From 8b1b89b872542a407dd63984f4dc9fd2b268b59f Mon Sep 17 00:00:00 2001 From: Nicolas Rodriguez Date: Mon, 5 Aug 2024 01:12:19 +0200 Subject: [PATCH] Improve dependencies settings --- Appraisals | 29 +++++++++++++++++++++++++++ Gemfile | 22 +++++++++++++++++++- gemfiles/rails_6.1.7.gemfile | 26 ++++++++++++++++++++++++ gemfiles/rails_7.0.8.gemfile | 26 ++++++++++++++++++++++++ gemfiles/rails_7.1.3.gemfile | 22 ++++++++++++++++++++ health_monitor.gemspec | 39 ++---------------------------------- 6 files changed, 126 insertions(+), 38 deletions(-) diff --git a/Appraisals b/Appraisals index 5ef65d0..3eb1eee 100644 --- a/Appraisals +++ b/Appraisals @@ -9,5 +9,34 @@ RAILS_VERSIONS = %w[ RAILS_VERSIONS.each do |version| appraise "rails_#{version}" do gem 'rails', 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" + # 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" + # 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 7f4f5e9..59ebbff 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,25 @@ # frozen_string_literal: true -source 'https://rubygems.org' +source "https://rubygems.org" gemspec + +gem "appraisal", git: "https://github.com/n-rodriguez/appraisal.git", branch: "wip/combustion" + +gem "capybara" +gem "capybara-screenshot" +gem "database_cleaner" +gem "guard-rspec" +gem "pry" +gem "rake" +gem "rediska", ">= 1.0" +gem "resque" +gem "rspec-rails" +gem "rubocop" +gem "rubocop-capybara" +gem "rubocop-rake" +gem "rubocop-rspec" +gem "sidekiq" +gem "simplecov" +gem "sqlite3", "~> 1.5.0" +gem "timecop" diff --git a/gemfiles/rails_6.1.7.gemfile b/gemfiles/rails_6.1.7.gemfile index 11e138d..4998cc4 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 "capybara-screenshot" +gem "database_cleaner" +gem "guard-rspec" +gem "pry" +gem "rake" +gem "rediska", ">= 1.0" +gem "resque" +gem "rspec-rails" +gem "rubocop" +gem "rubocop-capybara" +gem "rubocop-rake" +gem "rubocop-rspec" +gem "sidekiq" +gem "simplecov" +gem "sqlite3", "~> 1.5.0" +gem "timecop" 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 c86e7bc..df23e03 100644 --- a/gemfiles/rails_7.0.8.gemfile +++ b/gemfiles/rails_7.0.8.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 "capybara-screenshot" +gem "database_cleaner" +gem "guard-rspec" +gem "pry" +gem "rake" +gem "rediska", ">= 1.0" +gem "resque" +gem "rspec-rails" +gem "rubocop" +gem "rubocop-capybara" +gem "rubocop-rake" +gem "rubocop-rspec" +gem "sidekiq" +gem "simplecov" +gem "sqlite3", "~> 1.5.0" +gem "timecop" gem "rails", "7.0.8" +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.3.gemfile b/gemfiles/rails_7.1.3.gemfile index 2ce8f82..7fc6b71 100644 --- a/gemfiles/rails_7.1.3.gemfile +++ b/gemfiles/rails_7.1.3.gemfile @@ -2,6 +2,28 @@ source "https://rubygems.org" +gem "appraisal", git: "https://github.com/n-rodriguez/appraisal.git", branch: "wip/combustion" +gem "capybara" +gem "capybara-screenshot" +gem "database_cleaner" +gem "guard-rspec" +gem "pry" +gem "rake" +gem "rediska", ">= 1.0" +gem "resque" +gem "rspec-rails" +gem "rubocop" +gem "rubocop-capybara" +gem "rubocop-rake" +gem "rubocop-rspec" +gem "sidekiq" +gem "simplecov" +gem "sqlite3", "~> 1.5.0" +gem "timecop" gem "rails", "7.1.3" +install_if -> { Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.4.0") } do + gem "logger" +end + gemspec path: "../" diff --git a/health_monitor.gemspec b/health_monitor.gemspec index 524c6eb..6c28c7e 100644 --- a/health_monitor.gemspec +++ b/health_monitor.gemspec @@ -16,41 +16,6 @@ Gem::Specification.new do |s| s.files = `git ls-files`.split("\n") - s.add_runtime_dependency 'rails', '>= 6.1' - s.add_runtime_dependency 'zeitwerk' - - s.add_development_dependency 'appraisal' - s.add_development_dependency 'capybara' - s.add_development_dependency 'capybara-screenshot' - s.add_development_dependency 'database_cleaner' - s.add_development_dependency 'guard-rspec' - s.add_development_dependency 'pry' - s.add_development_dependency 'rake' - s.add_development_dependency 'rediska', '>= 1.0' - s.add_development_dependency 'resque' - s.add_development_dependency 'rspec-rails' - s.add_development_dependency 'rubocop' - s.add_development_dependency 'rubocop-capybara' - s.add_development_dependency 'rubocop-rake' - s.add_development_dependency 'rubocop-rspec' - s.add_development_dependency 'sidekiq' - s.add_development_dependency 'simplecov' - s.add_development_dependency 'sqlite3', '~> 1.5.0' - s.add_development_dependency 'timecop' - - 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" - s.add_development_dependency "pstore" - s.add_development_dependency "ostruct" - end + s.add_dependency 'rails', '>= 6.1' + s.add_dependency 'zeitwerk' end