-
Notifications
You must be signed in to change notification settings - Fork 0
Update Ruby and Rails versions with RBS and RuboCop adjustments #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
fea4657
cebe082
e484a82
62259df
d10151d
402bab5
a108778
d629feb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # RuboCop configuration for Ruby 3.3+ with RBS Inline support | ||
| inherit_from: .rubocop.yml | ||
|
|
||
| plugins: | ||
| - rubocop-rbs_inline | ||
|
|
||
|
Comment on lines
+2
to
+6
|
||
| # ========= RBS =========== | ||
| Style/RbsInline/MissingTypeAnnotation: | ||
| EnforcedStyle: method_type_signature | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 3.4.5 | ||
| 4.0.0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| # frozen_string_literal: true | ||
| # rbs_inline: enabled | ||
|
|
||
| source 'https://rubygems.org' | ||
|
|
||
|
|
@@ -22,13 +23,17 @@ group :development, :test do | |
| gem 'factory_bot' | ||
| gem 'lefthook', require: false | ||
| gem 'rake', '~> 13.0' | ||
| gem 'rbs-inline', require: false | ||
| gem 'rspec', '~> 3.0' | ||
| gem 'rspec-parameterized' | ||
| gem 'rubocop' | ||
| gem 'rubocop-factory_bot', require: false | ||
| gem 'rubocop-rake', require: false | ||
| gem 'rubocop-rbs_inline', require: false | ||
| gem 'rubocop-rspec', require: false | ||
| gem 'steep', require: false | ||
|
|
||
| # rbs-inline requires Ruby 3.3+ | ||
| if RUBY_VERSION >= '3.3.0' | ||
| gem 'rbs-inline', require: false | ||
| gem 'rubocop-rbs_inline', require: false | ||
| gem 'steep', require: false | ||
| end | ||
|
Comment on lines
+34
to
+38
|
||
| end | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,31 @@ | ||
| # frozen_string_literal: true | ||
| # rbs_inline: enabled | ||
|
|
||
| require 'bundler/gem_tasks' | ||
| require 'rspec/core/rake_task' | ||
| require 'steep/rake_task' | ||
|
|
||
| RSpec::Core::RakeTask.new(:spec) | ||
|
|
||
| require 'rubocop/rake_task' | ||
|
|
||
| RuboCop::RakeTask.new | ||
| Steep::RakeTask.new | ||
| # Use RBS Inline configuration for Ruby 3.3+ | ||
| rubocop_config = if RUBY_VERSION >= '3.3.0' | ||
| '.rubocop_rbs.yml' | ||
| else | ||
| '.rubocop.yml' | ||
| end | ||
|
Comment on lines
+12
to
+16
|
||
|
|
||
| task default: %i[spec rubocop steep] | ||
| RuboCop::RakeTask.new do |task| | ||
| task.options = ['--config', rubocop_config] | ||
| end | ||
|
|
||
| # Steep is only available for Ruby 3.3+ | ||
| default_tasks = %i[spec rubocop] | ||
|
|
||
| if RUBY_VERSION >= '3.3.0' | ||
| require 'steep/rake_task' | ||
| Steep::RakeTask.new | ||
| default_tasks << :steep | ||
| end | ||
|
Comment on lines
+25
to
+29
|
||
|
|
||
| task default: default_tasks | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| # frozen_string_literal: true | ||
| # rbs_inline: enabled | ||
|
|
||
| # D = Steep::Diagnostic | ||
| target :lib do | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #!/usr/bin/env ruby | ||
| # frozen_string_literal: true | ||
| # rbs_inline: enabled | ||
|
|
||
| # Wrapper script for rubocop that automatically uses the correct config file | ||
| # based on Ruby version | ||
|
|
||
| config_file = if RUBY_VERSION >= '3.3.0' && File.exist?('.rubocop_rbs.yml') | ||
| '.rubocop_rbs.yml' | ||
| else | ||
| '.rubocop.yml' | ||
| end | ||
|
|
||
| exec('bundle', 'exec', 'rubocop', '--config', config_file, *ARGV) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| # frozen_string_literal: true | ||
| # rbs_inline: enabled | ||
|
|
||
| require 'spec_helper' | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| # frozen_string_literal: true | ||
| # rbs_inline: enabled | ||
|
|
||
| require 'spec_helper' | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| # frozen_string_literal: true | ||
| # rbs_inline: enabled | ||
|
|
||
| require 'structured_params' | ||
| require 'rspec-parameterized' | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RUBY_VERSIONis exported to$GITHUB_ENVhere, but the workflow doesn’t reference it later (matrix values are used directly). Consider removing this line to avoid unused configuration, or use it in subsequent steps if it’s intended for tooling.