Skip to content

Commit

Permalink
Merge pull request #76 from a666/ruby33
Browse files Browse the repository at this point in the history
Add support for ruby 3.3
  • Loading branch information
briandunn authored Feb 10, 2024
2 parents b6fa580 + 3dbcb4a commit da91c30
Show file tree
Hide file tree
Showing 28 changed files with 155 additions and 738 deletions.
37 changes: 18 additions & 19 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,37 @@
---
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby

name: Ruby
name: Tests

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
gemfile: [6,7,8,9,10]
ruby-version: ['2.6', '2.7', '3.0', '3.1', '3.2']
rspec-minor-versions: [6, 7, 8, 9, 10, 11, 12, 13]
ruby-versions: ["2.6", "2.7", "3.0", "3.1", "3.2", "3.3"]
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rspec_3.${{ matrix.rspec-minor-versions }}.gemfile

steps:
- uses: actions/checkout@v2
- name: Set up Ruby
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
# change this to (see https://github.com/ruby/setup-ruby#versioning):
# uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
- name: install bundle
env:
BUNDLE_GEMFILE: gemfiles/rspec_3.${{matrix.gemfile}}.gemfile
run: bundle install
- name: Run tests
run: bundle exec rake
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-versions }}
bundler-cache: true

- name: Run tests
run: bundle exec rake
69 changes: 9 additions & 60 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
#
# See https://github.com/rubocop-hq/rubocop/blob/master/manual/configuration.md
#
require: rubocop-rake
require:
- rubocop-rake
# - rubocop-rspec

AllCops:
NewCops: enable
TargetRubyVersion: 2.6
Exclude:
- tmp/**/*
Expand All @@ -27,62 +30,8 @@ Style/Documentation:
Metrics/BlockLength:
Exclude:
- spec/**/*_spec.rb
Gemspec/DeprecatedAttributeAssignment:
Enabled: true
Layout/SpaceBeforeBrackets:
Enabled: true
Lint/AmbiguousAssignment:
Enabled: true
Lint/DeprecatedConstants:
Enabled: true
Lint/DuplicateBranch:
Enabled: true
Lint/DuplicateRegexpCharacterClassElement:
Enabled: true
Lint/EmptyBlock:
Enabled: true
Lint/EmptyClass:
Enabled: true
Lint/LambdaWithoutLiteralBlock:
Enabled: true
Lint/NoReturnInBeginEndBlocks:
Enabled: true
Lint/NumberedParameterAssignment:
Enabled: true
Lint/OrAssignmentToConstant:
Enabled: true
Lint/RedundantDirGlobSort:
Enabled: true
Lint/SymbolConversion:
Enabled: true
Lint/ToEnumArguments:
Enabled: true
Lint/TripleQuotes:
Enabled: true
Lint/UnexpectedBlockArity:
Enabled: true
Lint/UnmodifiedReduceAccumulator:
Enabled: true
Style/ArgumentsForwarding:
Enabled: true
Style/CollectionCompact:
Enabled: true
Style/DocumentDynamicEvalDefinition:
Enabled: true
Style/EndlessMethod:
Enabled: true
Style/HashConversion:
Enabled: true
Style/HashExcept:
Enabled: true
Style/IfWithBooleanLiteralBranches:
Enabled: true
Style/NegatedIfElseCondition:
Enabled: true
Style/NilLambda:
Enabled: true
Style/RedundantArgument:
Enabled: true
Style/SwapValues:
Enabled: true

Gemspec/RequiredRubyVersion:
Enabled: false
Gemspec/RequireMFA:
Enabled: false
Severity: warning
2 changes: 1 addition & 1 deletion Appraisals
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# vim: ft=ruby

(6..10).each do |minor|
(6..13).each do |minor|
appraise "rspec 3.#{minor}" do
gem 'rspec', "3.#{minor}.0"
end
Expand Down
13 changes: 7 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ gemspec name: 'flatware-rspec'
gemspec name: 'flatware-cucumber'

