tomo 1.12.1 → 1.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tomo/cli.rb +8 -2
- data/lib/tomo/colors.rb +1 -1
- data/lib/tomo/commands/tasks.rb +1 -1
- data/lib/tomo/plugin/bundler/tasks.rb +1 -4
- data/lib/tomo/plugin/rails/helpers.rb +6 -0
- data/lib/tomo/runtime/concurrent_ruby_thread_pool.rb +4 -3
- data/lib/tomo/runtime.rb +3 -3
- data/lib/tomo/ssh/options.rb +4 -2
- data/lib/tomo/templates/config.rb.erb +1 -0
- data/lib/tomo/testing/docker_image.rb +4 -2
- data/lib/tomo/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2da243b8f639993407cdb09d1bd13a5fadfa783e05b341432769149e4121a9d4
|
4
|
+
data.tar.gz: c194f68b4700a9b1ed3883e20c75ea36c5353a2a19b3db92644af1fdbbba7860
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c547b318e37b40b47737a097a15b7bbacda5bfcb446c285f91045a87f234ab8a7a3033cf1433cb8a99ce564a4463b3445be298d721dd6c8734c1e2cd8a26c97
|
7
|
+
data.tar.gz: 7342081977edf2ae5f98fe9f0b1cd39b9451a5a4ce870f2f713541041427088c830ae1ed3d975dab1eeb688362540369b1d550958b50ab91a7d9f2b4a62e776f
|
data/lib/tomo/cli.rb
CHANGED
@@ -36,6 +36,10 @@ module Tomo
|
|
36
36
|
"completion-script" => Tomo::Commands::CompletionScript
|
37
37
|
}.freeze
|
38
38
|
|
39
|
+
COMMAND_ALIASES = {
|
40
|
+
"-T" => Tomo::Commands::Tasks
|
41
|
+
}.freeze
|
42
|
+
|
39
43
|
def call(argv)
|
40
44
|
prepare_completions(argv)
|
41
45
|
command, command_name = lookup_command(argv)
|
@@ -56,12 +60,14 @@ module Tomo
|
|
56
60
|
end
|
57
61
|
|
58
62
|
def lookup_command(argv)
|
63
|
+
commands = COMMANDS.merge(COMMAND_ALIASES)
|
64
|
+
|
59
65
|
command_name = argv.first unless Completions.active? && argv.length == 1
|
60
|
-
command_name = Abbrev.abbrev(
|
66
|
+
command_name = Abbrev.abbrev(commands.keys)[command_name]
|
61
67
|
argv.shift if command_name
|
62
68
|
|
63
69
|
command_name = "run" if command_name.nil? && task_format?(argv.first)
|
64
|
-
command =
|
70
|
+
command = commands[command_name] || Tomo::Commands::Default
|
65
71
|
[command, command_name]
|
66
72
|
end
|
67
73
|
|
data/lib/tomo/colors.rb
CHANGED
data/lib/tomo/commands/tasks.rb
CHANGED
@@ -51,10 +51,7 @@ module Tomo::Plugin::Bundler
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def extract_bundler_ver_from_lockfile
|
54
|
-
lockfile_tail = remote.capture(
|
55
|
-
"tail", "-n", "10", paths.release.join("Gemfile.lock"),
|
56
|
-
raise_on_error: false
|
57
|
-
)
|
54
|
+
lockfile_tail = remote.capture("tail", "-n", "10", paths.release.join("Gemfile.lock"), raise_on_error: false)
|
58
55
|
version = lockfile_tail[/BUNDLED WITH\n (\S+)$/, 1]
|
59
56
|
return version if version || dry_run?
|
60
57
|
|
@@ -21,9 +21,10 @@ module Tomo
|
|
21
21
|
return if failure?
|
22
22
|
|
23
23
|
promises << future_on(executor, *args, &block)
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
.on_rejection_using(executor) do |reason|
|
25
|
+
self.failure = reason
|
26
|
+
end
|
27
|
+
|
27
28
|
nil
|
28
29
|
end
|
29
30
|
|
data/lib/tomo/runtime.rb
CHANGED
@@ -70,9 +70,9 @@ module Tomo
|
|
70
70
|
|
71
71
|
def new_task_runner(release_type, args)
|
72
72
|
run_settings = { release_path: release_path_for(release_type) }
|
73
|
-
|
74
|
-
|
75
|
-
|
73
|
+
.merge(local_user: Runtime.local_user)
|
74
|
+
.merge(settings)
|
75
|
+
.merge(run_args: args)
|
76
76
|
|
77
77
|
TaskRunner.new(plugins_registry: plugins_registry, settings: run_settings)
|
78
78
|
end
|
data/lib/tomo/ssh/options.rb
CHANGED
@@ -41,8 +41,10 @@ module Tomo
|
|
41
41
|
|
42
42
|
def control_opts(path, verbose)
|
43
43
|
opts = [
|
44
|
-
"-o",
|
45
|
-
"
|
44
|
+
"-o",
|
45
|
+
"ControlMaster=auto",
|
46
|
+
"-o",
|
47
|
+
"ControlPath=#{path}",
|
46
48
|
"-o"
|
47
49
|
]
|
48
50
|
opts << (verbose ? "ControlPersist=1s" : "ControlPersist=30s")
|
@@ -57,8 +57,10 @@ module Tomo
|
|
57
57
|
hosts_file = File.join(Dir.tmpdir, "tomo_#{SecureRandom.hex(8)}_hosts")
|
58
58
|
{
|
59
59
|
ssh_extra_opts: [
|
60
|
-
"-o",
|
61
|
-
"
|
60
|
+
"-o",
|
61
|
+
"UserKnownHostsFile=#{hosts_file}",
|
62
|
+
"-o",
|
63
|
+
"IdentityFile=#{private_key_path}"
|
62
64
|
],
|
63
65
|
ssh_strict_host_key_checking: false
|
64
66
|
}
|
data/lib/tomo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tomo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Brictson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Tomo is a feature-rich deployment tool that contains everything you need
|
14
14
|
to deploy a basic Rails app out of the box. It has an opinionated, production-tested
|
@@ -189,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
189
189
|
- !ruby/object:Gem::Version
|
190
190
|
version: '0'
|
191
191
|
requirements: []
|
192
|
-
rubygems_version: 3.3.
|
192
|
+
rubygems_version: 3.3.21
|
193
193
|
signing_key:
|
194
194
|
specification_version: 4
|
195
195
|
summary: A friendly CLI for deploying Rails apps ✨
|