tomo 1.18.1 → 1.18.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1df37ae46768cbf38ec93e0a12a25344daf0214e4d51ec36e94b0910cc52fe09
4
- data.tar.gz: 3005404f4cbb57a5bf7ef3df25cb6a84e55ab4a67752dae7022399bc2f8125a5
3
+ metadata.gz: 5e009fc663164b91e6dd0ad03333d704014775100f9b0aa222f691f6048f2b72
4
+ data.tar.gz: bb0943cdba7ef40ab5e2ab826826cf189e1ceec7f3ecaf6f55307117bb95d85d
5
5
  SHA512:
6
- metadata.gz: 5e06977997842a6ee0594857e1ae70d6c4d1bd9f5780d62d47b33b5e6b3aca7bf68d2ab5238b0074113f21a6ecea941afa3e721ad8a68b7f0ce2b6ad5a40663f
7
- data.tar.gz: 0e1194fcdf339e9f52744fe1de2152d86350c812c5b4ad3035a5b25b4f84eb0a87e73e5c4802813acad916af41da78819b795ad27b93a73f9289b93925283914
6
+ metadata.gz: 636abb08a843308c021677869941769fb4cf0f52143a54b7d8cb9132ae99c5b46a26731b9af196715f36f8b1b7cc513278feb1edfdc8f3d686a71b06b1abf547
7
+ data.tar.gz: 4f63cb3204cc73a707194daaffc9365e52e33bc5abb3131546177f86563783c3b4f08e24c9f1f65a8da4e686ba6fc92387560708b21ff18076f0228e814948f6
data/lib/tomo/cli.rb CHANGED
@@ -1,5 +1,3 @@
1
- require "abbrev"
2
-
3
1
  module Tomo
4
2
  class CLI
5
3
  autoload :Command, "tomo/cli/command"
@@ -63,7 +61,7 @@ module Tomo
63
61
  commands = COMMANDS.merge(COMMAND_ALIASES)
64
62
 
65
63
  command_name = argv.first unless Completions.active? && argv.length == 1
66
- command_name = Abbrev.abbrev(commands.keys)[command_name]
64
+ command_name = expand_abbrev(commands.keys, command_name)
67
65
  argv.shift if command_name
68
66
 
69
67
  command_name = "run" if command_name.nil? && task_format?(argv.first)
@@ -71,6 +69,13 @@ module Tomo
71
69
  [command, command_name]
72
70
  end
73
71
 
72
+ def expand_abbrev(names, abbrev)
73
+ return nil if abbrev.to_s.empty?
74
+
75
+ matches = names.select { |name| name.start_with?(abbrev) }
76
+ matches.first if matches.one?
77
+ end
78
+
74
79
  def task_format?(arg)
75
80
  arg.to_s.match?(/\A\S+:\S*\z/)
76
81
  end
data/lib/tomo/error.rb CHANGED
@@ -6,7 +6,7 @@ module Tomo
6
6
 
7
7
  def self.raise_with(message=nil, attributes)
8
8
  err = new(message)
9
- attributes.each { |attr, value| err.public_send("#{attr}=", value) }
9
+ attributes.each { |attr, value| err.public_send(:"#{attr}=", value) }
10
10
  raise err
11
11
  end
12
12
 
data/lib/tomo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tomo
2
- VERSION = "1.18.1".freeze
2
+ VERSION = "1.18.2".freeze
3
3
  end
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.18.1
4
+ version: 1.18.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Brictson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-22 00:00:00.000000000 Z
11
+ date: 2023-12-26 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
@@ -190,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
190
190
  - !ruby/object:Gem::Version
191
191
  version: '0'
192
192
  requirements: []
193
- rubygems_version: 3.4.21
193
+ rubygems_version: 3.5.3
194
194
  signing_key:
195
195
  specification_version: 4
196
196
  summary: A friendly CLI for deploying Rails apps ✨