deploy_pin 1.3.7 → 1.3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/deploy_pin/collector.rb +4 -6
- data/lib/deploy_pin/version.rb +1 -1
- data/lib/generators/deploy_pin/install/templates/deploy_pin.rb +2 -2
- 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: e3d6aa336c010d58ff4462cc64038351fa67432faf2f4dd3e094b12d3c912c9e
|
4
|
+
data.tar.gz: a9e8d29ac5e8db0c207f2e40a59f6d77013c98efbf7e9cb38c5b1e1b6840f577
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf2efc8fd1cc48f8e1bf5568bb11544d6a20510e7bbfa2ae81f63f831da6776945b6dc22e5d9befa444c77d042b3d6a9a87bb9b40f246c4a54e9801fd960069a
|
7
|
+
data.tar.gz: 1527b98cccfec97dad84286cea3063c9a76a051f9286a8be01181bb1bd1c6032e94693b57ed1f3cfea7b1286a2849d5fa2e36a0d8e7a1fe90f41dba946212c63
|
data/README.md
CHANGED
@@ -143,7 +143,7 @@ end
|
|
143
143
|
Check the documentation [here](lib/deploy_pin/parallel_wrapper.rb).
|
144
144
|
|
145
145
|
## Formatting
|
146
|
-
`run_formatter` is used to format the output of a `run` task
|
146
|
+
`run_formatter` is used to format the output of a `run` task
|
147
147
|
`list_formatter` is used to format the output of a `list` task
|
148
148
|
|
149
149
|
A default value must be defined in the deploy_pin initializer. Ex.:
|
@@ -151,9 +151,9 @@ A default value must be defined in the deploy_pin initializer. Ex.:
|
|
151
151
|
# config/initializers/deploy_pin.rb
|
152
152
|
DeployPin.setup do
|
153
153
|
run_formatter(
|
154
|
-
lambda do |index, task_count, task, executable, start,
|
154
|
+
lambda do |index, task_count, task, executable, start, duration = nil|
|
155
155
|
end_of_msg = if executable
|
156
|
-
start ? '(Started)' : "(Done in #{
|
156
|
+
start ? '(Started)' : "(Done in #{duration})\n\n"
|
157
157
|
else
|
158
158
|
"(Skipped)\n\n"
|
159
159
|
end
|
data/lib/deploy_pin/collector.rb
CHANGED
@@ -3,8 +3,6 @@
|
|
3
3
|
# executes tasks
|
4
4
|
module DeployPin
|
5
5
|
class Collector
|
6
|
-
include ActionView::Helpers::DateHelper
|
7
|
-
|
8
6
|
attr_reader :identifiers, :formatter
|
9
7
|
|
10
8
|
def initialize(identifiers:)
|
@@ -22,11 +20,11 @@ module DeployPin
|
|
22
20
|
|
23
21
|
# run if executable
|
24
22
|
if executable
|
25
|
-
|
23
|
+
duration = execution_duration do
|
26
24
|
run_with_timeout(task) { task.run }
|
27
25
|
end
|
28
26
|
|
29
|
-
DeployPin.run_formatter.call(index, _tasks.count, task, executable, false,
|
27
|
+
DeployPin.run_formatter.call(index, _tasks.count, task, executable, false, duration)
|
30
28
|
end
|
31
29
|
|
32
30
|
# mark each task as done
|
@@ -81,12 +79,12 @@ module DeployPin
|
|
81
79
|
DeployPin::Database.execute_with_timeout(DeployPin.statement_timeout, **{}, &block)
|
82
80
|
end
|
83
81
|
|
84
|
-
def
|
82
|
+
def execution_duration
|
85
83
|
start_time = Time.now
|
86
84
|
|
87
85
|
yield
|
88
86
|
|
89
|
-
|
87
|
+
Time.now - start_time
|
90
88
|
end
|
91
89
|
end
|
92
90
|
end
|
data/lib/deploy_pin/version.rb
CHANGED
@@ -6,9 +6,9 @@ DeployPin.setup do
|
|
6
6
|
fallback_group 'II'
|
7
7
|
statement_timeout 10.minutes
|
8
8
|
run_formatter(
|
9
|
-
lambda do |index, task_count, task, executable, start,
|
9
|
+
lambda do |index, task_count, task, executable, start, duration = nil|
|
10
10
|
end_of_msg = if executable
|
11
|
-
start ? '(Started)' : "(Done in #{
|
11
|
+
start ? '(Started)' : "(Done in #{duration})\n\n"
|
12
12
|
else
|
13
13
|
"(Skipped)\n\n"
|
14
14
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deploy_pin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Viktor Sych
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|