suo 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/suo/client/memcached.rb +9 -7
- data/lib/suo/version.rb +1 -1
- data/suo.gemspec +1 -1
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 631845e2977ae0e7bc903eb2863820a7ff55c54760879f96268a06f66c7ea15f
|
4
|
+
data.tar.gz: 5c262505f86e9a4e9fdd34df059a9c3ed76d55a596731a0178fe653ef2637f43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0c52381b64f1592170dfb0c4d7dabdcb0127a097e8d9702340c3f5107dcc7bea9d04ad00b4af4944b8622cc05cba96d48ed7db21e2a704def54e2ba323dccf9
|
7
|
+
data.tar.gz: fd9d8d47ff6281c2cf12f07cec4bcd7a0322ab52af80abd62db426742dfd7e3835b8a466fa7f6b585f38922c051cfddd1fa693d28980b8ca895cac021c322374
|
data/CHANGELOG.md
CHANGED
data/lib/suo/client/memcached.rb
CHANGED
@@ -7,27 +7,29 @@ module Suo
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def clear
|
10
|
-
@client.delete(@key)
|
10
|
+
@client.with { |client| client.delete(@key) }
|
11
11
|
end
|
12
12
|
|
13
13
|
private
|
14
14
|
|
15
15
|
def get
|
16
|
-
@client.get_cas(@key)
|
16
|
+
@client.with { |client| client.get_cas(@key) }
|
17
17
|
end
|
18
18
|
|
19
19
|
def set(newval, cas, expire: false)
|
20
20
|
if expire
|
21
|
-
@client.set_cas(@key, newval, cas, @options[:ttl])
|
21
|
+
@client.with { |client| client.set_cas(@key, newval, cas, @options[:ttl]) }
|
22
22
|
else
|
23
|
-
@client.set_cas(@key, newval, cas)
|
23
|
+
@client.with { |client| client.set_cas(@key, newval, cas) }
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
27
|
def initial_set(val = BLANK_STR)
|
28
|
-
@client.
|
29
|
-
|
30
|
-
|
28
|
+
@client.with do |client|
|
29
|
+
client.set(@key, val)
|
30
|
+
_val, cas = client.get_cas(@key)
|
31
|
+
cas
|
32
|
+
end
|
31
33
|
end
|
32
34
|
end
|
33
35
|
end
|
data/lib/suo/version.rb
CHANGED
data/suo.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_dependency "redis"
|
26
26
|
spec.add_dependency "msgpack"
|
27
27
|
|
28
|
-
spec.add_development_dependency "bundler"
|
28
|
+
spec.add_development_dependency "bundler"
|
29
29
|
spec.add_development_dependency "rake", "~> 10.0"
|
30
30
|
spec.add_development_dependency "rubocop", "~> 0.49.0"
|
31
31
|
spec.add_development_dependency "minitest", "~> 5.5.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: suo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Elser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dalli
|
@@ -56,16 +56,16 @@ dependencies:
|
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -167,8 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
167
|
- !ruby/object:Gem::Version
|
168
168
|
version: '0'
|
169
169
|
requirements: []
|
170
|
-
|
171
|
-
rubygems_version: 2.7.6
|
170
|
+
rubygems_version: 3.0.3
|
172
171
|
signing_key:
|
173
172
|
specification_version: 4
|
174
173
|
summary: Distributed locks (mutexes & semaphores) using Memcached or Redis.
|