Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CIVIS-9349] fix minitest instrumentation with mixins #134

Merged
merged 8 commits into from
Mar 12, 2024
29 changes: 27 additions & 2 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,38 @@ def self.with_ci_queue_rspec_gem(rspec_versions: 3, ci_queue_versions: 0)
end
end

def self.with_minitest_shoulda_context_gem(minitest_versions: 5, shoulda_context_versions: 2, shoulda_matchers_versions: 6)
Array(minitest_versions).each do |minitest_v|
Array(shoulda_context_versions).each do |shoulda_context_v|
Array(shoulda_matchers_versions).each do |shoulda_matchers_v|
appraise "minitest-#{minitest_v}-shoulda-context-#{shoulda_context_v}-shoulda-matchers-#{shoulda_matchers_v}" do
gem "minitest", "~> #{minitest_v}"
gem "shoulda-context", "~> #{shoulda_context_v}"
gem "shoulda-matchers", "~> #{shoulda_matchers_v}"
end
end
end
end
end

def self.with_active_support_gem(versions: 7)
Array(versions).each do |activesupport_v|
appraise "activesupport-#{activesupport_v}" do
gem "activesupport", "~> #{activesupport_v}"
end
end
end

ruby_version = Gem::Version.new(RUBY_ENGINE_VERSION)
major, minor, = ruby_version.segments

with_minitest_gem
with_rspec_gem
with_cucumber_gem(versions: 3..9)
with_ci_queue_minitest_gem
with_ci_queue_rspec_gem

major, minor, = Gem::Version.new(RUBY_ENGINE_VERSION).segments
with_minitest_shoulda_context_gem if ruby_version >= Gem::Version.new("3.1")
with_active_support_gem(versions: 4..7)

ruby_runtime = "#{RUBY_ENGINE}-#{major}.#{minor}"

Expand Down
11 changes: 11 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,20 @@ TEST_METADATA = {
"minitest" => {
"minitest-5" => "✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby"
},
"activesupport" => {
"activesupport-4" => "✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby",
"activesupport-5" => "✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby",
"activesupport-6" => "✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby",
"activesupport-7" => "✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby"
},
"ci_queue_minitest" => {
"ci-queue-0-minitest-5" => "✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby"
},
"ci_queue_rspec" => {
"ci-queue-0-rspec-3" => "✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby"
},
"minitest_shoulda_context" => {
"minitest-5-shoulda-context-2-shoulda-matchers-6" => "❌ 2.7 / ❌ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ 3.3 / ✅ jruby"
}
}

Expand Down Expand Up @@ -108,6 +117,8 @@ namespace :spec do
:cucumber,
:rspec,
:minitest,
:minitest_shoulda_context,
:activesupport,
:ci_queue_minitest,
:ci_queue_rspec
].each do |contrib|
Expand Down
31 changes: 31 additions & 0 deletions gemfiles/jruby_9.4_activesupport_4.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "ddtrace"
gem "pry"
gem "rake"
gem "os"
gem "climate_control"
gem "rspec"
gem "rspec-collection_matchers"
gem "rspec_junit_formatter"
gem "appraisal"
gem "timecop"
gem "standard", "~> 1.31"
gem "yard"
gem "webrick"
gem "pimpmychangelog", ">= 0.1.2"
gem "simplecov"
gem "simplecov-cobertura", "~> 2.1.0"
gem "activesupport", "~> 4"

group :check do

end

group :development do

end

gemspec path: "../"
149 changes: 149 additions & 0 deletions gemfiles/jruby_9.4_activesupport_4.gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
PATH
remote: ..
specs:
datadog-ci (0.8.0)
msgpack

GEM
remote: https://rubygems.org/
specs:
activesupport (4.2.11.3)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
appraisal (2.5.0)
bundler
rake
thor (>= 0.14.0)
ast (2.4.2)
climate_control (1.2.0)
coderay (1.1.3)
concurrent-ruby (1.2.3)
ddtrace (1.20.0)
datadog-ci (~> 0.7.0)
debase-ruby_core_source (= 3.3.1)
libdatadog (~> 5.0.0.1.0)
libddwaf (~> 1.14.0.0.0)
msgpack
debase-ruby_core_source (3.3.1)
diff-lcs (1.5.1)
docile (1.4.0)
ffi (1.16.3-java)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
json (2.7.1-java)
language_server-protocol (3.17.0.3)
libdatadog (5.0.0.1.0)
libddwaf (1.14.0.0.0-java)
ffi (~> 1.0)
lint_roller (1.1.0)
method_source (1.0.0)
minitest (5.22.2)
msgpack (1.7.2-java)
os (1.1.4)
parallel (1.24.0)
parser (3.3.0.5)
ast (~> 2.4.1)
racc
pimpmychangelog (0.1.3)
pry (0.14.2-java)
coderay (~> 1.1)
method_source (~> 1.0)
spoon (~> 0.0)
racc (1.7.3-java)
rainbow (3.1.1)
rake (13.1.0)
regexp_parser (2.9.0)
rexml (3.2.6)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-collection_matchers (1.2.1)
rspec-expectations (>= 2.99.0.beta1)
rspec-core (3.13.0)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (1.62.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.2)
parser (>= 3.3.0.4)
rubocop-performance (1.20.2)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (1.13.0)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-cobertura (2.1.0)
rexml
simplecov (~> 0.19)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
spoon (0.0.6)
ffi
standard (1.34.0)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.60)
standard-custom (~> 1.0.0)
standard-performance (~> 1.3)
standard-custom (1.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.50)
standard-performance (1.3.1)
lint_roller (~> 1.1)
rubocop-performance (~> 1.20.2)
thor (1.3.1)
thread_safe (0.3.6-java)
timecop (0.9.8)
tzinfo (1.2.11)
thread_safe (~> 0.1)
unicode-display_width (2.5.0)
webrick (1.8.1)
yard (0.9.36)

PLATFORMS
universal-java-11

DEPENDENCIES
activesupport (~> 4)
appraisal
climate_control
datadog-ci!
ddtrace
os
pimpmychangelog (>= 0.1.2)
pry
rake
rspec
rspec-collection_matchers
rspec_junit_formatter
simplecov
simplecov-cobertura (~> 2.1.0)
standard (~> 1.31)
timecop
webrick
yard

BUNDLED WITH
2.3.26
31 changes: 31 additions & 0 deletions gemfiles/jruby_9.4_activesupport_5.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "ddtrace"
gem "pry"
gem "rake"
gem "os"
gem "climate_control"
gem "rspec"
gem "rspec-collection_matchers"
gem "rspec_junit_formatter"
gem "appraisal"
gem "timecop"
gem "standard", "~> 1.31"
gem "yard"
gem "webrick"
gem "pimpmychangelog", ">= 0.1.2"
gem "simplecov"
gem "simplecov-cobertura", "~> 2.1.0"
gem "activesupport", "~> 5"

group :check do

end

group :development do

end

gemspec path: "../"
Loading
Loading