Skip to content

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

Open

Description

@dfguo

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!

Activity

  1. jrallison commented on Feb 24, 2014

    @jrallison
    Owner

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

  2. dfguo commented on Feb 24, 2014

    @dfguo
    Author

    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?

  3. dfguo commented on Mar 12, 2014

    @dfguo
    Author

    #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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions