rollout 2.4.4 → 2.4.5

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
  SHA256:
3
- metadata.gz: 2f9fd3e63d0d90aef2e2731d02bc6009a14572e9c2599f6a9c6f2431c229f072
4
- data.tar.gz: cb11d12f34818d24533717e55e8b46947be12e46ed85db05151e0a5fba5effac
3
+ metadata.gz: acf240ab59dcfdebec335aee19df882f8936e7de5b7a0c347a3c28cfa8b3fc6d
4
+ data.tar.gz: 2ca7c2d7c761c6e539790421547b5e8eb82bbe8b56dca246975f6adc0773866d
5
5
  SHA512:
6
- metadata.gz: f16756f6a5e15d301060999c6529d7a1ebad0e1f4d4ed01ba06008c1843518b0df887bcf124832591b7673aba48e121d5886efb083509ed910f13aebade88fa2
7
- data.tar.gz: fbd41cf3de15894d26f311f4c7d3d84c08c40d4600b63fa767e8b8af9d06ee068ee9d8b8912c7de5e3475dbe636bc58562efa484304b05d4074c4afe649738c0
6
+ metadata.gz: dc61fd463b60a94e85b5b141ad5fb7431f37249d9b899739b52524bd0fc28106135e039cbfe0130a0c35d0934b50339e426e38255516381636ec1ff226068e49
7
+ data.tar.gz: 5babd80ccaab8b4f7b4efeac63e5941709913014e5d5d37f71c5f8b04ae62d09a38e50f7f6236df8d09ce359384cb0d877452209a1b63b69284fd649bb49033c
data/.gitignore CHANGED
@@ -19,5 +19,6 @@ rdoc
19
19
  pkg
20
20
  *.gem
21
21
  gemfiles/*.lock
22
+ .rspec_status
22
23
 
23
24
  ## PROJECT::SPECIFIC
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rollout (2.4.4)
4
+ rollout (2.4.5)
5
5
  redis (~> 4.0)
6
6
 
7
7
  GEM
data/lib/rollout.rb CHANGED
@@ -264,6 +264,8 @@ class Rollout
264
264
  end
265
265
 
266
266
  def multi_get(*features)
267
+ return [] if features.empty?
268
+
267
269
  feature_keys = features.map { |feature| key(feature) }
268
270
  @storage.mget(*feature_keys).map.with_index { |string, index| Feature.new(features[index], string, @options) }
269
271
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Rollout
4
- VERSION = '2.4.4'
4
+ VERSION = '2.4.5'
5
5
  end
data/spec/rollout_spec.rb CHANGED
@@ -605,6 +605,12 @@ RSpec.describe "Rollout" do
605
605
  expect(features[2].percentage).to eq 100
606
606
  expect(features.size).to eq 3
607
607
  end
608
+
609
+ describe 'when given feature keys is empty' do
610
+ it 'returns empty array' do
611
+ expect(@rollout.multi_get(*[])).to match_array([])
612
+ end
613
+ end
608
614
  end
609
615
 
610
616
  describe "#set_feature_data" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rollout
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.4
4
+ version: 2.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Golick
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-05 00:00:00.000000000 Z
11
+ date: 2019-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis