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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 497f8d8c0021138da005c4ec8283a0f71d0b82120af2ffdf6bf0530c199c36b5
4
- data.tar.gz: aae8820a1c19d314d1154960a7e09157b8094d89a13a9ae72d3842b332b7460f
3
+ metadata.gz: 631845e2977ae0e7bc903eb2863820a7ff55c54760879f96268a06f66c7ea15f
4
+ data.tar.gz: 5c262505f86e9a4e9fdd34df059a9c3ed76d55a596731a0178fe653ef2637f43
5
5
  SHA512:
6
- metadata.gz: c20da62ec8742cac1a622f54d841564921522ddda67cbc4cd2e9609aaa5440a392803e547bb4c19cab8243c70a244768935b0498e0bfdce2b59b92bb845c9079
7
- data.tar.gz: de71d8bc43ad0396ec9d60ab76bc63836fcc75a8d0edb89a4b1de45d72dc0d2449ffd9a09cc3fe7b81d64ab7d3324e6f30df5f8dd1620f232d0886e28c9865ec
6
+ metadata.gz: d0c52381b64f1592170dfb0c4d7dabdcb0127a097e8d9702340c3f5107dcc7bea9d04ad00b4af4944b8622cc05cba96d48ed7db21e2a704def54e2ba323dccf9
7
+ data.tar.gz: fd9d8d47ff6281c2cf12f07cec4bcd7a0322ab52af80abd62db426742dfd7e3835b8a466fa7f6b585f38922c051cfddd1fa693d28980b8ca895cac021c322374
@@ -1,3 +1,7 @@
1
+ ## 0.3.4
2
+
3
+ - Support for connection pooling when using memcached locks, via `with` blocks using Dalli (thanks to Lev).
4
+
1
5
  ## 0.3.3
2
6
 
3
7
  - Default TTL for keys to allow for short-lived locking keys (thanks to Ian Remillard) without leaking memory.
@@ -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.set(@key, val)
29
- _val, cas = @client.get_cas(@key)
30
- cas
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
@@ -1,3 +1,3 @@
1
1
  module Suo
2
- VERSION = "0.3.3".freeze
2
+ VERSION = "0.3.4".freeze
3
3
  end
@@ -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", "~> 1.5"
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.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: 2018-10-05 00:00:00.000000000 Z
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: '1.5'
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: '1.5'
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
- rubyforge_project:
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.