faulty 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/.travis.yml +4 -2
- data/CHANGELOG.md +5 -0
- data/Gemfile +17 -0
- data/bin/console +1 -1
- data/faulty.gemspec +2 -10
- data/lib/faulty/storage/redis.rb +4 -4
- data/lib/faulty/version.rb +1 -1
- metadata +2 -126
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9af8f5d6a81fdf1b625c2d588f2d9f6f55380ebaf00c398d5ed29454bfafea48
|
4
|
+
data.tar.gz: 2d15beb6ffec3967bb740a3567245fe40e7b381408b7203f7cb2cce020802f89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d1a6b24d30ceac93393aef209ac8acb9b24648698aa1f046d32f9e181e3e7208829c62b235139e34cbbf6d4fa3528a9aef24ed48ff359d3b2bc29cd27205165
|
7
|
+
data.tar.gz: a95a10dfdc4ea878a35c1955a6c586ecf254f0fc6c02e02b5aab5cb2da09e5bd3ea4181a8fd652877a213cb0c519eee39735e6da3092cfc270a20832979f3ebc
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
@@ -6,6 +6,8 @@ rvm:
|
|
6
6
|
- 2.5
|
7
7
|
- 2.6
|
8
8
|
- 2.7
|
9
|
+
- jruby
|
10
|
+
- truffleruby
|
9
11
|
|
10
12
|
env:
|
11
13
|
global:
|
@@ -22,8 +24,8 @@ before_script:
|
|
22
24
|
- ./cc-test-reporter before-build
|
23
25
|
|
24
26
|
script:
|
25
|
-
-
|
26
|
-
-
|
27
|
+
- bundle exec rubocop
|
28
|
+
- bundle exec rspec --format doc
|
27
29
|
- bin/check-version
|
28
30
|
|
29
31
|
after_script:
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -3,3 +3,20 @@
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
|
5
5
|
gemspec
|
6
|
+
|
7
|
+
# We add non-essential gems like debugging tools and CI dependencies
|
8
|
+
# here. This also allows us to use conditional dependencies that depend on the
|
9
|
+
# platform
|
10
|
+
|
11
|
+
not_jruby = %i[ruby mingw x64_mingw].freeze
|
12
|
+
|
13
|
+
gem 'activesupport', '>= 4.2'
|
14
|
+
gem 'bundler', '>= 1.17', '< 3'
|
15
|
+
gem 'byebug', platforms: not_jruby
|
16
|
+
gem 'irb', '~> 1.0'
|
17
|
+
gem 'redcarpet', '~> 3.5', platforms: not_jruby
|
18
|
+
gem 'rspec_junit_formatter', '~> 0.4'
|
19
|
+
# For now, code climate doesn't support simplecov 0.18
|
20
|
+
# https://github.com/codeclimate/test-reporter/issues/413
|
21
|
+
gem 'simplecov', '>= 0.17.1', '< 0.18'
|
22
|
+
gem 'yard', '~> 0.9.25', platforms: not_jruby
|
data/bin/console
CHANGED
data/faulty.gemspec
CHANGED
@@ -23,22 +23,14 @@ Gem::Specification.new do |spec|
|
|
23
23
|
|
24
24
|
spec.add_runtime_dependency 'concurrent-ruby', '~> 1.0'
|
25
25
|
|
26
|
-
|
27
|
-
|
28
|
-
spec.add_development_dependency 'byebug', '~> 11.0'
|
26
|
+
# Only essential development tools and dependencies go here.
|
27
|
+
# Other non-essential development dependencies go in the Gemfile.
|
29
28
|
spec.add_development_dependency 'connection_pool', '~> 2.0'
|
30
29
|
spec.add_development_dependency 'honeybadger', '>= 2.0'
|
31
|
-
spec.add_development_dependency 'irb', '~> 1.0'
|
32
|
-
spec.add_development_dependency 'redcarpet', '~> 3.5'
|
33
30
|
spec.add_development_dependency 'redis', '~> 3.0'
|
34
31
|
spec.add_development_dependency 'rspec', '~> 3.8'
|
35
|
-
spec.add_development_dependency 'rspec_junit_formatter', '~> 0.4'
|
36
32
|
# 0.81 is the last rubocop version with Ruby 2.3 support
|
37
33
|
spec.add_development_dependency 'rubocop', '0.81.0'
|
38
34
|
spec.add_development_dependency 'rubocop-rspec', '1.38.1'
|
39
|
-
# For now, code climate doesn't support simplecov 0.18
|
40
|
-
# https://github.com/codeclimate/test-reporter/issues/413
|
41
|
-
spec.add_development_dependency 'simplecov', '>= 0.17.1', '< 0.18'
|
42
35
|
spec.add_development_dependency 'timecop', '>= 0.9'
|
43
|
-
spec.add_development_dependency 'yard', '~> 0.9.25'
|
44
36
|
end
|
data/lib/faulty/storage/redis.rb
CHANGED
@@ -288,15 +288,15 @@ module Faulty
|
|
288
288
|
# @return [Boolean] True if the value was set to `new`, false if the CAS
|
289
289
|
# failed
|
290
290
|
def compare_and_set(redis, key, old, new)
|
291
|
-
|
291
|
+
redis.watch(key) do
|
292
292
|
if old.include?(redis.get(key))
|
293
|
-
redis.multi { |m| m.set(key, new) }
|
293
|
+
result = redis.multi { |m| m.set(key, new) }
|
294
|
+
result && result[0] == 'OK'
|
294
295
|
else
|
295
296
|
redis.unwatch
|
297
|
+
false
|
296
298
|
end
|
297
299
|
end
|
298
|
-
|
299
|
-
result[0] == 'OK'
|
300
300
|
end
|
301
301
|
|
302
302
|
# Yield a Redis connection
|
data/lib/faulty/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faulty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Howard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -24,54 +24,6 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: activesupport
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '4.2'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '4.2'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: bundler
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '1.17'
|
48
|
-
- - "<"
|
49
|
-
- !ruby/object:Gem::Version
|
50
|
-
version: '3'
|
51
|
-
type: :development
|
52
|
-
prerelease: false
|
53
|
-
version_requirements: !ruby/object:Gem::Requirement
|
54
|
-
requirements:
|
55
|
-
- - ">="
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
version: '1.17'
|
58
|
-
- - "<"
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '3'
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: byebug
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
65
|
-
- - "~>"
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '11.0'
|
68
|
-
type: :development
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: !ruby/object:Gem::Requirement
|
71
|
-
requirements:
|
72
|
-
- - "~>"
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: '11.0'
|
75
27
|
- !ruby/object:Gem::Dependency
|
76
28
|
name: connection_pool
|
77
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,34 +52,6 @@ dependencies:
|
|
100
52
|
- - ">="
|
101
53
|
- !ruby/object:Gem::Version
|
102
54
|
version: '2.0'
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
name: irb
|
105
|
-
requirement: !ruby/object:Gem::Requirement
|
106
|
-
requirements:
|
107
|
-
- - "~>"
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '1.0'
|
110
|
-
type: :development
|
111
|
-
prerelease: false
|
112
|
-
version_requirements: !ruby/object:Gem::Requirement
|
113
|
-
requirements:
|
114
|
-
- - "~>"
|
115
|
-
- !ruby/object:Gem::Version
|
116
|
-
version: '1.0'
|
117
|
-
- !ruby/object:Gem::Dependency
|
118
|
-
name: redcarpet
|
119
|
-
requirement: !ruby/object:Gem::Requirement
|
120
|
-
requirements:
|
121
|
-
- - "~>"
|
122
|
-
- !ruby/object:Gem::Version
|
123
|
-
version: '3.5'
|
124
|
-
type: :development
|
125
|
-
prerelease: false
|
126
|
-
version_requirements: !ruby/object:Gem::Requirement
|
127
|
-
requirements:
|
128
|
-
- - "~>"
|
129
|
-
- !ruby/object:Gem::Version
|
130
|
-
version: '3.5'
|
131
55
|
- !ruby/object:Gem::Dependency
|
132
56
|
name: redis
|
133
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -156,20 +80,6 @@ dependencies:
|
|
156
80
|
- - "~>"
|
157
81
|
- !ruby/object:Gem::Version
|
158
82
|
version: '3.8'
|
159
|
-
- !ruby/object:Gem::Dependency
|
160
|
-
name: rspec_junit_formatter
|
161
|
-
requirement: !ruby/object:Gem::Requirement
|
162
|
-
requirements:
|
163
|
-
- - "~>"
|
164
|
-
- !ruby/object:Gem::Version
|
165
|
-
version: '0.4'
|
166
|
-
type: :development
|
167
|
-
prerelease: false
|
168
|
-
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
requirements:
|
170
|
-
- - "~>"
|
171
|
-
- !ruby/object:Gem::Version
|
172
|
-
version: '0.4'
|
173
83
|
- !ruby/object:Gem::Dependency
|
174
84
|
name: rubocop
|
175
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -198,26 +108,6 @@ dependencies:
|
|
198
108
|
- - '='
|
199
109
|
- !ruby/object:Gem::Version
|
200
110
|
version: 1.38.1
|
201
|
-
- !ruby/object:Gem::Dependency
|
202
|
-
name: simplecov
|
203
|
-
requirement: !ruby/object:Gem::Requirement
|
204
|
-
requirements:
|
205
|
-
- - ">="
|
206
|
-
- !ruby/object:Gem::Version
|
207
|
-
version: 0.17.1
|
208
|
-
- - "<"
|
209
|
-
- !ruby/object:Gem::Version
|
210
|
-
version: '0.18'
|
211
|
-
type: :development
|
212
|
-
prerelease: false
|
213
|
-
version_requirements: !ruby/object:Gem::Requirement
|
214
|
-
requirements:
|
215
|
-
- - ">="
|
216
|
-
- !ruby/object:Gem::Version
|
217
|
-
version: 0.17.1
|
218
|
-
- - "<"
|
219
|
-
- !ruby/object:Gem::Version
|
220
|
-
version: '0.18'
|
221
111
|
- !ruby/object:Gem::Dependency
|
222
112
|
name: timecop
|
223
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -232,20 +122,6 @@ dependencies:
|
|
232
122
|
- - ">="
|
233
123
|
- !ruby/object:Gem::Version
|
234
124
|
version: '0.9'
|
235
|
-
- !ruby/object:Gem::Dependency
|
236
|
-
name: yard
|
237
|
-
requirement: !ruby/object:Gem::Requirement
|
238
|
-
requirements:
|
239
|
-
- - "~>"
|
240
|
-
- !ruby/object:Gem::Version
|
241
|
-
version: 0.9.25
|
242
|
-
type: :development
|
243
|
-
prerelease: false
|
244
|
-
version_requirements: !ruby/object:Gem::Requirement
|
245
|
-
requirements:
|
246
|
-
- - "~>"
|
247
|
-
- !ruby/object:Gem::Version
|
248
|
-
version: 0.9.25
|
249
125
|
description:
|
250
126
|
email:
|
251
127
|
- jmhoward0@gmail.com
|