bibliothecary 5.6.0 → 5.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/bibliothecary/cli.rb +1 -0
- data/lib/bibliothecary/parsers/npm.rb +8 -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: deb50fc75b218674f906187fef3118965f52461af18ead0f64e06aa9578eac15
|
|
4
|
+
data.tar.gz: 07b8521b7b62c96fd04856aa20dbf78443889f5a832957c4a31317af776290d7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a2425dd7b33087da3f3c1c1b7b17f3b6afecd33930485be6a7e1656c35ccd7bf20569bdd33a205eeab84ecf9046c84cebf2a8560ebbb540883ad1cabd315f885
|
|
7
|
+
data.tar.gz: f7bb5c0f41a1feda006eddcbe301476a1714682d270b77fa9187c0e5b8a9a1157b2f8e21a74670236be8bae9c113176e9832a176234430b73f583cd5cb4e409b
|
data/lib/bibliothecary/cli.rb
CHANGED
|
@@ -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
|
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.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-
|
|
11
|
+
date: 2017-12-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: toml-rb
|