idempotent-request 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/lib/idempotent-request/redis_storage.rb +8 -2
- data/lib/idempotent-request/request_manager.rb +1 -1
- data/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25467dbc0ee42d2648e2dd267edb23be7972a6af0ba2d233e21d455c663fc643
|
4
|
+
data.tar.gz: 4dc4e7373dce6370eb850134d25c164fd67ef5c54dc12c3585267d4774d1f58f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9af0cf3e406cbea6807cdfedc32110984ac63225dbe9ffe671cfcd8b842dd639db8e80ead393b1bbb7a14d6977f4edbe02aec913f4a5b2e41093a8cf12577c23
|
7
|
+
data.tar.gz: b54740669825c315a164fb42a4a58e54fd1ac1cc6e2802d3c40f4c8e5123bbfb9742e93f53f42667c392982e68784ff3721cb6123e7ea77b41cd4ca3ae762dca
|
data/CHANGELOG.md
CHANGED
@@ -13,8 +13,14 @@ module IdempotentRequest
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def write(key, payload)
|
16
|
-
redis.
|
17
|
-
|
16
|
+
redis.set(
|
17
|
+
namespaced_key(key),
|
18
|
+
payload,
|
19
|
+
{}.tap do |options|
|
20
|
+
options[:nx] = true
|
21
|
+
options[:ex] = expire_time.to_i if expire_time.to_i > 0
|
22
|
+
end
|
23
|
+
)
|
18
24
|
end
|
19
25
|
|
20
26
|
private
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: idempotent-request
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmytro Zakharov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|