Skip to content

Commit

Permalink
Upgrade minimum required Ruby to v3.1.2
Browse files Browse the repository at this point in the history
I am considering this the correct minimum Ruby because it is the Ruby
which is available in Debian 12 (bookworm), which is current in January
2025.

* https://www.debian.org/releases/
* https://packages.debian.org/bookworm/ruby/

Additional changes:
* fixup README
  - fix RubyDoc link
  - update copyright to 2025
  - add link to Apache2 license
* add `logger` development dependency, which is needed by licence_finder
  and dropped in Ruby 3.5.
* remove the bundler development dependency, and always use the built-in
  bundler
* add rubocop excentions
  - rubocop-performance
  - rubocop-rake

Github Action script and CI updates:
* drop the unsupported Rubies and added 3.3, 3.4
* remove ruby version specification from the `coverage` step, because it
  should use the default/minimum Ruby specified in the `.ruby-version`
* update action/checkout step to v4
  • Loading branch information
acant committed Feb 12, 2025
1 parent 503ae0c commit 321e518
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 20 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,38 @@ name: CI
on:
push:
schedule:
- cron: '0 1 * * 0' # every Sunday at 1am
- cron: '0 1 * * 0' # every Sunday at 1am
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
ruby: ['2.6', '2.7', '3.0', '3.1', '3.2', head]
ruby: [3.1, 3.2, 3.3, 3.4, head, jruby, jruby-head]
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || endsWith(matrix.ruby, 'jruby') }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rake
- run: bundle exec rake spec
coverage:
needs: [ test ]
name: coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6'
bundler-cache: true
- run: bundle exec rake
env:
CUCUMBER_PUBLISH_TOKEN: ${{ secrets.CUCUMBER_PUBLISH_TOKEN }}
- uses: paambaati/codeclimate-action@v3.2.0
- uses: paambaati/codeclimate-action@v9.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageLocations: |
${{ github.workspace }}/coverage/lcov/*.lcov:lcov
debug: true
9 changes: 7 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
require: rubocop-rspec
require:
- rubocop-performance
- rubocop-rake
- rubocop-rspec

AllCops:
TargetRubyVersion: 2.6
NewCops: enable

Gemspec/DevelopmentDependencies:
EnforcedStyle: gemspec

Layout/LineLength:
Max: 100

Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.6.10
3.1.2
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]
### Changed
- update the required ruby version from v2.2 to v2.6
- update the required ruby version from v2.2 to v3.1

## [0.0.3] - 2022-01-24
### Added
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![Test Coverage](https://codeclimate.com/github/sugarcrm/rspec-tabular/badges/coverage.svg)](https://codeclimate.com/github/sugarcrm/rspec-tabular/coverage)
[![License](http://img.shields.io/badge/license-Apache2-green.svg?style=flat)](LICENSE)

[![RubyDoc](http://img.shields.io/badge/docs-rdoc.info-blue.svg)](http://rubydoc.org/gems/rspec-tabular)
[![RubyDoc](http://img.shields.io/badge/docs-rdoc.info-blue.svg)](https://rubydoc.info/gems/rspec-tabular)

Rspec extension for writing tabular examples

Expand Down Expand Up @@ -139,7 +139,7 @@ Links to other places on the web where this projects exists:
* [CucumberPro](https://app.cucumber.pro/projects/rspec-tabular)
* [Github](https://github.com/sugarcrm/rspec-tabular)
* [OpenHub](https://www.openhub.net/p/rspec-tabular)
* [RubyDoc](http://rubydoc.org/gems/rspec-tabular)
* [RubyDoc](https://rubydoc.org/gems/rspec-tabular)
* [RubyGems](https://rubygems.org/gems/rspec-tabular)
* [Ruby LibHunt](https://ruby.libhunt.com/rspec-tabular-alternatives)
* [Ruby Toolbox](https://www.ruby-toolbox.com/projects/rspec-tabular)
Expand All @@ -150,4 +150,4 @@ See [CONTRIBUTING](CONTRIBUTING.md) for how you can contribute changes back into

## License

Copyright 2019 [SugarCRM Inc.](http://sugarcrm.com), released under the Apache2 License.
Copyright 2025 [SugarCRM Inc.](http://sugarcrm.com), released under the [Apache2 License](https://www.apache.org/licenses/LICENSE-2.0.html).
8 changes: 5 additions & 3 deletions rspec-tabular.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,23 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ['lib']

spec.required_ruby_version = '>= 2.6.0'
spec.required_ruby_version = '>= 3.1.2'

spec.metadata['rubygems_mfa_required'] = 'true'

spec.add_runtime_dependency 'rspec-core', '>= 2.99.0'
spec.add_dependency 'rspec-core', '>= 2.99.0'

spec.add_development_dependency 'bundler', '~> 2.0'
spec.add_development_dependency 'rake', '~> 13.0'
spec.add_development_dependency 'rspec', '~> 3.5'

# Dependencies whose APIs we do not really depend upon, and can be upgraded
# without limiting.
spec.add_development_dependency 'bundler-audit'
spec.add_development_dependency 'license_finder'
spec.add_development_dependency 'logger'
spec.add_development_dependency 'rubocop'
spec.add_development_dependency 'rubocop-performance'
spec.add_development_dependency 'rubocop-rake'
spec.add_development_dependency 'rubocop-rspec'
spec.add_development_dependency 'simplecov'
spec.add_development_dependency 'simplecov-lcov'
Expand Down
6 changes: 4 additions & 2 deletions spec/rspec/tabular_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@
subject { test_class }

before do
allow(test_class).to receive(:method1).and_return(:result1)
allow(test_class).to receive(:method2).and_return(:result2)
allow(test_class).to receive_messages(
method1: :result1,
method2: :result2
)
end

inputs :input1, :input2
Expand Down

0 comments on commit 321e518

Please sign in to comment.