tomo 1.22.0 → 1.22.1
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/lib/tomo/error.rb +1 -1
- data/lib/tomo/plugin/puma/tasks.rb +5 -2
- data/lib/tomo/runtime/execution_plan.rb +1 -1
- data/lib/tomo/testing/systemctl.rb +3 -3
- data/lib/tomo/version.rb +1 -1
- 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: 5ab6df6968dd42a95ca984a38b14a817c0d0a947454441d844515fdc0dae5f8b
|
|
4
|
+
data.tar.gz: 02acf3183ca8fd770437d67a33efa21fe32b56af223d6b0c281b89a549b3fc97
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9328f7bcc5b49da0af09bec1a1cb03bbbef8a47b7fd31e2105005ab644ac4fcf93f17b432041a6ae158f45393adb881627ef0d8a4b218df818a6d945611bae0c
|
|
7
|
+
data.tar.gz: f9d299f3fca94e68d67e8a44e669a0e24ce84b9c8afcb1f9615ac272dfee1c9a93d53f352c3e1535ffb749a9cbca6f0b6786861b03a29a0f911544e62b8ae59d
|
data/lib/tomo/error.rb
CHANGED
|
@@ -6,7 +6,7 @@ module Tomo
|
|
|
6
6
|
|
|
7
7
|
include Colors
|
|
8
8
|
|
|
9
|
-
def self.raise_with(message=nil, attributes)
|
|
9
|
+
def self.raise_with(message=nil, attributes) # rubocop:disable Style/OptionalArguments
|
|
10
10
|
err = new(message)
|
|
11
11
|
attributes.each { |attr, value| err.public_send(:"#{attr}=", value) }
|
|
12
12
|
raise err
|
|
@@ -4,6 +4,9 @@ module Tomo::Plugin::Puma
|
|
|
4
4
|
class Tasks < Tomo::TaskLibrary
|
|
5
5
|
SystemdUnit = Struct.new(:name, :template, :path)
|
|
6
6
|
|
|
7
|
+
# Exposed to allow override during unit tests
|
|
8
|
+
def self.polling_delay = 1
|
|
9
|
+
|
|
7
10
|
def setup_systemd # rubocop:disable Metrics/AbcSize
|
|
8
11
|
linger_must_be_enabled!
|
|
9
12
|
|
|
@@ -90,7 +93,7 @@ module Tomo::Plugin::Puma
|
|
|
90
93
|
def wait_until
|
|
91
94
|
timeout = settings[:puma_check_timeout].to_i
|
|
92
95
|
start = Time.now.to_i
|
|
93
|
-
delay =
|
|
96
|
+
delay = self.class.polling_delay
|
|
94
97
|
|
|
95
98
|
loop do
|
|
96
99
|
sleep delay
|
|
@@ -99,7 +102,7 @@ module Tomo::Plugin::Puma
|
|
|
99
102
|
elapsed = Time.now.to_i - start
|
|
100
103
|
return false if elapsed >= timeout
|
|
101
104
|
|
|
102
|
-
delay = [delay +
|
|
105
|
+
delay = [delay + self.class.polling_delay, timeout - elapsed].min
|
|
103
106
|
end
|
|
104
107
|
end
|
|
105
108
|
|
|
@@ -26,7 +26,7 @@ module Tomo
|
|
|
26
26
|
|
|
27
27
|
case applicable_hosts.length
|
|
28
28
|
when 1 then applicable_hosts.first.to_s
|
|
29
|
-
when 2 then applicable_hosts.
|
|
29
|
+
when 2 then applicable_hosts.join(" and ")
|
|
30
30
|
else
|
|
31
31
|
"#{applicable_hosts.first} and #{applicable_hosts.length - 1} other hosts"
|
|
32
32
|
end
|
|
@@ -120,7 +120,7 @@ class Unit
|
|
|
120
120
|
end
|
|
121
121
|
end
|
|
122
122
|
|
|
123
|
-
class Service < Unit
|
|
123
|
+
class Service < Unit # rubocop:disable Style/OneClassPerFile
|
|
124
124
|
def is_active # rubocop:disable Naming/PredicatePrefix
|
|
125
125
|
exit(false) unless started?
|
|
126
126
|
puts "active"
|
|
@@ -176,8 +176,8 @@ class Service < Unit
|
|
|
176
176
|
end
|
|
177
177
|
|
|
178
178
|
def with_detached_io
|
|
179
|
-
null_in = File.open(File::NULL, "r")
|
|
180
|
-
null_out = File.open(File::NULL, "w")
|
|
179
|
+
null_in = File.open(File::NULL, "r") # rubocop:disable Style/FileOpen
|
|
180
|
+
null_out = File.open(File::NULL, "w") # rubocop:disable Style/FileOpen
|
|
181
181
|
$stdin.reopen(null_in)
|
|
182
182
|
$stderr.reopen(null_out)
|
|
183
183
|
$stdout.reopen(null_out)
|
data/lib/tomo/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tomo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.22.
|
|
4
|
+
version: 1.22.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matt Brictson
|
|
@@ -188,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
188
188
|
- !ruby/object:Gem::Version
|
|
189
189
|
version: '0'
|
|
190
190
|
requirements: []
|
|
191
|
-
rubygems_version: 4.0.
|
|
191
|
+
rubygems_version: 4.0.17
|
|
192
192
|
specification_version: 4
|
|
193
193
|
summary: A friendly CLI for deploying Rails apps ✨
|
|
194
194
|
test_files: []
|