group :development do
gem 'appraisal', '~> 2.4'
gem 'appraisal'
gem 'aruba', '~> 0.14'
gem 'pry', '~> 0.14'
gem 'rake', '~> 13.0'
gem 'rubocop', '>= 1.30'
gem 'rubocop-rake', '~> 0.5'
gem 'rubocop-rspec', '~> 2.2'
gem 'pry'
gem 'racc'
gem 'rake'
gem 'rubocop'
gem 'rubocop-rake'
gem 'rubocop-rspec'
end
2 changes: 1 addition & 1 deletion features/support/aruba.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Aruba.configure do |config|
config.working_directory = "tmp/aruba#{ENV['TEST_ENV_NUMBER']}"
config.working_directory = "tmp/aruba#{ENV.fetch('TEST_ENV_NUMBER', nil)}"
config.startup_wait_time = 0.1
config.io_wait_timeout = config.exit_timeout = 3
end
2 changes: 1 addition & 1 deletion features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

$LOAD_PATH.unshift Pathname.new(__FILE__).dirname.join('../../lib').to_s

ENV['PATH'] = [Pathname('.').expand_path.join('bin'), ENV['PATH']].join(':')
ENV['PATH'] = [Pathname('.').expand_path.join('bin'), ENV.fetch('PATH', nil)].join(':')

require 'flatware/pid'
require 'aruba/cucumber'
Expand Down
3 changes: 2 additions & 1 deletion flatware-cucumber.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ Gem::Specification.new do |s|
)
s.homepage = 'http://github.com/briandunn/flatware'
s.licenses = ['MIT']
s.required_ruby_version = ['>= 2.6', '< 3.3']
s.required_ruby_version = ['>= 2.6', '< 3.4']
s.require_paths = ['lib']
s.add_dependency %(cucumber), '~> 3.0'
s.add_dependency %(flatware), Flatware::VERSION
# s.metadata['rubygems_mfa_required'] = 'true'
end
3 changes: 2 additions & 1 deletion flatware-rspec.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ Gem::Specification.new do |s|
)
s.homepage = 'http://github.com/briandunn/flatware'
s.licenses = ['MIT']
s.required_ruby_version = ['>= 2.6', '< 3.3']
s.required_ruby_version = ['>= 2.6', '< 3.4']
s.require_paths = ['lib']
s.add_dependency %(flatware), Flatware::VERSION
s.add_dependency %(rspec), '>= 3.6'
# s.metadata['rubygems_mfa_required'] = 'true'
end
3 changes: 2 additions & 1 deletion flatware.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ Gem::Specification.new do |s|
s.homepage = 'http://github.com/briandunn/flatware'

s.licenses = ['MIT']
s.required_ruby_version = ['>= 2.6', '< 3.3']
s.required_ruby_version = ['>= 2.6', '< 3.4']
s.require_paths = ['lib']
s.executables = ['flatware']
s.add_dependency %(thor), '< 2.0'
# s.metadata['rubygems_mfa_required'] = 'true'
end
13 changes: 7 additions & 6 deletions gemfiles/rspec_3.10.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ source "https://rubygems.org"
gem "rspec", "3.10.0"

group :development do
gem "appraisal", "~> 2.4"
gem "appraisal"
gem "aruba", "~> 0.14"
gem "pry", "~> 0.14"
gem "rake", "~> 13.0"
gem "rubocop", ">= 1.30"
gem "rubocop-rake", "~> 0.5"
gem "rubocop-rspec", "~> 2.2"
gem "pry"
gem "racc"
gem "rake"
gem "rubocop"
gem "rubocop-rake"
gem "rubocop-rspec"
end

gemspec name: "flatware", path: "../"
Expand Down
120 changes: 0 additions & 120 deletions gemfiles/rspec_3.10.gemfile.lock

This file was deleted.

20 changes: 20 additions & 0 deletions gemfiles/rspec_3.11.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "rspec", "3.11.0"

group :development do
gem "appraisal"
gem "aruba", "~> 0.14"
gem "pry"
gem "racc"
gem "rake"
gem "rubocop"
gem "rubocop-rake"
gem "rubocop-rspec"
end

gemspec name: "flatware", path: "../"
gemspec name: "flatware-rspec", path: "../"
gemspec name: "flatware-cucumber", path: "../"
20 changes: 20 additions & 0 deletions gemfiles/rspec_3.12.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "rspec", "3.12.0"

group :development do
gem "appraisal"
gem "aruba", "~> 0.14"
gem "pry"
gem "racc"
gem "rake"
gem "rubocop"
gem "rubocop-rake"
gem "rubocop-rspec"
end

gemspec name: "flatware", path: "../"
gemspec name: "flatware-rspec", path: "../"
gemspec name: "flatware-cucumber", path: "../"
Loading

0 comments on commit da91c30

Please sign in to comment.