vanity 4.0.1 → 4.0.2

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: dcc07c2cfd7af5205d43f6ef16a4fe4607772b99613933ef37e53bbd16062ba3
4
- data.tar.gz: c2e194bc26d672eb44c692cbdd9955476844898f53c0a39cd11ff04acbcc7c46
3
+ metadata.gz: ea9d4e9d211abdf50a36e8d8bd1ede2d826b4d556ae52ef7537ee8f86cf3e0e8
4
+ data.tar.gz: 583ba00d677b13d9c27f0e5556f238f99b197614ada1a5fa3d68d1822fb1edca
5
5
  SHA512:
6
- metadata.gz: 51422c6d58f2b8aa110c79737d4aead1edc2da7ed13def526880b37c730837831ae6104b695c25656cd6e9077c906ae45d06626d354e62197e3d50555f5dcec0
7
- data.tar.gz: 12201f41ce6edc971928cb146cbb53c2ae09b9a61f6053ae888fa01ef180e05166836eb3f165f26adcba34f3dac523b4970593ecf7926a43d6604255afc0d8fa
6
+ metadata.gz: 679b3b9e5f5271b96bf57e7275edbcdd59765c0ccf80be786a71f8bfcf091dfb2d820eee1a6e3b4105ee49c462aed87ac4278f0146d5791f1923a3ecbf527ae6
7
+ data.tar.gz: 1a905082e51bfe15294333e43bd18b55c2c22926194b22ac7c03f74902578fcc5865c82b2cd0580d10dae0d42b3c4e7edf50a024ed996a5d846a1afe1f5b27f8
data/CHANGELOG CHANGED
@@ -1,3 +1,9 @@
1
+ CHANGELOG
2
+
3
+ == 4.0.2 (2022-03-03)
4
+
5
+ * Use Redis#exists? and fallback to #exists which could be either boolean or integer in recent redis gem versions (@bsedin)
6
+
1
7
  == 4.0.1 (2022-03-06)
2
8
 
3
9
  * Fix YAML alias support in `vanity.yml` (@frostmark)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vanity (4.0.1)
4
+ vanity (4.0.2)
5
5
  i18n
6
6
 
7
7
  GEM
@@ -33,7 +33,7 @@ GEM
33
33
  execjs
34
34
  coffee-script-source (1.9.1)
35
35
  colorator (0.1)
36
- concurrent-ruby (1.1.9)
36
+ concurrent-ruby (1.1.10)
37
37
  crack (0.3.1)
38
38
  execjs (2.5.2)
39
39
  fakefs (0.6.7)
@@ -107,8 +107,8 @@ GEM
107
107
  rb-inotify (0.9.5)
108
108
  ffi (>= 0.5.0)
109
109
  redcarpet (3.5.1)
110
- redis (4.0.3)
111
- redis-namespace (1.6.0)
110
+ redis (4.6.0)
111
+ redis-namespace (1.8.2)
112
112
  redis (>= 3.0.4)
113
113
  regexp_parser (2.2.1)
114
114
  rexml (3.2.5)
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: ..
9
9
  specs:
10
- vanity (4.0.1)
10
+ vanity (4.0.2)
11
11
  i18n
12
12
 
13
13
  GEM
@@ -217,8 +217,8 @@ GEM
217
217
  rb-inotify (0.9.10)
218
218
  ffi (>= 0.5.0, < 2)
219
219
  redcarpet (3.4.0)
220
- redis (4.0.1)
221
- redis-namespace (1.6.0)
220
+ redis (4.6.0)
221
+ redis-namespace (1.8.2)
222
222
  redis (>= 3.0.4)
223
223
  regexp_parser (2.2.1)
224
224
  rexml (3.2.5)
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: ..
9
9
  specs:
10
- vanity (4.0.1)
10
+ vanity (4.0.2)
11
11
  i18n
12
12
 
13
13
  GEM
@@ -215,8 +215,8 @@ GEM
215
215
  rb-inotify (0.9.10)
216
216
  ffi (>= 0.5.0, < 2)
217
217
  redcarpet (3.4.0)
218
- redis (4.0.1)
219
- redis-namespace (1.6.0)
218
+ redis (4.6.0)
219
+ redis-namespace (1.8.2)
220
220
  redis (>= 3.0.4)
221
221
  regexp_parser (2.2.1)
222
222
  rexml (3.2.5)
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: ..
9
9
  specs:
10
- vanity (4.0.1)
10
+ vanity (4.0.2)
11
11
  i18n
12
12
 
13
13
  GEM
@@ -215,8 +215,8 @@ GEM
215
215
  rb-inotify (0.9.10)
216
216
  ffi (>= 0.5.0, < 2)
217
217
  redcarpet (3.4.0)
218
- redis (4.0.1)
219
- redis-namespace (1.6.0)
218
+ redis (4.6.0)
219
+ redis-namespace (1.8.2)
220
220
  redis (>= 3.0.4)
221
221
  regexp_parser (2.2.1)
222
222
  rexml (3.2.5)
@@ -117,7 +117,13 @@ module Vanity
117
117
 
118
118
  def is_experiment_completed?(experiment) # rubocop:todo Naming/PredicateName
119
119
  call_redis_with_failover do
120
- @experiments.exists("#{experiment}:completed_at")
120
+ if @experiments.respond_to?(:exists?)
121
+ @experiments.exists?("#{experiment}:completed_at")
122
+ else
123
+ exists = @experiments.exists("#{experiment}:completed_at")
124
+
125
+ exists.is_a?(Numeric) ? exists > 0 : exists
126
+ end
121
127
  end
122
128
  end
123
129
 
@@ -1,5 +1,5 @@
1
1
  module Vanity
2
- VERSION = "4.0.1"
2
+ VERSION = "4.0.2"
3
3
 
4
4
  module Version
5
5
  version = VERSION.to_s.split(".").map { |i| i.to_i }
@@ -62,7 +62,7 @@ describe Vanity::Adapters::RedisAdapter do
62
62
 
63
63
  it "gracefully fails in #is_experiment_completed?" do
64
64
  redis_adapter, mocked_redis = stub_redis
65
- mocked_redis.stubs(:exists).raises(RuntimeError)
65
+ mocked_redis.stubs(:exists?).raises(RuntimeError)
66
66
 
67
67
  assert_silent do
68
68
  redis_adapter.is_experiment_completed?("price_options")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vanity
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Assaf Arkin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-07 00:00:00.000000000 Z
11
+ date: 2022-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -295,7 +295,7 @@ metadata:
295
295
  post_install_message: To get started run vanity --help
296
296
  rdoc_options:
297
297
  - "--title"
298
- - Vanity 4.0.1
298
+ - Vanity 4.0.2
299
299
  - "--main"
300
300
  - README.md
301
301
  - "--webcvs"