Skip to content

Commit 882ede2

Browse files
erimicelclaude
andcommitted
chore: bump rubocop to ~> 1.86 and rubocop-rspec to ~> 3.9
Bumps the linting toolchain: - rubocop: 1.72.2 (pinned exact) → ~> 1.86 - rubocop-rspec: ~> 3.6 → ~> 3.9 Loosens rubocop to a pessimistic constraint so it can pick up patch and minor bumps without another Gemfile change. The newer rubocop / rubocop-rspec surfaced ten new offences. Nine of them were two cops misfiring on `spec/spec_helper.rb`, which is integration infrastructure rather than an example file: - `RSpec/Output` flagged the `puts`/`print` calls that report docker-compose startup progress to the operator. They are not assertions on stdout, so the cop's intent does not apply. - `Naming/PredicateMethod` flagged `ensure_typesense_running`, which returns a boolean but has heavy side effects (boots a docker container); renaming to `ensure_typesense_running?` would be misleading. Both cops are excluded only for `spec/spec_helper.rb`, with comments explaining why. The tenth offence was a real but trivial `Style/HashAsLastArrayItem` / `Layout/SpaceInsideHashLiteralBraces` in `collection_spec.rb`, fixed by autocorrect. Verified: `bundle exec rubocop` reports 97 files, 0 offences. Full RSpec suite is unchanged at 151 / 1 / 27 (the single pre-existing `truncate_len` integration failure on master remains, unrelated). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent f33f224 commit 882ede2

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

.rubocop.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,13 @@ RSpec/ExampleLength:
4747
RSpec/MultipleExpectations:
4848
Enabled: false
4949

50+
RSpec/Output:
51+
Exclude:
52+
- spec/spec_helper.rb # Boots Typesense via docker-compose; the puts/print calls report startup progress to the operator, not to assertions.
53+
54+
Naming/PredicateMethod:
55+
Exclude:
56+
- spec/spec_helper.rb # ensure_typesense_running returns whether the helper started Typesense, but has heavy side effects, so a `?` suffix would be misleading.
57+
5058
Style/HashSyntax:
5159
Enabled: false # We still want to support older versions of Ruby

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ gem 'rake', '~> 13.0'
1515
gem 'rspec', '~> 3.9'
1616
gem 'rspec_junit_formatter', '~> 0.4'
1717
gem 'rspec-legacy_formatters', '~> 1.0' # For codecov formatter
18-
gem 'rubocop', '1.72.2'
19-
gem 'rubocop-rspec', '~> 3.6', require: false
18+
gem 'rubocop', '~> 1.86'
19+
gem 'rubocop-rspec', '~> 3.9', require: false
2020
gem 'simplecov', '~> 0.18'
2121
gem 'timecop', '~> 0.9'
2222
gem 'webmock', '~> 3.8'

spec/typesense/collection_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
it 'updates the specified collection' do
5353
update_schema = {
5454
'fields' => [
55-
'name' => 'field', 'drop' => true
55+
{ 'name' => 'field', 'drop' => true }
5656
]
5757
}
5858
stub_request(:patch, Typesense::ApiCall.new(typesense.configuration).send(:uri_for, '/collections/companies', typesense.configuration.nodes[0]))

0 commit comments

Comments
 (0)