-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
571dd9e
commit 7c8025f
Showing
8 changed files
with
129 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,97 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'yaml' | ||
|
||
rails_versions = YAML.safe_load_file('appraisal.yml') | ||
|
||
rails_versions.each do |version, gems| | ||
appraise "rails_#{version}" do | ||
gem 'rails', version | ||
gems.each do |name, opts| | ||
if opts['install_if'] | ||
install_if opts['install_if'] do | ||
if opts['version'].empty? | ||
gem name | ||
else | ||
gem name, opts['version'] | ||
end | ||
end | ||
elsif opts['version'].empty? | ||
gem name | ||
else | ||
gem name, opts['version'] | ||
end | ||
end | ||
appraise 'rails_7.0.8' do # rubocop:disable Metrics/BlockLength | ||
gem 'rails', '7.0.8' | ||
|
||
install_if '-> { ENV["DB_ADAPTER"] == "sqlite3" }' do | ||
gem 'sqlite3', '~> 1.5.0' | ||
end | ||
|
||
install_if '-> { ENV["DB_ADAPTER"] == "mysql2" }' do | ||
gem 'mysql2' | ||
end | ||
|
||
install_if '-> { ENV["DB_ADAPTER"] == "trilogy" }' do | ||
gem 'activerecord-trilogy-adapter' | ||
end | ||
|
||
install_if '-> { ENV["DB_ADAPTER"] == "oracle_enhanced" }' do | ||
gem 'ruby-oci8' | ||
gem 'activerecord-oracle_enhanced-adapter', '~> 7.0.0' | ||
end | ||
|
||
install_if '-> { ENV["DB_ADAPTER"] == "postgis" }' do | ||
gem 'activerecord-postgis-adapter' | ||
end | ||
|
||
# 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 'base64' | ||
gem 'bigdecimal' | ||
gem 'benchmark' | ||
gem 'drb' | ||
gem 'logger' | ||
gem 'mutex_m' | ||
gem 'ostruct' | ||
end | ||
end | ||
|
||
appraise 'rails_7.1.0' do | ||
gem 'rails', '7.1.0' | ||
|
||
install_if '-> { ENV["DB_ADAPTER"] == "sqlite3" }' do | ||
gem 'sqlite3', '~> 1.5.0' | ||
end | ||
|
||
install_if '-> { ENV["DB_ADAPTER"] == "mysql2" }' do | ||
gem 'mysql2' | ||
end | ||
|
||
install_if '-> { ENV["DB_ADAPTER"] == "trilogy" }' do | ||
gem 'activerecord-trilogy-adapter' | ||
end | ||
|
||
install_if '-> { ENV["DB_ADAPTER"] == "oracle_enhanced" }' do | ||
gem 'ruby-oci8' | ||
gem 'activerecord-oracle_enhanced-adapter', git: 'https://github.com/rsim/oracle-enhanced.git' | ||
end | ||
|
||
install_if '-> { ENV["DB_ADAPTER"] == "postgis" }' do | ||
gem 'activerecord-postgis-adapter' | ||
end | ||
|
||
# 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.3.0") }' do | ||
gem 'logger' | ||
gem 'ostruct' | ||
end | ||
end | ||
|
||
appraise 'rails_7.2.0' do | ||
gem 'rails', '7.2.0' | ||
|
||
install_if '-> { ENV["DB_ADAPTER"] == "sqlite3" }' do | ||
gem 'sqlite3', '~> 1.5.0' | ||
end | ||
|
||
install_if '-> { ENV["DB_ADAPTER"] == "mysql2" }' do | ||
gem 'mysql2' | ||
end | ||
|
||
install_if '-> { ENV["DB_ADAPTER"] == "trilogy" }' do | ||
gem 'activerecord-trilogy-adapter' | ||
end | ||
|
||
install_if '-> { ENV["DB_ADAPTER"] == "oracle_enhanced" }' do | ||
gem 'ruby-oci8' | ||
gem 'activerecord-oracle_enhanced-adapter', git: 'https://github.com/rsim/oracle-enhanced.git' | ||
end | ||
|
||
install_if '-> { ENV["DB_ADAPTER"] == "postgis" }' do | ||
gem 'activerecord-postgis-adapter', git: 'https://github.com/rgeo/activerecord-postgis-adapter.git' | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters