bibliothecary 5.5.1 → 5.5.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/maven.rb +6 -8
- data/lib/bibliothecary/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5628ea2da242b4e3a9878ee0d625d6e71d3e186f
|
4
|
+
data.tar.gz: f0fb7c57c85e4968e31d5359b77fdeb212814161
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cf23d5b7333c80642f2d5844bed308241b5aee609910fed6c3b32ee00ce2eba2332f43adf1d2e3fb32e30a9c7a441cc82f365ef91e845f0da9c32866240970e
|
7
|
+
data.tar.gz: 837c4a41be5b687287bcdecd9da9c2b280d327fa4edbc2988bd2b7691a4e471abcc87c50da8460b9ca6e388396bcdf803626f67e3e47343befd514fe92a5c0a9
|
@@ -58,16 +58,14 @@ module Bibliothecary
|
|
58
58
|
def self.parse_gradle(manifest)
|
59
59
|
response = Typhoeus.post("https://gradle-parser.libraries.io/parse", body: manifest)
|
60
60
|
json = JSON.parse(response.body)
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
next unless
|
65
|
-
version = dependency.split(':').last
|
66
|
-
name = dependency.split(':')[0..-2].join(':')
|
61
|
+
return [] unless json['dependencies']
|
62
|
+
json['dependencies'].map do |dependency|
|
63
|
+
name = [dependency["group"], dependency["name"]].join(':')
|
64
|
+
next unless name =~ (/[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+(\.[A-Za-z0-9_-])?\:[A-Za-z0-9_-]/)
|
67
65
|
{
|
68
66
|
name: name,
|
69
|
-
version: version,
|
70
|
-
type:
|
67
|
+
version: dependency["version"],
|
68
|
+
type: dependency["type"]
|
71
69
|
}
|
72
70
|
end.compact
|
73
71
|
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.5.
|
4
|
+
version: 5.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Nesbitt
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: toml-rb
|