rollout 2.4.2 → 2.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ae73aef78e5898a7936f6853788580ace070953f
4
- data.tar.gz: 216f839eb30e2dbd26b33c5a5f224c285e73dc66
3
+ metadata.gz: c11b1c464e66f315ad7ee924ea7408a5c4bf2a6f
4
+ data.tar.gz: 16da6d26818429e62e4783533df17d9022380a46
5
5
  SHA512:
6
- metadata.gz: 6da7d61689d2048e82ef624ac93bc38abf9b141fc53e1787bafcd937d84eccf663ad54141040eeabaaeab5580700600fbc5b8b1bc5a319447ce53fbb1c7a12b9
7
- data.tar.gz: 8c2d609455ea50da07b7229736db71e83856c4701d1b8c296472f4e6fb3583e748257a04840599a9a833114bcc9e9443f85172a0bbfdb15212beb8079aa8e629
6
+ metadata.gz: 4b7b1416e6ba291b67dbce4b5d67db30bbe494fbb31791f6435efe3280607abf17d64cf96210bbe113c6c9948ca8d50c25c0547b9870d0f652033b69cf412b00
7
+ data.tar.gz: 19e0b2bd04907cfe2f1b400ccb047b8320b35dddf85f1b76d607b5491340f0b3a63a20fdb2f30af138579a8e016accc4aa88549d32c4136c8a003fe2997ea318
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rollout (2.4.2)
4
+ rollout (2.4.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -203,6 +203,13 @@ class Rollout
203
203
  end
204
204
  end
205
205
 
206
+ def set_users(feature, users)
207
+ with_feature(feature) do |f|
208
+ f.users = []
209
+ users.each{|user| f.add_user(user)}
210
+ end
211
+ end
212
+
206
213
  def define_group(group, &block)
207
214
  @groups[group.to_sym] = block
208
215
  end
@@ -1,3 +1,3 @@
1
1
  class Rollout
2
- VERSION = "2.4.2"
2
+ VERSION = "2.4.3"
3
3
  end
@@ -226,6 +226,16 @@ RSpec.describe "Rollout" do
226
226
  end
227
227
  end
228
228
 
229
+
230
+ describe 'set a group of users' do
231
+ it 'should replace the users with the given array' do
232
+ users = %w(1 2 3 4)
233
+ @rollout.activate_users(:chat, %w(10 20 30))
234
+ @rollout.set_users(:chat, users)
235
+ expect(@rollout.get(:chat).users).to eq(users)
236
+ end
237
+ end
238
+
229
239
  describe "activating a feature globally" do
230
240
  before do
231
241
  @rollout.activate(:chat)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rollout
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.2
4
+ version: 2.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Golick