Skip to content

Commit d6092b8

Browse files
authored
Merge pull request #309 from projectblacklight/fix_bl8_testapp_fixup
Test App fixup for BL8 only needed prior to 8.7.0
2 parents 1239284 + 98f3376 commit d6092b8

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

spec/test_app_templates/lib/generators/test_app_generator.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,13 @@ def run_bl7_jsbundling_fixup
1313
end
1414

1515
def run_bl8_jsbundling_fixup
16-
# while it's named confusingly, the BL8 assets:propshaft generator has what we need
17-
# for jsbundling, I think.
18-
if File.exist?("package.json") && Blacklight::VERSION.split(".").first == "8"
16+
# BL 8.7.0 doesn't seem to need anything, but BL8 before that the automatic BL
17+
# install process doesn't do everything we need.
18+
#
19+
# By manually triggering the BL8 assets:propshaft generator, we can get what we need
20+
# for jsbundling, even though it's named confusingly for that, it works in these
21+
# versions.
22+
if File.exist?("package.json") && Gem::Requirement.create("~> 8.0", "< 8.7.0").satisfied_by?(Gem::Version.new(Blacklight::VERSION))
1923
generate "blacklight:assets:propshaft"
2024
end
2125
end

0 commit comments

Comments
 (0)