Skip to content

Commit

Permalink
Merge pull request mdub#112 from AlexWayfer/update_dependencies
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
mdub committed Nov 8, 2021
2 parents 3878d32 + cffb7c3 commit a82775c
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.bundle
.markdownlint*
.rvmrc
.ruby-version
.yardoc
doc
pkg/*
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AllCops:
TargetRubyVersion: 2.4
TargetRubyVersion: 2.5
NewCops: enable

Layout/LineLength:
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: ruby
rvm:
- 2.4
- 2.5
- 2.6
- 2.7
- 3.0
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ group :development do
gem "listen", "~> 3.0"
gem "pry-byebug", "~> 3.9"
gem "rake", "~> 13.0"
gem "rubocop", "~> 0.89.0", require: false
gem "rubocop", "~> 1.13.0", require: false
end

group :test do
Expand Down
4 changes: 2 additions & 2 deletions Guardfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# directories %w(app lib config test spec features) \
# .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}

## Note: if you are using the `directories` clause above and you are not
## NOTE: if you are using the `directories` clause above and you are not
## watching the project directory ('.'), then you will want to move
## the Guardfile to a watched dir and symlink it back, e.g.
#
Expand All @@ -17,7 +17,7 @@
#
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"

# Note: The cmd option is now required due to the increasing number of ways
# NOTE: The cmd option is now required due to the increasing number of ways
# rspec may be run, below are examples of the most common uses.
# * bundler: 'bundle exec rspec'
# * bundler binstubs: 'bin/rspec'
Expand Down
2 changes: 1 addition & 1 deletion clamp.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ Gem::Specification.new do |s|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.require_paths = ["lib"]

s.required_ruby_version = "~> 2.4"
s.required_ruby_version = ">= 2.5", "< 4"
end
10 changes: 4 additions & 6 deletions lib/clamp/parameter/parsing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@ def parse_parameters

def set_parameters_from_command_line
self.class.parameters.each do |parameter|
begin
parameter.consume(remaining_arguments).each do |value|
parameter.of(self).take(value)
end
rescue ArgumentError => e
signal_usage_error Clamp.message(:parameter_argument_error, param: parameter.name, message: e.message)
parameter.consume(remaining_arguments).each do |value|
parameter.of(self).take(value)
end
rescue ArgumentError => e
signal_usage_error Clamp.message(:parameter_argument_error, param: parameter.name, message: e.message)
end
end

Expand Down
8 changes: 3 additions & 5 deletions spec/clamp/command_group_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,9 @@ def execute
end

it "shows parameter in usage help" do
begin
command.run(["stuff", "say", "loud", "--help"])
rescue Clamp::HelpWanted => e
expect(e.command.invocation_path).to eql("with THING say loud")
end
command.run(["stuff", "say", "loud", "--help"])
rescue Clamp::HelpWanted => e
expect(e.command.invocation_path).to eql("with THING say loud")
end

end
Expand Down
8 changes: 3 additions & 5 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@
RSpec.configure do |config|

config.around(:each) do |example|
begin
example.run
rescue SystemExit => e
raise "Unexpected exit with status #{e.status}"
end
example.run
rescue SystemExit => e
raise "Unexpected exit with status #{e.status}"
end

end
Expand Down

0 comments on commit a82775c

Please sign in to comment.