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 7a3cf43
Show file tree
Hide file tree
Showing 7 changed files with 4 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
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 7a3cf43

Please sign in to comment.