tomo 1.18.1 → 1.18.3

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: 7be159189aa32ca0143ab318466b1b0e8b8c9f16940eb410d9ca5119ac75dcc9
4
+ data.tar.gz: 5c6a16311a72ccc75b79ae06a62b3fd83a8d0b7f47382b167e9a2866efd1a5c2
5
5
  SHA512:
6
- metadata.gz: 5e06977997842a6ee0594857e1ae70d6c4d1bd9f5780d62d47b33b5e6b3aca7bf68d2ab5238b0074113f21a6ecea941afa3e721ad8a68b7f0ce2b6ad5a40663f
7
- data.tar.gz: 0e1194fcdf339e9f52744fe1de2152d86350c812c5b4ad3035a5b25b4f84eb0a87e73e5c4802813acad916af41da78819b795ad27b93a73f9289b93925283914
6
+ metadata.gz: 6cd5a644af7d6303051c6ae903ff3e35206005629e23df3211303d28136d0547bd094719ddb99ceb84f57470cfe8f6197b33ceeb416b323c20d202e97aca67ee
7
+ data.tar.gz: 508a44c49b78be4264bbb6d5b0ee011140f6cca91456a28b7e89786c98a9b4225a7099a7ad61667c8051b575a3a9484ceae4dd684eae3784e4cc5bf9a0b56629
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2023 Matt Brictson
3
+ Copyright (c) 2024 Matt Brictson
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
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.3".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.3
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: 2024-04-02 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.6
194
194
  signing_key:
195
195
  specification_version: 4
196
196
  summary: A friendly CLI for deploying Rails apps ✨