feature_flagger icon indicating copy to clipboard operation
feature_flagger copied to clipboard

Rake to generate YAML file

Open lcezermf opened this issue 8 years ago • 3 comments

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 inside RAILS_APP/config path.
  • Something like a Rails Generator

:bulb: :thought_balloon:

lcezermf avatar Sep 20 '16 00:09 lcezermf

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

geisonbiazus avatar Sep 26 '16 10:09 geisonbiazus

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 ?

lcezermf avatar Sep 27 '16 00:09 lcezermf

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).

geisonbiazus avatar Sep 27 '16 10:09 geisonbiazus