bibliothecary 5.6.1 → 5.6.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: deb50fc75b218674f906187fef3118965f52461af18ead0f64e06aa9578eac15
4
- data.tar.gz: 07b8521b7b62c96fd04856aa20dbf78443889f5a832957c4a31317af776290d7
3
+ metadata.gz: be6b3116c97d68a5f4311d19d5acf98618e5da7498c618ac297e1a56fe771dad
4
+ data.tar.gz: b087f87e42174c28681cc176fe13a68b2e980d5f2f8b10af848c53ce6c4f8dea
5
5
  SHA512:
6
- metadata.gz: a2425dd7b33087da3f3c1c1b7b17f3b6afecd33930485be6a7e1656c35ccd7bf20569bdd33a205eeab84ecf9046c84cebf2a8560ebbb540883ad1cabd315f885
7
- data.tar.gz: f7bb5c0f41a1feda006eddcbe301476a1714682d270b77fa9187c0e5b8a9a1157b2f8e21a74670236be8bae9c113176e9832a176234430b73f583cd5cb4e409b
6
+ metadata.gz: db123853b0991e4a98bfbb0319e6592f7c6e36e424aaa771f4c3f71a31b175cf3c88a50dc447bfd73f71d1128ffcf505378316eaf6d71bfe6d8f890597d990be
7
+ data.tar.gz: e54ef5a1f40c8a797a6a0b4d811cac33eb2d80f18bf7cd87c3699c609ec6b7d32db6d861a093eba79d04e0ae5a7f6f5e46d3d1c54016268589551bb071032e6a
@@ -33,7 +33,15 @@ module Bibliothecary
33
33
  /^vendor\/vendor.json$/ => {
34
34
  kind: 'manifest',
35
35
  parser: :parse_govendor
36
- }
36
+ },
37
+ /^Gopkg\.toml$/ => {
38
+ kind: 'manifest',
39
+ parser: :parse_dep_toml
40
+ },
41
+ /^Gopkg\.lock$/ => {
42
+ kind: 'lockfile',
43
+ parser: :parse_dep_lockfile
44
+ },
37
45
  }
38
46
  end
39
47
 
@@ -77,6 +85,16 @@ module Bibliothecary
77
85
  map_dependencies(manifest, 'dependencies', 'importpath', 'revision', 'runtime')
78
86
  end
79
87
 
88
+ def self.parse_dep_toml(file_contents)
89
+ manifest = TomlRB.parse file_contents
90
+ map_dependencies(manifest, 'constraint', 'name', 'version', 'runtime')
91
+ end
92
+
93
+ def self.parse_dep_lockfile(file_contents)
94
+ manifest = TomlRB.parse file_contents
95
+ map_dependencies(manifest, 'projects', 'name', 'revision', 'runtime')
96
+ end
97
+
80
98
  def self.map_dependencies(manifest, attr_name, dep_attr_name, version_attr_name, type)
81
99
  manifest.fetch(attr_name,[]).map do |dependency|
82
100
  {
@@ -1,3 +1,3 @@
1
1
  module Bibliothecary
2
- VERSION = "5.6.1"
2
+ VERSION = "5.6.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bibliothecary
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.6.1
4
+ version: 5.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Nesbitt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-21 00:00:00.000000000 Z
11
+ date: 2018-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: toml-rb