tomo 1.20.3 → 1.21.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 36f41f85965651a3d63c2e38d800950d3dc725cd74c0089ac67954b5174f72a9
4
- data.tar.gz: c08730260a28aa24909906adffd5c1e8c2bf6242f8d24bbd5bf4a25d950d36f7
3
+ metadata.gz: ac5052452c7e4056f5f317b6b47bc8f38392c5446184e53eeaaaa78cff8d1f22
4
+ data.tar.gz: 303a428217f2d40d32248ce38b04e3297c8d8b37bc95afa420ca59a115d60299
5
5
  SHA512:
6
- metadata.gz: 1c6320cc0ece0ede078cbe064c9b46b0a07a67055877c66823bf916ee333b9fb3b0bb1d497c6a44a33511efe312138c6783f9a0ebe2589422899b7a26c315218
7
- data.tar.gz: b238053c2d80970d5610f2e30d58437bbd97ce67b4dfacffbe0490c68c1b4a22e384876d1a16f94241c9e850888702963f163bb9701e56b633bb8a70cd79f225
6
+ metadata.gz: 330eaeb416788e15f1d607ea47a7f14562f2f7592a752d61a1325dc867a2ff241b1a239384d8a9fd62f3b0786c6cffa4e886826b7dd6f551f7b5c1922dbf347b
7
+ data.tar.gz: 1bcb68c9a20e9790ad270183bc3172622fcf440cd18a9183cd12053c2f6381d9683ba44ae49a1a8a80d484f074c437a7300a08ca1c3ee3deb58ebe1a9c900c26
data/README.md CHANGED
@@ -3,7 +3,6 @@
3
3
  [![Gem Version](https://img.shields.io/gem/v/tomo)](https://rubygems.org/gems/tomo)
4
4
  [![Gem Downloads](https://img.shields.io/gem/dt/tomo)](https://www.ruby-toolbox.com/projects/tomo)
5
5
  [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/mattbrictson/tomo/ci.yml)](https://github.com/mattbrictson/tomo/actions/workflows/ci.yml)
6
- [![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/mattbrictson/tomo)](https://codeclimate.com/github/mattbrictson/tomo)
7
6
 
8
7
  Tomo is a friendly command-line tool for deploying Rails apps.
9
8
 
@@ -8,8 +8,8 @@ module Tomo
8
8
  parser.arg(spec, values:)
9
9
  end
10
10
 
11
- def option(key, spec, desc=nil, values: [], &block)
12
- parser.option(key, spec, desc, values:, &block)
11
+ def option(key, spec, desc=nil, values: [], &)
12
+ parser.option(key, spec, desc, values:, &)
13
13
  end
14
14
 
15
15
  def after_parse(context_method_name)
@@ -42,10 +42,10 @@ module Tomo
42
42
  settings.keys.map { |sett| "#{sett}=" }
43
43
  end
44
44
 
45
- def prompt_for_environment(*args, options)
45
+ def prompt_for_environment(*, options)
46
46
  return unless options[:environment].nil?
47
47
 
48
- envs = environment_names(*args, options)
48
+ envs = environment_names(*, options)
49
49
  return if envs.empty?
50
50
  return unless Console.interactive?
51
51
 
@@ -22,8 +22,8 @@ module Tomo
22
22
  rules.add_arg(spec, proc_for(values))
23
23
  end
24
24
 
25
- def option(key, spec, desc=nil, values: [], &block)
26
- rules.add_option(key, spec, proc_for(values), &block)
25
+ def option(key, spec, desc=nil, values: [], &)
26
+ rules.add_option(key, spec, proc_for(values), &)
27
27
  usage.add_option(spec, desc)
28
28
  end
29
29
 
@@ -3,8 +3,8 @@
3
3
  module Tomo
4
4
  class CLI
5
5
  class RulesEvaluator
6
- def self.evaluate(**kwargs)
7
- new(**kwargs).call
6
+ def self.evaluate(**)
7
+ new(**).call
8
8
  end
9
9
 
10
10
  def initialize(rules:, argv:, state:, literal:, completions: nil)
@@ -52,11 +52,11 @@ module Tomo
52
52
  BANNER
53
53
  end
54
54
 
55
- def call(task, *args, options)
55
+ def call(task, *, options)
56
56
  logger.info "tomo run v#{Tomo::VERSION}"
57
57
 
58
58
  runtime = configure_runtime(options)
59
- plan = runtime.run!(task, *args, privileged: options[:privileged])
59
+ plan = runtime.run!(task, *, privileged: options[:privileged])
60
60
  log_completion(task, plan)
61
61
  end
62
62
 
data/lib/tomo/console.rb CHANGED
@@ -11,6 +11,7 @@ module Tomo
11
11
 
12
12
  class << self
13
13
  extend Forwardable
14
+
14
15
  def_delegators :@instance, :interactive?, :prompt, :menu
15
16
  end
16
17
 
data/lib/tomo/host.rb CHANGED
@@ -7,12 +7,12 @@ module Tomo
7
7
 
8
8
  attr_reader :address, :log_prefix, :user, :port, :roles, :as_privileged
9
9
 
10
- def self.parse(host, **kwargs)
10
+ def self.parse(host, **)
11
11
  host = host.to_s.strip
12
12
  user, address = host.match(PATTERN).captures
13
13
  raise ArgumentError, "host cannot be blank" if address.empty?
14
14
 
15
- new(user:, address:, **kwargs)
15
+ new(user:, address:, **)
16
16
  end
17
17
 
18
18
  def initialize(address:, port: nil, log_prefix: nil, roles: nil, user: nil, privileged_user: "root")
@@ -8,8 +8,8 @@ module Tomo::Plugin::Bundler
8
8
  end
9
9
  end
10
10
 
11
- def bundle?(*args, **opts)
12
- result = bundle(*args, **opts, raise_on_error: false)
11
+ def bundle?(*, **)
12
+ result = bundle(*, **, raise_on_error: false)
13
13
  result.success?
14
14
  end
15
15
  end
@@ -14,8 +14,8 @@ module Tomo::Plugin::Rails
14
14
  end
15
15
  end
16
16
 
17
- def rake?(*args, **opts)
18
- result = rake(*args, **opts, raise_on_error: false)
17
+ def rake?(*, **)
18
+ result = rake(*, **, raise_on_error: false)
19
19
  result.success?
20
20
  end
21
21
 
@@ -5,6 +5,7 @@ raise "The testing plugin cannot be used outside of unit tests" unless defined?(
5
5
  module Tomo::Plugin
6
6
  class Testing < Tomo::TaskLibrary
7
7
  extend Tomo::PluginDSL
8
+
8
9
  tasks self
9
10
 
10
11
  def call_helper
data/lib/tomo/remote.rb CHANGED
@@ -7,6 +7,7 @@ module Tomo
7
7
  include TaskAPI
8
8
 
9
9
  extend Forwardable
10
+
10
11
  def_delegators :ssh, :close, :host
11
12
  def_delegators :shell_builder, :chdir, :env, :prepend, :umask
12
13
 
@@ -3,10 +3,10 @@
3
3
  module Tomo
4
4
  class Runtime
5
5
  class InlineThreadPool
6
- def post(*args)
6
+ def post(*)
7
7
  return if failure?
8
8
 
9
- yield(*args)
9
+ yield(*)
10
10
  nil
11
11
  rescue StandardError => e
12
12
  self.failure = e
@@ -38,8 +38,8 @@ module Tomo
38
38
  host.scripts.map(&:to_s)
39
39
  end
40
40
 
41
- def mock_script_result(script=/.*/, **kwargs)
42
- host.mock(script, **kwargs)
41
+ def mock_script_result(script=/.*/, **)
42
+ host.mock(script, **)
43
43
  self
44
44
  end
45
45
 
@@ -121,7 +121,7 @@ class Unit
121
121
  end
122
122
 
123
123
  class Service < Unit
124
- def is_active # rubocop:disable Naming/PredicateName
124
+ def is_active # rubocop:disable Naming/PredicatePrefix
125
125
  exit(false) unless started?
126
126
  puts "active"
127
127
  end
data/lib/tomo/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tomo
4
- VERSION = "1.20.3"
4
+ VERSION = "1.21.0"
5
5
  end
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.20.3
4
+ version: 1.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Brictson
@@ -181,14 +181,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
181
181
  requirements:
182
182
  - - ">="
183
183
  - !ruby/object:Gem::Version
184
- version: '3.1'
184
+ version: '3.2'
185
185
  required_rubygems_version: !ruby/object:Gem::Requirement
186
186
  requirements:
187
187
  - - ">="
188
188
  - !ruby/object:Gem::Version
189
189
  version: '0'
190
190
  requirements: []
191
- rubygems_version: 3.6.7
191
+ rubygems_version: 3.7.1
192
192
  specification_version: 4
193
193
  summary: A friendly CLI for deploying Rails apps ✨
194
194
  test_files: []