Commit bf737c6
Modernize dependencies, fix CI, and add rubocop-gusto (#178)
* Modernize dependencies and fix CI
CI tests against Ruby 3.2, 3.3, and 4.0. Several gems were
incompatible with Ruby 4.0, causing bundle install to fail.
Dependency updates:
- Remove git-sourced packwerk override from Gemfile (packwerk 3 is
on RubyGems)
- Update all outdated gems: activesupport 7 → 8.1, rubocop 1.56 →
1.85, sorbet/tapioca 0.5/0.11 → 0.6/0.16, minitest 5.19 → 6.0,
code_ownership 1.34 → 2.1.1 (native Rust gem), and many more
- Bump required_ruby_version in gemspec from >= 2.6.0 to >= 3.2
- Remove bundler version pin and spoom version pin
Linting:
- Autocorrect rubocop offenses (block forwarding, collection querying)
- Add .rubocop_todo.yml for Naming/BlockForwarding (Sorbet incompatible
with anonymous block forwarding) and Naming/PredicateMethod
- Update TargetRubyVersion from 2.6.0 to 3.2
Test fixes for updated gem APIs:
- code_ownership 2.1.1 (Rust-based): for_file now defaults to
from_codeowners: true; pass from_codeowners: false in
CodeOwnershipPostProcessor to use pack-based ownership lookup
- code_ownership 2.1.1: team YAML files require github.team field
- code_ownership 2.1.1: only recognizes top-level owner: key in
package.yml, not metadata.owner; update spec_helper write_package_yml
to write owner at top level via config hash
- code_ownership 2.1.1: remove_file_annotation! regex requires trailing
newline; fix test file to include newline
- Psych 5: YAML array items no longer indented under parent key; update
test expectations
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
* Regenerate tapioca RBI files and update bundler to 4.0.7
- Update bundler to 4.0.7 (was 2.7.2) and tapioca to 0.17.10 (was
0.16.11), spoom to 1.7.11 (was 1.6.3), rbs to 4.0.0.dev.5 (was
3.10.3) to match updated dependencies
- Add require 'packwerk' to sorbet/tapioca/require.rb so tapioca can
generate a populated packwerk RBI
- Regenerate all gem RBIs via `tapioca gems --all` for updated versions:
- Remove stale RBIs for gems no longer in the lockfile (rubocop-rspec,
rubocop-sorbet, ruby-graphviz)
- Add new RBIs for new gems (addressable, benchmark, better_html,
bigdecimal, byebug, coderay, connection_pool, diff-lcs, drb, erubi,
i18n, io-console, json, json-schema, language_server-protocol,
lint_roller, logger, loofah, mcp, method_source, netrc, nokogiri,
parallel, pastel, prism, pry, pry-byebug, public_suffix, racc,
rails-dom-testing, rails-html-sanitizer, rake, rbi, rbs, reline,
rexml, require-hooks, securerandom, smart_properties, spoom,
tapioca, thor, tsort, tty-color, tty-cursor, tty-reader, tty-screen,
tzinfo, unicode-display_width, unicode-emoji, uri, wisper, yard,
yard-sorbet, zeitwerk) and versioned renames of existing ones
- Fix activesupport, packwerk, rainbow, tty-prompt RBIs with correct
content for new gem versions
- Verify `bundle exec srb tc` passes with no errors
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
* Exclude gems with sorbet built-in shims from tapioca generation
Gems in https://github.com/sorbet/sorbet/tree/master/rbi/stdlib already
have type definitions shipped with sorbet itself, so generating tapioca
RBIs for them is redundant. Configure tapioca to exclude these and
remove the now-redundant generated RBI files.
Excluded: base64, benchmark, bigdecimal, drb, json, logger, racc,
reline, rexml, securerandom, tsort, uri
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
* Add rubocop-gusto as a development dependency and plugin
- Add rubocop-gusto to gemspec as a development dependency
- Add `plugins: - rubocop-gusto` to .rubocop.yml
- Run `rubocop -A` to autocorrect 490 offenses
- Regenerate .rubocop_todo.yml for remaining 91 violations that
cannot be autocorrected (RSpec/ContextWording, Gusto/NoMetaprogramming,
Sorbet/StrictSigil, Sorbet/ConstantsFromStrings, and others)
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
* Configure rubocop inheritance and regenerate .rubocop_todo.yml
- Add inherit_mode with merge for Exclude and Include arrays so that
exclusions from .rubocop_todo.yml and inherit_gem are merged rather
than overridden
- Add inherit_gem to pull in rubocop-gusto's default.yml configuration
- Regenerate .rubocop_todo.yml from scratch
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
* Fix Sorbet type check failures introduced by rubocop-gusto autocorrect
rubocop-gusto's Sorbet/BlockMethodDefinition cop autocorrected `def`
to `define_method` inside the `no_commands` block in cli.rb, which
caused Sorbet to be unable to resolve `exit_successfully` and
`parse_pack_names` as methods on Packs::CLI.
Revert to plain `def` inside the block (keeping the other good changes:
filter_map and delete_suffix) and add cli.rb to the
Sorbet/BlockMethodDefinition exclude list in .rubocop_todo.yml.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
* Regenerate rubocop and tapioca binstubs
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
* Remove disabled Layout cops and autocorrect violations
Remove Layout/LineLength, Layout/MultilineMethodCallIndentation,
Layout/FirstArgumentIndentation, Layout/ArgumentAlignment, and
Layout/BlockEndNewline from .rubocop.yml, then autocorrect the
113 resulting violations.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
* Revert define_method in cli_spec.rb introduced by Sorbet/BlockMethodDefinition autocorrect
Same issue as lib/packs/cli.rb: the Sorbet/BlockMethodDefinition cop
converted plain helper defs to define_method inside the RSpec.describe
block. Revert to def and add the file to the cop's exclude list.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
* Resolve Sorbet/BlockMethodDefinition in cli.rb by removing no_commands wrapper
Thor 1.x treats private methods as non-commands, making the no_commands
wrapper redundant. Replacing it with plain private defs satisfies
Sorbet/BlockMethodDefinition without resorting to define_method.
Naming/BlockForwarding remains excluded for logging.rb and configuration.rb
since anonymous & is incompatible with typed Sorbet block parameter sigs.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
* Replace define_method with def in spec/packs_spec.rb
The rubocop-gusto Sorbet/BlockMethodDefinition autocorrect had converted
plain helper defs to define_method inside the RSpec.describe block.
Revert to def, move packs_spec.rb from Gusto/NoMetaprogramming to
Sorbet/BlockMethodDefinition in .rubocop_todo.yml, and remove its now-
unnecessary entry from Gusto/NoMetaprogramming.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
* Fix Layout/EmptyLines rubocop offense in cli.rb
---------
Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>1 parent b68b0e6 commit bf737c6
115 files changed
Lines changed: 304703 additions & 34742 deletions
File tree
- bin
- lib/packs
- private
- interactive_cli
- use_cases
- sorbet
- rbi/gems
- tapioca
- spec
- packs/private
- interactive_cli
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
1 | 15 | | |
2 | 16 | | |
3 | 17 | | |
| |||
13 | 27 | | |
14 | 28 | | |
15 | 29 | | |
16 | | - | |
| 30 | + | |
17 | 31 | | |
18 | 32 | | |
19 | 33 | | |
| |||
50 | 64 | | |
51 | 65 | | |
52 | 66 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | 67 | | |
57 | 68 | | |
58 | 69 | | |
| |||
93 | 104 | | |
94 | 105 | | |
95 | 106 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | 107 | | |
101 | 108 | | |
102 | 109 | | |
| |||
105 | 112 | | |
106 | 113 | | |
107 | 114 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | 115 | | |
117 | 116 | | |
118 | 117 | | |
119 | 118 | | |
120 | 119 | | |
121 | | - | |
122 | | - | |
123 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
0 commit comments