redis-mutex 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 +5 -5
- data/.travis.yml +1 -0
- data/lib/redis_mutex/macro.rb +6 -1
- data/redis-mutex.gemspec +1 -1
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 938cf6fdd7b6baa536703e89f2f45dbdd7a7725ee2a8595e840515c8317dfac9
|
4
|
+
data.tar.gz: 172a141c6d8218384de2a45b861ff7ed2a85fbe4a8cd52d60a6b2c7a3bca6c76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 198b9c51d0f26c282d88f8d3d3555f283e3d5b57080c0a75788243359440a791c896ba32dca09b4f5c43f9a6d9a61eaff9621412ac9abb474a31b20aa17ff44e
|
7
|
+
data.tar.gz: 61009d9d9bb9c50697f48041f0535a366141234b9dab5480c500f9b00eb2f526ee92c1ee0d923adfe8192fb0dadf430714806627bcc948ee357fbc8130028c24
|
data/.travis.yml
CHANGED
data/lib/redis_mutex/macro.rb
CHANGED
@@ -38,7 +38,12 @@ class RedisMutex
|
|
38
38
|
define_method(with_method) do |*args|
|
39
39
|
named_arguments = Hash[target_argument_names.zip(args)]
|
40
40
|
arguments = mutex_arguments.map { |name| named_arguments.fetch(name) }
|
41
|
-
key =
|
41
|
+
key = format(
|
42
|
+
"%<class>s#%<target>s:%<arguments>s",
|
43
|
+
class: self.class.name,
|
44
|
+
target: target,
|
45
|
+
arguments: arguments.join(":")
|
46
|
+
)
|
42
47
|
begin
|
43
48
|
RedisMutex.with_lock(key, options) do
|
44
49
|
send(without_method, *args)
|
data/redis-mutex.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |gem|
|
|
12
12
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
13
13
|
gem.name = "redis-mutex"
|
14
14
|
gem.require_paths = ["lib"]
|
15
|
-
gem.version = '4.0.
|
15
|
+
gem.version = '4.0.2' # retrieve this value by: Gem.loaded_specs['redis-mutex'].version.to_s
|
16
16
|
|
17
17
|
gem.add_runtime_dependency "redis-classy", "~> 2.0"
|
18
18
|
gem.add_development_dependency "rspec"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis-mutex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenn Ejima
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis-classy
|
@@ -90,7 +90,7 @@ files:
|
|
90
90
|
homepage: http://github.com/kenn/redis-mutex
|
91
91
|
licenses: []
|
92
92
|
metadata: {}
|
93
|
-
post_install_message:
|
93
|
+
post_install_message:
|
94
94
|
rdoc_options: []
|
95
95
|
require_paths:
|
96
96
|
- lib
|
@@ -105,9 +105,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
105
|
- !ruby/object:Gem::Version
|
106
106
|
version: '0'
|
107
107
|
requirements: []
|
108
|
-
|
109
|
-
|
110
|
-
signing_key:
|
108
|
+
rubygems_version: 3.0.8
|
109
|
+
signing_key:
|
111
110
|
specification_version: 4
|
112
111
|
summary: Distrubuted mutex using Redis
|
113
112
|
test_files:
|