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`
  - [ ] 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”`)

Please merge this PR if it looks good, this PR will be merged if there isn't any activity after 4 weeks.
  • Loading branch information
george-ma committed Mar 26, 2024
1 parent 711100d commit ccf9406
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 8 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Expand Up @@ -30,7 +30,6 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Rubocop run
run: |
Expand All @@ -48,7 +47,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.0', '3.1', '3.2']
ruby-version: ['3.0', '3.1', '3.2', '3.3']

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/gem-push.yml
Expand Up @@ -16,8 +16,6 @@ jobs:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2

- name: Publish to RubyGems
run: |
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -7,4 +7,3 @@
/spec/reports/
/tmp/
.rubocop-https*
Gemfile.lock
1 change: 0 additions & 1 deletion .rubocop.yml
Expand Up @@ -7,7 +7,6 @@ require:

AllCops:
NewCops: enable
TargetRubyVersion: 3.2

Naming/FileName:
Exclude:
Expand Down
1 change: 1 addition & 0 deletions .ruby-version
@@ -0,0 +1 @@
3.3.0
69 changes: 69 additions & 0 deletions Gemfile.lock
@@ -0,0 +1,69 @@
PATH
remote: .
specs:
ruby-limiter (2.3.0)

GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
code-scanning-rubocop (0.6.1)
rubocop (~> 1.0)
json (2.7.1)
language_server-protocol (3.17.0.3)
minitest (5.22.3)
minitest-focus (1.4.0)
minitest (>= 4, < 6)
mocha (2.1.0)
ruby2_keywords (>= 0.0.5)
parallel (1.24.0)
parser (3.3.0.5)
ast (~> 2.4.1)
racc
racc (1.7.3)
rainbow (3.1.1)
rake (13.1.0)
regexp_parser (2.9.0)
rexml (3.2.6)
rubocop (1.62.1)
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.31.1, < 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-minitest (0.33.0)
rubocop (>= 1.39, < 2.0)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
rubocop-shopify (2.15.1)
rubocop (~> 1.51)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
unicode-display_width (2.5.0)

PLATFORMS
arm64-darwin-23
ruby

DEPENDENCIES
bundler
code-scanning-rubocop (~> 0.6.1)
minitest (~> 5.20)
minitest-focus (~> 1.4)
mocha (~> 2.1)
rake (~> 13.0)
rubocop (~> 1.57)
rubocop-minitest (~> 0.33.0)
rubocop-rake (~> 0.6.0)
rubocop-shopify (~> 2.14)
ruby-limiter!

BUNDLED WITH
2.5.3
2 changes: 1 addition & 1 deletion dev.yml
Expand Up @@ -3,7 +3,7 @@
name: limiter

up:
- ruby: 3.2.2
- ruby
- bundler

commands:
Expand Down
2 changes: 1 addition & 1 deletion limiter.gemspec
Expand Up @@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
spec.summary = "Simple Ruby rate limiting mechanism."
spec.homepage = "https://github.com/Shopify/limiter"
spec.license = "MIT"
spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
spec.required_ruby_version = Gem::Requirement.new(">= 3.0.0")

if spec.respond_to?(:metadata)
spec.metadata["allowed_push_host"] = "https://rubygems.org"
Expand Down

0 comments on commit ccf9406

Please sign in to comment.