Skip to content

Commit 9e9205c

Browse files
committed
Improve Appraisal config
1 parent a21694e commit 9e9205c

23 files changed

+645
-175
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
runs-on: ubuntu-latest
3535

3636
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
37-
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.rails }}.gemfile
37+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.rails }}_with_${{ matrix.adapter }}.gemfile
3838
ORACLE_COOKIE: sqldev
3939
ORACLE_FILE: oracle11g/xe/oracle-xe-11.2.0-1.0.x86_64.rpm.zip
4040
ORACLE_HOME: /u01/app/oracle/product/11.2.0/xe

Appraisals

+141-51
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,48 @@
11
# frozen_string_literal: true
22

3-
appraise 'rails_7.0.8' do # rubocop:disable Metrics/BlockLength
4-
gem 'rails', '7.0.8'
3+
###############
4+
# RAILS 7.0.8 #
5+
###############
56

6-
install_if '-> { ENV["DB_ADAPTER"] == "sqlite3" }' do
7-
gem 'sqlite3', '~> 1.5.0'
8-
end
7+
appraise 'rails_7.0.8_with_postgresql' do
8+
gem 'rails', '7.0.8'
9+
gem 'pg'
910

10-
install_if '-> { ENV["DB_ADAPTER"] == "mysql2" }' do
11-
gem 'mysql2'
11+
# Fix:
12+
# warning: logger was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.5.0
13+
# Add logger to your Gemfile or gemspec.
14+
install_if '-> { Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.4.0") }' do
15+
gem 'base64'
16+
gem 'bigdecimal'
17+
gem 'benchmark'
18+
gem 'drb'
19+
gem 'logger'
20+
gem 'mutex_m'
21+
gem 'ostruct'
1222
end
23+
end
1324

14-
install_if '-> { ENV["DB_ADAPTER"] == "trilogy" }' do
15-
gem 'activerecord-trilogy-adapter'
16-
end
25+
appraise 'rails_7.0.8_with_sqlite3' do
26+
gem 'rails', '7.0.8'
27+
gem 'sqlite3', '~> 1.5.0'
1728

18-
install_if '-> { ENV["DB_ADAPTER"] == "oracle_enhanced" }' do
19-
gem 'ruby-oci8'
20-
gem 'activerecord-oracle_enhanced-adapter', '~> 7.0.0'
29+
# Fix:
30+
# warning: logger was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.5.0
31+
# Add logger to your Gemfile or gemspec.
32+
install_if '-> { Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.4.0") }' do
33+
gem 'base64'
34+
gem 'bigdecimal'
35+
gem 'benchmark'
36+
gem 'drb'
37+
gem 'logger'
38+
gem 'mutex_m'
39+
gem 'ostruct'
2140
end
41+
end
2242

23-
install_if '-> { ENV["DB_ADAPTER"] == "postgis" }' do
24-
gem 'activerecord-postgis-adapter'
25-
end
43+
appraise 'rails_7.0.8_with_mysql2' do
44+
gem 'rails', '7.0.8'
45+
gem 'mysql2'
2646

2747
# Fix:
2848
# warning: logger was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.5.0
@@ -38,60 +58,130 @@ appraise 'rails_7.0.8' do # rubocop:disable Metrics/BlockLength
3858
end
3959
end
4060

41-
appraise 'rails_7.1.0' do
42-
gem 'rails', '7.1.0'
43-
44-
install_if '-> { ENV["DB_ADAPTER"] == "sqlite3" }' do
45-
gem 'sqlite3', '~> 1.5.0'
46-
end
61+
appraise 'rails_7.0.8_with_trilogy' do
62+
gem 'rails', '7.0.8'
63+
gem 'activerecord-trilogy-adapter'
4764

48-
install_if '-> { ENV["DB_ADAPTER"] == "mysql2" }' do
49-
gem 'mysql2'
65+
# Fix:
66+
# warning: logger was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.5.0
67+
# Add logger to your Gemfile or gemspec.
68+
install_if '-> { Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.4.0") }' do
69+
gem 'base64'
70+
gem 'bigdecimal'
71+
gem 'benchmark'
72+
gem 'drb'
73+
gem 'logger'
74+
gem 'mutex_m'
75+
gem 'ostruct'
5076
end
77+
end
5178

52-
install_if '-> { ENV["DB_ADAPTER"] == "trilogy" }' do
53-
gem 'activerecord-trilogy-adapter'
54-
end
79+
appraise 'rails_7.0.8_with_oracle_enhanced' do
80+
gem 'rails', '7.0.8'
81+
gem 'ruby-oci8'
82+
gem 'activerecord-oracle_enhanced-adapter', '~> 7.0.0'
5583

