bibliothecary 5.3.3 → 5.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/bibliothecary/parsers/npm.rb +15 -0
- 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: 063b544e4ac6eebc896b7c302661ae0ffcbc75a3
|
4
|
+
data.tar.gz: 126b6165dcfe0fe5ce21eb98b81e745a24b166cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9dc6f7227c16bcf3f013776b822df9fd1302c4834855fd9fb4b3c96a54b9e93903dd1a4e96039c3914e3edcab727c25fe2146b685c9ec804627c93b81ed04fc0
|
7
|
+
data.tar.gz: 6e65bbe8c730a5fd4ede8db52eb163d000752262c3018ea77ac2faf1b069db31e403278c7caca2f6ced08788e473039076574bc0760f41a4514500787413ebca
|
data/README.md
CHANGED
@@ -18,6 +18,10 @@ module Bibliothecary
|
|
18
18
|
/^(?!node_modules).*yarn\.lock$/ => {
|
19
19
|
kind: 'lockfile',
|
20
20
|
parser: :parse_yarn_lock
|
21
|
+
},
|
22
|
+
/^(?!node_modules).*package-lock\.json$/ => {
|
23
|
+
kind: 'lockfile',
|
24
|
+
parser: :parse_package_lock
|
21
25
|
}
|
22
26
|
}
|
23
27
|
end
|
@@ -33,6 +37,17 @@ module Bibliothecary
|
|
33
37
|
end
|
34
38
|
end
|
35
39
|
|
40
|
+
def self.parse_package_lock(file_contents)
|
41
|
+
manifest = JSON.parse(file_contents)
|
42
|
+
manifest.fetch('dependencies',[]).map do |name, requirement|
|
43
|
+
{
|
44
|
+
name: name,
|
45
|
+
requirement: requirement["version"],
|
46
|
+
type: 'runtime'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
36
51
|
def self.parse_manifest(file_contents)
|
37
52
|
manifest = JSON.parse(file_contents)
|
38
53
|
map_dependencies(manifest, 'dependencies', 'runtime') +
|
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.3.
|
4
|
+
version: 5.3.4
|
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-05-
|
11
|
+
date: 2017-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: toml-rb
|