Skip to content

Commit 714985a

Browse files
committed
WIP: Prepare appraisal files for view_component integration tests
* In order to write working integration tests for the major versions of ViewComponent that have instrumentation support, we need to use custom appraisal sets instead of `build_coverage_matrix`, since an ad-hoc Rails app needs to be spooled up, which includes `pg` and `rails`. * I was not able to get the `docker compose` setup running on my machine due to the inability to pull the `ddapm-test-agent` * Therefore, I was not able to spool up containers for each version of Ruby to generate their `gemfiles/` * While I tested this locally with `ruby-3.3`, I did not commit the changes since I was not able to follow the containerized setup
1 parent 882e142 commit 714985a

16 files changed

+238
-14
lines changed

Matrixfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,7 @@
294294
'redis-3' => '✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ 3.4 / ✅ 3.5 / ✅ jruby',
295295
},
296296
'view_component' => {
297-
'view_component-min' => '✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ 3.4 / ✅ 3.5 / ✅ jruby',
298-
'view_component-3' => '❌ 2.5 / ❌ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ 3.4 / ✅ 3.5 / ✅ jruby',
297+
'view_component-3.23.2' => '❌ 2.5 / ❌ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ 3.4 / ✅ 3.5 / ✅ jruby',
299298
'view_component-4' => '❌ 2.5 / ❌ 2.6 / ❌ 2.7 / ❌ 3.0 / ❌ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ 3.4 / ✅ 3.5 / ✅ jruby',
300299
},
301300
'appsec:active_record' => {

appraisal/jruby-9.2.rb

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@
204204
build_coverage_matrix('rest-client')
205205
build_coverage_matrix('mongo', min: '2.1.0')
206206
build_coverage_matrix('dalli', [2])
207-
build_coverage_matrix('view_component', (3..4), min: '2.34.0')
208207
# NOTE: JRuby bundler failed to install some dependencies https://github.com/ruby/psych/issues/700
209208
# and it could be re-enabled when upstream fix the issue
210209
# build_coverage_matrix('devise', min: '3.2.1')
@@ -271,6 +270,16 @@
271270
end
272271
end
273272

273+
['3.23.2', '4'].each do |v|
274+
appraise "view_component-#{v}" do
275+
gem 'view_component', "~> #{v}"
276+
gem "actionview"
277+
gem "rails"
278+
gem 'sprockets', '< 4'
279+
gem 'pg'
280+
end
281+
end
282+
274283
appraise 'contrib-old' do
275284
gem 'presto-client', '>= 0.5.14' # Renamed to trino-client in >= 1.0
276285
end

appraisal/jruby-9.3.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@
177177
build_coverage_matrix('rest-client')
178178
build_coverage_matrix('mongo', min: '2.1.0')
179179
build_coverage_matrix('dalli', [2])
180-
build_coverage_matrix('view_component', (3..4), min: '2.34.0')
181180
# NOTE: JRuby bundler failed to install some dependencies https://github.com/ruby/psych/issues/700
182181
# and it could be re-enabled when upstream fix the issue
183182
# build_coverage_matrix('devise', min: '3.2.1')
@@ -244,6 +243,15 @@
244243
end
245244
end
246245

246+
['3.23.2', '4'].each do |v|
247+
appraise "view_component-#{v}" do
248+
gem 'view_component', "~> #{v}"
249+
gem "actionview"
250+
gem "rails"
251+
gem 'pg'
252+
end
253+
end
254+
247255
appraise 'contrib-old' do
248256
gem 'presto-client', '>= 0.5.14' # Renamed to trino-client in >= 1.0
249257
end

appraisal/jruby-9.4.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@
8282
build_coverage_matrix('mongo', min: '2.1.0')
8383
build_coverage_matrix('dalli', [2])
8484
build_coverage_matrix('karafka', min: '2.3.0')
85-
build_coverage_matrix('view_component', (3..4), min: '2.34.0')
8685

8786
appraise 'karafka-min' do
8887
gem 'karafka', '= 2.3.0'
@@ -156,6 +155,15 @@
156155
end
157156
end
158157

158+
['3.23.2', '4'].each do |v|
159+
appraise "view_component-#{v}" do
160+
gem 'view_component', "~> #{v}"
161+
gem "actionview"
162+
gem "rails"
163+
gem 'pg'
164+
end
165+
end
166+
159167
appraise 'contrib-old' do
160168
gem 'presto-client', '>= 0.5.14' # Renamed to trino-client in >= 1.0
161169
end

appraisal/ruby-2.5.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@
224224
build_coverage_matrix('mongo', min: '2.1.0')
225225
build_coverage_matrix('dalli')
226226
build_coverage_matrix('devise', min: '3.2.1', meta: { min: { 'bigdecimal' => '1.3.4' } })
227-
build_coverage_matrix('view_component', min: '2.34.0')
228227

229228
appraise 'relational_db' do
230229
gem 'activerecord', '~> 5'

appraisal/ruby-2.6.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@
177177
build_coverage_matrix('mongo', min: '2.1.0')
178178
build_coverage_matrix('dalli', [2])
179179
build_coverage_matrix('devise', min: '3.2.1', meta: { min: { 'bigdecimal' => '1.4.1' } })
180-
build_coverage_matrix('view_component', min: '2.34.0')
181180

182181
appraise 'relational_db' do
183182
gem 'activerecord', '~> 6.0.0'

appraisal/ruby-2.7.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@
178178
build_coverage_matrix('mongo', min: '2.1.0')
179179
build_coverage_matrix('dalli', [2])
180180
build_coverage_matrix('devise', min: '3.2.1')
181-
build_coverage_matrix('view_component', [3], min: '2.34.0')
182181

183182
appraise 'relational_db' do
184183
gem 'activerecord', '~> 6.1.0'
@@ -245,6 +244,15 @@
245244
end
246245
end
247246

247+
['3.23.2'].each do |v|
248+
appraise "view_component-#{v}" do
249+
gem 'view_component', "~> #{v}"
250+
gem "actionview"
251+
gem "rails"
252+
gem 'pg'
253+
end
254+
end
255+
248256
appraise 'opentelemetry' do
249257
gem 'opentelemetry-sdk', '~> 1.1'
250258
end

appraisal/ruby-3.0.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@
9898
build_coverage_matrix('mongo', min: '2.1.0')
9999
build_coverage_matrix('dalli', [2])
100100
build_coverage_matrix('devise', min: '3.2.1')
101-
build_coverage_matrix('view_component', [3], min: '2.34.0')
102101

103102
appraise 'karafka-min' do
104103
gem 'karafka', '= 2.3.0'
@@ -169,6 +168,15 @@
169168
end
170169
end
171170

171+
['3.23.2'].each do |v|
172+
appraise "view_component-#{v}" do
173+
gem 'view_component', "~> #{v}"
174+
gem "actionview"
175+
gem "rails"
176+
gem 'pg'
177+
end
178+
end
179+
172180
appraise 'opentelemetry' do
173181
gem 'opentelemetry-sdk', '~> 1.1'
174182
end

appraisal/ruby-3.1.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@
9999
build_coverage_matrix('dalli', [2])
100100
build_coverage_matrix('karafka', min: '2.3.0')
101101
build_coverage_matrix('devise', min: '3.2.1')
102-
build_coverage_matrix('view_component', [3], min: '2.34.0')
103102

104103
appraise 'relational_db' do
105104
gem 'activerecord', '~> 7'
@@ -166,6 +165,15 @@
166165
end
167166
end
168167

168+
['3.23.2'].each do |v|
169+
appraise "view_component-#{v}" do
170+
gem 'view_component', "~> #{v}"
171+
gem "actionview"
172+
gem "rails"
173+
gem 'pg'
174+
end
175+
end
176+
169177
appraise 'opentelemetry' do
170178
gem 'opentelemetry-sdk', '~> 1.1'
171179
end

appraisal/ruby-3.2.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@
144144
build_coverage_matrix('dalli', [2])
145145
build_coverage_matrix('karafka', min: '2.3.0')
146146
build_coverage_matrix('devise', min: '3.2.1')
147-
build_coverage_matrix('view_component', (3..4), min: '2.34.0')
148147

149148
appraise 'relational_db' do
150149
gem 'activerecord', '~> 7'
@@ -211,6 +210,15 @@
211210
end
212211
end
213212

213+
['3.23.2', '4'].each do |v|
214+
appraise "view_component-#{v}" do
215+
gem 'view_component', "~> #{v}"
216+
gem "actionview"
217+
gem "rails"
218+
gem 'pg'
219+
end
220+
end
221+
214222
appraise 'opentelemetry' do
215223
gem 'opentelemetry-sdk', '~> 1.1'
216224
end

0 commit comments

Comments
 (0)