Skip to content

Commit

Permalink
Improve dependencies settings
Browse files Browse the repository at this point in the history
  • Loading branch information
n-rodriguez committed Aug 4, 2024
1 parent c096d2f commit 62a0bf9
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 21 deletions.
29 changes: 29 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 11 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# 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 "debug"
gem "rspec-rails"
gem "rubocop"
gem "rubocop-rake"
gem "rubocop-rspec"
gem "ruby-lsp"
gem "simplecov"
16 changes: 16 additions & 0 deletions gemfiles/rails_6.1.7.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

source "https://rubygems.org"

gem "appraisal", git: "https://github.com/n-rodriguez/appraisal.git", branch: "wip/combustion"
gem "debug"
gem "rspec-rails"
gem "rubocop"
gem "rubocop-rake"
gem "rubocop-rspec"
gem "ruby-lsp"
gem "simplecov"
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: "../"
16 changes: 16 additions & 0 deletions gemfiles/rails_7.0.8.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

source "https://rubygems.org"

gem "appraisal", git: "https://github.com/n-rodriguez/appraisal.git", branch: "wip/combustion"
gem "debug"
gem "rspec-rails"
gem "rubocop"
gem "rubocop-rake"
gem "rubocop-rspec"
gem "ruby-lsp"
gem "simplecov"
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: "../"
12 changes: 12 additions & 0 deletions gemfiles/rails_7.1.3.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

source "https://rubygems.org"

gem "appraisal", git: "https://github.com/n-rodriguez/appraisal.git", branch: "wip/combustion"
gem "debug"
gem "rspec-rails"
gem "rubocop"
gem "rubocop-rake"
gem "rubocop-rspec"
gem "ruby-lsp"
gem "simplecov"
gem "rails", "7.1.3"

install_if -> { Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.4.0") } do
gem "logger"
end

gemspec path: "../"
24 changes: 4 additions & 20 deletions redis_web_manager.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,8 @@ Gem::Specification.new do |s|

s.files = `git ls-files`.split("\n")

s.add_runtime_dependency 'pagy', '>= 5.0'
s.add_runtime_dependency 'rails', '>= 6.1'
s.add_runtime_dependency 'redis', '>= 4.1.0'
s.add_runtime_dependency 'sprockets-rails', '>= 3.4.0'

s.add_development_dependency 'appraisal'
s.add_development_dependency 'debug'
s.add_development_dependency 'rspec-rails'
s.add_development_dependency 'rubocop'
s.add_development_dependency 'rubocop-rake'
s.add_development_dependency 'rubocop-rspec'
s.add_development_dependency 'ruby-lsp'
s.add_development_dependency 'simplecov'

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"
end
s.add_dependency 'pagy', '>= 5.0'
s.add_dependency 'rails', '>= 6.1'
s.add_dependency 'redis', '>= 4.1.0'
s.add_dependency 'sprockets-rails', '>= 3.4.0'
end

0 comments on commit 62a0bf9

Please sign in to comment.