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

why not use @rollout.features in wrapper.rb #24

Open
dfguo opened this issue Feb 24, 2014 · 3 comments
Open

why not use @rollout.features in wrapper.rb #24

dfguo opened this issue Feb 24, 2014 · 3 comments

Comments

@dfguo
Copy link

dfguo commented Feb 24, 2014

If you use redis namespace, redis.smembers(:features) will not work. I changed it to @rollout.features, but it breaks a bunch of tests.

I'm not entirely sure why we need to have #add_feature in wrapper.rb, so I'm really having trouble refactoring it. What's the reason behind using redis.smembers(:features) instead of @rollout.features? Thanks!

@jrallison
Copy link
Owner

Probably just legacy, as iirc, that wasn't available when I originally wrote this. Switching it over would be great.

@dfguo
Copy link
Author

dfguo commented Feb 24, 2014

I have some trouble understanding few parts of the code and can't proceed with the refactoring. Particularly with monkey_patch.rb

  def active?(feature, user=nil)
    RolloutUi::Wrapper.new(self).add_feature(feature)
    original_active?(feature, user)
  end

why do we add the feature in here?

@dfguo
Copy link
Author

dfguo commented Mar 12, 2014

#25 is a refactoring to use native rollout features method.

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

No branches or pull requests

2 participants