progressrus 1.0.2 → 1.0.3

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: 564bda7bfb2cfd735379ef412a908303655e1fe2853cd666d6d6fcbcefca5a6b
4
- data.tar.gz: 0acaae1e3e6cdd2d69be60b27dfbe5d5185af7f7d6677b5ad0e190918cbab43b
3
+ metadata.gz: d353cca4bf4eca46acd2837f9e62f6dbe35834cd3efe00bf66ece1c02a2924d0
4
+ data.tar.gz: 2b8c0dc2e6ec18c4f22b3a911bedfbcd73232517c4576dcc4971c46fc7abaabb
5
5
  SHA512:
6
- metadata.gz: 417d841b14a93351ed90ff754706467c42e29663bd076d55b9d7e23bca8ceef7989095f8eab1ce14cfc97caf51ed9497079f79498c775a6f06a4a20358c7417a
7
- data.tar.gz: 514c8bcf9fb63500629630255861d590c35cbbdb5ab05c4798a37d30a32ffe51b4a8c59d11cb3f53ccc5d86aafdb52bab48c0c23972596e2a6f96208b9eb557d
6
+ metadata.gz: d1b1f0472d3ed65a214a020433315f7dd9cc37618fe992125e9a8836b320e0b92cc3adb5dca28f9109f15bb670abf6392a9493df3e7bd5921b9206f78e9d0b3c
7
+ data.tar.gz: 9823e1025dff167ffc79e33d12cc636fd5494a23cf5c97500fb655eb69a5aabbb0df45518ed8928f11ac41cf8b62f9f0f196d125cde2f3f98b0e5e3980206e21
@@ -0,0 +1,38 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ ruby: ["2.6", "2.7", "3.0", "3.1"]
17
+ services:
18
+ redis:
19
+ image: redis
20
+ options: >-
21
+ --health-cmd "redis-cli ping"
22
+ --health-interval 10s
23
+ --health-timeout 5s
24
+ --health-retries 5
25
+ ports:
26
+ - 6379:6379
27
+
28
+ steps:
29
+ - uses: actions/checkout@v2
30
+ - name: Set up Ruby
31
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
32
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
33
+ uses: ruby/setup-ruby@v1
34
+ with:
35
+ bundler-cache: true # 'bundle install' and cache gems
36
+ ruby-version: ${{ matrix.ruby }}
37
+ - name: Run tests
38
+ run: bundle exec rake
@@ -17,9 +17,9 @@ class Progressrus
17
17
  if outdated?(progress) || force
18
18
  key_for_scope = key(progress.scope)
19
19
 
20
- redis.pipelined do
21
- redis.hset(key_for_scope, progress.id, progress.to_serializeable.to_json)
22
- redis.expireat(key_for_scope, expires_at.to_i) if expires_at
20
+ redis.pipelined do |pipeline|
21
+ pipeline.hset(key_for_scope, progress.id, progress.to_serializeable.to_json)
22
+ pipeline.expireat(key_for_scope, expires_at.to_i) if expires_at
23
23
  end
24
24
 
25
25
  @persisted_ats[progress.scope][progress.id] = now
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Progressrus
4
- VERSION = '1.0.2'
4
+ VERSION = '1.0.3'
5
5
  end
@@ -44,7 +44,7 @@ class IntegrationTest < Minitest::Test
44
44
  end
45
45
 
46
46
  def test_tick_on_enumerable
47
- a = (0..10)
47
+ a = (0..10).to_a
48
48
  b = a.with_progress(scope: "walrus").map(&:to_i)
49
49
 
50
50
  ticks = Progressrus.scope(["walrus"]).values
@@ -57,7 +57,7 @@ class IntegrationTest < Minitest::Test
57
57
  end
58
58
 
59
59
  def test_tick_on_enumerable_calls_fail_on_exception
60
- a = (0..10)
60
+ a = (0..10).to_a
61
61
 
62
62
  assert_raises ArgumentError do
63
63
  a.with_progress(scope: "walrus").each do
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.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Eskildsen
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-25 00:00:00.000000000 Z
11
+ date: 2022-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis
@@ -129,8 +129,8 @@ executables: []
129
129
  extensions: []
130
130
  extra_rdoc_files: []
131
131
  files:
132
+ - ".github/workflows/ci.yml"
132
133
  - ".gitignore"
133
- - ".travis.yml"
134
134
  - Gemfile
135
135
  - LICENSE.txt
136
136
  - README.md
@@ -155,7 +155,7 @@ homepage: https://github.com/Sirupsen/progressrus
155
155
  licenses:
156
156
  - MIT
157
157
  metadata: {}
158
- post_install_message:
158
+ post_install_message:
159
159
  rdoc_options: []
160
160
  require_paths:
161
161
  - lib
@@ -170,8 +170,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
170
170
  - !ruby/object:Gem::Version
171
171
  version: '0'
172
172
  requirements: []
173
- rubygems_version: 3.0.3
174
- signing_key:
173
+ rubygems_version: 3.3.3
174
+ signing_key:
175
175
  specification_version: 4
176
176
  summary: Monitor the progress of remote, long-running jobs.
177
177
  test_files:
data/.travis.yml DELETED
@@ -1,8 +0,0 @@
1
- language: ruby
2
- services:
3
- - redis-server
4
- rvm:
5
- - 2.4
6
- - 2.5
7
- - 2.6
8
- - 2.7