bibliothecary 5.6.0 → 5.6.1

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: 1132887757d12b74eac14368bab1568ea1a736fa59f384aa6a8a3b09b5f295a7
4
- data.tar.gz: 4e5d2a6450479303b8eadc7a2dd99d924239e9142f317aac0aceb0e43e6c4543
3
+ metadata.gz: deb50fc75b218674f906187fef3118965f52461af18ead0f64e06aa9578eac15
4
+ data.tar.gz: 07b8521b7b62c96fd04856aa20dbf78443889f5a832957c4a31317af776290d7
5
5
  SHA512:
6
- metadata.gz: 22d0e75ed77493f0ec5fc7521077706a1131f6ac837f8d321fa012116aae7c949e6ea1de163d96a6f7c9decbf2dd0e84bcc4fd78584754091129d33a44373669
7
- data.tar.gz: 72dfb01b6c44c159616f06d9d3021fcc77085bb15ebbc393a9403283e4389995e3ff3fd7c47e439ec32f53eeab2bbb2a7d2f9c82059f7299629bc8ae7420d865
6
+ metadata.gz: a2425dd7b33087da3f3c1c1b7b17f3b6afecd33930485be6a7e1656c35ccd7bf20569bdd33a205eeab84ecf9046c84cebf2a8560ebbb540883ad1cabd315f885
7
+ data.tar.gz: f7bb5c0f41a1feda006eddcbe301476a1714682d270b77fa9187c0e5b8a9a1157b2f8e21a74670236be8bae9c113176e9832a176234430b73f583cd5cb4e409b
@@ -16,6 +16,7 @@ module Bibliothecary
16
16
  c.description = 'List dependencies'
17
17
  c.option("--path FILENAME", String, "Path to file/folder to analyse")
18
18
  c.action do |_args, options|
19
+ options.default path: './'
19
20
  output = Bibliothecary.analyse(options.path)
20
21
  output.each do |manifest|
21
22
  puts "#{manifest[:path]} (#{manifest[:platform]})"
@@ -57,7 +57,14 @@ module Bibliothecary
57
57
  def self.parse_yarn_lock(file_contents)
58
58
  response = Typhoeus.post("https://yarn-parser.libraries.io/parse", body: file_contents)
59
59
  return [] unless response.response_code == 200
60
- JSON.parse(response.body, symbolize_names: true)
60
+ json = JSON.parse(response.body, symbolize_names: true)
61
+ json.uniq.map do |dep|
62
+ {
63
+ name: dep[:name],
64
+ requirement: dep[:version],
65
+ type: dep[:type]
66
+ }
67
+ end
61
68
  end
62
69
  end
63
70
  end
@@ -1,3 +1,3 @@
1
1
  module Bibliothecary
2
- VERSION = "5.6.0"
2
+ VERSION = "5.6.1"
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.0
4
+ version: 5.6.1
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-20 00:00:00.000000000 Z
11
+ date: 2017-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: toml-rb