-
-
Notifications
You must be signed in to change notification settings - Fork 418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Check Context #158
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I don't see a reason to keep this here and I'm not sure why I added it.
More specific.
https://travis-ci.org/jnunemaker/flipper/jobs/159306226 ``` $ bundle exec rake /home/travis/.rvm/rubies/ruby-2.0.0-p648-clang/bin/ruby -I/home/travis/.rvm/gems/ruby-2.0.0-p648-clang/gems/rspec-core-3.5.3/lib:/home/travis/.rvm/gems/ruby-2.0.0-p648-clang/gems/rspec-support-3.5.0/lib /home/travis/.rvm/gems/ruby-2.0.0-p648-clang/gems/rspec-core-3.5.3/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb --color /home/travis/build/jnunemaker/flipper/lib/flipper/feature.rb:4:in `require': /home/travis/build/jnunemaker/flipper/lib/flipper/gate_context.rb:6: syntax error, unexpected ',' (SyntaxError) def initialize(values:, feature_name:) ^ /home/travis/build/jnunemaker/flipper/lib/flipper/gate_context.rb:11: syntax error, unexpected keyword_end, expecting end-of-input ``` The easy way around it is to just use a hash with fetch which raises KeyError for missing key.
thing and context were always together so I might as well collapse them.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sometimes when checking if a group should be enabled or not you just want a little extra context about the current check. This allows the group check to know which feature is being checked and what the gate values are for that feature. It allows for more advanced/crazy things. Should be backwards compatible, so if you don't need the context, just don't use it. I included an example for those that are curious.