progressrus 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +38 -0
- data/lib/progressrus/store/redis.rb +3 -3
- data/lib/progressrus/version.rb +1 -1
- data/test/integration_test.rb +2 -2
- metadata +7 -7
- data/.travis.yml +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d353cca4bf4eca46acd2837f9e62f6dbe35834cd3efe00bf66ece1c02a2924d0
|
4
|
+
data.tar.gz: 2b8c0dc2e6ec18c4f22b3a911bedfbcd73232517c4576dcc4971c46fc7abaabb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
22
|
-
|
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
|
data/lib/progressrus/version.rb
CHANGED
data/test/integration_test.rb
CHANGED
@@ -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.
|
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:
|
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.
|
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:
|