bundler-multilock 1.1.1 → 1.1.2

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: cac57db5334b1e1eca3b690b889b28fbb0fa0ffed4a2961ddc8208f3fc7620f1
4
- data.tar.gz: 0f80468fd6caab34bc0139aaf078cfc6b8e635237570fdcc803a46d658872515
3
+ metadata.gz: 67b3efef0037c3c22b0b8fccee25a6388b3cc3aa38b92dc2dfdc956b2eca01e8
4
+ data.tar.gz: e12da2edaeacc80d5d5b90108a333c1d195be6d0784618ab40ebe5d5807981fc
5
5
  SHA512:
6
- metadata.gz: aa446fe3eb1cbf6896083dee2b5063c1fd5569043b3f2d4df7572f91d1054409bb83c0a29061390d367906f1649bf3a3c646440fa7f664454be0863dedc95885
7
- data.tar.gz: 11bbaa79a07b0854150a053a83f9f3d32afe8e4ab7ffeda8936d878b1842b98f50d956941a33ecc90710cd2ca916f569e4328097c259153979addb2beac6cf75
6
+ metadata.gz: 64f62f4d2d35d55cacb8d751be9708d56f4d60348c69faa61f8ea8c48a0ff273fd355238fe71175e0d36c2ad7cbe6f55e225fb6ea56be8361d258d5cb6ae45d8
7
+ data.tar.gz: 393ca25f67035f032b83442e7dd7bf5a4cec5002f72c94eb1f42a3d962117f79a39e029e1280c845520af398fc7b68d4cbd5d2dd60ab9d6181891a1ee10ab36b
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Bundler
4
4
  module Multilock
5
- VERSION = "1.1.1"
5
+ VERSION = "1.1.2"
6
6
  end
7
7
  end
@@ -62,14 +62,8 @@ module Bundler
62
62
  raise ArgumentError, "Lockfile #{lockfile} is already defined"
63
63
  end
64
64
 
65
- env_lockfile = ENV["BUNDLE_LOCKFILE"]
66
- if env_lockfile
67
- unless env_lockfile.include?("/") || env_lockfile.end_with?(".lock")
68
- env_lockfile = "Gemfile.#{env_lockfile}.lock"
69
- end
70
- env_lockfile = Bundler.root.join(env_lockfile).expand_path
71
- active = env_lockfile == lockfile
72
- end
65
+ env_lockfile = ENV["BUNDLE_LOCKFILE"]&.then { |l| expand_lockfile(l) }
66
+ active = env_lockfile == lockfile if env_lockfile
73
67
 
74
68
  if active && (old_active = lockfile_definitions.find { |definition| definition[:active] })
75
69
  raise ArgumentError, "Only one lockfile (#{old_active[:lockfile]}) can be flagged as the default"
@@ -310,16 +304,17 @@ module Bundler
310
304
 
311
305
  return unless lockfile_definitions.none? { |definition| definition[:active] }
312
306
 
313
- # Gemfile.lock isn't explicitly specified, otherwise it would be active
314
- default_lockfile_definition = lockfile_definitions.find do |definition|
315
- definition[:lockfile] == Bundler.default_lockfile(force_original: true)
316
- end
317
- if ENV["BUNDLE_LOCKFILE"] == Bundler.default_lockfile(force_original: true) && default_lockfile_definition
307
+ if ENV["BUNDLE_LOCKFILE"]&.then { |l| expand_lockfile(l) } ==
308
+ Bundler.default_lockfile(force_original: true)
318
309
  return
319
310
  end
320
311
 
321
312
  raise GemfileNotFound, "Could not locate lockfile #{ENV["BUNDLE_LOCKFILE"].inspect}" if ENV["BUNDLE_LOCKFILE"]
322
313
 
314
+ # Gemfile.lock isn't explicitly specified, otherwise it would be active
315
+ default_lockfile_definition = lockfile_definitions.find do |definition|
316
+ definition[:lockfile] == Bundler.default_lockfile(force_original: true)
317
+ end
323
318
  return unless default_lockfile_definition && default_lockfile_definition[:active] == false
324
319
 
325
320
  raise GemfileEvalError, "No lockfiles marked as default"
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.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure