fasten 0.16.0 → 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/.tool-versions +1 -1
- data/Gemfile.lock +14 -15
- data/README.md +1 -1
- data/fasten.gemspec +1 -1
- data/lib/fasten/runner.rb +6 -4
- data/lib/fasten/support/yaml.rb +1 -1
- data/lib/fasten/version.rb +1 -1
- data/lib/fasten.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93858ac8aab1bd5bbbb63aaf5475be37beaf50f43e4b6677822558ae21fdc024
|
4
|
+
data.tar.gz: 0bce3109d9d5aa7499746fe298427d40e94e6305a617e5b5ac6f321e1c808755
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 740fc94594c962bb8decf84dafc2c4952db90c4ccf8bccb6522a3920d0621ebb81dfe5a979a32f862baca1d0de4e9d56a5fad550614bd363bc1784e30267758e
|
7
|
+
data.tar.gz: fff1959d04192828f7c44e6c29fcf813c39877f34f719921eb0bd672eb66772f78b51a6410f3c06baa69ee64c7b12eda5dbf88d9f29fadd289f2b599a03d8e51
|
data/.rubocop.yml
CHANGED
data/.tool-versions
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby
|
1
|
+
ruby 3.0.2
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
fasten (0.
|
4
|
+
fasten (0.18.0)
|
5
5
|
binding_of_caller
|
6
6
|
hirb
|
7
7
|
os
|
@@ -14,14 +14,14 @@ GEM
|
|
14
14
|
binding_of_caller (1.0.0)
|
15
15
|
debug_inspector (>= 0.0.1)
|
16
16
|
coderay (1.1.3)
|
17
|
-
curses (1.4.
|
17
|
+
curses (1.4.2)
|
18
18
|
debug_inspector (1.1.0)
|
19
19
|
diff-lcs (1.4.4)
|
20
20
|
hirb (0.7.3)
|
21
21
|
method_source (1.0.0)
|
22
|
-
os (1.1.
|
23
|
-
parallel (1.
|
24
|
-
parser (3.0.
|
22
|
+
os (1.1.4)
|
23
|
+
parallel (1.21.0)
|
24
|
+
parser (3.0.2.0)
|
25
25
|
ast (~> 2.4.1)
|
26
26
|
pry (0.14.1)
|
27
27
|
coderay (~> 1.1)
|
@@ -42,25 +42,24 @@ GEM
|
|
42
42
|
rspec-mocks (3.10.2)
|
43
43
|
diff-lcs (>= 1.2.0, < 2.0)
|
44
44
|
rspec-support (~> 3.10.0)
|
45
|
-
rspec-support (3.10.
|
46
|
-
rubocop (1.
|
45
|
+
rspec-support (3.10.3)
|
46
|
+
rubocop (1.22.3)
|
47
47
|
parallel (~> 1.10)
|
48
48
|
parser (>= 3.0.0.0)
|
49
49
|
rainbow (>= 2.2.2, < 4.0)
|
50
50
|
regexp_parser (>= 1.8, < 3.0)
|
51
51
|
rexml
|
52
|
-
rubocop-ast (>= 1.
|
52
|
+
rubocop-ast (>= 1.12.0, < 2.0)
|
53
53
|
ruby-progressbar (~> 1.7)
|
54
54
|
unicode-display_width (>= 1.4.0, < 3.0)
|
55
|
-
rubocop-ast (1.
|
55
|
+
rubocop-ast (1.12.0)
|
56
56
|
parser (>= 3.0.1.1)
|
57
|
-
rubocop-rake (0.
|
58
|
-
rubocop
|
59
|
-
rubocop-rspec (2.3.0)
|
57
|
+
rubocop-rake (0.6.0)
|
60
58
|
rubocop (~> 1.0)
|
61
|
-
|
59
|
+
rubocop-rspec (2.5.0)
|
60
|
+
rubocop (~> 1.19)
|
62
61
|
ruby-progressbar (1.11.0)
|
63
|
-
unicode-display_width (2.
|
62
|
+
unicode-display_width (2.1.0)
|
64
63
|
|
65
64
|
PLATFORMS
|
66
65
|
ruby
|
@@ -77,4 +76,4 @@ DEPENDENCIES
|
|
77
76
|
rubocop-rspec
|
78
77
|
|
79
78
|
BUNDLED WITH
|
80
|
-
|
79
|
+
2.2.22
|
data/README.md
CHANGED
@@ -47,7 +47,7 @@ It has been released so people can try it and make feature requests, comments an
|
|
47
47
|
- [x] Console is the default if STDOUT/STDIN is not a tty
|
48
48
|
- [x] Display each task as is being finished
|
49
49
|
- [ ] Calculate ETA, assuming all tasks take same time
|
50
|
-
- [
|
50
|
+
- [x] Calculate ETA, based on saved tasks statistics
|
51
51
|
|
52
52
|
|
53
53
|
### CLI
|
data/fasten.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
11
11
|
spec.description = 'Fasten your seatbelts! Run jobs in parallel, intelligently.'
|
12
12
|
spec.homepage = 'https://github.com/a0/a0-fasten-ruby/'
|
13
13
|
spec.license = 'MIT'
|
14
|
-
spec.required_ruby_version = Gem::Requirement.new('>=
|
14
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 3.0.2')
|
15
15
|
|
16
16
|
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
17
17
|
|
data/lib/fasten/runner.rb
CHANGED
@@ -28,7 +28,7 @@ module Fasten
|
|
28
28
|
@tasks = TaskManager.new(targets: options[:targets] || [], runner: self)
|
29
29
|
@workers = []
|
30
30
|
|
31
|
-
reconfigure(options)
|
31
|
+
reconfigure(**options)
|
32
32
|
end
|
33
33
|
|
34
34
|
def reconfigure(**options)
|
@@ -40,7 +40,9 @@ module Fasten
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def task(name, **opts, &block)
|
43
|
-
|
43
|
+
opts[:name] = name
|
44
|
+
opts[:block] = block
|
45
|
+
tasks << task = Task.new(**opts)
|
44
46
|
|
45
47
|
task
|
46
48
|
end
|
@@ -111,7 +113,7 @@ module Fasten
|
|
111
113
|
dispatch_pending_tasks
|
112
114
|
end
|
113
115
|
|
114
|
-
break if tasks.no_running? && tasks.no_waiting? || state == :QUIT
|
116
|
+
break if (tasks.no_running? && tasks.no_waiting?) || state == :QUIT
|
115
117
|
end
|
116
118
|
|
117
119
|
remove_all_workers
|
@@ -129,7 +131,7 @@ module Fasten
|
|
129
131
|
end
|
130
132
|
|
131
133
|
def should_wait_for_running_tasks?
|
132
|
-
tasks.running? && (tasks.no_waiting? || tasks.failed? || %i[PAUSING QUITTING].include?(state)) || tasks.running.map(&:weight).sum >= jobs
|
134
|
+
(tasks.running? && (tasks.no_waiting? || tasks.failed? || %i[PAUSING QUITTING].include?(state))) || tasks.running.map(&:weight).sum >= jobs
|
133
135
|
end
|
134
136
|
|
135
137
|
def wait_for_running_tasks
|
data/lib/fasten/support/yaml.rb
CHANGED
data/lib/fasten/version.rb
CHANGED
data/lib/fasten.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fasten
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aldrin Martoq
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curses
|
@@ -195,14 +195,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
195
195
|
requirements:
|
196
196
|
- - ">="
|
197
197
|
- !ruby/object:Gem::Version
|
198
|
-
version:
|
198
|
+
version: 3.0.2
|
199
199
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
200
200
|
requirements:
|
201
201
|
- - ">="
|
202
202
|
- !ruby/object:Gem::Version
|
203
203
|
version: '0'
|
204
204
|
requirements: []
|
205
|
-
rubygems_version: 3.
|
205
|
+
rubygems_version: 3.2.22
|
206
206
|
signing_key:
|
207
207
|
specification_version: 4
|
208
208
|
summary: Fasten your seatbelts! Run jobs in parallel, intelligently.
|