progressrus 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/progressrus/store/redis.rb +5 -1
- data/lib/progressrus/version.rb +3 -1
- data/test/store/redis_test.rb +15 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1e63f1c18708a23b56833afb791eaf7bc27e05243fd4abbd65290e3100d5bf8
|
4
|
+
data.tar.gz: 5387f3c957800d8292ea2f5ebb81b7e5fdacb3a4d045c0f9b2fb14686256f97f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5039104d899d32e43c908213170555ef5ab1b7031af6099497328195d6985643725c4b09cbd5411edbce03769cd98fcd368e2eca54a79ad78e86a471ba99a01
|
7
|
+
data.tar.gz: 5ff5e57e00cd6ff54bc35479047a0d40ae41691fb34324697600f5c4c47b983128bc64e1165102f6e3d187f76aeaffa4e6d6920ca92c5adffd3b573d88711b77
|
data/lib/progressrus/version.rb
CHANGED
data/test/store/redis_test.rb
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
require_relative "../test_helper"
|
2
2
|
|
3
3
|
class RedisStoreTest < Minitest::Test
|
4
|
+
class PrefixClass
|
5
|
+
def self.call(scope)
|
6
|
+
"custom_prefix:#{scope.join(':')}"
|
7
|
+
end
|
8
|
+
end
|
4
9
|
def setup
|
5
10
|
@scope = ["walrus", "1234"]
|
6
11
|
@progress = Progressrus.new(
|
@@ -17,11 +22,19 @@ class RedisStoreTest < Minitest::Test
|
|
17
22
|
name: "oemg-name-two"
|
18
23
|
)
|
19
24
|
|
20
|
-
@
|
25
|
+
@redis = ::Redis.new(host: ENV["PROGRESSRUS_REDIS_HOST"] || "localhost")
|
26
|
+
|
27
|
+
@store = Progressrus::Store::Redis.new(@redis)
|
21
28
|
end
|
22
29
|
|
23
30
|
def teardown
|
24
|
-
|
31
|
+
@store.flush(@scope)
|
32
|
+
end
|
33
|
+
|
34
|
+
def test_prefix_can_be_a_proc
|
35
|
+
store = Progressrus::Store::Redis.new(@redis, prefix: PrefixClass)
|
36
|
+
store.persist(@progress)
|
37
|
+
refute_empty(@redis.hgetall('custom_prefix:walrus:1234'))
|
25
38
|
end
|
26
39
|
|
27
40
|
def test_persist_should_set_key_value_if_outdated
|
@@ -99,5 +112,4 @@ class RedisStoreTest < Minitest::Test
|
|
99
112
|
@store.persist(@progress)
|
100
113
|
@store.persist(@progress, force: true)
|
101
114
|
end
|
102
|
-
|
103
115
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: progressrus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Eskildsen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|
@@ -171,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
171
171
|
- !ruby/object:Gem::Version
|
172
172
|
version: '0'
|
173
173
|
requirements: []
|
174
|
-
rubygems_version: 3.0.
|
174
|
+
rubygems_version: 3.0.3
|
175
175
|
signing_key:
|
176
176
|
specification_version: 4
|
177
177
|
summary: Monitor the progress of remote, long-running jobs.
|