Skip to content
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 threshold argument to passes_threshold? to enable re-use in subclasses #102

Merged
merged 2 commits into from Dec 6, 2016

Conversation

osheroff
Copy link
Contributor

@osheroff osheroff commented Dec 5, 2016

@@ -55,7 +55,7 @@ def enabled_for?(feature_recipient)
return false if feature_recipient.nil?
return false if blacklisted?(feature_recipient)
return true if whitelisted?(feature_recipient)
passes_threshold?(feature_recipient)
passes_threshold?(feature_recipient, self.deployment_percentage || 0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for self.

@@ -81,8 +81,7 @@ def self.last_updated_at

protected

def passes_threshold?(feature_recipient)
threshold = self.deployment_percentage || 0
def passes_threshold?(feature_recipient, threshold)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a test that shows this usage ... or some docs why this is here would be nice

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not a public interface, so a test feels inappropriate. What are you concretely asking for?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... at least docs would be nice ... # used by external library, do not modify interface
also means we are using a protected method ... making it public might be more obvious ... but either way is fine

@vanchi-zendesk
Copy link

👍

@ggrossman
Copy link
Member

👍 thanks for humoring me

@grosser
Copy link
Collaborator

grosser commented Dec 6, 2016

👍

@osheroff osheroff merged commit c84e81d into master Dec 6, 2016
@osheroff
Copy link
Contributor Author

osheroff commented Dec 6, 2016

@grosser can you release v2.2.3? I merged and tagged and everything but don't have the perms to release

@grosser
Copy link
Collaborator

grosser commented Dec 6, 2016 via email

@bquorning bquorning deleted the ben/expose_formula branch January 13, 2021 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants