Skip to content

Commit 82df1eb

Browse files
authored
Merge pull request #1866 from Earlopain/drop-abbrev-dep
Drop dependency on `abbrev`
2 parents d7c3666 + 8e9adec commit 82df1eb

File tree

6 files changed

+5
-11
lines changed

6 files changed

+5
-11
lines changed

Gemfile.lock

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ PATH
22
remote: .
33
specs:
44
rbs (3.5.0.pre.2)
5-
abbrev
65

76
PATH
87
remote: test/assets/test-gem

Steepfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ target :lib do
88
# "lib/rbs/test.rb"
99
)
1010

11-
library "pathname", "json", "logger", "monitor", "tsort", "uri", 'dbm', 'pstore', 'singleton', 'shellwords', 'fileutils', 'find', 'digest', 'abbrev', 'prettyprint', 'yaml', "psych", "securerandom"
11+
library "pathname", "json", "logger", "monitor", "tsort", "uri", 'dbm', 'pstore', 'singleton', 'shellwords', 'fileutils', 'find', 'digest', 'prettyprint', 'yaml', "psych", "securerandom"
1212
signature "stdlib/strscan/0/"
1313
signature "stdlib/optparse/0/"
1414
signature "stdlib/rdoc/0/"

docs/gem.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ Assume you have three RBS files in your gem package:
3131

3232
```yaml
3333
dependencies:
34-
- name: abbrev
3534
- name: json
3635
- name: logger
3736
- name: optparse

lib/rbs/cli.rb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
require "open3"
44
require "optparse"
55
require "shellwords"
6-
require "abbrev"
76
require "stringio"
87

98
module RBS
@@ -1062,14 +1061,13 @@ def run_collection(args, options)
10621061
config_path = options.config_path or raise
10631062
lock_path = Collection::Config.to_lockfile_path(config_path)
10641063

1065-
subcommand = Abbrev.abbrev(['install', 'update', 'help'])[args[0]] || args[0]
1066-
case subcommand
1067-
when 'install'
1064+
case args[0]
1065+
when 'install', 'instal', 'insta', 'inst', 'ins', 'in', 'i'
10681066
unless params[:frozen]
10691067
Collection::Config.generate_lockfile(config_path: config_path, definition: Bundler.definition)
10701068
end
10711069
Collection::Installer.new(lockfile_path: lock_path, stdout: stdout).install_from_lockfile
1072-
when 'update'
1070+
when 'update', 'updat', 'upda', 'upd', 'up', 'u'
10731071
# TODO: Be aware of argv to update only specified gem
10741072
Collection::Config.generate_lockfile(config_path: config_path, definition: Bundler.definition, with_lockfile: false)
10751073
Collection::Installer.new(lockfile_path: lock_path, stdout: stdout).install_from_lockfile
@@ -1107,7 +1105,7 @@ def run_collection(args, options)
11071105
exit 1
11081106
end
11091107
Collection::Cleaner.new(lockfile_path: lock_path)
1110-
when 'help'
1108+
when 'help', 'hel', 'he', 'h'
11111109
puts opts.help
11121110
else
11131111
puts opts.help

rbs.gemspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,4 @@ Gem::Specification.new do |spec|
4141
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
4242
spec.require_paths = ["lib"]
4343
spec.required_ruby_version = ">= 3.0"
44-
spec.add_dependency "abbrev"
4544
end

sig/manifest.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ dependencies:
55
- name: optparse
66
- name: tsort
77
- name: rdoc
8-
- name: abbrev

0 commit comments

Comments
 (0)