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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 339163151e8113f056a34e7089bcd5e68d0629cdd45b0109b40087974dd0efa4
4
- data.tar.gz: 0bd35f6a15d412e7625268e41de4122a352a08c5def052a4bdd54efcaede8dba
3
+ metadata.gz: bbb80d11b51f48774a10ad1617525f5a01f580f10571a90b418bcc974ad07da4
4
+ data.tar.gz: 9a3c8bf41e7a7e461e28ea966acdd98ee5b4fb49d3fb94c59294734a6bd04b6a
5
5
  SHA512:
6
- metadata.gz: 0f6ef41d068ddab930d57d22beb60cb8bdc1543de2429ed5d4e13a3ded544cc8dec1374798c2d5a432d610ed6a5612578996940c793d869795bb0c35ad6ebad5
7
- data.tar.gz: dff39cdf5dc7b28de5343ad45a1b095336cdcdeb92224855b47abd112f61d0ff6d861367fe8c84fe546ce4a1c7e94fdd2b84cb7c3d841e6057a52db227bff194
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
- deps.push({
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
@@ -1,3 +1,3 @@
1
1
  module Bibliothecary
2
- VERSION = "8.6.1"
2
+ VERSION = "8.6.3"
3
3
  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.1
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-04-20 00:00:00.000000000 Z
11
+ date: 2023-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tomlrb