56-
install_if '-> { ENV["DB_ADAPTER"] == "oracle_enhanced" }' do
57-
gem 'ruby-oci8'
58-
gem 'activerecord-oracle_enhanced-adapter', git: 'https://github.com/rsim/oracle-enhanced.git'
84+
# Fix:
85+
# warning: logger was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.5.0
86+
# Add logger to your Gemfile or gemspec.
87+
install_if '-> { Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.4.0") }' do
88+
gem 'base64'
89+
gem 'bigdecimal'
90+
gem 'benchmark'
91+
gem 'drb'
92+
gem 'logger'
93+
gem 'mutex_m'
94+
gem 'ostruct'
5995
end
96+
end
6097

61-
install_if '-> { ENV["DB_ADAPTER"] == "postgis" }' do
62-
gem 'activerecord-postgis-adapter'
63-
end
98+
appraise 'rails_7.0.8_with_postgis' do
99+
gem 'rails', '7.0.8'
100+
gem 'pg'
101+
gem 'activerecord-postgis-adapter'
64102

65103
# Fix:
66104
# warning: logger was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.5.0
67105
# Add logger to your Gemfile or gemspec.
68-
install_if '-> { Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.3.0") }' do
106+
install_if '-> { Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.4.0") }' do
107+
gem 'base64'
108+
gem 'bigdecimal'
109+
gem 'benchmark'
110+
gem 'drb'
69111
gem 'logger'
112+
gem 'mutex_m'
70113
gem 'ostruct'
71114
end
72115
end
73116

74-
appraise 'rails_7.2.0' do
117+
###############
118+
# RAILS 7.1.0 #
119+
###############
120+
121+
appraise 'rails_7.1.0_with_postgresql' do
122+
gem 'rails', '7.1.0'
123+
gem 'pg'
124+
end
125+
126+
appraise 'rails_7.1.0_with_sqlite3' do
127+
gem 'rails', '7.1.0'
128+
gem 'sqlite3', '~> 1.5.0'
129+
end
130+
131+
appraise 'rails_7.1.0_with_mysql2' do
132+
gem 'rails', '7.1.0'
133+
gem 'mysql2'
134+
end
135+
136+
appraise 'rails_7.1.0_with_trilogy' do
137+
gem 'rails', '7.1.0'
138+
gem 'activerecord-trilogy-adapter'
139+
end
140+
141+
appraise 'rails_7.1.0_with_oracle_enhanced' do
142+
gem 'rails', '7.1.0'
143+
gem 'ruby-oci8'
144+
gem 'activerecord-oracle_enhanced-adapter', git: 'https://github.com/rsim/oracle-enhanced.git'
145+
end
146+
147+
appraise 'rails_7.1.0_with_postgis' do
148+
gem 'rails', '7.1.0'
149+
gem 'pg'
150+
gem 'activerecord-postgis-adapter'
151+
end
152+
153+
###############
154+
# RAILS 7.2.0 #
155+
###############
156+
157+
appraise 'rails_7.2.0_with_postgresql' do
75158
gem 'rails', '7.2.0'
159+
gem 'pg'
160+
end
76161

77-
install_if '-> { ENV["DB_ADAPTER"] == "sqlite3" }' do
78-
gem 'sqlite3', '~> 1.5.0'
79-
end
162+
appraise 'rails_7.2.0_with_sqlite3' do
163+
gem 'rails', '7.2.0'
164+
gem 'sqlite3', '~> 1.5.0'
165+
end
80166

81-
install_if '-> { ENV["DB_ADAPTER"] == "mysql2" }' do
82-
gem 'mysql2'
83-
end
167+
appraise 'rails_7.2.0_with_mysql2' do
168+
gem 'rails', '7.2.0'
169+
gem 'mysql2'
170+
end
84171

85-
install_if '-> { ENV["DB_ADAPTER"] == "trilogy" }' do
86-
gem 'activerecord-trilogy-adapter'
87-
end
172+
appraise 'rails_7.2.0_with_trilogy' do
173+
gem 'rails', '7.2.0'
174+
gem 'activerecord-trilogy-adapter'
175+
end
88176

89-
install_if '-> { ENV["DB_ADAPTER"] == "oracle_enhanced" }' do
90-
gem 'ruby-oci8'
91-
gem 'activerecord-oracle_enhanced-adapter', git: 'https://github.com/rsim/oracle-enhanced.git'
92-
end
177+
appraise 'rails_7.2.0_with_oracle_enhanced' do
178+
gem 'rails', '7.2.0'
179+
gem 'ruby-oci8'
180+
gem 'activerecord-oracle_enhanced-adapter', git: 'https://github.com/rsim/oracle-enhanced.git'
181+
end
93182

94-
install_if '-> { ENV["DB_ADAPTER"] == "postgis" }' do
95-
gem 'activerecord-postgis-adapter', git: 'https://github.com/rgeo/activerecord-postgis-adapter.git'
96-
end
183+
appraise 'rails_7.2.0_with_postgis' do
184+
gem 'rails', '7.2.0'
185+
gem 'pg'
186+
gem 'activerecord-postgis-adapter', git: 'https://github.com/rgeo/activerecord-postgis-adapter.git'
97187
end

Gemfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ gemspec
66

77
gem 'appraisal', git: 'https://github.com/thoughtbot/appraisal.git'
88

9-
# gem 'activerecord-oracle_enhanced-adapter'
109
gem 'combustion'
1110
gem 'database_cleaner'
1211
gem 'factory_bot'
1312
gem 'faker'
1413
gem 'generator_spec'
1514
gem 'guard-rspec'
16-
gem 'pg'
1715
gem 'pry'
1816
gem 'puma'
1917
gem 'rake'
@@ -25,3 +23,7 @@ gem 'rubocop-performance'
2523
gem 'rubocop-rake'
2624
gem 'rubocop-rspec'
2725
gem 'simplecov'
26+
27+
# Fallback to pg if DB_ADAPTER is not set (like in dev/local environment)
28+
# so we can still call bin/rspec
29+
gem 'pg' if $PROGRAM_NAME == 'bin/rspec' && ENV['DB_ADAPTER'].nil?
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "appraisal", git: "https://github.com/thoughtbot/appraisal.git"
6+
gem "combustion"
7+
gem "database_cleaner"
8+
gem "factory_bot"
9+
gem "faker"
10+
gem "generator_spec"
11+
gem "guard-rspec"
12+
gem "pry"
13+
gem "puma"
14+
gem "rake"
15+
gem "rspec"
16+
gem "rspec-retry"
17+
gem "rubocop"
18+
gem "rubocop-factory_bot"
19+
gem "rubocop-performance"
20+
gem "rubocop-rake"
21+
gem "rubocop-rspec"
22+
gem "simplecov"
23+
gem "rails", "7.0.8"
24+
gem "mysql2"
25+
26+
install_if -> { Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.4.0") } do
27+
gem "base64"
28+
gem "bigdecimal"
29+
gem "benchmark"
30+
gem "drb"
31+
gem "logger"
32+
gem "mutex_m"
33+
gem "ostruct"
34+
end
35+
36+
gemspec path: "../"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "appraisal", git: "https://github.com/thoughtbot/appraisal.git"
6+
gem "combustion"
7+
gem "database_cleaner"
8+
gem "factory_bot"
9+
gem "faker"
10+
gem "generator_spec"
11+
gem "guard-rspec"
12+
gem "pry"
13+
gem "puma"
14+
gem "rake"
15+
gem "rspec"
16+
gem "rspec-retry"
17+
gem "rubocop"
18+
gem "rubocop-factory_bot"
19+
gem "rubocop-performance"
20+
gem "rubocop-rake"
21+
gem "rubocop-rspec"
22+
gem "simplecov"
23+
gem "rails", "7.0.8"
24+
gem "ruby-oci8"
25+
gem "activerecord-oracle_enhanced-adapter", "~> 7.0.0"
26+
27+
install_if -> { Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.4.0") } do
28+
gem "base64"
29+
gem "bigdecimal"
30+
gem "benchmark"
31+
gem "drb"
32+
gem "logger"
33+
gem "mutex_m"
34+
gem "ostruct"
35+
end
36+
37+
gemspec path: "../"

gemfiles/rails_7.0.8.gemfile gemfiles/rails_7.0.8_with_postgis.gemfile

+2-22
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ gem "factory_bot"
99
gem "faker"
1010
gem "generator_spec"
1111
gem "guard-rspec"
12-
gem "pg"
1312
gem "pry"
1413
gem "puma"
1514
gem "rake"
@@ -22,27 +21,8 @@ gem "rubocop-rake"
2221
gem "rubocop-rspec"
2322
gem "simplecov"
2423
gem "rails", "7.0.8"
25-
26-
install_if -> { ENV["DB_ADAPTER"] == "sqlite3" } do
27-
gem "sqlite3", "~> 1.5.0"
28-
end
29-
30-
install_if -> { ENV["DB_ADAPTER"] == "mysql2" } do
31-
gem "mysql2"
32-
end
33-
34-
install_if -> { ENV["DB_ADAPTER"] == "trilogy" } do
35-
gem "activerecord-trilogy-adapter"
36-
end
37-
38-
install_if -> { ENV["DB_ADAPTER"] == "oracle_enhanced" } do
39-
gem "ruby-oci8"
40-
gem "activerecord-oracle_enhanced-adapter", "~> 7.0.0"
41-
end
42-
43-
install_if -> { ENV["DB_ADAPTER"] == "postgis" } do
44-
gem "activerecord-postgis-adapter"
45-
end
24+
gem "pg"
25+
gem "activerecord-postgis-adapter"
4626

4727
install_if -> { Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.4.0") } do
4828
gem "base64"

0 commit comments

Comments
 (0)