lock_and_cache 6.0.0 → 6.0.1

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
- SHA1:
3
- metadata.gz: 9b00954eb152d6691ec74bbd0db1ed1a203293fb
4
- data.tar.gz: 9e41793803b95b133756e37f59cfd7715d71750a
2
+ SHA256:
3
+ metadata.gz: c89613cc8fdd7ed23861149ccfc49e664af988d6b917757f09c18b18b5415f0b
4
+ data.tar.gz: 286efd9473fedfbd8e7de5175d9a4ec374bde72757d103bd9c964faa6af1bc70
5
5
  SHA512:
6
- metadata.gz: e57de257fd2d8c19e3c1ea657e155ce3a6abc2d579fbacac42ea1c7f1469408ae0c360492f98ac219cbe90f10ddc14b1655a804ad70636a2e9fb78b58479057f
7
- data.tar.gz: 77604654cebc124eb594e7824cf8c318d7abc2261082802052f66475f06886826521ea89c7d9c82ffc46eeb823763b2b97a8955b1866cd4312cb9bec98546fe0
6
+ metadata.gz: 15f13a8204942588e436ddd5a0eec963148d179a10bf3268401316b8479f2857f50e5e83a47d324765c57f614c7e11b2656b7643c139ebbce6e6b67f1c2969ba
7
+ data.tar.gz: 28d901547a8b96a9065514151149176eef91c5ed9fb76274b7a7e655bba4f8f584b6246e20534342022ae1bddbfe4918cbe73cedcb7936fa886962b117c698bd
data/CHANGELOG CHANGED
@@ -1,3 +1,9 @@
1
+ 6.0.1
2
+
3
+ * Enhancements
4
+
5
+ * Use Redis#exists? to avoid deprec warning
6
+
1
7
  6.0.0
2
8
 
3
9
  * Breaking changes
@@ -55,7 +55,7 @@ module LockAndCache
55
55
  raise "heartbeat_expires must be >= 2 seconds" unless heartbeat_expires >= 2
56
56
  heartbeat_frequency = (heartbeat_expires / 2).ceil
57
57
  LockAndCache.logger.debug { "[lock_and_cache] A1 #{key.debug} #{Base64.encode64(digest).strip} #{Digest::SHA1.hexdigest digest}" }
58
- if cache_storage.exists(digest) and (existing = cache_storage.get(digest)).is_a?(String)
58
+ if cache_storage.exists?(digest) and (existing = cache_storage.get(digest)).is_a?(String)
59
59
  return load_existing(existing)
60
60
  end
61
61
  LockAndCache.logger.debug { "[lock_and_cache] B1 #{key.debug} #{Base64.encode64(digest).strip} #{Digest::SHA1.hexdigest digest}" }
@@ -71,7 +71,7 @@ module LockAndCache
71
71
  acquired = true
72
72
  end
73
73
  LockAndCache.logger.debug { "[lock_and_cache] D1 #{key.debug} #{Base64.encode64(digest).strip} #{Digest::SHA1.hexdigest digest}" }
74
- if cache_storage.exists(digest) and (existing = cache_storage.get(digest)).is_a?(String)
74
+ if cache_storage.exists?(digest) and (existing = cache_storage.get(digest)).is_a?(String)
75
75
  LockAndCache.logger.debug { "[lock_and_cache] E1 #{key.debug} #{Base64.encode64(digest).strip} #{Digest::SHA1.hexdigest digest}" }
76
76
  retval = load_existing existing
77
77
  end
@@ -98,11 +98,11 @@ module LockAndCache
98
98
  end
99
99
 
100
100
  def locked?
101
- LockAndCache.lock_storage.exists lock_digest
101
+ LockAndCache.lock_storage.exists? lock_digest
102
102
  end
103
103
 
104
104
  def cached?
105
- LockAndCache.cache_storage.exists digest
105
+ LockAndCache.cache_storage.exists? digest
106
106
  end
107
107
 
108
108
  def clear
@@ -1,3 +1,3 @@
1
1
  module LockAndCache
2
- VERSION = '6.0.0'
2
+ VERSION = '6.0.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lock_and_cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0
4
+ version: 6.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seamus Abshere
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-25 00:00:00.000000000 Z
11
+ date: 2020-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -181,8 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
181
181
  - !ruby/object:Gem::Version
182
182
  version: '0'
183
183
  requirements: []
184
- rubyforge_project:
185
- rubygems_version: 2.6.13
184
+ rubygems_version: 3.0.3
186
185
  signing_key:
187
186
  specification_version: 4
188
187
  summary: Lock and cache methods.