Closed scraton closed 9 years ago
I don't think removing the need for a Project tag is a good idea - it's breaking behaviour that has existed since the original capify-ec2
, and new users already find the instance matching behaviour hard to understand initially.
I'll reword the documentation as you suggest, since that's much clearer than my ramblings.
Hello!
I was interested in using this gem to simplify our Capistrano logic. But the documentation was a little unclear about its requirements. Hopefully you can word things a bit differently to help out others in the future, or alternatively make the code match the documentation to make this lib more configurable.
The line I'm talking about is this one:
This would seem to indicate it can be undefined and simply not look for the project tag. But in fact it will always look for a project tag, even if this is
nil
:Perhaps this could be improved with something like this:
This way a dependency for having a Project tag is dropped, in cases where you have an AWS account dedicated to a particular project. The second check to
instance_has_tag?(i, project_tag, stag)
is also removed since it appears to be a duplicate.Or just reword the documentation:
Let me know what you think. :)