From a44be27b0c8e273b4bb830e2ccc4cbff43df75ad Mon Sep 17 00:00:00 2001 From: Adam Crownoble Date: Sun, 2 Jul 2023 16:36:10 -0500 Subject: [PATCH] Add suport for Ruby 3.2 and remove Rails 5.* - Ruby 3.2 is out now, so add support for it - Also, remove support for Rail 5.* as it is getting pretty old - Test all suported Ruby versions --- .github/workflows/rspec.yml | 8 ++++++-- .ruby-version | 2 +- .tool-versions | 1 + Appraisals | 12 ------------ cache_crispies.gemspec | 11 +++++++---- gemfiles/rails_5.0.gemfile | 7 ------- gemfiles/rails_5.1.gemfile | 7 ------- gemfiles/rails_5.2.gemfile | 7 ------- spec/spec_helper.rb | 1 - 9 files changed, 15 insertions(+), 41 deletions(-) create mode 100644 .tool-versions delete mode 100644 gemfiles/rails_5.0.gemfile delete mode 100644 gemfiles/rails_5.1.gemfile delete mode 100644 gemfiles/rails_5.2.gemfile diff --git a/.github/workflows/rspec.yml b/.github/workflows/rspec.yml index 186f90d..8cc0b59 100644 --- a/.github/workflows/rspec.yml +++ b/.github/workflows/rspec.yml @@ -7,12 +7,16 @@ jobs: runs-on: ubuntu-latest + strategy: + matrix: + ruby-version: ['3.2', '3.1', '3.0', '2.7'] + steps: - uses: actions/checkout@v3 - - name: Set up Ruby + - name: Set up Ruby ${{ matrix.ruby-version }} uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1 with: - ruby-version: '3.1' + ruby-version: ${{ matrix.ruby-version }} - name: Install dependencies run: bundle install - name: Installing all gem versions via Appraisal diff --git a/.ruby-version b/.ruby-version index ef538c2..0aec50e 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.1.2 +3.1.4 diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..306ab33 --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +ruby 3.1.4 diff --git a/Appraisals b/Appraisals index 4e033fe..892c575 100644 --- a/Appraisals +++ b/Appraisals @@ -1,15 +1,3 @@ -appraise "rails-5.0" do - gem "railties", "~>5.0.0" -end - -appraise "rails-5.1" do - gem "railties", "~>5.1.0" -end - -appraise "rails-5.2" do - gem "railties", "~>5.2.0" -end - appraise "rails-6.0" do gem "railties", "~>6.0.0" end diff --git a/cache_crispies.gemspec b/cache_crispies.gemspec index e660a18..5728327 100644 --- a/cache_crispies.gemspec +++ b/cache_crispies.gemspec @@ -11,18 +11,21 @@ Gem::Specification.new do |spec| spec.summary = 'Fast Rails serializer with built-in caching' spec.homepage = 'https://github.com/codenoble/cache-crispies' spec.licenses = ['MIT'] + spec.metadata = { 'source_code_uri' => 'https://github.com/example/example' } spec.files = Dir.glob('{lib,spec}/**/*') + ['.rspec'] spec.test_files = spec.files.grep(%r{^(spec)/}) spec.require_paths = ['lib'] - spec.add_dependency 'railties', '>= 5.0.0', '< 8.0' + spec.required_ruby_version = '>= 2.7.0' + + spec.add_dependency 'railties', '>= 6.0.0', '< 8.0' spec.add_dependency 'oj', '~> 3.7' - spec.add_development_dependency 'activemodel', '>= 5.0.0', '< 8.0' - spec.add_development_dependency 'appraisal', '~> 2.2' + spec.add_development_dependency 'activemodel', '>= 6.0.0', '< 8.0' + spec.add_development_dependency 'appraisal', '~> 2.4' spec.add_development_dependency 'bundler', '~> 2.0' - spec.add_development_dependency 'byebug', '~> 11.0' + spec.add_development_dependency 'debug', '~> 1.8' spec.add_development_dependency 'rspec', '~> 3.12.0' spec.add_development_dependency 'rspec_junit_formatter', '~> 0.4' spec.add_development_dependency 'simplecov', '~> 0.22' diff --git a/gemfiles/rails_5.0.gemfile b/gemfiles/rails_5.0.gemfile deleted file mode 100644 index d3ee48c..0000000 --- a/gemfiles/rails_5.0.gemfile +++ /dev/null @@ -1,7 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "railties", "~>5.0.0" - -gemspec path: "../" diff --git a/gemfiles/rails_5.1.gemfile b/gemfiles/rails_5.1.gemfile deleted file mode 100644 index a2c96ac..0000000 --- a/gemfiles/rails_5.1.gemfile +++ /dev/null @@ -1,7 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "railties", "~>5.1.0" - -gemspec path: "../" diff --git a/gemfiles/rails_5.2.gemfile b/gemfiles/rails_5.2.gemfile deleted file mode 100644 index aada12c..0000000 --- a/gemfiles/rails_5.2.gemfile +++ /dev/null @@ -1,7 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "railties", "~>5.2.0" - -gemspec path: "../" diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 80baa14..6df6b18 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -17,7 +17,6 @@ ) end -require 'byebug' require_relative '../lib/cache_crispies' RSpec.configure do |config|