Skip to content

Commit

Permalink
Fix rubocop validations (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpkorstanje committed Aug 10, 2023
1 parent 744d8f3 commit ea8d9f5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ source "https://rubygems.org"

gemspec

gem 'rake', '~> 13.0', '>= 13.0.6'
gem 'rspec', '~> 3.11', '>= 3.11.0'
gem 'rubocop', '~> 1.29', '>= 1.29.1'
gem 'rubocop-packaging', '~> 0.5', '>= 0.5.1'
gem 'unindent', '~> 1.0', '>= 1.0'

# To hack on Cucumber together with any of these libraries, uncomment the line below:
# gem 'cucumber-gherkin', path: '../common/gherkin/ruby'
# gem 'cucumber-messages', path: '../common/messages/ruby'
6 changes: 0 additions & 6 deletions cucumber-core.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ Gem::Specification.new do |s|
s.add_dependency 'cucumber-messages', '>= 19', '< 22'
s.add_dependency 'cucumber-tag-expressions', '~> 5.0', '>= 5.0.4'

s.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6'
s.add_development_dependency 'rspec', '~> 3.11', '>= 3.11.0'
s.add_development_dependency 'rubocop', '~> 1.29', '>= 1.29.1'
s.add_development_dependency 'rubocop-packaging', '~> 0.5', '>= 0.5.1'
s.add_development_dependency 'unindent', '~> 1.0', '>= 1.0'

s.files = Dir[
'CHANGELOG.md',
'CONTRIBUTING.md',
Expand Down
2 changes: 1 addition & 1 deletion lib/cucumber/core/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def event_id
private

def underscore(string)
string.to_s.gsub(/::/, '/').
string.to_s.gsub('::', '/').
gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2').
gsub(/([a-z\d])([A-Z])/, '\1_\2').
tr("-", "_").
Expand Down
2 changes: 1 addition & 1 deletion spec/cucumber/core/test/doc_string_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ module Test
end

it 'delegates #gsub to the content string' do
expect( doc_string.gsub(/n/, '_') ).to eq 'co_te_t'
expect( doc_string.gsub('n', '_') ).to eq 'co_te_t'
end

it 'delegates #split to the content string' do
Expand Down

0 comments on commit ea8d9f5

Please sign in to comment.