traject_plus 1.2.1 → 1.2.2

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: 0b27a18435a3547cc2d7e8c89b881b19371312e3abc0670a7648eb25a0eec3ab
4
- data.tar.gz: 34a5e4f57e063c19687dfdcb3e5be6fda683e040ce0401450ddd7453cb940522
3
+ metadata.gz: 3180ce1ed02cce4f3580e9ce8e7ee230d387d6fc231778db6329ce1774a9034f
4
+ data.tar.gz: a3e91726f5f63c5f1355ada3e7b59cdbd7487bd4d9cb55f33f9ea631c5b027fc
5
5
  SHA512:
6
- metadata.gz: e31021d1869a7d98f9b4f2f834eb77bcd7f8347d1b492cffd46f2817ea143492b7f3d057047f070a6e7ee3fde27f2b7c8ef5f8b15217b24c3eb10ff97a663829
7
- data.tar.gz: 638cefd62dd2bca34952a37ab307a2209a6c5e621c08258647fe6f285ced151084d41af5a3901bfe78284bf0e4ab4136270c3ba16b73ce57f4e4f0aa474aa192
6
+ metadata.gz: b2041c23e176a5a06a7ae0bf73fef6bc1c96be3848be5c31442f325e76230fcb05ad676f61c347db80eec3b8a55c7b9bd23780b1c2db0cb8b6348de31b1fb401
7
+ data.tar.gz: 2dc0bb7e2dfafd82ebc35e8380076ceb471189b0411c21f53cafd9deeb4fa50cf8b07aed14ce85aee2d2287d9f062100231de1a01294bd02fd2fc7329ae097a4
@@ -6,11 +6,9 @@ module TrajectPlus
6
6
  module FGDC
7
7
  NS = { fgdc: 'http://www.fgdc.gov/metadata/fgdc-std-001-1998.dtd' }.freeze
8
8
 
9
- include Traject::Macros::NokogiriMacros
10
-
11
9
  # @param xpath [String] the xpath query expression
12
- def extract_fgdc(xpath)
13
- extract_xpath(xpath, ns: NS)
10
+ def extract_fgdc(xpath, options = {})
11
+ extract_xml(xpath, NS, options)
14
12
  end
15
13
  end
16
14
  end
@@ -9,11 +9,9 @@ module TrajectPlus
9
9
  dc: 'http://purl.org/dc/elements/1.1/',
10
10
  xlink: 'http://www.w3.org/1999/xlink' }.freeze
11
11
 
12
- include Traject::Macros::NokogiriMacros
13
-
14
12
  # @param xpath [String] the xpath query expression
15
- def extract_mods(xpath)
16
- extract_xpath(xpath, ns: NS)
13
+ def extract_mods(xpath, options = {})
14
+ extract_xml(xpath, NS, options)
17
15
  end
18
16
  end
19
17
  end
@@ -5,11 +5,9 @@ module TrajectPlus
5
5
  module Tei
6
6
  NS = { tei: 'http://www.tei-c.org/ns/1.0' }.freeze
7
7
 
8
- include Traject::Macros::NokogiriMacros
9
-
10
8
  # @param xpath [String] the xpath query expression
11
- def extract_tei(xpath)
12
- extract_xpath(xpath, ns: NS)
9
+ def extract_tei(xpath, options = {})
10
+ extract_xml(xpath, NS, options)
13
11
  end
14
12
  end
15
13
  end
@@ -8,8 +8,6 @@ module TrajectPlus
8
8
  # @param namespaces [Hash<String,String>] The namespaces for the xpath query
9
9
  # @param options [Hash] other options, may include :trim
10
10
  def extract_xml(xpath, namespaces, options = {})
11
- Deprecation.warn(self, "extract_xml is deprecated and will be removed in the next major release. Use the Traject 3 pipeline instead")
12
-
13
11
  lambda do |xml, accumulator, _context|
14
12
  result = xml.xpath(xpath, namespaces).map(&:text)
15
13
  unless options.empty?
@@ -1,3 +1,3 @@
1
1
  module TrajectPlus
2
- VERSION = '1.2.1'.freeze
2
+ VERSION = "1.2.2".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: traject_plus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2019-09-25 00:00:00.000000000 Z
14
+ date: 2019-09-26 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport