bundler-resolutions 0.4.0 → 0.5.0

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: a4f090d8833033fef1949501d9b8876333cfbc8797c954306f4ee57d963981dc
4
- data.tar.gz: 0400ae342a0e9b8c50f7644daf99b7642954fda1d2758e68b8b06041472244b6
3
+ metadata.gz: ca66a89bbd900f1f8c14ff704e6e4155fd4dc768f05d3c16f1d3eb18a0a57d19
4
+ data.tar.gz: 77aa2e3521124d04f3c6cb4422fef1e417b0c6c705a840f728696bddefa35aa8
5
5
  SHA512:
6
- metadata.gz: cc78cd3cfacb3b56a160fe9a59acffb848360f082a2e326a647f2c547ddd31a692198fdcb13faf1ac50a224b6595c00cf11aa725f98cbfc98a0cd5453f95d263
7
- data.tar.gz: 77cdeadf7f8fda11a215e8ab50d9c1506e400991a087b07e5edceef0d796c2faad2681979a2bbd41324ae5d99820377e8c710467895b21932b91990396756721
6
+ metadata.gz: e453be51627d50ffa3186b27c2ee4926805e4f1d11c26a061cdfd94960f83286513b036f228e0ad2029730308cfbcd08a663b62c6faead45fa26291c78e13c21
7
+ data.tar.gz: 1c0681c2f8b334f3c85073d693900f3898d87343ed912f50f7fd1823a0986ac546979bf8dba447e7d39bbe5bd06765476aefeb6a703152a3befd09316b7f5577
@@ -9,13 +9,24 @@ module Bundler
9
9
 
10
10
  class << self
11
11
  def load_config(config = nil)
12
+ location = "config hash"
12
13
  raw_hash = if config.is_a?(Hash)
13
14
  config
14
15
  else
15
- YAML.safe_load_file(find_config(config))
16
+ location = find_config(config)
17
+ YAML.safe_load_file(location)
16
18
  end
17
- gems = raw_hash.fetch("gems")
18
- gems.transform_values { |reqs| Array(reqs).map { |req| Gem::Requirement.new(req) } }
19
+ gems = raw_hash.fetch("gems") {
20
+ raise <<~ERR
21
+ No 'gems' key found in #{location}. Please ensure the file is formatted correctly.
22
+
23
+ Data was:
24
+ #{raw_hash.inspect}
25
+ ERR
26
+ }
27
+ gems.transform_values { |reqs|
28
+ Array(reqs).flat_map { |v| v.split(",") }.map { |req| Gem::Requirement.new(req) }
29
+ }
19
30
  end
20
31
 
21
32
  private def find_config(config = nil)
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Bundler
4
4
  class Resolutions
5
- VERSION = "0.4.0"
5
+ VERSION = "0.5.0"
6
6
  end
7
7
  end
8
8
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler-resolutions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harry Lascelles
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-06-03 00:00:00.000000000 Z
11
+ date: 2025-07-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A bundler plugin to enforce resolutions without specifying a concrete
14
14
  dependency