Skip to content

Commit

Permalink
Centralize Ruby Version to .ruby-version
Browse files Browse the repository at this point in the history
The `.ruby-version` file is the ecosystem standard for defining a Ruby version.  This PR adds the `.ruby-version` file, ensures a `required_ruby_version` is set, and removes all other references to Ruby in this repository, aligning it with the standard.
> [!IMPORTANT]
> Please verify the following before merging:

Verify that the changes in the PR meets the following requirements or adjust manually to make it compliant:
  - [ ] `.ruby-version` file is present with the correct Ruby version defined
  - [ ] A `required_ruby_version` in your gemspec is set
  - [ ] There is no Ruby version present in the  `dev.yml` Ruby task (before: `- ruby: x.x.x`, after: `- ruby`)
  - [ ] There is no Ruby version/requirement referenced in the `Gemfile` (no lines with `ruby  <some-version>`)
  - [ ] A `Gemfile.lock` is built with the defined Ruby version
  - [ ] The version of Rubocop installed is 1.61.0 or greater
  - [ ] There is no `TargetRubyVersion` defined  in `rubocop.yml` (reads from  `required_ruby_version` on Rubocop 1.61.0)
  - [ ] There is no Ruby argument  present in  `ruby/setup-ruby` Github Actions that do **not**  run on a Ruby matrix (no lines with `ruby-version: “x.x”`)

To establish consistency, the `required_ruby_version` is set to 2.7. If you think that another version is a better fit, please make the applicable changes.

Please merge this PR if it looks good, this PR will be addressed if there isn't any activity after 4 weeks.
  • Loading branch information
george-ma committed Apr 3, 2024
1 parent c3f5aff commit f47902b
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [2.7, 3.1, 3.3]
ruby: [2.7, 3.0, 3.1, 3.2, 3.3]
graphql_version: ['~> 1.12.18', '~> 1.13', '~> 2.0']
include:
- ruby: 2.4
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/.bundle/
/.yardoc
/Gemfile*.lock
/_yardoc/
/coverage/
/doc/
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ gemspec

gem 'graphql', ENV['GRAPHQL_VERSION'] if ENV['GRAPHQL_VERSION']
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.4.0')
gem 'rubocop', '~> 1.12.0', require: false
gem 'rubocop', '~> 1.61.0', require: false
gem "rubocop-shopify", '~> 1.0.7', require: false
end
60 changes: 60 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
PATH
remote: .
specs:
graphql-batch (0.6.0)
graphql (>= 1.12.18, < 3)
promise.rb (~> 0.7.2)

GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
base64 (0.2.0)
byebug (11.1.3)
graphql (2.3.0)
base64
json (2.7.1)
language_server-protocol (3.17.0.3)
minitest (5.22.3)
parallel (1.24.0)
parser (3.3.0.5)
ast (~> 2.4.1)
racc
promise.rb (0.7.4)
racc (1.7.3)
rainbow (3.1.1)
rake (13.2.0)
regexp_parser (2.9.0)
rexml (3.2.6)
rubocop (1.61.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.2)
parser (>= 3.3.0.4)
rubocop-shopify (1.0.7)
rubocop (~> 1.4)
ruby-progressbar (1.13.0)
unicode-display_width (2.5.0)

PLATFORMS
arm64-darwin-23
ruby

DEPENDENCIES
byebug
graphql-batch!
minitest
rake (>= 12.3.3)
rubocop (~> 1.61.0)
rubocop-shopify (~> 1.0.7)

BUNDLED WITH
2.5.3
2 changes: 2 additions & 0 deletions graphql-batch.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Gem::Specification.new do |spec|
spec.homepage = "https://github.com/Shopify/graphql-batch"
spec.license = "MIT"

spec.required_ruby_version = ">= 2.7"

spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
Expand Down

0 comments on commit f47902b

Please sign in to comment.