bundler-multilock 1.0.8 → 1.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bundler/multilock/check.rb +1 -4
- data/lib/bundler/multilock/version.rb +1 -1
- data/lib/bundler/multilock.rb +14 -5
- data/plugins.rb +0 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f71e197447bdcd02b427ac7bc3a21a7e41e20a3d67edda69ed3821dea293e3ac
|
4
|
+
data.tar.gz: bf11ee91ace5dff77af3bc2b56ec283d2d227513e8d9397ce00e199ab73e3d83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cad381cf2fbb7d441f98d39322d54a0496570ceb3e564669a39429072224b7cbbca1af2f68205bc1149e05dc7535ca75e3f51631795732c019354d92ce17952
|
7
|
+
data.tar.gz: 3ddb854fc272683a96711403a8f65fc4d588260c46e7753f71ca790192be19f8f9e7b9b7612457d99ea4596ab6830b8cf8eda5c0385621f0769949f41cb95c87
|
@@ -56,10 +56,7 @@ module Bundler
|
|
56
56
|
|
57
57
|
begin
|
58
58
|
definition.validate_runtime!
|
59
|
-
Bundler.ui.silence
|
60
|
-
definition.resolve_only_locally!
|
61
|
-
end
|
62
|
-
not_installed = definition.missing_specs
|
59
|
+
not_installed = Bundler.ui.silence { definition.missing_specs }
|
63
60
|
rescue RubyVersionMismatch, GemNotFound, SolveFailure
|
64
61
|
return return_missing ? [] : false
|
65
62
|
end
|
data/lib/bundler/multilock.rb
CHANGED
@@ -48,7 +48,9 @@ module Bundler
|
|
48
48
|
current = true if current.nil? && lockfile_definitions.empty? && lockfile.nil? && gemfile.nil?
|
49
49
|
|
50
50
|
# allow short-form lockfile names
|
51
|
-
|
51
|
+
if lockfile.is_a?(String) && !(lockfile.include?("/") || lockfile.end_with?(".lock"))
|
52
|
+
lockfile = "Gemfile.#{lockfile}.lock"
|
53
|
+
end
|
52
54
|
# if a gemfile was provided, but not a lockfile, infer the default lockfile for that gemfile
|
53
55
|
lockfile ||= "#{gemfile}.lock" if gemfile
|
54
56
|
# use absolute paths
|
@@ -339,8 +341,13 @@ module Bundler
|
|
339
341
|
end
|
340
342
|
end
|
341
343
|
|
342
|
-
|
344
|
+
builder = Bundler::Plugin::DSL.new
|
345
|
+
builder.eval_gemfile(Bundler.default_gemfile)
|
346
|
+
gemfiles = builder.instance_variable_get(:@gemfiles).map(&:read)
|
347
|
+
|
348
|
+
modified = inject_specific_preamble(gemfile, gemfiles, injection_point, bundle_preamble2, add_newline: true)
|
343
349
|
modified = true if inject_specific_preamble(gemfile,
|
350
|
+
gemfiles,
|
344
351
|
injection_point,
|
345
352
|
bundle_preamble1,
|
346
353
|
match: bundle_preamble1_match,
|
@@ -357,8 +364,8 @@ module Bundler
|
|
357
364
|
|
358
365
|
private
|
359
366
|
|
360
|
-
def inject_specific_preamble(gemfile, injection_point, preamble, add_newline:, match: preamble)
|
361
|
-
return false if
|
367
|
+
def inject_specific_preamble(gemfile, gemfiles, injection_point, preamble, add_newline:, match: preamble)
|
368
|
+
return false if gemfiles.any? { |g| g.include?(match) }
|
362
369
|
|
363
370
|
add_newline = false unless gemfile[injection_point - 1] == "\n"
|
364
371
|
|
@@ -388,7 +395,7 @@ module Bundler
|
|
388
395
|
if install
|
389
396
|
current_definition = builder.to_definition(current_lockfile, {})
|
390
397
|
begin
|
391
|
-
current_definition.
|
398
|
+
current_definition.resolve_with_cache!
|
392
399
|
if current_definition.missing_specs.any?
|
393
400
|
Bundler.with_default_lockfile(current_lockfile) do
|
394
401
|
Installer.install(gemfile.dirname, current_definition, {})
|
@@ -435,3 +442,5 @@ module Bundler
|
|
435
442
|
@prepare_block = nil
|
436
443
|
end
|
437
444
|
end
|
445
|
+
|
446
|
+
Bundler::Multilock.inject_preamble unless Bundler::Multilock.loaded?
|
data/plugins.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundler-multilock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Instructure
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|