Skip to content

Commit

Permalink
Merge branch 'main' into add_auto_correct_multiple_expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhacaz authored Dec 19, 2023
2 parents dd482af + 114862f commit 635f98f
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
ruby-version: 2.7
bundler-cache: true
- name: Default task, RSpec and Rubocop
run: bundle exec rake
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* Added autocorrection for `RSpec/MultipleExpectations`.
(Fix [#59](https://github.com/petalmd/rubocop-petal/issues/59)). ([#74](https://github.com/petalmd/rubocop-petal/pull/74))
* Update rubocop dependencies and minimum Ruby version. (Fix [#68](https://github.com/petalmd/rubocop-petal/issues/68)). ([#75](https://github.com/petalmd/rubocop-petal/pull/75))
* Enabled `RSpec/MultipleExpectations`. ([#73](https://github.com/petalmd/rubocop-petal/pull/73))
* Added new cops from test-prod RSpec/AggregateExamples. ([#72](https://github.com/petalmd/rubocop-petal/pull/72))

Expand Down
42 changes: 27 additions & 15 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ PATH
remote: .
specs:
rubocop-petal (1.2.0)
rubocop (~> 1.50)
rubocop-performance (~> 1.17)
rubocop-rails (~> 2.19)
rubocop-rspec (~> 2.17)
rubocop (~> 1.59)
rubocop-factory_bot (~> 2.24)
rubocop-performance (~> 1.20)
rubocop-rails (~> 2.23)
rubocop-rspec (~> 2.25)

GEM
remote: https://rubygems.org/
Expand All @@ -21,10 +22,13 @@ GEM
i18n (1.8.11)
concurrent-ruby (~> 1.0)
json (2.6.3)
language_server-protocol (3.17.0.3)
minitest (5.15.0)
parallel (1.21.0)
parser (3.2.2.1)
parser (3.2.2.4)
ast (~> 2.4.1)
racc
racc (1.7.3)
rack (3.0.7)
rainbow (3.0.0)
rake (13.0.6)
Expand All @@ -43,27 +47,35 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-support (3.10.3)
rubocop (1.50.2)
rubocop (1.59.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.0.0)
parser (>= 3.2.2.4)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.0, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.28.1)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-performance (1.17.1)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rails (2.19.1)
rubocop-capybara (2.19.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.24.0)
rubocop (~> 1.33)
rubocop-performance (1.20.0)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-rails (2.23.0)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-rspec (2.17.1)
rubocop (~> 1.33)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-rspec (2.25.0)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
ruby-progressbar (1.11.0)
thread_safe (0.3.6)
tzinfo (1.2.9)
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/cop/rails/enum_starting_value.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def on_send(node)
end

def start_with_zero?(node)
return unless node.type == :hash
return false unless node.type == :hash

node.children.any? do |child|
value = child.value
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/cop/rspec/aggregate_examples.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class AggregateExamples < ::RuboCop::Cop::Cop

def on_block(node)
example_group_with_several_examples(node) do |all_examples|
example_clusters(all_examples).each do |_, examples|
example_clusters(all_examples).each_value do |examples|
examples[1..].each do |example|
add_offense(example,
location: :expression,
Expand Down
11 changes: 6 additions & 5 deletions rubocop-petal.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
spec.summary = 'Petal custom cops'
spec.homepage = 'https://github.com/petalmd/rubocop-petal'
spec.license = 'MIT'
spec.required_ruby_version = Gem::Requirement.new('>= 2.6')
spec.required_ruby_version = Gem::Requirement.new('>= 2.7')

spec.files = Dir['LICENSE.txt', 'README.md', 'config/**/*', 'lib/**/*']
spec.extra_rdoc_files = %w[LICENSE.txt README.md]
Expand All @@ -25,8 +25,9 @@ Gem::Specification.new do |spec|
'rubygems_mfa_required' => 'true'
}

spec.add_dependency 'rubocop', '~> 1.50'
spec.add_dependency 'rubocop-performance', '~> 1.17'
spec.add_dependency 'rubocop-rails', '~> 2.19'
spec.add_dependency 'rubocop-rspec', '~> 2.17'
spec.add_dependency 'rubocop', '~> 1.59'
spec.add_dependency 'rubocop-factory_bot', '~> 2.24'
spec.add_dependency 'rubocop-performance', '~> 1.20'
spec.add_dependency 'rubocop-rails', '~> 2.23'
spec.add_dependency 'rubocop-rspec', '~> 2.25'
end

0 comments on commit 635f98f

Please sign in to comment.