Skip to content

Commit

Permalink
Merge pull request #102 from belousovAV/bump-highline
Browse files Browse the repository at this point in the history
Update highline
  • Loading branch information
ggilder authored Jan 15, 2024
2 parents 4d055c6 + fcfddd1 commit d2fcf50
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
inherit_from: .rubocop_todo.yml

AllCops:
TargetRubyVersion: 2.4
TargetRubyVersion: 3.0
NewCops: enable
SuggestExtensions: false

Expand Down
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ before_install:
- gem update --system
- gem update bundler
rvm:
- 2.4
- 2.5
- 2.6
- 2.7
- 3.0
- 3.1
- 3.2
- 3.3
- jruby
- ruby-head
4 changes: 2 additions & 2 deletions commander.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ Gem::Specification.new do |s|
'homepage_uri' => s.homepage,
'source_code_uri' => "#{s.homepage}/tree/v#{s.version}",
}
s.required_ruby_version = '>= 2.4'
s.required_ruby_version = '>= 3.0'

s.files = `git ls-files`.split("\n").reject { |f| f.match(%r{^(test|spec|features)/}) }
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
s.require_paths = ['lib']

s.add_runtime_dependency('highline', '~> 2.0.0')
s.add_runtime_dependency('highline', '~> 3.0.0')

s.add_development_dependency('rake')
s.add_development_dependency('rspec', '~> 3.2')
Expand Down
4 changes: 2 additions & 2 deletions lib/commander/delegates.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def #{meth}(*args, &block)
END
end

def defined_commands(*args, &block)
::Commander::Runner.instance.commands(*args, &block)
def defined_commands(...)
::Commander::Runner.instance.commands(...)
end
end
end
10 changes: 4 additions & 6 deletions lib/commander/user_interaction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -344,12 +344,10 @@ def method_missing(method_name, *arguments, &block)
# All Classes that respond to #parse
# Ignore constants that trigger deprecation warnings
available_classes = (Object.constants - DEPRECATED_CONSTANTS).map do |const|
begin
Object.const_get(const)
rescue RuntimeError
# Rescue errors in Ruby 3 for SortedSet:
# The `SortedSet` class has been extracted from the `set` library.
end
Object.const_get(const)
rescue RuntimeError
# Rescue errors in Ruby 3 for SortedSet:
# The `SortedSet` class has been extracted from the `set` library.
end.compact.select do |const|
const.instance_of?(Class) && const.respond_to?(:parse)
end
Expand Down

0 comments on commit d2fcf50

Please sign in to comment.