-
Notifications
You must be signed in to change notification settings - Fork 436
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
Allow setting raise_on_mismatches per Experiment instance #23
Allow setting raise_on_mismatches per Experiment instance #23
Conversation
43d583b
to
eb94336
Compare
@@ -269,4 +269,16 @@ def try(name = nil, &block) | |||
def use(&block) | |||
try "control", &block | |||
end | |||
|
|||
def raise_on_mismatches=(bool) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might go with attr_accessor
here instead, but continue to define the predicate method below.
@@ -5,6 +5,9 @@ | |||
# implements Scientist::Experiment's interface. | |||
module Scientist::Experiment | |||
|
|||
# Whether to raise when the control and candidate mismatch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you document the default behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did. Let me know if this is not what you wanted.
I'll rebase and squash if necessary, so let me know. |
@jesseplusplus @rick @zerowidth We let this one go stale. Final thoughts? |
I'm neither a rebaser nor a squasher. Seems 👍 to 🚢. |
Allow setting raise_on_mismatches per Experiment instance
@jesseplusplus @zerowidth @rick The API seems pretty stable, this is the first change we've merged in a while. How bout bumping to 1.0.0? |
@jbarnette Hmm, the master build failed CI after merging this. Looks like an issue installing the scientist gem while bundling before it even gets to the tests -- possibly related to a change in Travis' build environment for the older rubies since the last commit before merge passed with no troubles. |
@jesseplusplus Doh! I'll fix it up. |
This patch addresses #21. I also find this would be useful, so here's the patch.