From 4291639363ede9a8f8feb8650aebefc5ad97679c Mon Sep 17 00:00:00 2001 From: Takuya Mikami <5079965+mkmn@users.noreply.github.com> Date: Mon, 20 Nov 2023 10:17:56 +0900 Subject: [PATCH] Ci against rails7.1 (#48) * Relax rails version in gemspec * Use the latest version of rspec-rails * disable Gemspec/DevelopmentDependencies cop --------- Co-authored-by: mkmn --- .github/gemfiles/rails-7.1.Gemfile | 9 +++++++++ .github/workflows/test.yaml | 2 ++ .rubocop.yml | 3 +++ scimaenaga.gemspec | 4 ++-- 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 .github/gemfiles/rails-7.1.Gemfile diff --git a/.github/gemfiles/rails-7.1.Gemfile b/.github/gemfiles/rails-7.1.Gemfile new file mode 100644 index 00000000..0a754a8f --- /dev/null +++ b/.github/gemfiles/rails-7.1.Gemfile @@ -0,0 +1,9 @@ +source 'https://rubygems.org' + +gemspec path: '../..' + +gem "rails", "~> 7.1" + +# Since rails 7.0, rails does not require sprockets-rails. +# This is added to run the same tests as in previous versions. +gem 'sprockets-rails' diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5acd6241..58e5615e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -72,6 +72,8 @@ jobs: - 6.1.7.3 # 2023-03-13 releases - 7.0.4.3 + # 2023-10-05 releases + - 7.1 exclude: ## be careful with which versions of ruby does rails support ## cf https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html diff --git a/.rubocop.yml b/.rubocop.yml index 7462d2a4..457998a9 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,6 +1,9 @@ AllCops: NewCops: enable +Gemspec/DevelopmentDependencies: + Enabled: false + Style/FrozenStringLiteralComment: Enabled: true diff --git a/scimaenaga.gemspec b/scimaenaga.gemspec index dba2520b..ade56b78 100644 --- a/scimaenaga.gemspec +++ b/scimaenaga.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |s| s.files = Dir['{app,config,db,lib}/**/*', 'MIT-LICENSE', 'Rakefile', 'README.md'] s.required_ruby_version = '>= 2.5.9', '< 3.3' - s.add_dependency 'rails', '>= 5.2.4.6', '< 7.1' + s.add_dependency 'rails', '>= 5.2.4.6', '< 7.2' s.add_runtime_dependency 'jwt', '>= 1.5' s.test_files = Dir['spec/**/*'] @@ -24,7 +24,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'factory_bot_rails' s.add_development_dependency 'pry' s.add_development_dependency 'rake', '~> 13.0' - s.add_development_dependency 'rspec-rails', '~> 5.0' + s.add_development_dependency 'rspec-rails' s.add_development_dependency 'sqlite3', '~> 1.3', '< 1.5' s.metadata = { 'rubygems_mfa_required' => 'true',