diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4085056..bba98e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: - '3.0' - 'head' rails: - - rails_7.1.0 + - rails_7.1.3 - rails_7.0.8 - rails_6.1.7 diff --git a/Appraisals b/Appraisals index 835c314..0176b89 100644 --- a/Appraisals +++ b/Appraisals @@ -3,12 +3,44 @@ RAILS_VERSIONS = %w[ 6.1.7 7.0.8 - 7.1.0 + 7.1.3 ].freeze RAILS_VERSIONS.each do |version| appraise "rails_#{version}" do gem "rails", version - gem "sprockets-rails" if ["7.0.8", "7.1.0"].include?(version) + + case version + when "6.1.7" + # Fix: LoadError: cannot load such file -- base64 + install_if '-> { Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.3.0") }' do + gem "base64" + gem "bigdecimal" + gem "mutex_m" + gem "drb" + gem "logger" + end + + when "7.0.8" + gem "sprockets-rails" + + # Fix: LoadError: cannot load such file -- base64 + install_if '-> { Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.3.0") }' do + gem "base64" + gem "bigdecimal" + gem "mutex_m" + gem "drb" + gem "logger" + end + + when "7.1.3" + gem "sprockets-rails" + + # Fix: warning: logger was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.5.0. Add logger to your Gemfile or gemspec. + install_if '-> { Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.4.0") }' do + gem "logger" + end + end + end end diff --git a/Gemfile b/Gemfile index be173b2..29242bf 100644 --- a/Gemfile +++ b/Gemfile @@ -3,3 +3,23 @@ source "https://rubygems.org" gemspec + +gem "appraisal", git: "https://github.com/n-rodriguez/appraisal.git", branch: "wip/combustion" + +gem "capybara" +gem "cuprite" +gem "database_cleaner" +gem "factory_bot" +gem "faker" +gem "guard-rspec" +gem "puma" +gem "rake" +gem "rspec-rails" +gem "rspec-retry" +gem "rubocop" +gem "rubocop-capybara" +gem "rubocop-factory_bot" +gem "rubocop-rake" +gem "rubocop-rspec" +gem "simplecov" +gem "sqlite3", "~> 1.5.0" diff --git a/draper.gemspec b/draper.gemspec index 25ff02f..8bba753 100644 --- a/draper.gemspec +++ b/draper.gemspec @@ -18,42 +18,7 @@ Gem::Specification.new do |s| s.files = `git ls-files`.split("\n") s.require_paths = ["lib"] - s.add_runtime_dependency "rails", ">= 6.1" - s.add_runtime_dependency "request_store", ">= 1.0" - s.add_runtime_dependency "zeitwerk" - - s.add_development_dependency "appraisal" - s.add_development_dependency "capybara" - s.add_development_dependency "cuprite" - s.add_development_dependency "database_cleaner" - s.add_development_dependency "factory_bot" - s.add_development_dependency "faker" - s.add_development_dependency "guard-rspec" - s.add_development_dependency "puma" - s.add_development_dependency "rake" - s.add_development_dependency "rspec-rails" - s.add_development_dependency "rspec-retry" - s.add_development_dependency "rubocop" - s.add_development_dependency "rubocop-capybara" - s.add_development_dependency "rubocop-factory_bot" - s.add_development_dependency "rubocop-rake" - s.add_development_dependency "rubocop-rspec" - s.add_development_dependency "simplecov" - s.add_development_dependency "sqlite3", "~> 1.5.0" - - # rubocop:disable Gemspec/RubyVersionGlobalsUsage - if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.1.0") - s.add_development_dependency "net-imap" - s.add_development_dependency "net-pop" - s.add_development_dependency "net-smtp" - end - - if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.4.0") - s.add_development_dependency "base64" - s.add_development_dependency "bigdecimal" - s.add_development_dependency "mutex_m" - s.add_development_dependency "drb" - s.add_development_dependency "logger" - end - # rubocop:enable Gemspec/RubyVersionGlobalsUsage + s.add_dependency "rails", ">= 6.1" + s.add_dependency "request_store", ">= 1.0" + s.add_dependency "zeitwerk" end diff --git a/gemfiles/rails_6.1.7.gemfile b/gemfiles/rails_6.1.7.gemfile index 11e138d..8ef410c 100644 --- a/gemfiles/rails_6.1.7.gemfile +++ b/gemfiles/rails_6.1.7.gemfile @@ -2,6 +2,32 @@ source "https://rubygems.org" +gem "appraisal", git: "https://github.com/n-rodriguez/appraisal.git", branch: "wip/combustion" +gem "capybara" +gem "cuprite" +gem "database_cleaner" +gem "factory_bot" +gem "faker" +gem "guard-rspec" +gem "puma" +gem "rake" +gem "rspec-rails" +gem "rspec-retry" +gem "rubocop" +gem "rubocop-capybara" +gem "rubocop-factory_bot" +gem "rubocop-rake" +gem "rubocop-rspec" +gem "simplecov" +gem "sqlite3", "~> 1.5.0" gem "rails", "6.1.7" +install_if -> { Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.3.0") } do + gem "base64" + gem "bigdecimal" + gem "mutex_m" + gem "drb" + gem "logger" +end + gemspec path: "../" diff --git a/gemfiles/rails_7.0.8.gemfile b/gemfiles/rails_7.0.8.gemfile index a14dc5e..9d15fbd 100644 --- a/gemfiles/rails_7.0.8.gemfile +++ b/gemfiles/rails_7.0.8.gemfile @@ -2,7 +2,33 @@ source "https://rubygems.org" +gem "appraisal", git: "https://github.com/n-rodriguez/appraisal.git", branch: "wip/combustion" +gem "capybara" +gem "cuprite" +gem "database_cleaner" +gem "factory_bot" +gem "faker" +gem "guard-rspec" +gem "puma" +gem "rake" +gem "rspec-rails" +gem "rspec-retry" +gem "rubocop" +gem "rubocop-capybara" +gem "rubocop-factory_bot" +gem "rubocop-rake" +gem "rubocop-rspec" +gem "simplecov" +gem "sqlite3", "~> 1.5.0" gem "rails", "7.0.8" gem "sprockets-rails" +install_if -> { Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.3.0") } do + gem "base64" + gem "bigdecimal" + gem "mutex_m" + gem "drb" + gem "logger" +end + gemspec path: "../" diff --git a/gemfiles/rails_7.1.0.gemfile b/gemfiles/rails_7.1.0.gemfile deleted file mode 100644 index 2db66ea..0000000 --- a/gemfiles/rails_7.1.0.gemfile +++ /dev/null @@ -1,8 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "rails", "7.1.0" -gem "sprockets-rails" - -gemspec path: "../" diff --git a/gemfiles/rails_7.1.3.gemfile b/gemfiles/rails_7.1.3.gemfile new file mode 100644 index 0000000..555e715 --- /dev/null +++ b/gemfiles/rails_7.1.3.gemfile @@ -0,0 +1,30 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "appraisal", git: "https://github.com/n-rodriguez/appraisal.git", branch: "wip/combustion" +gem "capybara" +gem "cuprite" +gem "database_cleaner" +gem "factory_bot" +gem "faker" +gem "guard-rspec" +gem "puma" +gem "rake" +gem "rspec-rails" +gem "rspec-retry" +gem "rubocop" +gem "rubocop-capybara" +gem "rubocop-factory_bot" +gem "rubocop-rake" +gem "rubocop-rspec" +gem "simplecov" +gem "sqlite3", "~> 1.5.0" +gem "rails", "7.1.3" +gem "sprockets-rails" + +install_if -> { Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.4.0") } do + gem "logger" +end + +gemspec path: "../"