Skip to content

Commit

Permalink
Bump required ruby version to >= 3.1 (#311)
Browse files Browse the repository at this point in the history
* Bump required ruby version to >= 3.1

* Bump outdated gems

* Bump pre-commit plugins

* Resolve rubocop violations

* Update tapioca config

* be tapioca gems

* Update CHANGELOG

* Prepare v0.9.0
  • Loading branch information
dduugg authored Jun 30, 2024
1 parent b92b111 commit d604c3a
Show file tree
Hide file tree
Showing 20 changed files with 2,379 additions and 1,802 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4']
ruby-version: ['3.1', '3.2', '3.3', '3.4']
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
- id: sort-simple-yaml
- id: trailing-whitespace
- repo: https://github.com/crate-ci/typos
rev: v1.20.9
rev: v1.22.9
hooks:
- id: typos
args: [--exclude=sorbet/rbi/gems, --force-exclude]
Expand Down
5 changes: 4 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ require:

AllCops:
NewCops: enable
TargetRubyVersion: 3.0
TargetRubyVersion: 3.1

Layout/ClassStructure:
Enabled: true
# Cannot add type annotations to forwarded blocks
Naming/BlockForwarding:
Enabled: false
Naming/FileName:
Exclude:
- lib/yard-sorbet.rb
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

## main

* 0.9.0 (2024-06-30)

### Bug Fixes

* [Fix](https://github.com/dduugg/yard-sorbet/commit/f44388b) syntax of order-dependent lists

### Changes

* [#282](https://github.com/dduugg/yard-sorbet/issues/282) Increase minimum required ruby version to `3.0`
* [#311](https://github.com/dduugg/yard-sorbet/issues/311) Increase minimum required ruby version to `3.1`

## 0.8.1 (2023-04-03)

Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ gem 'rubocop', '~> 1.64.1'
gem 'rubocop-packaging', '~> 0.5.2'
gem 'rubocop-performance', '~> 1.21.0'
gem 'rubocop-rake', '~> 0.6.0'
gem 'rubocop-rspec', '~> 2.29.2'
gem 'rubocop-rspec', '~> 3.0.1'
gem 'rubocop-sorbet', '~> 0.8.3'
gem 'simplecov-cobertura', '~> 2.1.0'
gem 'sorbet', '~> 0.5.11406'
gem 'tapioca', '~> 0.13.3'
gem 'tapioca', '~> 0.15.0'
63 changes: 27 additions & 36 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
yard-sorbet (0.8.1)
yard-sorbet (0.9.0)
sorbet-runtime
yard

Expand All @@ -11,38 +11,38 @@ GEM
ast (2.4.2)
diff-lcs (1.5.1)
docile (1.4.0)
erubi (1.12.0)
erubi (1.13.0)
json (2.7.2)
language_server-protocol (3.17.0.3)
netrc (0.11.0)
parallel (1.24.0)
parser (3.3.2.0)
parallel (1.25.1)
parser (3.3.3.0)
ast (~> 2.4.1)
racc
prism (0.27.0)
prism (0.30.0)
racc (1.8.0)
rainbow (3.1.1)
rake (13.2.1)
rbi (0.1.12)
prism (>= 0.18.0, < 0.28)
rbi (0.1.13)
prism (>= 0.18.0, < 1.0.0)
sorbet-runtime (>= 0.5.9204)
redcarpet (3.6.0)
regexp_parser (2.9.2)
rexml (3.2.8)
strscan (>= 3.0.9)
rexml (3.3.1)
strscan
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.0)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.0)
rspec-expectations (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.0)
rspec-mocks (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.0)
rspec-support (3.13.1)
rubocop (1.64.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
Expand All @@ -56,24 +56,15 @@ GEM
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.3)
parser (>= 3.3.1.0)
rubocop-capybara (2.20.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.25.1)
rubocop (~> 1.41)
rubocop-packaging (0.5.2)
rubocop (>= 1.33, < 2.0)
rubocop-performance (1.21.0)
rubocop-performance (1.21.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
rubocop-rspec (2.29.2)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
rubocop-rspec_rails (~> 2.28)
rubocop-rspec_rails (2.28.3)
rubocop (~> 1.40)
rubocop-rspec (3.0.1)
rubocop (~> 1.61)
rubocop-sorbet (0.8.3)
rubocop (>= 0.90.0)
ruby-progressbar (1.13.0)
Expand All @@ -86,21 +77,21 @@ GEM
simplecov (~> 0.19)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
sorbet (0.5.11406)
sorbet-static (= 0.5.11406)
sorbet-runtime (0.5.11406)
sorbet-static (0.5.11406-universal-darwin)
sorbet-static (0.5.11406-x86_64-linux)
sorbet-static-and-runtime (0.5.11406)
sorbet (= 0.5.11406)
sorbet-runtime (= 0.5.11406)
spoom (1.3.1)
sorbet (0.5.11463)
sorbet-static (= 0.5.11463)
sorbet-runtime (0.5.11463)
sorbet-static (0.5.11463-universal-darwin)
sorbet-static (0.5.11463-x86_64-linux)
sorbet-static-and-runtime (0.5.11463)
sorbet (= 0.5.11463)
sorbet-runtime (= 0.5.11463)
spoom (1.3.2)
erubi (>= 1.10.0)
prism (>= 0.19.0)
sorbet-static-and-runtime (>= 0.5.10187)
thor (>= 0.19.2)
strscan (3.1.0)
tapioca (0.13.3)
tapioca (0.15.0)
bundler (>= 2.2.25)
netrc (>= 0.11.0)
parallel (>= 1.21.0)
Expand All @@ -127,11 +118,11 @@ DEPENDENCIES
rubocop-packaging (~> 0.5.2)
rubocop-performance (~> 1.21.0)
rubocop-rake (~> 0.6.0)
rubocop-rspec (~> 2.29.2)
rubocop-rspec (~> 3.0.1)
rubocop-sorbet (~> 0.8.3)
simplecov-cobertura (~> 2.1.0)
sorbet (~> 0.5.11406)
tapioca (~> 0.13.3)
tapioca (~> 0.15.0)
yard-sorbet!

BUNDLED WITH
Expand Down
2 changes: 1 addition & 1 deletion lib/yard-sorbet/handlers/sig_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def document_attrs(method_objects) = method_objects.each { parse_node(_1, _1.do
def parse_node(attach_to, docstring, include_params: true)
existing_docstring = docstring.is_a?(YARD::Docstring)
docstring, directives = Directives.extract_directives(docstring) unless existing_docstring
parse_sig(docstring, include_params: include_params)
parse_sig(docstring, include_params:)
attach_to.docstring = docstring.to_raw
Directives.add_directives(attach_to.docstring, directives) unless existing_docstring
end
Expand Down
2 changes: 1 addition & 1 deletion lib/yard-sorbet/handlers/struct_prop_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def params = @params ||= T.let(statement.parameters(false), T.nilable(T::Array[Y
def register_attrs(object, name)
write = immutable? ? nil : object
# Create the virtual attribute in our current scope
namespace.attributes[scope][name] ||= SymbolHash[read: object, write: write]
namespace.attributes[scope][name] ||= SymbolHash[read: object, write:]
end

# Store the prop for use in the constructor definition
Expand Down
2 changes: 1 addition & 1 deletion lib/yard-sorbet/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# Types are documentation
module YARDSorbet
# {https://rubygems.org/gems/yard-sorbet Version history}
VERSION = '0.8.1'
VERSION = '0.9.0'
end
Loading

0 comments on commit d604c3a

Please sign in to comment.