bibliothecary 8.6.1 → 8.6.3
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/maven.rb +7 -3
- data/lib/bibliothecary/version.rb +1 -1
- data/lib/bibliothecary.rb +1 -0
- 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: bbb80d11b51f48774a10ad1617525f5a01f580f10571a90b418bcc974ad07da4
|
4
|
+
data.tar.gz: 9a3c8bf41e7a7e461e28ea966acdd98ee5b4fb49d3fb94c59294734a6bd04b6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0aa9c475c57d5a5fb902cfbd049f12d113ed0ab0472fcd0ee788c07ff3cece579a92fb6d65e0b91d2ecc4415b1cb10c3fcdf2487b539990a11c785ab4078046e
|
7
|
+
data.tar.gz: 6d35f0e547438be4e1cb6fe981ed9a96ffb86a3cdfd3dc8b633b7502412505f7884e0c12792987659c7e547dd48c99333dbe45add7e39bc0b5d4d727ef1cdf0a
|
@@ -268,11 +268,15 @@ module Bibliothecary
|
|
268
268
|
[].tap do |deps|
|
269
269
|
['dependencies/dependency', 'dependencyManagement/dependencies/dependency'].each do |deps_xpath|
|
270
270
|
xml.locate(deps_xpath).each do |dep|
|
271
|
-
|
271
|
+
dep_hash = {
|
272
272
|
name: "#{extract_pom_dep_info(xml, dep, 'groupId', parent_properties)}:#{extract_pom_dep_info(xml, dep, 'artifactId', parent_properties)}",
|
273
273
|
requirement: extract_pom_dep_info(xml, dep, 'version', parent_properties),
|
274
|
-
type: extract_pom_dep_info(xml, dep, 'scope', parent_properties) || 'runtime'
|
275
|
-
}
|
274
|
+
type: extract_pom_dep_info(xml, dep, 'scope', parent_properties) || 'runtime',
|
275
|
+
}
|
276
|
+
# optional field is, itself, optional, and will be either "true" or "false"
|
277
|
+
optional = extract_pom_dep_info(xml, dep, 'optional', parent_properties)
|
278
|
+
dep_hash[:optional] = optional == "true" unless optional.nil?
|
279
|
+
deps.push(dep_hash)
|
276
280
|
end
|
277
281
|
end
|
278
282
|
end
|
data/lib/bibliothecary.rb
CHANGED
@@ -77,6 +77,7 @@ module Bibliothecary
|
|
77
77
|
|
78
78
|
def self.utf8_string(string)
|
79
79
|
string
|
80
|
+
.dup # ensure we don't have a frozen string
|
80
81
|
.force_encoding("UTF-8") # treat all strings as utf8
|
81
82
|
.sub(/^\xEF\xBB\xBF/, '') # remove any Byte Order Marks so JSON, etc don't fail while parsing them.
|
82
83
|
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: 8.6.
|
4
|
+
version: 8.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Nesbitt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tomlrb
|