tomo 1.19.0 → 1.20.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/tomo +1 -0
- data/lib/tomo/cli/command.rb +2 -0
- data/lib/tomo/cli/common_options.rb +2 -0
- data/lib/tomo/cli/completions.rb +2 -0
- data/lib/tomo/cli/deploy_options.rb +2 -0
- data/lib/tomo/cli/error.rb +2 -0
- data/lib/tomo/cli/interrupted_error.rb +2 -0
- data/lib/tomo/cli/options.rb +2 -0
- data/lib/tomo/cli/parser.rb +2 -0
- data/lib/tomo/cli/project_options.rb +2 -0
- data/lib/tomo/cli/rules/argument.rb +2 -0
- data/lib/tomo/cli/rules/switch.rb +2 -0
- data/lib/tomo/cli/rules/value_switch.rb +2 -0
- data/lib/tomo/cli/rules.rb +2 -0
- data/lib/tomo/cli/rules_evaluator.rb +2 -0
- data/lib/tomo/cli/state.rb +2 -0
- data/lib/tomo/cli/usage.rb +2 -0
- data/lib/tomo/cli.rb +2 -0
- data/lib/tomo/colors.rb +2 -0
- data/lib/tomo/commands/completion_script.rb +2 -0
- data/lib/tomo/commands/default.rb +2 -0
- data/lib/tomo/commands/deploy.rb +2 -0
- data/lib/tomo/commands/help.rb +2 -0
- data/lib/tomo/commands/init.rb +2 -0
- data/lib/tomo/commands/run.rb +2 -0
- data/lib/tomo/commands/setup.rb +2 -0
- data/lib/tomo/commands/tasks.rb +2 -0
- data/lib/tomo/commands/version.rb +2 -0
- data/lib/tomo/commands.rb +2 -0
- data/lib/tomo/configuration/dsl/batch_block.rb +2 -0
- data/lib/tomo/configuration/dsl/config_file.rb +2 -0
- data/lib/tomo/configuration/dsl/environment_block.rb +2 -0
- data/lib/tomo/configuration/dsl/error_formatter.rb +3 -1
- data/lib/tomo/configuration/dsl/hosts_and_settings.rb +2 -0
- data/lib/tomo/configuration/dsl/tasks_block.rb +2 -0
- data/lib/tomo/configuration/dsl.rb +2 -0
- data/lib/tomo/configuration/environment.rb +2 -0
- data/lib/tomo/configuration/glob.rb +2 -0
- data/lib/tomo/configuration/plugin_file_not_found_error.rb +2 -0
- data/lib/tomo/configuration/plugins_registry/file_resolver.rb +2 -0
- data/lib/tomo/configuration/plugins_registry/gem_resolver.rb +3 -1
- data/lib/tomo/configuration/plugins_registry.rb +2 -0
- data/lib/tomo/configuration/project_not_found_error.rb +2 -0
- data/lib/tomo/configuration/role_based_task_filter.rb +2 -0
- data/lib/tomo/configuration/unknown_environment_error.rb +4 -2
- data/lib/tomo/configuration/unknown_plugin_error.rb +4 -2
- data/lib/tomo/configuration/unspecified_environment_error.rb +2 -0
- data/lib/tomo/configuration.rb +2 -0
- data/lib/tomo/console/key_reader.rb +4 -2
- data/lib/tomo/console/menu.rb +6 -4
- data/lib/tomo/console/non_interactive_error.rb +4 -2
- data/lib/tomo/console.rb +2 -0
- data/lib/tomo/error/suggestions.rb +2 -0
- data/lib/tomo/error.rb +2 -0
- data/lib/tomo/host.rb +2 -0
- data/lib/tomo/logger/tagged_io.rb +2 -0
- data/lib/tomo/logger.rb +2 -0
- data/lib/tomo/path.rb +2 -0
- data/lib/tomo/paths.rb +2 -0
- data/lib/tomo/plugin/bundler/helpers.rb +2 -0
- data/lib/tomo/plugin/bundler/tasks.rb +2 -0
- data/lib/tomo/plugin/bundler.rb +2 -0
- data/lib/tomo/plugin/core/helpers.rb +2 -0
- data/lib/tomo/plugin/core/tasks.rb +2 -0
- data/lib/tomo/plugin/core.rb +2 -0
- data/lib/tomo/plugin/env/tasks.rb +2 -0
- data/lib/tomo/plugin/env.rb +2 -0
- data/lib/tomo/plugin/git/helpers.rb +2 -0
- data/lib/tomo/plugin/git/tasks.rb +2 -0
- data/lib/tomo/plugin/git.rb +2 -0
- data/lib/tomo/plugin/nodenv/tasks.rb +2 -0
- data/lib/tomo/plugin/nodenv.rb +2 -0
- data/lib/tomo/plugin/puma/tasks.rb +2 -0
- data/lib/tomo/plugin/puma.rb +2 -0
- data/lib/tomo/plugin/rails/helpers.rb +2 -0
- data/lib/tomo/plugin/rails/tasks.rb +2 -0
- data/lib/tomo/plugin/rails.rb +2 -0
- data/lib/tomo/plugin/rbenv/tasks.rb +2 -0
- data/lib/tomo/plugin/rbenv.rb +2 -0
- data/lib/tomo/plugin/testing.rb +2 -0
- data/lib/tomo/plugin.rb +2 -0
- data/lib/tomo/plugin_dsl.rb +2 -0
- data/lib/tomo/remote.rb +2 -0
- data/lib/tomo/result.rb +3 -1
- data/lib/tomo/runtime/concurrent_ruby_load_error.rb +2 -0
- data/lib/tomo/runtime/concurrent_ruby_thread_pool.rb +2 -0
- data/lib/tomo/runtime/context.rb +2 -0
- data/lib/tomo/runtime/current.rb +2 -0
- data/lib/tomo/runtime/execution_plan.rb +2 -0
- data/lib/tomo/runtime/explanation.rb +3 -1
- data/lib/tomo/runtime/host_execution_step.rb +2 -0
- data/lib/tomo/runtime/inline_thread_pool.rb +2 -0
- data/lib/tomo/runtime/no_tasks_error.rb +2 -0
- data/lib/tomo/runtime/privileged_task.rb +2 -0
- data/lib/tomo/runtime/settings_interpolation.rb +3 -1
- data/lib/tomo/runtime/settings_required_error.rb +3 -1
- data/lib/tomo/runtime/task_aborted_error.rb +2 -0
- data/lib/tomo/runtime/task_runner.rb +2 -0
- data/lib/tomo/runtime/template_not_found_error.rb +2 -0
- data/lib/tomo/runtime/unknown_task_error.rb +3 -1
- data/lib/tomo/runtime.rb +2 -0
- data/lib/tomo/script.rb +2 -0
- data/lib/tomo/shell_builder.rb +2 -0
- data/lib/tomo/ssh/child_process.rb +2 -0
- data/lib/tomo/ssh/connection.rb +2 -0
- data/lib/tomo/ssh/connection_error.rb +2 -0
- data/lib/tomo/ssh/connection_validator.rb +2 -0
- data/lib/tomo/ssh/error.rb +2 -0
- data/lib/tomo/ssh/executable_error.rb +2 -0
- data/lib/tomo/ssh/options.rb +4 -2
- data/lib/tomo/ssh/permission_error.rb +2 -0
- data/lib/tomo/ssh/script_error.rb +2 -0
- data/lib/tomo/ssh/unknown_error.rb +2 -0
- data/lib/tomo/ssh/unsupported_version_error.rb +2 -0
- data/lib/tomo/ssh.rb +2 -0
- data/lib/tomo/task_api.rb +2 -0
- data/lib/tomo/task_library.rb +2 -0
- data/lib/tomo/testing/Dockerfile +1 -1
- data/lib/tomo/testing/cli_extensions.rb +2 -0
- data/lib/tomo/testing/cli_tester.rb +2 -0
- data/lib/tomo/testing/connection.rb +2 -0
- data/lib/tomo/testing/docker_image.rb +4 -2
- data/lib/tomo/testing/host_extensions.rb +3 -1
- data/lib/tomo/testing/local.rb +2 -0
- data/lib/tomo/testing/log_capturing.rb +2 -0
- data/lib/tomo/testing/mock_plugin_tester.rb +2 -0
- data/lib/tomo/testing/mocked_exec_error.rb +2 -0
- data/lib/tomo/testing/mocked_exit_error.rb +2 -0
- data/lib/tomo/testing/remote_extensions.rb +2 -0
- data/lib/tomo/testing/ssh_extensions.rb +2 -0
- data/lib/tomo/testing/systemctl.rb +1 -0
- data/lib/tomo/testing/ubuntu_setup.sh +3 -1
- data/lib/tomo/testing.rb +2 -0
- data/lib/tomo/version.rb +3 -1
- data/lib/tomo.rb +3 -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: 818e5cca74aa96ed436ea031e78780f927b07fdbdfd9cf43a52b35ddca393a48
|
4
|
+
data.tar.gz: cfacd1ee7b6d7bd0748c55493f7b3e0e2d1aedb022ff095b406bfaec85129254
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad640825bf0973ef78e3a29d79290487f1a7fa73550fc40e26bb464df1438bb66d8659035588f3219a9661ad7be5aafbd43e28e0cf62e95a8977fafa68a210fc
|
7
|
+
data.tar.gz: d329fb4f7bfa764532f453f9cadd92ae83060503de15ba97a235eeec0ce47faa1e520b6113622bebc63a00b93822ea0de662a247117554fba0d478e11baf8ba9
|
data/exe/tomo
CHANGED
data/lib/tomo/cli/command.rb
CHANGED
data/lib/tomo/cli/completions.rb
CHANGED
data/lib/tomo/cli/error.rb
CHANGED
data/lib/tomo/cli/options.rb
CHANGED
data/lib/tomo/cli/parser.rb
CHANGED
data/lib/tomo/cli/rules.rb
CHANGED
data/lib/tomo/cli/state.rb
CHANGED
data/lib/tomo/cli/usage.rb
CHANGED
data/lib/tomo/cli.rb
CHANGED
data/lib/tomo/colors.rb
CHANGED
data/lib/tomo/commands/deploy.rb
CHANGED
data/lib/tomo/commands/help.rb
CHANGED
data/lib/tomo/commands/init.rb
CHANGED
data/lib/tomo/commands/run.rb
CHANGED
data/lib/tomo/commands/setup.rb
CHANGED
data/lib/tomo/commands/tasks.rb
CHANGED
data/lib/tomo/commands.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Tomo
|
2
4
|
class Configuration
|
3
5
|
module DSL
|
@@ -55,7 +57,7 @@ module Tomo
|
|
55
57
|
last = [dsl_lines.length, error_line_no + 1].min
|
56
58
|
width = last.to_s.length
|
57
59
|
|
58
|
-
(first..last).each_with_object("") do |line_no, result|
|
60
|
+
(first..last).each_with_object(+"") do |line_no, result|
|
59
61
|
line = dsl_lines[line_no - 1]
|
60
62
|
line_no_prefix = line_no.to_s.rjust(width)
|
61
63
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Tomo
|
2
4
|
class Configuration
|
3
5
|
class UnknownEnvironmentError < Tomo::Error
|
@@ -23,10 +25,10 @@ module Tomo
|
|
23
25
|
ERROR
|
24
26
|
|
25
27
|
if suggestions.any?
|
26
|
-
error
|
28
|
+
error + suggestions.to_console
|
27
29
|
else
|
28
30
|
envs = known_environments.map { |env| blue(" #{env}") }
|
29
|
-
error
|
31
|
+
error + <<~ENVS
|
30
32
|
|
31
33
|
The following environments are available:
|
32
34
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Tomo
|
2
4
|
class Configuration
|
3
5
|
class UnknownPluginError < Tomo::Error
|
@@ -9,9 +11,9 @@ module Tomo
|
|
9
11
|
ERROR
|
10
12
|
|
11
13
|
sugg = Error::Suggestions.new(dictionary: known_plugins, word: name)
|
12
|
-
error
|
14
|
+
error += sugg.to_console if sugg.any?
|
13
15
|
|
14
|
-
error
|
16
|
+
error + gem_suggestion
|
15
17
|
end
|
16
18
|
|
17
19
|
private
|
data/lib/tomo/configuration.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "forwardable"
|
2
4
|
require "io/console"
|
3
5
|
require "time"
|
@@ -8,7 +10,7 @@ module Tomo
|
|
8
10
|
extend Forwardable
|
9
11
|
|
10
12
|
def initialize(input=$stdin)
|
11
|
-
@buffer = ""
|
13
|
+
@buffer = +""
|
12
14
|
@input = input
|
13
15
|
end
|
14
16
|
|
@@ -35,7 +37,7 @@ module Tomo
|
|
35
37
|
end
|
36
38
|
|
37
39
|
def read_chars_nonblock
|
38
|
-
chars = ""
|
40
|
+
chars = +""
|
39
41
|
loop do
|
40
42
|
next_char = raw { read_nonblock(1) }
|
41
43
|
break if next_char.nil?
|
data/lib/tomo/console/menu.rb
CHANGED
@@ -1,13 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "forwardable"
|
2
4
|
require "io/console"
|
3
5
|
|
4
6
|
module Tomo
|
5
7
|
class Console
|
6
8
|
class Menu
|
7
|
-
ARROW_UP = "\e[A"
|
8
|
-
ARROW_DOWN = "\e[B"
|
9
|
-
RETURN = "\r"
|
10
|
-
ENTER = "\n"
|
9
|
+
ARROW_UP = "\e[A"
|
10
|
+
ARROW_DOWN = "\e[B"
|
11
|
+
RETURN = "\r"
|
12
|
+
ENTER = "\n"
|
11
13
|
|
12
14
|
extend Forwardable
|
13
15
|
include Colors
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Tomo
|
2
4
|
class Console
|
3
5
|
class NonInteractiveError < Tomo::Error
|
@@ -5,8 +7,8 @@ module Tomo
|
|
5
7
|
|
6
8
|
def to_console
|
7
9
|
error = ""
|
8
|
-
error
|
9
|
-
error
|
10
|
+
error += "#{operation_name} requires an interactive console."
|
11
|
+
error += "\n\n#{seems_like_ci}" if ci_var
|
10
12
|
error
|
11
13
|
end
|
12
14
|
|
data/lib/tomo/console.rb
CHANGED
data/lib/tomo/error.rb
CHANGED
data/lib/tomo/host.rb
CHANGED
data/lib/tomo/logger.rb
CHANGED
data/lib/tomo/path.rb
CHANGED
data/lib/tomo/paths.rb
CHANGED
data/lib/tomo/plugin/bundler.rb
CHANGED
data/lib/tomo/plugin/core.rb
CHANGED
data/lib/tomo/plugin/env.rb
CHANGED
data/lib/tomo/plugin/git.rb
CHANGED
data/lib/tomo/plugin/nodenv.rb
CHANGED
data/lib/tomo/plugin/puma.rb
CHANGED