bibliothecary 5.2.0 → 5.3.0
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/parsers/npm.rb +3 -3
- data/lib/bibliothecary/parsers/pypi.rb +19 -33
- 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: 2fa6295e2d804a14e0272bc9e6df52cbdf44f013
|
|
4
|
+
data.tar.gz: 09a249dd16c786b3e66f1f0b02c6eddbe82cd794
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e9a2921352f301b01d2c251508300c026ac03fdb90acd68bf16f3a405d1b86666994cdb1058e1000bdca4489087491dca4503256dd5736732088ef1182578f10
|
|
7
|
+
data.tar.gz: 3895ca5d0d453f70dab81f7b284b86679a738beac7d8942be22ae72fad84ce5a84b1ad24d6a8438da019bb9d5cb864c0ca33c926e5daedf52bb78052d23a5bd1
|
|
@@ -7,15 +7,15 @@ module Bibliothecary
|
|
|
7
7
|
|
|
8
8
|
def self.mapping
|
|
9
9
|
{
|
|
10
|
-
/^package\.json$/ => {
|
|
10
|
+
/^(?!node_modules).+*package\.json$/ => {
|
|
11
11
|
kind: 'manifest',
|
|
12
12
|
parser: :parse_manifest
|
|
13
13
|
},
|
|
14
|
-
/^npm-shrinkwrap\.json$/ => {
|
|
14
|
+
/^(?!node_modules).+*npm-shrinkwrap\.json$/ => {
|
|
15
15
|
kind: 'lockfile',
|
|
16
16
|
parser: :parse_shrinkwrap
|
|
17
17
|
},
|
|
18
|
-
/^yarn\.lock$/ => {
|
|
18
|
+
/^(?!node_modules).+*yarn\.lock$/ => {
|
|
19
19
|
kind: 'lockfile',
|
|
20
20
|
parser: :parse_yarn_lock
|
|
21
21
|
}
|
|
@@ -7,31 +7,25 @@ module Bibliothecary
|
|
|
7
7
|
REQUIRE_REGEXP = /([a-zA-Z0-9]+[a-zA-Z0-9\-_\.]+)([><=\d\.,]+)?/
|
|
8
8
|
REQUIREMENTS_REGEXP = /^#{REQUIRE_REGEXP}/
|
|
9
9
|
|
|
10
|
-
def self.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
def self.match?(filename)
|
|
31
|
-
is_requirements_file(filename) ||
|
|
32
|
-
filename.match(/setup\.py$/) ||
|
|
33
|
-
filename.match(/Pipfile$/) ||
|
|
34
|
-
filename.match(/Pipfile\.lock$/)
|
|
10
|
+
def self.mapping
|
|
11
|
+
{
|
|
12
|
+
/^(?!node_modules).*require.*\.(txt|pip)$/ => {
|
|
13
|
+
kind: 'manifest',
|
|
14
|
+
parser: :parse_requirements_txt
|
|
15
|
+
},
|
|
16
|
+
/setup\.py$/ => {
|
|
17
|
+
kind: 'manifest',
|
|
18
|
+
parser: :parse_setup_py
|
|
19
|
+
},
|
|
20
|
+
/^Pipfile$/ => {
|
|
21
|
+
kind: 'manifest',
|
|
22
|
+
parser: :parse_pipfile
|
|
23
|
+
},
|
|
24
|
+
/^Pipfile\.lock$/ => {
|
|
25
|
+
kind: 'lockfile',
|
|
26
|
+
parser: :parse_pipfile_lock
|
|
27
|
+
}
|
|
28
|
+
}
|
|
35
29
|
end
|
|
36
30
|
|
|
37
31
|
def self.parse_pipfile(file_contents)
|
|
@@ -111,14 +105,6 @@ module Bibliothecary
|
|
|
111
105
|
end
|
|
112
106
|
deps
|
|
113
107
|
end
|
|
114
|
-
|
|
115
|
-
def self.is_requirements_file(filename)
|
|
116
|
-
if filename.match(/require.*\.(txt|pip)$/) and !filename.match(/^node_modules/)
|
|
117
|
-
return true
|
|
118
|
-
else
|
|
119
|
-
return false
|
|
120
|
-
end
|
|
121
|
-
end
|
|
122
108
|
end
|
|
123
109
|
end
|
|
124
110
|
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.
|
|
4
|
+
version: 5.3.0
|
|
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-02
|
|
11
|
+
date: 2017-03-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: toml-rb
|