modsulator 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/modsulator/normalizer.rb +0 -17
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ce17e2a28f3d77f771b5c6760810ad7e5f43a86
|
4
|
+
data.tar.gz: 9e864adcd74c178dda9e0021d9a6a603873c4a97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f726929bffd044eb365d2580d7b9db268514a83d17b60daaa908707a6fd4a59020f04cce8401eab243367851076e8f161456045076a6182e058c852024b6021
|
7
|
+
data.tar.gz: 980f96dfa483c4b21b45968f63984cb1d8782185d9fa5fd9726cf07443341af8349fe9af7336149181676ac24fbcfefefe7d58184c8769c715d9f8f8eb189563
|
@@ -172,22 +172,6 @@ class Normalizer
|
|
172
172
|
end
|
173
173
|
|
174
174
|
|
175
|
-
# Removes the point attribute from single <dateCreated> and <dateIssued> elements.
|
176
|
-
#
|
177
|
-
# @param [Nokogiri::XML::NodeSet] nodes A set of all affected <dateCreated> and <dateIssued> elements.
|
178
|
-
# @return [Void] The given document is modified in place.
|
179
|
-
def clean_date_attributes(nodes)
|
180
|
-
|
181
|
-
# Find all the <dateCreated> and <dateIssued> elements that are NOT immediately followed by another element with the same name
|
182
|
-
nodes.each do |current_element|
|
183
|
-
attributes = current_element.attributes
|
184
|
-
if(attributes.key?('point'))
|
185
|
-
current_element.remove_attribute('point')
|
186
|
-
end
|
187
|
-
end
|
188
|
-
end
|
189
|
-
|
190
|
-
|
191
175
|
# Sometimes there are spurious decimal digits within the date fields. This method removes any trailing decimal points within
|
192
176
|
# <dateCreated> and <dateIssued>.
|
193
177
|
#
|
@@ -215,7 +199,6 @@ class Normalizer
|
|
215
199
|
remove_empty_attributes(root)
|
216
200
|
remove_empty_nodes(root)
|
217
201
|
trim_text(root)
|
218
|
-
clean_date_attributes(root.xpath(LONE_DATE_XPATH, 'mods' => MODS_NAMESPACE))
|
219
202
|
clean_date_values(root.xpath(DATE_CREATED_ISSUED_XPATH, 'mods' => MODS_NAMESPACE))
|
220
203
|
end
|
221
204
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: modsulator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tommy Ingulfsen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: roo
|