flipper-ui 0.2.0.beta1 → 0.2.0.beta2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e9d451a699e2b1acd1697ffea82cace549570b2
4
- data.tar.gz: 012aa58d86f51d10b433a48ad0a7503d601b948d
3
+ metadata.gz: 0066f600077329991959e5bba71ad6a820c1bef8
4
+ data.tar.gz: 372ff7bd0108faa1eeff9edcdb0f64f8b685c4f1
5
5
  SHA512:
6
- metadata.gz: a2911695881ddf0c229fbf06bd1249e0f6439d0703c8783c702bbf7bf4715070ed48b61b902ef9fc4c6d97f0d17ebea4ec7172048f1ca586c0a7ddeb89623d47
7
- data.tar.gz: 5d110e6a66dac9408c36ae2a3222598893a57254e88e11cddce3977dadb70f10f74139464ef76340623973354ccc0172ba9e9a4a3003abbe9ed69ffe0b27ca01
6
+ metadata.gz: 7c8a4c2ab207262a94f3d9c88b9ff0f3bc1852085bbccb586f244e59c5c6558bf7c8b19a0642cca79e3f81ea8bcc974cee83d637339b124ae0e2e8b14b3c3235
7
+ data.tar.gz: 276d8e236e9ee6ab4b984c7e68f4abc16f4235c203631860ade07f694cf15e3749acca051d0e69ab1c1bb2b6a6511190728285319e8235d580ac7b22fdb18103
data/examples/basic.ru CHANGED
@@ -38,7 +38,7 @@ flipper[:suits].enable Actor.new('1')
38
38
  flipper[:suits].enable Actor.new('6')
39
39
  flipper[:secrets].enable flipper.group(:admins)
40
40
  flipper[:secrets].enable flipper.group(:early_access)
41
- flipper[:logging].enable flipper.random(5)
41
+ flipper[:logging].enable flipper.time(5)
42
42
  flipper[:new_cache].enable flipper.actors(15)
43
43
 
44
44
  run Flipper::UI.app(flipper)
@@ -83,9 +83,9 @@ module Flipper
83
83
  invalid_percentage value, exception
84
84
  end
85
85
 
86
- def update_percentage_of_random(feature)
86
+ def update_percentage_of_time(feature)
87
87
  value = params['value']
88
- feature.enable_percentage_of_random value
88
+ feature.enable_percentage_of_time value
89
89
  rescue ArgumentError => exception
90
90
  invalid_percentage value, exception
91
91
  end
@@ -288,9 +288,9 @@ class App.Gate.PercentageOfActors extends App.Gate.Percentage
288
288
  @name = 'percentage_of_actors'
289
289
  super
290
290
 
291
- class App.Gate.PercentageOfRandom extends App.Gate.Percentage
291
+ class App.Gate.PercentageOfTime extends App.Gate.Percentage
292
292
  constructor: ->
293
- @name = 'percentage_of_random'
293
+ @name = 'percentage_of_time'
294
294
  super
295
295
 
296
296
  class App.GateList extends Spine.Stack
@@ -299,7 +299,7 @@ class App.GateList extends Spine.Stack
299
299
  group: App.Gate.Group
300
300
  actor: App.Gate.Actor
301
301
  percentage_of_actors: App.Gate.PercentageOfActors
302
- percentage_of_random: App.Gate.PercentageOfRandom
302
+ percentage_of_time: App.Gate.PercentageOfTime
303
303
 
304
304
  jQuery ->
305
305
  new App(el: $('#app'))
@@ -502,16 +502,16 @@
502
502
 
503
503
  })(App.Gate.Percentage);
504
504
 
