feature_flagger
feature_flagger copied to clipboard
Rake to generate YAML file
Provide a rake to generate initial YAML file for the projects.
This issue was extracted from a comment on code.
@geisonbiazus @nandosousafr for this issue, it's better to use:
- Simple rake task that creates the
rollout.yml
insideRAILS_APP/config
path. - Something like a Rails Generator
:bulb: :thought_balloon:
Nice @lccezinha, it would be great!
But we have to take care. Rails mustn't become a dependency of the project. If we want to use feature_flagger in a non rails app, it should be no problem. But the gem still can verify for rails existence and have a generator.
Something like:
rails generate feature_flagger:setup
Another option that I found, that does not depend on Rails Generators, is using Thor - (Rails Generators use Thor in a low-level).
What do you guys thing about it ?
Nice @lccezinha but I don't think it's worth it since it will only generate an empty rollout.yml file for now and it will also add a new depency that we actually don't need. I'd go for rails generator checking if Rails is defined (we don't add rails as a dependency).