bibliothecary 7.1.1 → 7.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bibliothecary/parsers/pypi.rb +15 -0
- data/lib/bibliothecary/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 901e953500cd1880a638a6555c5dfc82dd8d8521be5b7bf85fc0d6dff981dfe0
|
4
|
+
data.tar.gz: 2c1d2c23f53bdea2a91b418bdee9ecc0becb8cbb651f94b53f76b8974b0a765e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1883bdfe4f28f284c4ef661f443b2e23830910368fbe63d8bf4e491e46278aaee12d8014c7181094933d7e3a6f33b6553318b016616ac27af00153ae763d65e
|
7
|
+
data.tar.gz: 59c5d53bffaeeb8c59df649370ff85c91245d8d7c3762dc97e21dc2663f02a10bd4a65e5c6f8dbf90bc8e2782b7420d3521623bb343e8b44985f396b019649a6
|
@@ -7,9 +7,15 @@ module Bibliothecary
|
|
7
7
|
REQUIRE_REGEXP = /([a-zA-Z0-9]+[a-zA-Z0-9\-_\.]+)([><=\w\.,]+)?/
|
8
8
|
REQUIREMENTS_REGEXP = /^#{REQUIRE_REGEXP}/
|
9
9
|
MANIFEST_REGEXP = /.*require[^\/]*(\/)?[^\/]*\.(txt|pip)$/
|
10
|
+
PIP_COMPILE_REGEXP = /.*require.*$/
|
10
11
|
|
11
12
|
def self.mapping
|
12
13
|
{
|
14
|
+
lambda { |p| PIP_COMPILE_REGEXP.match(p) } => {
|
15
|
+
content_matcher: :pip_compile?,
|
16
|
+
kind: 'lockfile',
|
17
|
+
parser: :parse_requirements_txt
|
18
|
+
},
|
13
19
|
lambda { |p| MANIFEST_REGEXP.match(p) } => {
|
14
20
|
kind: 'manifest',
|
15
21
|
parser: :parse_requirements_txt,
|
@@ -174,6 +180,15 @@ module Bibliothecary
|
|
174
180
|
end
|
175
181
|
deps
|
176
182
|
end
|
183
|
+
|
184
|
+
def self.pip_compile?(file_contents)
|
185
|
+
return file_contents.include?("This file is autogenerated by pip-compile")
|
186
|
+
rescue Exception # rubocop:disable Lint/RescueException
|
187
|
+
# We rescue exception here since native libs can throw a non-StandardError
|
188
|
+
# We don't want to throw errors during the matching phase, only during
|
189
|
+
# parsing after we match.
|
190
|
+
false
|
191
|
+
end
|
177
192
|
end
|
178
193
|
end
|
179
194
|
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: 7.1.
|
4
|
+
version: 7.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Nesbitt
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tomlrb
|
@@ -206,7 +206,7 @@ dependencies:
|
|
206
206
|
- - ">="
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '0'
|
209
|
-
description:
|
209
|
+
description:
|
210
210
|
email:
|
211
211
|
- andrewnez@gmail.com
|
212
212
|
executables:
|
@@ -274,7 +274,7 @@ homepage: https://github.com/librariesio/bibliothecary
|
|
274
274
|
licenses:
|
275
275
|
- AGPL-3.0
|
276
276
|
metadata: {}
|
277
|
-
post_install_message:
|
277
|
+
post_install_message:
|
278
278
|
rdoc_options: []
|
279
279
|
require_paths:
|
280
280
|
- lib
|
@@ -290,7 +290,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
290
290
|
version: '0'
|
291
291
|
requirements: []
|
292
292
|
rubygems_version: 3.1.2
|
293
|
-
signing_key:
|
293
|
+
signing_key:
|
294
294
|
specification_version: 4
|
295
295
|
summary: Find and parse manifests
|
296
296
|
test_files: []
|