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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3180ce1ed02cce4f3580e9ce8e7ee230d387d6fc231778db6329ce1774a9034f
|
4
|
+
data.tar.gz: a3e91726f5f63c5f1355ada3e7b59cdbd7487bd4d9cb55f33f9ea631c5b027fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
|
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
|
-
|
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?
|
data/lib/traject_plus/version.rb
CHANGED
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.
|
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-
|
14
|
+
date: 2019-09-26 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activesupport
|