Repository navigation
Conversation
- rubocop, rubocop-rake and rubocop-rspec, pinned to patch versions so new cops don't break CI unexpectedly - bundle exec rake runs specs and RuboCop; CI runs RuboCop in its own job - Move specs to match lib paths (spec/ios/devices_spec.rb, spec/ios/devices/) - Document the Ios and Ios::Devices modules, use described_class and aggregate_failures in specs - Skip the MFA cop (releases are published by hand) and the length and word-array cops for the device data file Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds RuboCop and fixes everything it flagged. It started at 13 offenses; none were bugs.
Setup
rubocop(1.92.0),rubocop-rakeandrubocop-rspecin the Gemfile, pinned to patch versions. WithNewCops: enable, a new minor RuboCop release could otherwise fail CI with no code change. Bump them on purpose..rubocop.yml: target Ruby 3.1, new cops enabled.bundle exec rakenow runs the specs and RuboCop. CI runs specs on 3.1–4.0 (rake spec) and RuboCop once, in a separatelintjob on Ruby 4.0.Fixes
RSpec/SpecFilePathFormat):spec/ios/devices_spec.rb,spec/ios/devices/model_spec.rbandspec/ios/devices/device_types_spec.rb. README paths updated.IosandIos::Devices.described_classinstead ofIos::Devices;:aggregate_failureson the examples with more than one expectation; theextravocabulary moved into alet.Turned off on purpose
Gemspec/RequireMFA: releases are published by hand without enforcing MFA.Metrics/ModuleLengthandStyle/WordArrayforlib/ios/devices/device_types.rbonly. It's one long data hash, and['iPad', 'Wi-Fi']reads better than%w[iPad Wi-Fi].87 examples pass, there are no RuboCop offenses, and the gem builds cleanly.
🤖 Generated with Claude Code