progressrus 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -1
- data/lib/progressrus/core_ext/enumerable.rb +2 -2
- data/lib/progressrus/store/redis.rb +2 -2
- data/lib/progressrus/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: 564bda7bfb2cfd735379ef412a908303655e1fe2853cd666d6d6fcbcefca5a6b
|
4
|
+
data.tar.gz: 0acaae1e3e6cdd2d69be60b27dfbe5d5185af7f7d6677b5ad0e190918cbab43b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 417d841b14a93351ed90ff754706467c42e29663bd076d55b9d7e23bca8ceef7989095f8eab1ce14cfc97caf51ed9497079f79498c775a6f06a4a20358c7417a
|
7
|
+
data.tar.gz: 514c8bcf9fb63500629630255861d590c35cbbdb5ab05c4798a37d30a32ffe51b4a8c59d11cb3f53ccc5d86aafdb52bab48c0c23972596e2a6f96208b9eb557d
|
data/.travis.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module Enumerable
|
2
|
-
def with_progress(
|
2
|
+
def with_progress(args = {}, &block)
|
3
3
|
if block_given?
|
4
4
|
progresser = progress(args)
|
5
5
|
begin
|
@@ -25,7 +25,7 @@ module Enumerable
|
|
25
25
|
# Lazily read the size, for some enumerable this may be quite expensive and
|
26
26
|
# using this method should come with a warning in the documentation.
|
27
27
|
total = self.size unless args[:total]
|
28
|
-
@progress = Progressrus.new(
|
28
|
+
@progress = Progressrus.new(total: total, **args)
|
29
29
|
end
|
30
30
|
end
|
31
31
|
end
|
@@ -31,7 +31,7 @@ class Progressrus
|
|
31
31
|
def scope(scope)
|
32
32
|
scope = redis.hgetall(key(scope))
|
33
33
|
scope.each_pair { |id, value|
|
34
|
-
scope[id] = Progressrus.new(deserialize(value))
|
34
|
+
scope[id] = Progressrus.new(**deserialize(value))
|
35
35
|
}
|
36
36
|
rescue *BACKEND_EXCEPTIONS => e
|
37
37
|
raise Progressrus::Store::BackendError.new(e)
|
@@ -41,7 +41,7 @@ class Progressrus
|
|
41
41
|
value = redis.hget(key(scope), id)
|
42
42
|
return unless value
|
43
43
|
|
44
|
-
Progressrus.new(deserialize(value))
|
44
|
+
Progressrus.new(**deserialize(value))
|
45
45
|
rescue *BACKEND_EXCEPTIONS => e
|
46
46
|
raise Progressrus::Store::BackendError.new(e)
|
47
47
|
end
|
data/lib/progressrus/version.rb
CHANGED
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: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Eskildsen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|