bibliothecary 8.5.0 → 8.5.1

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: ac52b349e3c70feee32a4866adc7d81a850467dcc167cd0227c20dadafcb78a9
4
- data.tar.gz: 7127e1e85bf737dacbfaf84d91fd3c8e0ea527d7337e0381d1ca36a8677289c3
3
+ metadata.gz: 28eee333f0558f68657092d126ca5465eddbba371f1ad189a3007d4b43915063
4
+ data.tar.gz: 91cb04d35a821cd7a8af93688a7db430d445f37f805493f379c2eeccddca5f74
5
5
  SHA512:
6
- metadata.gz: 476ced972f0f89192fb42fa2d9a12bc279ef8635211040e3e9c73cd0ab242e997193fae9f21c4a305956f5f8b188b12cf3a67fd054200a589202e6337755d990
7
- data.tar.gz: 8167b963298ad218bbbc0b7666f3e8a0622781321a64c2558c816946ddfd69c284cf4842bb8c99681c5ea84edf1d665ce8a2291753f16a6447ab388a5982f7ce
6
+ metadata.gz: 8286430aba8f90efd0fc73b63f1fe31f57a7aa3759f88613fdecced517ad98a12a2ce62032bab0919c94f125c84953a71ba3862533a4a2e410ec11d1e4cf4a99
7
+ data.tar.gz: 310fa03c90fca4ee65fb46b2fb78b9f9276b082adeada8a4536cd9357441c7f33c54cbf016cd087a7b7c5f0b6517664ed8107d92cbe730e57538888e2e778fe6
@@ -322,6 +322,9 @@ module Bibliothecary
322
322
  extract_pom_dep_info(xml, xml, location, parent_properties)
323
323
  end
324
324
 
325
+ # TODO: it might be worth renaming parent_properties to parent_elements
326
+ # so that more can be inherited from the parent pom than just <properties>
327
+ # here (see https://maven.apache.org/pom.html#inheritance)
325
328
  def self.extract_pom_dep_info(xml, dependency, name, parent_properties = {})
326
329
  field = dependency.locate(name).first
327
330
  return nil if field.nil?
@@ -363,7 +366,10 @@ module Bibliothecary
363
366
  return "${#{property_name}}" if !xml.respond_to?("properties") && parent_properties.empty? && xml.locate(non_prop_name).empty?
364
367
 
365
368
  prop_field = xml.properties.locate(property_name).first if xml.respond_to?("properties")
366
- parent_prop = parent_properties[property_name]
369
+ parent_prop = parent_properties[property_name] || # e.g. "${foo}"
370
+ parent_properties[property_name.sub(/^project\./, '')] || # e.g. "${project.foo}"
371
+ parent_properties[property_name.sub(/^project\.parent\./, '')] # e.g. "${project.parent.foo}"
372
+
367
373
  if prop_field
368
374
  prop_field.nodes.first
369
375
  elsif parent_prop
@@ -1,3 +1,3 @@
1
1
  module Bibliothecary
2
- VERSION = "8.5.0"
2
+ VERSION = "8.5.1"
3
3
  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.5.0
4
+ version: 8.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Nesbitt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-23 00:00:00.000000000 Z
11
+ date: 2023-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tomlrb