inline_forms_installer 8.1.10 → 8.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 949a3d8e8b439ac7f34a04e4acfc38974c3a7125a45a8cc6384e50bee43f9ae9
|
|
4
|
+
data.tar.gz: 7ae6307dad95185fe50df14b7f5e4b3a1f7b010bb27d9b6cdb5847f5eb61b997
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 70aa006317eaab16ee0995ebe148d1296c20e52819da3f3bcce30469413287297a2918301ff68c5ddd96395bf3374d6586c1a81a47018a2da0594b23f12ae307
|
|
7
|
+
data.tar.gz: 34481743978a4551cba788d665975d57c057ac7864d3aae9f8eaf78d75c755510d82aa9b3df68ffbbf686c8417b0638b84b9433b21ec9cc1e8f84ad5f71b5de6
|
|
@@ -52,7 +52,18 @@ def install_prerelease_gems_from_roots!
|
|
|
52
52
|
# gem build on every release once minor versions cross a digit
|
|
53
53
|
# boundary. Parse the version out of the filename with Gem::Version
|
|
54
54
|
# so the comparison is numeric.
|
|
55
|
-
|
|
55
|
+
#
|
|
56
|
+
# Look in both the checkout root (`gem build` output) *and* `pkg/`
|
|
57
|
+
# (`rake build` output from Bundler::GemHelper.install_tasks). 8.1.10
|
|
58
|
+
# only globbed the root, so the moment a maintainer ran `rake build`
|
|
59
|
+
# the freshly-built gem ended up in `pkg/` and was invisible — the
|
|
60
|
+
# installer fell back to whatever stale `<name>-*.gem` was still
|
|
61
|
+
# sitting in the checkout root from an earlier `gem build`. That's
|
|
62
|
+
# the exact shape that bit us between 8.1.6 (default gemset's
|
|
63
|
+
# highest installer) and 8.1.10.
|
|
64
|
+
candidates = roots.flat_map { |root|
|
|
65
|
+
Dir[File.join(root, "#{name}-*.gem"), File.join(root, "pkg", "#{name}-*.gem")]
|
|
66
|
+
}
|
|
56
67
|
gem_file = candidates.max_by do |path|
|
|
57
68
|
ver_str = File.basename(path, ".gem").sub(/\A#{Regexp.escape(name)}-/, "")
|
|
58
69
|
Gem::Version.new(ver_str) rescue Gem::Version.new("0")
|
|
@@ -1380,12 +1391,40 @@ if ENV['install_example'] == 'true'
|
|
|
1380
1391
|
create_file rel, example_user_cfg.adapt_example_test_source(File.read(abs))
|
|
1381
1392
|
end
|
|
1382
1393
|
|
|
1383
|
-
|
|
1394
|
+
# Cap test parallelism so the example-app gate fits on memory-modest
|
|
1395
|
+
# machines. Rails' minitest parallelizer defaults to `workers:
|
|
1396
|
+
# number_of_processors`, which on a 20-core box forks 20 full Rails
|
|
1397
|
+
# processes — each ~200-300 MB resident with the example app's full
|
|
1398
|
+
# gem stack (CarrierWave + Devise + PaperTrail + Foundation +
|
|
1399
|
+
# tabs_on_rails + money-rails). Multiply that by 20 and you're 4-6 GB
|
|
1400
|
+
# in worker processes alone, on top of the parent installer/bundler
|
|
1401
|
+
# state. On a memory-pressured host systemd-oomd can kill the whole
|
|
1402
|
+
# VTE/terminal session before the gate finishes, with no useful
|
|
1403
|
+
# signal back to the user (one such kill happened mid-gate on
|
|
1404
|
+
# 2026-05-28 07:50:35; that's what motivated this cap).
|
|
1405
|
+
#
|
|
1406
|
+
# `PARALLEL_WORKERS=2` keeps the worker footprint to ~600 MB and
|
|
1407
|
+
# roughly doubles the wall-clock vs 20 workers — fine for a one-shot
|
|
1408
|
+
# gate. The `INLINE_FORMS_TEST_WORKERS` env override lets machines
|
|
1409
|
+
# with RAM headroom crank it back up (use `0` for Rails' default
|
|
1410
|
+
# number_of_processors, any positive integer to pin).
|
|
1411
|
+
workers_env = ENV["INLINE_FORMS_TEST_WORKERS"].to_s.strip
|
|
1412
|
+
workers = if workers_env.empty?
|
|
1413
|
+
"2"
|
|
1414
|
+
elsif workers_env == "0"
|
|
1415
|
+
nil # let Rails pick number_of_processors
|
|
1416
|
+
else
|
|
1417
|
+
workers_env
|
|
1418
|
+
end
|
|
1419
|
+
worker_prefix = workers ? "PARALLEL_WORKERS=#{Shellwords.escape(workers)} " : ""
|
|
1420
|
+
|
|
1421
|
+
say "- Running example regression tests (bundle exec rails test)#{workers ? " with PARALLEL_WORKERS=#{workers}" : ""}..."
|
|
1384
1422
|
log_path = ENV["INLINE_FORMS_INSTALLER_LOG"].to_s
|
|
1423
|
+
rails_test = "#{worker_prefix}bundle exec rails test"
|
|
1385
1424
|
test_cmd = if log_path != ""
|
|
1386
|
-
"
|
|
1425
|
+
"#{rails_test} 2>&1 | tee -a #{Shellwords.escape(log_path)}"
|
|
1387
1426
|
else
|
|
1388
|
-
"
|
|
1427
|
+
"#{rails_test} 2>&1"
|
|
1389
1428
|
end
|
|
1390
1429
|
test_ok = system("bash", "-c", "#{test_cmd}; exit ${PIPESTATUS[0]}")
|
|
1391
1430
|
abort "ERROR: bundle exec rails test failed during --example install. See #{log_path}" unless test_ok
|
|
@@ -38,12 +38,12 @@ module InlineFormsInstaller
|
|
|
38
38
|
6.times do
|
|
39
39
|
if ENV["INLINE_FORMS_RELEASE_ROOT"].to_s == "" &&
|
|
40
40
|
File.file?(File.join(dir, "inline_forms.gemspec")) &&
|
|
41
|
-
|
|
41
|
+
checkout_has_built_gem?(dir, "inline_forms")
|
|
42
42
|
ENV["INLINE_FORMS_RELEASE_ROOT"] = dir
|
|
43
43
|
end
|
|
44
44
|
if ENV["VALIDATION_HINTS_ROOT"].to_s == "" &&
|
|
45
45
|
File.file?(File.join(dir, "validation_hints.gemspec")) &&
|
|
46
|
-
|
|
46
|
+
checkout_has_built_gem?(dir, "validation_hints")
|
|
47
47
|
ENV["VALIDATION_HINTS_ROOT"] = dir
|
|
48
48
|
end
|
|
49
49
|
parent = File.expand_path("..", dir)
|
|
@@ -74,9 +74,21 @@ module InlineFormsInstaller
|
|
|
74
74
|
File.expand_path("~/#{repo_name}")
|
|
75
75
|
].uniq.find do |checkout|
|
|
76
76
|
File.file?(File.join(checkout, "#{repo_name}.gemspec")) &&
|
|
77
|
-
|
|
77
|
+
checkout_has_built_gem?(checkout, repo_name)
|
|
78
78
|
end
|
|
79
79
|
end
|
|
80
|
+
|
|
81
|
+
# Look for built `<name>-*.gem` files in both the checkout root *and*
|
|
82
|
+
# `pkg/` — `gem build` writes to the root, but `rake build` (i.e.
|
|
83
|
+
# `Bundler::GemHelper.install_tasks` from the Rakefile) writes to
|
|
84
|
+
# `pkg/`. Either is a legitimate "I just built this" location; only
|
|
85
|
+
# globbing the root meant a freshly-`rake build`-ed gem was invisible
|
|
86
|
+
# to install_prerelease_gems_from_roots! and the installer would
|
|
87
|
+
# silently fall back to whatever stale `*.gem` was sitting in the
|
|
88
|
+
# checkout root from a previous `gem build` run.
|
|
89
|
+
def self.checkout_has_built_gem?(checkout, name)
|
|
90
|
+
Dir[File.join(checkout, "#{name}-*.gem"), File.join(checkout, "pkg", "#{name}-*.gem")].any?
|
|
91
|
+
end
|
|
80
92
|
end
|
|
81
93
|
|
|
82
94
|
require "inline_forms_installer/user_model_config"
|