diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 3a1f6777..c07fc518 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -23,7 +23,7 @@ jobs: - { ruby: '2.7', rails: '6.1' } - { ruby: '3.0', rails: '7.0' } - { ruby: '3.1', rails: '7.0' } - - { ruby: '3.2', rails: '7.0' } + - { ruby: '3.2', rails: '7.1' } env: BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails.${{ matrix.rails }}.gemfile diff --git a/Appraisals b/Appraisals index e505df04..7d129328 100644 --- a/Appraisals +++ b/Appraisals @@ -1,4 +1,4 @@ -%w[5.1 5.2 6.0 6.1 7.0].each do |version| +%w[6.0 6.1 7.0 7.1].each do |version| appraise "rails.#{version}" do gem 'actionpack', "~> #{version}.0" gem 'activesupport', "~> #{version}.0" diff --git a/gemfiles/rails.5.2.gemfile b/gemfiles/rails.5.2.gemfile deleted file mode 100644 index 52493e40..00000000 --- a/gemfiles/rails.5.2.gemfile +++ /dev/null @@ -1,10 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "granite-form", git: "https://github.com/toptal/granite-form.git" -gem "actionpack", "~> 5.2.0" -gem "activesupport", "~> 5.2.0" -gem "activerecord", "~> 5.2.0" - -gemspec path: "../" diff --git a/gemfiles/rails.5.1.gemfile b/gemfiles/rails.7.1.gemfile similarity index 63% rename from gemfiles/rails.5.1.gemfile rename to gemfiles/rails.7.1.gemfile index ca2075ca..43af6636 100644 --- a/gemfiles/rails.5.1.gemfile +++ b/gemfiles/rails.7.1.gemfile @@ -3,8 +3,8 @@ source "https://rubygems.org" gem "granite-form", git: "https://github.com/toptal/granite-form.git" -gem "actionpack", "~> 5.1.0" -gem "activesupport", "~> 5.1.0" -gem "activerecord", "~> 5.1.0" +gem "actionpack", "~> 7.1.0" +gem "activesupport", "~> 7.1.0" +gem "activerecord", "~> 7.1.0" gemspec path: "../" diff --git a/granite.gemspec b/granite.gemspec index 862fbfde..eab88fe7 100644 --- a/granite.gemspec +++ b/granite.gemspec @@ -14,9 +14,9 @@ Gem::Specification.new do |s| s.license = 'MIT' s.required_ruby_version = '>= 2.5' - s.add_runtime_dependency 'actionpack', '>= 5.1', '< 7.1' + s.add_runtime_dependency 'actionpack', '>= 6.0', '< 7.2' s.add_runtime_dependency 'granite-form', '>= 0.3.0' - s.add_runtime_dependency 'activesupport', '>= 5.1', '< 7.1' + s.add_runtime_dependency 'activesupport', '>= 6.0', '< 7.2' s.add_runtime_dependency 'memoist', '~> 0.16' s.add_runtime_dependency 'ruby2_keywords', '~> 0.0.5' @@ -27,11 +27,11 @@ Gem::Specification.new do |s| s.add_development_dependency 'fuubar', '~> 2.0' s.add_development_dependency 'pg', '< 2' s.add_development_dependency 'pry-byebug' - s.add_development_dependency 'rspec', '~> 3.6' + s.add_development_dependency 'rspec', '~> 3.12' s.add_development_dependency 'rspec-activemodel-mocks', '~> 1.0' s.add_development_dependency 'rspec-collection_matchers', '~> 1.1' s.add_development_dependency 'rspec-its', '~> 1.2 ' - s.add_development_dependency 'rspec-rails', '~> 3.6' + s.add_development_dependency 'rspec-rails', '~> 5.0' s.add_development_dependency 'rspec_junit_formatter', '~> 0.2' s.add_development_dependency 'rubocop', '~> 1.0' s.add_development_dependency 'rubocop-rails', '~> 2.13' diff --git a/spec/lib/generators/granite_generator_spec.rb b/spec/lib/generators/granite_generator_spec.rb index 8ff1f97a..d469f377 100644 --- a/spec/lib/generators/granite_generator_spec.rb +++ b/spec/lib/generators/granite_generator_spec.rb @@ -1,10 +1,18 @@ require 'rails/generators' -require 'rails/generators/testing/behaviour' +if Rails.version > '7.1' + require 'rails/generators/testing/behavior' +else + require 'rails/generators/testing/behaviour' +end require_relative '../../../lib/generators/granite_generator' RSpec.describe GraniteGenerator do include RSpec::Rails::RailsExampleGroup - include Rails::Generators::Testing::Behaviour + if Rails.version > '7.1' + include Rails::Generators::Testing::Behavior + else + include Rails::Generators::Testing::Behaviour + end include FileUtils tests described_class diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index edaade63..32e3174f 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -13,7 +13,7 @@ require 'rspec/matchers/fail_matchers' require 'simplecov' SimpleCov.start do - minimum_coverage 99.74 + minimum_coverage 99.73 end require 'granite'