lib/rollout.rb in rolloutbr-2.0.5br vs lib/rollout.rb in rolloutbr-2.0.6br

- old
+ new

@@ -75,16 +75,15 @@ end end end - @storage_hash = {:temp => "richard"} - @cleared = Time.now + @storage_hash = {} + @cleared = Time.now class << self attr_accessor :storage_hash, :cleared - end def initialize(storage, opts = {}) @storage = storage @groups = {:all => lambda { |user| true }} @@ -156,21 +155,14 @@ def period @period ||= 60 end def get(feature, force=false) - puts "force: #{force}" - puts "!self.class.cleared: #{!self.class.cleared}" - puts "Time.now: #{Time.now}" - puts "self.class.cleared + period: #{self.class.cleared + period}" - puts "Comp: #{Time.now >= (self.class.cleared + period)}" if force || !self.class.cleared || Time.now >= (self.class.cleared + period) - puts "forced" - self.class.storage_hash = {:temp => "richard2"} + self.class.storage_hash = {} self.class.cleared = Time.now end if self.class.storage_hash[feature].nil? - puts "nil" self.class.storage_hash[feature] = @storage.get(key(feature)) rescue '0||' end string = self.class.storage_hash[feature] if string || !migrate? Feature.new(feature, string)