505
- App.Gate.PercentageOfRandom = (function(_super) {
505
+ App.Gate.PercentageOfTime = (function(_super) {
506
506
 
507
- __extends(PercentageOfRandom, _super);
507
+ __extends(PercentageOfTime, _super);
508
508
 
509
- function PercentageOfRandom() {
510
- this.name = 'percentage_of_random';
511
- PercentageOfRandom.__super__.constructor.apply(this, arguments);
509
+ function PercentageOfTime() {
510
+ this.name = 'percentage_of_time';
511
+ PercentageOfTime.__super__.constructor.apply(this, arguments);
512
512
  }
513
513
 
514
- return PercentageOfRandom;
514
+ return PercentageOfTime;
515
515
 
516
516
  })(App.Gate.Percentage);
517
517
 
@@ -528,7 +528,7 @@
528
528
  group: App.Gate.Group,
529
529
  actor: App.Gate.Actor,
530
530
  percentage_of_actors: App.Gate.PercentageOfActors,
531
- percentage_of_random: App.Gate.PercentageOfRandom
531
+ percentage_of_time: App.Gate.PercentageOfTime
532
532
  };
533
533
 
534
534
  return GateList;
@@ -1,5 +1,5 @@
1
1
  module Flipper
2
2
  module UI
3
- VERSION = "0.2.0.beta1"
3
+ VERSION = "0.2.0.beta2"
4
4
  end
5
5
  end
@@ -67,8 +67,8 @@
67
67
  <li><a href="#" data-tab="actor">Actors</a></li>
68
68
  <li><a href="#" data-tab="percentage_of_actors">
69
69
  Percentage Of Actors</a></li>
70
- <li><a href="#" data-tab="percentage_of_random">
71
- Percentage Of Random</a></li>
70
+ <li><a href="#" data-tab="percentage_of_time">
71
+ Percentage Of Time</a></li>
72
72
  </ul>
73
73
  </div>
74
74
 
@@ -149,8 +149,8 @@
149
149
  </form>
150
150
  </script>
151
151
 
152
- <script id="gate-percentage-of-random-template" type="text/x-handlebars-template">
153
- <form action="/features/{{feature_id}}/percentage_of_random" method="POST">
152
+ <script id="gate-percentage-of-time-template" type="text/x-handlebars-template">
153
+ <form action="/features/{{feature_id}}/percentage_of_time" method="POST">
154
154
  <div class="slider-range"></div>
155
155
  <input type="text" name="value" value="{{value}}" /> %
156
156
  <button>Save Settings</button>
@@ -207,14 +207,14 @@ describe Flipper::UI do
207
207
  end
208
208
  end
209
209
 
210
- describe "POST /features/:id/percentage_of_random" do
210
+ describe "POST /features/:id/percentage_of_time" do
211
211
  context "valid value" do
212
212
  before do
213
213
  feature = flipper[:some_thing]
214
214
  params = {
215
215
  'value' => '5',
216
216
  }
217
- post "/features/#{feature.name}/percentage_of_random", params
217
+ post "/features/#{feature.name}/percentage_of_time", params
218
218
  end
219
219
 
220
220
  it "responds with 200" do
@@ -224,13 +224,13 @@ describe Flipper::UI do
224
224
  it "responds with json" do
225
225
  result = json_response
226
226
  result.should be_instance_of(Hash)
227
- result['name'].should eq('percentage_of_random')
228
- result['key'].should eq('percentage_of_random')
227
+ result['name'].should eq('percentage_of_time')
228
+ result['key'].should eq('percentage_of_time')
229
229
  result['value'].should eq(5)
230
230
  end
231
231
 
232
232
  it "updates gate state" do
233
- gate_value(:some_thing, :percentage_of_random).to_i.should be(5)
233
+ gate_value(:some_thing, :percentage_of_time).to_i.should be(5)
234
234
  end
235
235
  end
236
236
 
@@ -240,7 +240,7 @@ describe Flipper::UI do
240
240
  params = {
241
241
  'value' => '555',
242
242
  }
243
- post "/features/#{feature.name}/percentage_of_random", params
243
+ post "/features/#{feature.name}/percentage_of_time", params
244
244
  end
245
245
 
246
246
  it "responds with 422" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flipper-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.beta1
4
+ version: 0.2.0.beta2
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Nunemaker