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 +4 -4
- data/lib/bibliothecary/parsers/go.rb +19 -1
- data/lib/bibliothecary/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be6b3116c97d68a5f4311d19d5acf98618e5da7498c618ac297e1a56fe771dad
|
4
|
+
data.tar.gz: b087f87e42174c28681cc176fe13a68b2e980d5f2f8b10af848c53ce6c4f8dea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
{
|
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.
|
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:
|
11
|
+
date: 2018-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: toml-rb
|