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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c2c4453df94f17f94fca51f189da489d6b72cb9c
4
- data.tar.gz: efe04c9e8a9cb9515dedce455cfb9742972dd51a
3
+ metadata.gz: 5628ea2da242b4e3a9878ee0d625d6e71d3e186f
4
+ data.tar.gz: f0fb7c57c85e4968e31d5359b77fdeb212814161
5
5
  SHA512:
6
- metadata.gz: d342d97b39bd2d9309d8c81ba7f9bfffeaf068527e948f979eb694754c527db6c473f25d23dcf8f37c134bbbf1a3bb696e2dcf370349f95f648a8c63e81d1941
7
- data.tar.gz: fa5787751ba98ef6f9ccdcfa9caa6b9e198a58f73292a3621167c7639bd4e6bf94c776293842b2ff7c4b409b201cba89aafae0380cfd68d47d5f416aade95eb0
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
- return [] unless json['dependencies'] && json['dependencies']['compile'] && json['dependencies']['compile'].is_a?(Array)
63
- json['dependencies']['compile'].map do |dependency|
64
- next unless dependency =~ (/[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+(\.[A-Za-z0-9_-])?\:[A-Za-z0-9_-]+\:/)
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: 'runtime'
67
+ version: dependency["version"],
68
+ type: dependency["type"]
71
69
  }
72
70
  end.compact
73
71
  end
@@ -1,3 +1,3 @@
1
1
  module Bibliothecary
2
- VERSION = "5.5.1"
2
+ VERSION = "5.5.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.5.1
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-07-28 00:00:00.000000000 Z
11
+ date: 2017-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: toml-rb