While using the guard-cucumber plugin I found it wasn't working with terminal-notifier-guard
What's the best way to figure out what's going wrong and start making lasting fixes?
Some important criteria are:
- I want to get up and running as fast as possible.
- Once I'm up and running I want to be able to iterate as fast as possible.
- I want to alter my project as little as possible.
- I want to be able to keep my changes in version control so I don't lose track of them.
- I want to be able to get feedback on my changes if I want.
- I want to test my changes in an isolated env.
- I don't want to change the
guard-cucumber
gem installed on my system.
This is my process:
- Fork the project and clone it.
- Create a new branch
- Change the name to
guard-cucumber-cats
in the gemspec. - In the cloned gem, Do some work.
Add a breakpoint near my work with
pry
:require 'pry' binding.pry
rake install
to installguard-cucumber-cats
on my machine.In my project, add
guard-cucumber-cats
as a dep and comment outguard-cucumber
in gemspec. For example:# spec.add_development_dependency "guard-cucumber", "~> 2.1.2" spec.add_development_dependency "guard-cucumber-cats"
- Run my project, hit debug, mess around with code.
- Repeat 4-8
Thinking about process in terms of criteria:
- Getting up and running wasn't too bad
- Iterating was pretty painful, having to reinstall the
guard-cucumber-cats
every time I wanted to test a change was awkward. - Changing one line in my project gemspec doesn't seem bad, however it would be better to be able to change nothing.
- All the benefits of
git
right for the beginning was a huge plus - Same goes for
github
- I don't have a workflow setup with either vagrant or docker, so my "isolated" test env is basically just me on my laptop. Maybe this is a good opportunity to set up a working containerized dev env? I'm not sure sure, but the way I have it now doesn't seem like it meets this criteria.
- Although it seems awkward to have to rename the gem and then install it on my system it is nice that I didn't need to change the actual
guard-cucumber
on my machine.
Ideally I'd like to be able to do something like:
cp -r
my project into some sandboxed env- Clone the forked
guard-cucumber
into the same sandboxed env - Have everything "just work"
- Do work on the cloned
guard-cucumber
- Repeat 4
I read in another answer to just start edit the system gem but didn't like that solution because I lose the benefits of git
and github
.
Is there a better process that's working for you? Or areas my process can be improved?
Also, as a side note: this is how you can nest code blocks in a list
Use
:path
in the project's gemfile.You are working on gem
my_gem
and projectmy_project
at the same time. To make this painless use this in the gemfile of your projectAnd then you can iterate without having to build the gem all time.
There's isn't even a need to rename the gem.