rollout 2.4.2 → 2.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/rollout.rb +7 -0
- data/lib/rollout/version.rb +1 -1
- data/spec/rollout_spec.rb +10 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c11b1c464e66f315ad7ee924ea7408a5c4bf2a6f
|
4
|
+
data.tar.gz: 16da6d26818429e62e4783533df17d9022380a46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b7b1416e6ba291b67dbce4b5d67db30bbe494fbb31791f6435efe3280607abf17d64cf96210bbe113c6c9948ca8d50c25c0547b9870d0f652033b69cf412b00
|
7
|
+
data.tar.gz: 19e0b2bd04907cfe2f1b400ccb047b8320b35dddf85f1b76d607b5491340f0b3a63a20fdb2f30af138579a8e016accc4aa88549d32c4136c8a003fe2997ea318
|
data/Gemfile.lock
CHANGED
data/lib/rollout.rb
CHANGED
@@ -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
|
data/lib/rollout/version.rb
CHANGED
data/spec/rollout_spec.rb
CHANGED
@@ -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)
|