bundler-multilock 1.2.1 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ae43b2fb6574790232991cd23d08d435ed0cc0d413b742a22873db23954dcd5a
4
- data.tar.gz: c63455f34150db51a3d667bac13fb6376f94e26bc5cb004ae2b19b0d3c5613fb
3
+ metadata.gz: cc3afea590bb51cf3bb3ea6e5e1b5fc6da4ba400276db5b99cefbce26ac00a40
4
+ data.tar.gz: dc917e664709ab17ffdcd6b8d067c4e54c71377de945ecb9975ad8b8975271fd
5
5
  SHA512:
6
- metadata.gz: d7dddd5f731f05f34ad7dbe958ea7fd06a920749e571208d6b91bcf2cfde11816dd09885f887d2059dc5501f36c89ae5a41feebf9f02958487dc6dfa3ae8a0ff
7
- data.tar.gz: 22a251eaaad1c1f79668bcb5417a1581ae7865489dfec949d5c44e05d783b085ef0e19780f6b4181ac32c178b458285614ba910bc8bc173397c15365f18b8e74
6
+ metadata.gz: 4938a9f3a520ae864bc0f56b8f153d2f2bef00a3c0bacc6ec59647f3cb47db4b53062e213ab368f90c7901d777c911d0245eba9d59239eb1f02c5ee7d406f47c
7
+ data.tar.gz: 6055d06c51beec2d7e0be5f96f72edb19fcd70553fd07846350d0df1f8fa01f2addfa34cd75551889ee2af48247a9b1ad5ab45e4d2ac19ed756291ddc08c3dee
@@ -190,7 +190,8 @@ module Bundler
190
190
  private
191
191
 
192
192
  def cache_reverse_dependencies(lockfile)
193
- reverse_dependencies = Hash.new { |h, k| h[k] = Gem::Requirement.default_prerelease }
193
+ # can use Gem::Requirement.default_prelease when Ruby 2.6 support is dropped
194
+ reverse_dependencies = Hash.new { |h, k| h[k] = Gem::Requirement.new(">= 0.a") }
194
195
 
195
196
  lockfile.dependencies.each_value do |spec|
196
197
  reverse_dependencies[spec.name].requirements.concat(spec.requirement.requirements)
@@ -41,7 +41,7 @@ module Bundler
41
41
  if block
42
42
  instance_eval(&block)
43
43
  else
44
- instance_eval(contents.dup.tap { |x| x.untaint if RUBY_VERSION < "2.7" }, gemfile.to_s, 1)
44
+ instance_eval(contents.dup.tap { |x| x.untaint if RUBY_VERSION < "2.7" }, @gemfile.to_s, 1)
45
45
  end
46
46
  rescue Exception => e # rubocop:disable Lint/RescueException
47
47
  message = "There was an error " \
@@ -7,7 +7,7 @@ module Bundler
7
7
  module DSL
8
8
  ::Bundler::Plugin::DSL.include(self)
9
9
 
10
- def lockfile(...)
10
+ def lockfile(*, **)
11
11
  # pass
12
12
  end
13
13
  end
@@ -6,7 +6,7 @@ module Bundler
6
6
  module Source
7
7
  ::Bundler::Source.prepend(self)
8
8
 
9
- def print_using_message(...)
9
+ def print_using_message(*)
10
10
  return if Bundler.settings[:suppress_install_using_messages]
11
11
 
12
12
  super
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Bundler
4
4
  module Multilock
5
- VERSION = "1.2.1"
5
+ VERSION = "1.2.3"
6
6
  end
7
7
  end
@@ -60,16 +60,18 @@ module Bundler
60
60
  raise ArgumentError, "Lockfile #{lockfile} is already defined"
61
61
  end
62
62
 
63
- env_lockfile = ENV["BUNDLE_LOCKFILE"]&.then { |l| expand_lockfile(l) }
63
+ env_lockfile = lockfile if active && ENV["BUNDLE_LOCKFILE"] == "active"
64
+ env_lockfile ||= ENV["BUNDLE_LOCKFILE"]&.then { |l| expand_lockfile(l) }
64
65
  active = env_lockfile == lockfile if env_lockfile
65
66
 
66
67
  if active && (old_active = lockfile_definitions.find { |definition| definition[:active] })
67
- raise ArgumentError, "Only one lockfile (#{old_active[:lockfile]}) can be flagged as the default"
68
+ raise ArgumentError, "Only one lockfile (#{old_active[:lockfile]}) can be flagged as active"
68
69
  end
69
70
 
70
71
  parent = expand_lockfile(parent)
71
72
  if parent != Bundler.default_lockfile(force_original: true) &&
72
- !lockfile_definitions.find { |definition| definition[:lockfile] == parent }
73
+ !lockfile_definitions.find { |definition| definition[:lockfile] == parent } &&
74
+ !parent.exist?
73
75
  raise ArgumentError, "Parent lockfile #{parent} is not defined"
74
76
  end
75
77
 
@@ -313,7 +315,7 @@ module Bundler
313
315
  end
314
316
  return unless default_lockfile_definition && default_lockfile_definition[:active] == false
315
317
 
316
- raise GemfileEvalError, "No lockfiles marked as default"
318
+ raise GemfileEvalError, "No lockfiles marked as active"
317
319
  end
318
320
 
319
321
  # @!visibility private
@@ -468,7 +470,12 @@ module Bundler
468
470
  resolved_remotely = true
469
471
  end
470
472
  SharedHelpers.capture_filesystem_access do
471
- definition.lock(lockfile_definition[:lockfile], true)
473
+ if Bundler.gem_version >= Gem::Version.new("2.5.6")
474
+ definition.instance_variable_set(:@lockfile, lockfile_definition[:lockfile])
475
+ definition.lock(true)
476
+ else
477
+ definition.lock(lockfile_definition[:lockfile], true)
478
+ end
472
479
  end
473
480
  ensure
474
481
  Bundler.ui.level = previous_ui_level
@@ -493,6 +500,8 @@ module Bundler
493
500
  end
494
501
  end
495
502
 
503
+ # see https://github.com/rubygems/rubygems/pull/7368
504
+ Bundler::LazySpecification.include(Bundler::MatchMetadata) if defined?(Bundler::MatchMetadata)
496
505
  Bundler::Multilock.inject_preamble unless Bundler::Multilock.loaded?
497
506
 
498
507
  # this is terrible, but we can't prepend into these modules because we only load
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.2.1
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-18 00:00:00.000000000 Z
11
+ date: 2024-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -31,19 +31,19 @@ dependencies:
31
31
  - !ruby/object:Gem::Version
32
32
  version: '2.6'
33
33
  - !ruby/object:Gem::Dependency
34
- name: debug
34
+ name: gem-release
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '1.8'
39
+ version: '2.2'
40
40
  type: :development
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '1.8'
46
+ version: '2.2'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -72,50 +72,8 @@ dependencies:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
74
  version: '3.12'
75
- - !ruby/object:Gem::Dependency
76
- name: rubocop-inst
77
- requirement: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - "~>"
80
- - !ruby/object:Gem::Version
81
- version: '1.0'
82
- type: :development
83
- prerelease: false
84
- version_requirements: !ruby/object:Gem::Requirement
85
- requirements:
86
- - - "~>"
87
- - !ruby/object:Gem::Version
88
- version: '1.0'
89
- - !ruby/object:Gem::Dependency
90
- name: rubocop-rake
91
- requirement: !ruby/object:Gem::Requirement
92
- requirements:
93
- - - "~>"
94
- - !ruby/object:Gem::Version
95
- version: '0.6'
96
- type: :development
97
- prerelease: false
98
- version_requirements: !ruby/object:Gem::Requirement
99
- requirements:
100
- - - "~>"
101
- - !ruby/object:Gem::Version
102
- version: '0.6'
103
- - !ruby/object:Gem::Dependency
104
- name: rubocop-rspec
105
- requirement: !ruby/object:Gem::Requirement
106
- requirements:
107
- - - "~>"
108
- - !ruby/object:Gem::Version
109
- version: '2.24'
110
- type: :development
111
- prerelease: false
112
- version_requirements: !ruby/object:Gem::Requirement
113
- requirements:
114
- - - "~>"
115
- - !ruby/object:Gem::Version
116
- version: '2.24'
117
- description:
118
- email:
75
+ description:
76
+ email:
119
77
  executables: []
120
78
  extensions: []
121
79
  extra_rdoc_files: []
@@ -138,7 +96,7 @@ licenses:
138
96
  - MIT
139
97
  metadata:
140
98
  rubygems_mfa_required: 'true'
141
- post_install_message:
99
+ post_install_message:
142
100
  rdoc_options: []
143
101
  require_paths:
144
102
  - lib
@@ -146,15 +104,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
146
104
  requirements:
147
105
  - - ">="
148
106
  - !ruby/object:Gem::Version
149
- version: '2.7'
107
+ version: '2.6'
150
108
  required_rubygems_version: !ruby/object:Gem::Requirement
151
109
  requirements:
152
110
  - - ">="
153
111
  - !ruby/object:Gem::Version
154
112
  version: '0'
155
113
  requirements: []
156
- rubygems_version: 3.4.19
157
- signing_key:
114
+ rubygems_version: 3.5.6
115
+ signing_key:
158
116
  specification_version: 4
159
117
  summary: Support Multiple Lockfiles
160
118
  test_files: []