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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b5cd2369da367f85505ff94038ed56c4d5e492732e9993b595a0c96acdaf265b
4
- data.tar.gz: 23e4444e32c105d2565f093c607ddc7ece5b74624af9628cf3297740af889dc2
3
+ metadata.gz: 564bda7bfb2cfd735379ef412a908303655e1fe2853cd666d6d6fcbcefca5a6b
4
+ data.tar.gz: 0acaae1e3e6cdd2d69be60b27dfbe5d5185af7f7d6677b5ad0e190918cbab43b
5
5
  SHA512:
6
- metadata.gz: cb1621312d260fd16afa68931fc34a4c6b17ca9a7db6a4ef3a5ccfd8534c8fe8c91821728214609288d54294370444be98006f325f3cd00b32ab3b2a0f59b315
7
- data.tar.gz: e431e6c4857aa31025dd39e0dff73683a32aca87bea5664bc21cc2988f430d286290f7f187b3816c8959818ac52ead468426d085728444781c56587ddd59fadd
6
+ metadata.gz: 417d841b14a93351ed90ff754706467c42e29663bd076d55b9d7e23bca8ceef7989095f8eab1ce14cfc97caf51ed9497079f79498c775a6f06a4a20358c7417a
7
+ data.tar.gz: 514c8bcf9fb63500629630255861d590c35cbbdb5ab05c4798a37d30a32ffe51b4a8c59d11cb3f53ccc5d86aafdb52bab48c0c23972596e2a6f96208b9eb557d
@@ -2,6 +2,7 @@ language: ruby
2
2
  services:
3
3
  - redis-server
4
4
  rvm:
5
- - 2.3
6
5
  - 2.4
7
6
  - 2.5
7
+ - 2.6
8
+ - 2.7
@@ -1,5 +1,5 @@
1
1
  module Enumerable
2
- def with_progress(**args, &block)
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({total: total}.merge(args))
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Progressrus
4
- VERSION = '1.0.1'
4
+ VERSION = '1.0.2'
5
5
  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: 1.0.1
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: 2019-09-04 00:00:00.000000000 Z
11
+ date: 2020-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis