bundler-multilock 1.0.0 → 1.0.2

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: 648cdaff608ff51cfe15ab2c098cff90218068d650f9c0fa4825dca90d2cc573
4
- data.tar.gz: 12be8f53d490c149f2e2691b4e694c8bc395673a2c30e622b5071b1b4771ddb4
3
+ metadata.gz: ad2556137eeec88cc813f9ac79cbb7062a4a16b067bf88a61cfacb03d1ae9add
4
+ data.tar.gz: 58c7c976aa0e57f426b80152f213d069ee7f24ea5b9da1ee0c1ef115a8208e64
5
5
  SHA512:
6
- metadata.gz: 5e42ff819d3a1640e6c51dd326e01c9d3400a8193807cb1ed3400b72b9dc2b9fb0dc71289471545c74034c61f2c53884ef1f8c53618360d9490ff6193f72a19e
7
- data.tar.gz: 916d273cb5dbe217d8b5d77be760f9db732e92b39177bfc5487f8868f93e0a90bca11afbeb4c09b3e508f99098f81275973b941e243e7668e0443cd61bcc888a
6
+ metadata.gz: 84e3cd4a4b12513f2a5ea4d0d214abb9e1a061bf96d041d1bea16c833131941ce8da7f9109018dd2bc5b2ddc4afc363e68caae7948707ec7d3a68ac8dea745f3
7
+ data.tar.gz: cb8d45a52af7437ab6192809711531df051f7da2343b91087d4522f520441ab90476c822499d6e0c13d015923bf0701a75c9cead68f52bc49026de439cd0fbbe
@@ -53,7 +53,7 @@ module Bundler
53
53
  end
54
54
 
55
55
  def lockfile(*args, **kwargs, &block)
56
- return if Multilock.loaded?
56
+ return true if Multilock.loaded?
57
57
 
58
58
  Multilock.add_lockfile(*args, builder: self, **kwargs, &block)
59
59
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Bundler
4
4
  module Multilock
5
- VERSION = "1.0.0"
5
+ VERSION = "1.0.2"
6
6
  end
7
7
  end
@@ -356,12 +356,7 @@ module Bundler
356
356
 
357
357
  def write_lockfile(lockfile_definition, lockfile, install:, dependency_changes: false)
358
358
  self.prepare_block = lockfile_definition[:prepare]
359
- definition = Definition.build(lockfile_definition[:gemfile], lockfile, false)
360
- definition.instance_variable_set(:@dependency_changes, dependency_changes) if dependency_changes
361
- if lockfile_definition[:lockfile].exist?
362
- definition.instance_variable_set(:@lockfile_contents,
363
- lockfile_definition[:lockfile].read)
364
- end
359
+ definition = build_definition(lockfile_definition, lockfile, dependency_changes: dependency_changes)
365
360
 
366
361
  resolved_remotely = false
367
362
  begin
@@ -370,7 +365,8 @@ module Bundler
370
365
  begin
371
366
  definition.resolve_with_cache!
372
367
  rescue GemNotFound, SolveFailure
373
- definition = Definition.build(lockfile_definition[:gemfile], lockfile, false)
368
+ definition = build_definition(lockfile_definition, lockfile, dependency_changes: dependency_changes)
369
+
374
370
  definition.resolve_remotely!
375
371
  resolved_remotely = true
376
372
  end
@@ -391,6 +387,16 @@ module Bundler
391
387
  ensure
392
388
  self.prepare_block = nil
393
389
  end
390
+
391
+ def build_definition(lockfile_definition, lockfile, dependency_changes:)
392
+ definition = Definition.build(lockfile_definition[:gemfile], lockfile, false)
393
+ definition.instance_variable_set(:@dependency_changes, dependency_changes) if dependency_changes
394
+ if lockfile_definition[:lockfile].exist?
395
+ definition.instance_variable_set(:@lockfile_contents,
396
+ lockfile_definition[:lockfile].read)
397
+ end
398
+ definition
399
+ end
394
400
  end
395
401
 
396
402
  reset!
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler-multilock
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  - !ruby/object:Gem::Version
146
146
  version: '0'
147
147
  requirements: []
148
- rubygems_version: 3.1.6
148
+ rubygems_version: 3.4.19
149
149
  signing_key:
150
150
  specification_version: 4
151
151
  summary: Support Multiple Lockfiles