ruby_flipper 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,4 +1,5 @@
1
1
  pkg/*
2
2
  *.gem
3
3
  .bundle
4
- spec/reports
4
+ spec/reports
5
+ Gemfile.lock
@@ -0,0 +1,8 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.8.7
4
+ - 1.9.3
5
+ - jruby-18mode # JRuby in 1.8 mode
6
+ - jruby-19mode # JRuby in 1.9 mode
7
+ notifications:
8
+ email: false
data/Gemfile CHANGED
@@ -1,4 +1,6 @@
1
1
  source "http://rubygems.org"
2
2
 
3
+ gem "rake"
4
+
3
5
  # Specify your gem's dependencies in ruby_flipper.gemspec
4
6
  gemspec
@@ -1,126 +1,172 @@
1
- = Ruby Flipper
1
+ # Ruby Flipper
2
+ ![Travis-CI](https://secure.travis-ci.org/blaulabs/ruby_flipper.png)
2
3
 
3
4
  Ruby Flipper makes it easy to define features and switch them on and off. It's configuration DSL provides a very flexible but still not too verbose syntax to fulfil your flipping needs.
4
5
 
5
6
 
6
- == Usage
7
+ ## Usage
7
8
 
8
9
  To use ruby flipper, you have to load a feature definition file somewhere:
9
10
 
10
- RubyFlipper.load(File.expand_path '../features.rb', __FILE__)
11
+ ```ruby
12
+ RubyFlipper.load(File.expand_path '../features.rb', __FILE__)
13
+ ```
11
14
 
12
15
  This configuration can be reset by calling:
13
16
 
14
- RubyFlipper.reset
17
+ ```ruby
18
+ RubyFlipper.reset
19
+ ```
15
20
 
16
21
 
17
- == Feature Definitions
22
+ ## Feature Definitions
18
23
 
19
24
  The file loaded by ruby flipper is written in ruby flipper's simple DSL. The most basic feature definition is just a feature with a name. Without any further conditions, the feature is active by default.
20
25
 
21
- feature :always_on_feature
26
+ ```ruby
27
+ feature :always_on_feature
28
+ ```
22
29
 
23
30
  You can specify conditions that are used to determine whether a feature is active or not in three different ways:
24
31
 
25
- feature :conditional_feature_with_parameter, false
26
- feature :conditional_feature_with_condition_opt, :condition => false
27
- feature :conditional_feature_with_conditions_opt, :conditions => false
32
+ ```ruby
33
+ feature :conditional_feature_with_parameter, false
34
+ feature :conditional_feature_with_condition_opt, :condition #> false
35
+ feature :conditional_feature_with_conditions_opt, :conditions #> false
36
+ ```
28
37
 
29
38
  In the examples above, the features are statically disabled. You can use three different types of conditions.
30
39
 
31
- === Static Conditions
40
+ ### Static Conditions
32
41
 
33
42
  A static condition is a boolean that is evaluated when the feature definitions are loaded. This can be used to statically activate/deactivate features or make features dependent on variables that don't change during runtime.
34
43
 
35
- feature :development_feature, Rails.env.development?
44
+ ```ruby
45
+ feature :development_feature, Rails.env.development?
46
+ ```ruby
36
47
 
37
48
  This defines a feature that is only active in Rails' development mode.
38
49
 
39
- === Reference Conditions
50
+ ### Reference Conditions
40
51
 
41
52
  A reference condition is a symbol that references another feature. This can be used to make a feature dependent on another feature or extract complex condition definitions and reuse them for several features.
42
53
 
43
- feature :dependent_feature, :development_feature
54
+ ```ruby
55
+ feature :dependent_feature, :development_feature
56
+ ```
44
57
 
45
58
  This defines a feature that is only active when the feature :development_feature is active.
46
59
 
47
- === Dynamic Conditions
60
+ ### Dynamic Conditions
48
61
 
49
62
  A dynamic condition is a proc (or anything that responds to :call) that will be evaluated each time the state of a feature is checked. This can be used to activate/deactivate features dynamically depending on variables that change during runtime.
50
63
 
51
- feature :admin_feature, condition => lambda { User.current.is_admin? }
64
+ ```ruby
65
+ feature :admin_feature, condition #> lambda { User.current.is_admin? }
66
+ ```
52
67
 
53
68
  This defines a feature that is only active when the current user is an admin (the user specific stuff must be implemented somewhere else).
54
69
 
55
70
  Dynamic conditions can also be given to the feature method as a block:
56
71
 
57
- feature :admin_feature do
58
- User.current.is_admin?
59
- end
72
+ ```ruby
73
+ feature :admin_feature do
74
+ User.current.is_admin?
75
+ end
76
+ ```
60
77
 
61
78
  Within such a proc, you can also check whether another feature is active or not to phrase complex condition dependencies:
62
79
 
63
- feature :shy_feature do
64
- active?(:development_feature) && (active?(:admin_feature) || Time.now.hour < 8)
65
- end
80
+ ```ruby
81
+ feature :shy_feature do
82
+ active?(:development_feature) && (active?(:admin_feature) || Time.now.hour < 8)
83
+ end
84
+ ```
66
85
 
67
86
  This defines a feature that is only active when the feature :development_feature is active and either the feature :admin_feature is active or it is between midnight and 8:00 in the morning (however that might be useful).
68
87
 
69
- === Combined Conditions
88
+ ### Combined Conditions
70
89
 
71
90
  A combined condition is an array of other conditions. Any type of condition can be combined in an array. All conditions have to be met for a feature to be active.
72
91
 
73
- feature :combined_feature, [:development_feature, lambda { User.current.name == 'patti' }]
92
+ ```ruby
93
+ feature :combined_feature, [:development_feature, lambda { User.current.name ## 'patti' }]
94
+ ```
74
95
 
75
96
  This defines a feature that is only enabled when the feature :development_feature is enbled and the current user is 'patti'.
76
97
 
77
- === More
98
+ ### More
78
99
 
79
100
  For more examples, see spec/fixtures/features.rb and spec/ruby_flipper_spec.rb (section 'integration specs using spec/fixtures/features.rb' which is an end-to-end integration test).
80
101
 
81
102
 
82
- == Condition Definitions
103
+ ## Condition Definitions
83
104
 
84
105
  If you have a lot of dependent features with shared conditions you can clean up your definition file by explicitly defining conditions that aren't used as features but just as conditions real features depend on.
85
106
 
86
- condition :development, Rails.env.development?
87
- condition :admin { User.current.is_admin? }
88
-
89
- feature :user_administration, :development, :admin
90
- feature :new_feature, :development
107
+ ```ruby
108
+ condition :development, Rails.env.development?
109
+ condition :admin do
110
+ User.current.is_admin?
111
+ end
112
+ feature :user_administration, :development, :admin
113
+ feature :new_feature, :development
114
+ ```
91
115
 
92
116
  Of course, you can nest this as deep as you like (features depending on conditions depending on conditions depending on features depending on conditions...), although this might lead to completely incomprehensible rulesets.
93
117
 
94
118
  The condition method is just an alias to the feature method, so internally, it makes absolutely no difference which method you use. Using both methods just helps you structuring your feature definitions and makes the feature definition file easier to understand.
95
119
 
96
120
 
97
- == Usage
121
+ ## Usage
98
122
 
99
123
  Finally, there are two ways to check whether a feature is active or not within your code. You can just give it a block that will only be evaluated when the feature is active:
100
124
 
101
- feature_active?(:hidden_feature) do
102
- # do something for that feature
103
- end
125
+ ```ruby
126
+ feature_active?(:hidden_feature) do
127
+ # do something for that feature
128
+ end
129
+ ```
104
130
 
105
131
  or if you need the state of a feature as a boolean value or want to do something when a feature is not active:
106
132
 
107
- if feature_active?(:hidden_feature)
108
- # do something for that feature
109
- else
110
- # do something else
111
- end
133
+ ```ruby
134
+ if feature_active?(:hidden_feature)
135
+ # do something for that feature
136
+ else
137
+ # do something else
138
+ end
139
+ ```
140
+
141
+ Its also possible to pass arbitary arguments to `feature_active?` like so:
142
+
143
+ ```ruby
144
+ if feature_active?(:hidden_feature, "secret_sauce")
145
+ ...
146
+ end
147
+ ```
148
+
149
+ Those parameters will be passed to the block defining the condition.
112
150
 
113
151
  This method is defined on Object, so it is available anywhere you might ever need it.
114
152
 
115
153
 
116
- == Describing Features
154
+ ## Describing Features
117
155
 
118
156
  Last and least, you can describe your features, for example when you use ticket numbers or anything other cryptic for your feature names. The description isn't used anywhere yet, but it might make your code more readable.
119
157
 
120
- feature :feature_452, :development, :description => 'Feature 452: An end user can change his data on his profile page.'
158
+ ```ruby
159
+ feature :feature_452, :development, :description #> 'Feature 452: An end user can change his data on his profile page.'
160
+ ```
121
161
 
122
162
  You could also just use comments for that, but giving this to ruby flipper in code enables you to evaluate your features and print lists containing the description.
123
163
 
124
- RubyFlipper::Feature.all.each do |feature|
125
- puts "#{feature.name}: #{feature.description}"
126
- end
164
+ ```ruby
165
+ RubyFlipper::Feature.all.each do |feature|
166
+ puts "#{feature.name}: #{feature.description}"
167
+ end
168
+ ```
169
+
170
+ ## Contributors:
171
+
172
+ - Thanks to [Ryan Ahearn](https://github.com/rahearn) for implementing dynamic parameters to `feature_active?`
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'ruby_flipper/object_mixin'
2
3
 
3
4
  module RubyFlipper
@@ -27,6 +28,14 @@ module RubyFlipper
27
28
  Feature.reset
28
29
  end
29
30
 
31
+ def self.silence_warnings
32
+ warn_level = $VERBOSE
33
+ $VERBOSE = nil
34
+ yield
35
+ ensure
36
+ $VERBOSE = warn_level
37
+ end
38
+
30
39
  end
31
40
 
32
41
  require 'ruby_flipper/railtie' if defined?(Rails)
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module RubyFlipper
2
3
 
3
4
  class Feature
@@ -18,11 +19,13 @@ module RubyFlipper
18
19
  all[name] || raise(NotDefinedError, "'#{name}' is not defined")
19
20
  end
20
21
 
21
- def self.condition_met?(condition)
22
+ def self.condition_met?(condition, *args)
22
23
  if condition.is_a?(Symbol)
23
24
  find(condition).active?
24
25
  elsif condition.is_a?(Proc)
25
- !!ConditionContext.new.instance_eval(&condition)
26
+ RubyFlipper.silence_warnings do
27
+ !!ConditionContext.new.instance_exec(*args, &condition)
28
+ end
26
29
  elsif condition.respond_to?(:call)
27
30
  !!condition.call
28
31
  else
@@ -42,8 +45,8 @@ module RubyFlipper
42
45
  @name, @conditions = name, [conditions, block].flatten.compact
43
46
  end
44
47
 
45
- def active?
46
- conditions.map {|condition| self.class.condition_met?(condition)}.all?
48
+ def active?(*args)
49
+ conditions.map {|condition| self.class.condition_met?(condition, *args)}.all?
47
50
  end
48
51
 
49
52
  end
@@ -2,8 +2,8 @@ module RubyFlipper
2
2
 
3
3
  module ObjectMixin
4
4
 
5
- def feature_active?(name)
6
- active = Feature.find(name).active?
5
+ def feature_active?(name, *args)
6
+ active = Feature.find(name).active?(*args)
7
7
  yield if active && block_given?
8
8
  active
9
9
  end
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "ruby_flipper"
6
- s.version = "0.0.3"
6
+ s.version = "0.0.5"
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Thomas Jachmann"]
9
9
  s.email = ["self@thomasjachmann.com"]
@@ -13,9 +13,9 @@ Gem::Specification.new do |s|
13
13
 
14
14
  s.rubyforge_project = "ruby_flipper"
15
15
 
16
- s.add_development_dependency "ci_reporter", "~> 1.6.3"
17
- s.add_development_dependency "rspec", "~> 2.0.1"
18
- s.add_development_dependency "mocha", "~> 0.9.10"
16
+ s.add_development_dependency "ci_reporter", "~> 1.6.5"
17
+ s.add_development_dependency "rspec", "~> 2.6.0"
18
+ s.add_development_dependency "mocha", "~> 0.9.12"
19
19
 
20
20
  s.files = `git ls-files`.split("\n")
21
21
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -22,17 +22,22 @@ feature :disabled, :description => 'disabled feature', :condition => false
22
22
  feature :floyd, :description => 'just for floyd', :condition => :dynamic_is_floyd
23
23
 
24
24
  # feature depending on a dynamic condition (lambda)
25
- feature :philip, :description => 'just for philip', :condition => lambda { FLIPPER_ENV[:dynamic] == 'philip' }
25
+ feature :philip, :description => 'just for philip', :condition => proc { FLIPPER_ENV[:dynamic] == 'philip' }
26
26
 
27
27
  # feature depending on array of a static condition, a predefined condition and a dynamic condition (lambda)
28
28
  # given in :conditions (can be both :condition/:conditions)
29
29
  feature :patti, :description => 'just for patti', :conditions => [
30
30
  FLIPPER_ENV[:changing] == 'patti',
31
31
  :dynamic_is_floyd,
32
- lambda { FLIPPER_ENV[:changing] == 'gavin'}
32
+ proc { FLIPPER_ENV[:changing] == 'gavin'}
33
33
  ]
34
34
 
35
35
  # feature with a complex combination of dynamic and predifined conditions given as a block
36
36
  feature :sue, :description => 'just for sue' do
37
37
  (active?(:static_is_cherry) || active?(:dynamic_is_floyd)) && FLIPPER_ENV[:changing] == 'sue'
38
38
  end
39
+
40
+ # feature with a block relying on a runtime argument
41
+ feature :argument do |arg|
42
+ !arg.nil?
43
+ end
@@ -36,7 +36,7 @@ describe RubyFlipper::Feature do
36
36
  end
37
37
 
38
38
  it 'should call add with a name, conditions and a block and store the feature' do
39
- block = lambda {}
39
+ block = proc {}
40
40
  # cannot mock this since mocha doesn't allow to test for a proc [thomas, 2010-12-13]
41
41
  feature = RubyFlipper::Feature.add(:feature_name, :one, :two, &block)
42
42
  feature.conditions.should == [:one, :two, block]
@@ -81,7 +81,7 @@ describe RubyFlipper::Feature do
81
81
  }.each do |condition, expected|
82
82
 
83
83
  it "should call a given proc and return #{expected} when it returns #{condition}" do
84
- RubyFlipper::Feature.condition_met?(lambda { condition }).should == expected
84
+ RubyFlipper::Feature.condition_met?(proc { condition }).should == expected
85
85
  end
86
86
 
87
87
  it "should call anything callable and return #{expected} when it returns #{condition}" do
@@ -99,8 +99,8 @@ describe RubyFlipper::Feature do
99
99
  it 'should return the met? of the combined referenced conditions' do
100
100
  RubyFlipper::Feature.add(:true, true)
101
101
  RubyFlipper::Feature.add(:false, false)
102
- RubyFlipper::Feature.condition_met?(lambda { active?(:true) || active?(:false) }).should == true
103
- RubyFlipper::Feature.condition_met?(lambda { active?(:true) && active?(:false) }).should == false
102
+ RubyFlipper::Feature.condition_met?(proc { active?(:true) || active?(:false) }).should == true
103
+ RubyFlipper::Feature.condition_met?(proc { active?(:true) && active?(:false) }).should == false
104
104
  end
105
105
 
106
106
  end
@@ -126,17 +126,17 @@ describe RubyFlipper::Feature do
126
126
  end
127
127
 
128
128
  it 'should work with a dynamic condition as parameter' do
129
- condition = lambda { true }
129
+ condition = proc { true }
130
130
  RubyFlipper::Feature.new(:feature_name, condition).conditions.should == [condition]
131
131
  end
132
132
 
133
133
  it 'should work with a dynamic condition as block' do
134
- condition = lambda { true }
134
+ condition = proc { true }
135
135
  RubyFlipper::Feature.new(:feature_name, &condition).conditions.should == [condition]
136
136
  end
137
137
 
138
138
  it 'should work with a combination of static and dynamic conditions' do
139
- condition = lambda { true }
139
+ condition = proc { true }
140
140
  RubyFlipper::Feature.new(:feature_name, false, :live, condition).conditions.should == [false, :live, condition]
141
141
  end
142
142
 
@@ -149,7 +149,7 @@ describe RubyFlipper::Feature do
149
149
  end
150
150
 
151
151
  it 'should work with a combination of arrays, dynamic conditions and conditions given in the opts hash and eliminate nil' do
152
- condition = lambda { true }
152
+ condition = proc { true }
153
153
  RubyFlipper::Feature.new(:feature_name, [false, nil], :condition => [nil, 'c'], :conditions => ['c1', 'c2'], &condition).conditions.should == [false, 'c', 'c1', 'c2', condition]
154
154
  end
155
155
 
@@ -162,7 +162,7 @@ describe RubyFlipper::Feature do
162
162
  end
163
163
 
164
164
  it 'should return false when not all conditions are met (with dynamic)' do
165
- RubyFlipper::Feature.new(:feature_name, true, lambda { false }).active?.should == false
165
+ RubyFlipper::Feature.new(:feature_name, true, proc { false }).active?.should == false
166
166
  end
167
167
 
168
168
  it 'should return false when not all conditions are met (only static)' do
@@ -173,6 +173,17 @@ describe RubyFlipper::Feature do
173
173
  RubyFlipper::Feature.new(:feature_name, true, true).active?.should == true
174
174
  end
175
175
 
176
+ context 'with a dynamic argument' do
177
+ subject { RubyFlipper::Feature.new(:feature_name, proc { |arg| arg == 'active' }) }
178
+
179
+ it 'should return false when not all conditions are met' do
180
+ subject.active?('inactive').should == false
181
+ end
182
+
183
+ it 'should return true when all conditions are met' do
184
+ subject.active?('active').should == true
185
+ end
186
+ end
176
187
  end
177
188
 
178
189
  end
@@ -55,6 +55,39 @@ describe RubyFlipper::ObjectMixin do
55
55
 
56
56
  end
57
57
 
58
+ context 'with a dynamic feature' do
59
+
60
+ before(:each) do
61
+ RubyFlipper::Feature.add(:dynamic, proc { |arg| arg == 'active' })
62
+ end
63
+
64
+ context 'that is inactive' do
65
+ it 'should return false when called without a block' do
66
+ subject.feature_active?(:dynamic, 'inactive').should == false
67
+ end
68
+
69
+ it 'should not execute the block and return false when called with a block' do
70
+ subject.feature_active?(:dynamic, 'inactive') do
71
+ fail 'the given block should not be called'
72
+ end.should == false
73
+ end
74
+ end
75
+
76
+ context 'that is active' do
77
+ it 'should return true when called without a block' do
78
+ subject.feature_active?(:dynamic, 'active').should == true
79
+ end
80
+
81
+ it 'should execute the block and return true when called with a block' do
82
+ var = 'before'
83
+ subject.feature_active?(:dynamic, 'active') do
84
+ var = 'after'
85
+ end.should == true
86
+ var.should == 'after'
87
+ end
88
+ end
89
+ end
90
+
58
91
  context 'with a missing feature' do
59
92
 
60
93
  it 'should raise an error when called without a block and the referenced feature is not defined' do
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'spec_helper'
2
3
 
3
4
  describe RubyFlipper do
@@ -282,6 +283,30 @@ describe RubyFlipper do
282
283
 
283
284
  end
284
285
 
286
+ context ':argument' do
287
+ it 'should be active when called with arg' do
288
+ load_features
289
+ RubyFlipper::Feature.find(:argument).active?(true).should be_true
290
+ end
291
+
292
+ it 'should not be active when called without an argument' do
293
+ load_features
294
+ RubyFlipper::Feature.find(:argument).should_not be_active
295
+ end
296
+ end
297
+
298
+ end
299
+
300
+ context "ruby 1.8" do
301
+ #warning: multiple values for a block parameter (0 for 1)
302
+ it 'should not show warnings' do
303
+ $VERBOSE=true
304
+ @verbose = true
305
+ RubyFlipper.silence_warnings do
306
+ @verbose = $VERBOSE
307
+ end
308
+ @verbose.should be_nil
309
+ end
285
310
  end
286
311
 
287
312
  end
@@ -3,7 +3,7 @@ Bundler.require(:default, :development)
3
3
 
4
4
  FLIPPER_ENV = {}
5
5
 
6
- Rspec.configure do |config|
6
+ RSpec.configure do |config|
7
7
  config.mock_with :mocha
8
8
  config.after(:each) do
9
9
  RubyFlipper.reset
metadata CHANGED
@@ -1,86 +1,61 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ruby_flipper
3
- version: !ruby/object:Gem::Version
4
- hash: 25
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 0
9
- - 3
10
- version: 0.0.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.5
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Thomas Jachmann
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2010-12-13 00:00:00 +01:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2012-06-14 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: ci_reporter
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &2181489240 !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
18
+ requirements:
27
19
  - - ~>
28
- - !ruby/object:Gem::Version
29
- hash: 9
30
- segments:
31
- - 1
32
- - 6
33
- - 3
34
- version: 1.6.3
20
+ - !ruby/object:Gem::Version
21
+ version: 1.6.5
35
22
  type: :development
36
- version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: rspec
39
23
  prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *2181489240
25
+ - !ruby/object:Gem::Dependency
26
+ name: rspec
27
+ requirement: &2181488760 !ruby/object:Gem::Requirement
41
28
  none: false
42
- requirements:
29
+ requirements:
43
30
  - - ~>
44
- - !ruby/object:Gem::Version
45
- hash: 13
46
- segments:
47
- - 2
48
- - 0
49
- - 1
50
- version: 2.0.1
31
+ - !ruby/object:Gem::Version
32
+ version: 2.6.0
51
33
  type: :development
52
- version_requirements: *id002
53
- - !ruby/object:Gem::Dependency
54
- name: mocha
55
34
  prerelease: false
56
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *2181488760
36
+ - !ruby/object:Gem::Dependency
37
+ name: mocha
38
+ requirement: &2181488300 !ruby/object:Gem::Requirement
57
39
  none: false
58
- requirements:
40
+ requirements:
59
41
  - - ~>
60
- - !ruby/object:Gem::Version
61
- hash: 47
62
- segments:
63
- - 0
64
- - 9
65
- - 10
66
- version: 0.9.10
42
+ - !ruby/object:Gem::Version
43
+ version: 0.9.12
67
44
  type: :development
68
- version_requirements: *id003
45
+ prerelease: false
46
+ version_requirements: *2181488300
69
47
  description: Most flexible still least verbose feature flipper for ruby projects.
70
- email:
48
+ email:
71
49
  - self@thomasjachmann.com
72
50
  executables: []
73
-
74
51
  extensions: []
75
-
76
52
  extra_rdoc_files: []
77
-
78
- files:
53
+ files:
79
54
  - .gitignore
80
55
  - .rspec
56
+ - .travis.yml
81
57
  - Gemfile
82
- - Gemfile.lock
83
- - README.rdoc
58
+ - README.md
84
59
  - Rakefile
85
60
  - autotest/discover.rb
86
61
  - lib/ruby_flipper.rb
@@ -97,41 +72,31 @@ files:
97
72
  - spec/ruby_flipper/object_mixin_spec.rb
98
73
  - spec/ruby_flipper_spec.rb
99
74
  - spec/spec_helper.rb
100
- has_rdoc: true
101
75
  homepage: https://github.com/blaulabs/ruby_flipper
102
76
  licenses: []
103
-
104
77
  post_install_message:
105
78
  rdoc_options: []
106
-
107
- require_paths:
79
+ require_paths:
108
80
  - lib
109
- required_ruby_version: !ruby/object:Gem::Requirement
81
+ required_ruby_version: !ruby/object:Gem::Requirement
110
82
  none: false
111
- requirements:
112
- - - ">="
113
- - !ruby/object:Gem::Version
114
- hash: 3
115
- segments:
116
- - 0
117
- version: "0"
118
- required_rubygems_version: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - ! '>='
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ required_rubygems_version: !ruby/object:Gem::Requirement
119
88
  none: false
120
- requirements:
121
- - - ">="
122
- - !ruby/object:Gem::Version
123
- hash: 3
124
- segments:
125
- - 0
126
- version: "0"
89
+ requirements:
90
+ - - ! '>='
91
+ - !ruby/object:Gem::Version
92
+ version: '0'
127
93
  requirements: []
128
-
129
94
  rubyforge_project: ruby_flipper
130
- rubygems_version: 1.3.7
95
+ rubygems_version: 1.8.11
131
96
  signing_key:
132
97
  specification_version: 3
133
98
  summary: Make switching features on and off easy.
134
- test_files:
99
+ test_files:
135
100
  - spec/fixtures/features.rb
136
101
  - spec/ruby_flipper/condition_context_spec.rb
137
102
  - spec/ruby_flipper/dsl_spec.rb
@@ -139,3 +104,4 @@ test_files:
139
104
  - spec/ruby_flipper/object_mixin_spec.rb
140
105
  - spec/ruby_flipper_spec.rb
141
106
  - spec/spec_helper.rb
107
+ has_rdoc:
@@ -1,34 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- ruby_flipper (0.0.3)
5
-
6
- GEM
7
- remote: http://rubygems.org/
8
- specs:
9
- builder (3.0.0)
10
- ci_reporter (1.6.3)
11
- builder (>= 2.1.2)
12
- diff-lcs (1.1.2)
13
- mocha (0.9.10)
14
- rake
15
- rake (0.8.7)
16
- rspec (2.0.1)
17
- rspec-core (~> 2.0.1)
18
- rspec-expectations (~> 2.0.1)
19
- rspec-mocks (~> 2.0.1)
20
- rspec-core (2.0.1)
21
- rspec-expectations (2.0.1)
22
- diff-lcs (>= 1.1.2)
23
- rspec-mocks (2.0.1)
24
- rspec-core (~> 2.0.1)
25
- rspec-expectations (~> 2.0.1)
26
-
27
- PLATFORMS
28
- ruby
29
-
30
- DEPENDENCIES
31
- ci_reporter (~> 1.6.3)
32
- mocha (~> 0.9.10)
33
- rspec (~> 2.0.1)
34
- ruby_flipper!