stanford-mods 2.3.1 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bf9995bc6d5890bb8520ec918ef23ef8fc6a215e
4
- data.tar.gz: 6a39d07658e000e296d40e3666b93ead0c3a32ca
3
+ metadata.gz: a4fe370e5f566e6a8aaf2cecf78f8d2f261e83d3
4
+ data.tar.gz: 7fd7c27ee40726c0509190ef9dfd398fba91d95d
5
5
  SHA512:
6
- metadata.gz: 3fb187dbfc6ac4f2f1f21a68dc8cd43940f5cf8e2f67b1895392cc9adbd91eccf163cd6d8e35e5f7fbd72fadd1a0ff7019f2f8120e790f31b8e2d65c275fe5b6
7
- data.tar.gz: 4d5e7dbf3099da891b5c15b5d3e64c27b72c1ea305c503b068a5890324dc818db9fb644d500e20afaa0729fb2202628d621f12fd3b8a95fdcfd020d22fdedc05
6
+ metadata.gz: ac960448cdf1c552d8e78822735bfacce0dfd193a729e8f8f8f4b6516c6eb06cb639546ce3183f5be5d6283251036e82b4f53ed04b2d482fe01da80440d208fc
7
+ data.tar.gz: bbdd468328c00a918ecf898a2217f58cf8b3737a4e541246da480103bf9405293350410f2629f4492ae591bb47d0dd8a6223dce1f0abf88a55c2de1c18ce1681
@@ -18,19 +18,36 @@ module Stanford
18
18
  # <gml:upperCorner>-122.149475 37.4435369</gml:upperCorner>
19
19
  def geo_extensions_as_envelope
20
20
  mods_ng_xml.extension
21
- .xpath('//rdf:RDF/rdf:Description/gml:boundedBy/gml:Envelope',
22
- 'gml' => GMLNS,
23
- 'rdf' => 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'
24
- ).map do |v|
25
- uppers = v.xpath('gml:upperCorner', 'gml' => GMLNS).text.split
26
- lowers = v.xpath('gml:lowerCorner', 'gml' => GMLNS).text.split
27
- "ENVELOPE(#{lowers[0]}, #{uppers[0]}, #{uppers[1]}, #{lowers[1]})"
28
- end
21
+ .xpath(
22
+ '//rdf:RDF/rdf:Description/gml:boundedBy/gml:Envelope',
23
+ 'gml' => GMLNS,
24
+ 'rdf' => 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'
25
+ ).map do |v|
26
+ uppers = v.xpath('gml:upperCorner', 'gml' => GMLNS).text.split
27
+ lowers = v.xpath('gml:lowerCorner', 'gml' => GMLNS).text.split
28
+ "ENVELOPE(#{lowers[0]}, #{uppers[0]}, #{uppers[1]}, #{lowers[1]})"
29
+ end
29
30
  rescue RuntimeError => e
30
31
  logger.warn "failure parsing <extension> element: #{e.message}"
31
32
  []
32
33
  end
33
34
 
35
+ # @return [Array{String}] values suitable for solr SRPT fields, like "-16.0 28.0"
36
+ # @note example xml leaf nodes
37
+ # <gml:pos>-122.191292 37.4063388</gml:pos>
38
+ def geo_extensions_point_data
39
+ mods_ng_xml.extension
40
+ .xpath(
41
+ '//rdf:RDF/rdf:Description/gmd:centerPoint/gml:Point[gml:pos]',
42
+ 'gml' => GMLNS,
43
+ 'gmd' => 'http://www.isotc211.org/2005/gmd',
44
+ 'rdf' => 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'
45
+ ).map do |v|
46
+ lat, long = v.xpath('gml:pos', 'gml' => GMLNS).text.split
47
+ "#{long} #{lat}"
48
+ end
49
+ end
50
+
34
51
  # @return [Array{Stanford::Mods::Coordinate}] valid coordinates as objects
35
52
  def coordinates_objects
36
53
  coordinates.map { |n| Stanford::Mods::Coordinate.new(n) }.select(&:valid?)
@@ -47,6 +64,6 @@ module Stanford
47
64
  end
48
65
 
49
66
  alias point_bbox coordinates_as_bbox
50
- end # class Record
51
- end # Module Mods
52
- end # Module Stanford
67
+ end
68
+ end
69
+ end
@@ -13,10 +13,9 @@ module Stanford
13
13
  # return pub year as an Integer
14
14
  # prefer dateIssued (any) before dateCreated (any) before dateCaptured (any)
15
15
  # look for a keyDate and use it if there is one; otherwise pick earliest date
16
- # @param [Boolean] ignore_approximate true if approximate dates (per qualifier attribute)
17
- # should be ignored; false if approximate dates should be included
16
+ # @param [Boolean] ignore_approximate true if approximate dates (per qualifier attribute) should be ignored; false if approximate dates should be included
18
17
  # @return [Integer] publication year as an Integer
19
- # note that for sorting 5 B.C. => -5; 666 B.C. => -666
18
+ # @note for sorting: 5 B.C. => -5; 666 B.C. => -666
20
19
  def pub_year_int(ignore_approximate = false)
21
20
  single_pub_year(ignore_approximate, :year_int)
22
21
  end
@@ -24,11 +23,10 @@ module Stanford
24
23
  # return a single string intended for lexical sorting for pub date
25
24
  # prefer dateIssued (any) before dateCreated (any) before dateCaptured (any)
26
25
  # look for a keyDate and use it if there is one; otherwise pick earliest date
27
- # @param [Boolean] ignore_approximate true if approximate dates (per qualifier attribute)
28
- # should be ignored; false if approximate dates should be included
26
+ # @param [Boolean] ignore_approximate true if approximate dates (per qualifier attribute) should be ignored; false if approximate dates should be included
29
27
  # @return [String] single String containing publication year for lexical sorting
30
- # note that for string sorting 5 B.C. = -5 => -995; 6 B.C. => -994 so 6 B.C. sorts before 5 B.C.
31
- # @deprecated use pub_year_int
28
+ # @note for string sorting 5 B.C. = -5 => -995; 6 B.C. => -994, so 6 B.C. sorts before 5 B.C.
29
+ # @deprecated use pub_year_int
32
30
  def pub_year_sort_str(ignore_approximate = false)
33
31
  single_pub_year(ignore_approximate, :year_sort_str)
34
32
  end
@@ -186,8 +184,7 @@ module Stanford
186
184
  result = send(method_sym, date_issued_elements(ignore_approximate))
187
185
  result ||= send(method_sym, date_created_elements(ignore_approximate))
188
186
  # dateCaptured for web archive seed records
189
- result ||= send(method_sym, mods_ng_xml.origin_info.dateCaptured.to_a)
190
- result
187
+ result || send(method_sym, mods_ng_xml.origin_info.dateCaptured.to_a)
191
188
  end
192
189
 
193
190
  # given the passed date elements, look for a single keyDate and use it if there is one;
@@ -210,10 +207,9 @@ module Stanford
210
207
  # get earliest parseable year from the passed date elements
211
208
  # @param [Array<Nokogiri::XML::Element>] date_el_array the elements from which to select a pub date
212
209
  # @param [Symbol] method_sym method name in DateParsing, as a symbol
213
- # @return two values:
214
- # the first is either: the lexically sortable String value of the earliest date or the Integer value of same,
215
- # depending on the method_sym passed in
216
- # the second is the original String value of the chosen element
210
+ # @return [Array<String,Integer>] two values: earliest date and the original element string
211
+ # - first is earliest date either as lexically sortable String value or the Integer, depending on method_sym
212
+ # - second is the original String value of the chosen element
217
213
  def earliest_year(date_el_array, method_sym)
218
214
  poss_results = {}
219
215
  date_el_array.each { |el|
@@ -228,8 +224,7 @@ module Stanford
228
224
  # ---- old date parsing methods used downstream of gem; will be deprecated/replaced with new date parsing methods
229
225
 
230
226
  def place
231
- vals = term_values([:origin_info, :place, :placeTerm])
232
- vals
227
+ term_values([:origin_info, :place, :placeTerm])
233
228
  end
234
229
 
235
230
  # Values for the pub date facet. This is less strict than the 4 year date requirements for pub_date
@@ -237,28 +232,18 @@ module Stanford
237
232
  # Spotlight: pub_date field should be replaced by pub_year_w_approx_isi and pub_year_no_approx_isi
238
233
  # SearchWorks: pub_date field used for display in search results and show view; for sorting nearby-on-shelf
239
234
  # these could be done with more approp fields/methods (pub_year_int for sorting; new pub year methods to populate field)
240
- # TODO: prob should deprecate this in favor of pub_year_display_str;
235
+ # TODO: prob should deprecate this in favor of pub_year_display_str;
241
236
  # need head-to-head testing with pub_year_display_str
242
- # @return <Array[String]> with values for the pub date facet
237
+ # @return [String] value for the pub date facet
243
238
  def pub_date_facet
244
- if pub_date
245
- if pub_date.start_with?('-')
246
- return (pub_date.to_i + 1000).to_s + ' B.C.'
247
- end
248
- if pub_date.include? '--'
249
- cent = pub_date[0, 2].to_i
250
- cent += 1
251
- cent = cent.to_s + 'th century'
252
- return cent
253
- else
254
- return pub_date
255
- end
256
- end
257
- nil
239
+ return nil unless pub_date
240
+ return "#{pub_date.to_i + 1000} B.C." if pub_date.start_with?('-')
241
+ return pub_date unless pub_date.include? '--'
242
+ "#{pub_date[0, 2].to_i + 1}th century"
258
243
  end
259
244
 
260
245
  # creates a date suitable for sorting. Guarnteed to be 4 digits or nil
261
- # @deprecated: use pub_year_int, or pub_year_sort_str if you must have a string (why?)
246
+ # @deprecated use pub_year_int, or pub_year_sort_str if you must have a string (why?)
262
247
  def pub_date_sort
263
248
  if pub_date
264
249
  pd = pub_date
@@ -272,14 +257,14 @@ module Stanford
272
257
  # For the date display only, the first place to look is in the dates without encoding=marc array.
273
258
  # If no such dates, select the first date in the dates_marc_encoding array. Otherwise return nil
274
259
  # @return [String] value for the pub_date_display Solr field for this document or nil if none
275
- # @deprecated: DO NOT USE: this is no longer used in SW, Revs or Spotlight Jan 2016
260
+ # @deprecated DO NOT USE: this is no longer used in SW, Revs or Spotlight Jan 2016
276
261
  def pub_date_display
277
262
  return dates_no_marc_encoding.first unless dates_no_marc_encoding.empty?
278
263
  return dates_marc_encoding.first unless dates_marc_encoding.empty?
279
264
  nil
280
265
  end
281
266
 
282
- # ---- old date parsing protected methods will be deprecated/replaced with new date parsing methods (see also DateParsing)
267
+ # old date parsing protected methods to be deprecated/replaced with new methods (see also DateParsing)
283
268
 
284
269
  protected
285
270
 
@@ -292,30 +277,23 @@ module Stanford
292
277
  return @pub_year
293
278
  end
294
279
 
295
- dates = pub_dates
296
- if dates
297
- pruned_dates = []
298
- dates.each do |f_date|
299
- # remove ? and []
300
- if f_date.length == 4 && f_date.end_with?('?')
301
- pruned_dates << f_date.tr('?', '0')
302
- else
303
- pruned_dates << f_date.delete('?[]')
304
- end
280
+ dates = pub_dates.map do |f_date|
281
+ # remove ? and []
282
+ if f_date.length == 4 && f_date.end_with?('?')
283
+ f_date.tr('?', '0')
284
+ else
285
+ f_date.delete('?[]')
305
286
  end
287
+ end
288
+
289
+ if dates
306
290
  # try to find a date starting with the most normal date formats and progressing to more wonky ones
307
- @pub_year = get_plain_four_digit_year pruned_dates
308
- return @pub_year if @pub_year
309
- # Check for years in u notation, e.g., 198u
310
- @pub_year = get_u_year pruned_dates
311
- return @pub_year if @pub_year
312
- @pub_year = get_double_digit_century pruned_dates
313
- return @pub_year if @pub_year
314
- @pub_year = get_bc_year pruned_dates
315
- return @pub_year if @pub_year
316
- @pub_year = get_three_digit_year pruned_dates
317
- return @pub_year if @pub_year
318
- @pub_year = get_single_digit_century pruned_dates
291
+ @pub_year = get_plain_four_digit_year(dates) ||
292
+ get_u_year(dates) || # Check for years in u notation, e.g., 198u
293
+ get_double_digit_century(dates) ||
294
+ get_bc_year(dates) ||
295
+ get_three_digit_year(dates) ||
296
+ get_single_digit_century(dates)
319
297
  return @pub_year if @pub_year
320
298
  end
321
299
  @pub_year = ''
@@ -384,7 +362,6 @@ module Stanford
384
362
  matches = f_date.scan(/\d{4}/)
385
363
  if matches.length == 1
386
364
  @pub_year = matches.first
387
- return matches.first
388
365
  else
389
366
  # when there are multiple matches, check for ones with CE after them
390
367
  matches.each do |match|
@@ -396,8 +373,8 @@ module Stanford
396
373
  return match
397
374
  end
398
375
  end
399
- return matches.first
400
376
  end
377
+ return matches.first
401
378
  end
402
379
  nil
403
380
  end
@@ -8,78 +8,56 @@ module Stanford
8
8
  # Each method here expects to find at most ONE matching element. Subsequent potential matches
9
9
  # are ignored.
10
10
  class Record < ::Mods::Record
11
- # return box number (note: single valued and might be something like 35A)
12
- # data in location/physicalLocation or in relatedItem/location/physicalLocation
13
- # so use _location to get the data from either one of them
14
- # TODO: should it be hierarchical series/box/folder?
11
+ # data in location/physicalLocation or in relatedItem/location/physicalLocation
12
+ # so use _location to get the data from either one of them
13
+ # @return [String] box number (note: single valued and might be something like 35A)
14
+ # @todo should it be hierarchical series/box/folder?
15
15
  def box
16
- # _location.physicalLocation should find top level and relatedItem
17
- box_num = @mods_ng_xml._location.physicalLocation.map do |node|
18
- val = node.text
19
- # note that this will also find Flatbox or Flat-box
20
- match_data = val.match(/Box ?:? ?([^,|(Folder)]+)/i)
21
- match_data[1].strip if match_data.present?
22
- end.compact
23
-
24
- # There should only be one box
25
- box_num.first
16
+ mods_ng_xml._location.physicalLocation.each do |node|
17
+ match_data = node.text.match(/Box ?:? ?([^,|(Folder)]+)/i) # note that this will also find Flatbox or Flat-box
18
+ return match_data[1].strip if match_data.present?
19
+ end
20
+ nil
26
21
  end
27
22
 
28
- # returns folder number (note: single valued)
29
- # data in location/physicalLocation or in relatedItem/location/physicalLocation
30
- # so use _location to get the data from either one of them
31
- # TODO: should it be hierarchical series/box/folder?
23
+ # data in location/physicalLocation or in relatedItem/location/physicalLocation
24
+ # so use _location to get the data from either one of them
25
+ # @return [String] folder number (note: single valued)
26
+ # @todo should it be hierarchical series/box/folder?
32
27
  def folder
33
- # _location.physicalLocation should find top level and relatedItem
34
- folder_num = @mods_ng_xml._location.physicalLocation.map do |node|
28
+ mods_ng_xml._location.physicalLocation.each do |node|
35
29
  val = node.text
36
-
37
- match_data = if val =~ /\|/
38
- # we assume the data is pipe-delimited, and may contain commas within values
39
- val.match(/Folder ?:? ?([^|]+)/)
40
- else
41
- # the data should be comma-delimited, and may not contain commas within values
42
- val.match(/Folder ?:? ?([^,]+)/)
43
- end
44
-
45
- match_data[1].strip if match_data.present?
46
- end.compact
47
-
48
- # There should be one folder
49
- folder_num.first
30
+ match_data = val =~ /\|/ ?
31
+ val.match(/Folder ?:? ?([^|]+)/) : # expect pipe-delimited, may contain commas within values
32
+ val.match(/Folder ?:? ?([^,]+)/) # expect comma-delimited, may NOT contain commas within values
33
+ return match_data[1].strip if match_data.present?
34
+ end
35
+ nil
50
36
  end
51
37
 
52
- # return entire contents of physicalLocation as a string (note: single valued)
53
- # but only if it has series, accession, box or folder data
54
- # data in location/physicalLocation or in relatedItem/location/physicalLocation
55
- # so use _location to get the data from either one of them
56
- # TODO: should it be hierarchical series/box/folder?
57
- # NOTE: there is a "physicalLocation" and a "location" method defined in the mods gem, so we cannot use these names to avoid conflicts
38
+ # but only if it has series, accession, box or folder data
39
+ # data in location/physicalLocation or in relatedItem/location/physicalLocation
40
+ # so use _location to get the data from either one of them
41
+ # @return [String] entire contents of physicalLocation as a string (note: single valued)
42
+ # @note there is a "physicalLocation" and a "location" method defined in the mods gem, so we cannot use these names to avoid conflicts
43
+ # @todo should it be hierarchical series/box/folder?
58
44
  def physical_location_str
59
- # _location.physicalLocation should find top level and relatedItem
60
- loc = @mods_ng_xml._location.physicalLocation.map do |node|
61
- node.text if node.text =~ /.*(Series)|(Accession)|(Folder)|(Box).*/i
62
- end.compact
63
-
64
- # There should only be one location
65
- loc.first
45
+ mods_ng_xml._location.physicalLocation.map(&:text).find do |text|
46
+ text =~ /.*(Series)|(Accession)|(Folder)|(Box).*/i
47
+ end
66
48
  end
67
49
 
68
- # return series/accession 'number' (note: single valued)
69
- # data in location/physicalLocation or in relatedItem/location/physicalLocation
70
- # so use _location to get the data from either one of them
71
- # TODO: should it be hierarchical series/box/folder?
50
+ # data in location/physicalLocation or in relatedItem/location/physicalLocation
51
+ # so use _location to get the data from either one of them
52
+ # @return [String] series/accession 'number' (note: single valued)
53
+ # @todo should it be hierarchical series/box/folder?
72
54
  def series
73
- # _location.physicalLocation should find top level and relatedItem
74
- series_num = @mods_ng_xml._location.physicalLocation.map do |node|
75
- val = node.text
55
+ mods_ng_xml._location.physicalLocation.each do |node|
76
56
  # feigenbaum uses 'Accession'
77
- match_data = val.match(/(?:(?:Series)|(?:Accession)):? ([^,|]+)/i)
78
- match_data[1].strip if match_data.present?
79
- end.compact
80
-
81
- # There should be only one series
82
- series_num.first
57
+ match_data = node.text.match(/(?:(?:Series)|(?:Accession)):? ([^,|]+)/i)
58
+ return match_data[1].strip if match_data.present?
59
+ end
60
+ nil
83
61
  end
84
62
  end # class Record
85
63
  end # Module Mods
@@ -16,21 +16,15 @@ module Stanford
16
16
  result = term_values([:subject, :geographic]) || []
17
17
 
18
18
  # hierarchicalGeographic has sub elements
19
- @mods_ng_xml.subject.hierarchicalGeographic.each { |hg_node|
20
- hg_vals = []
21
- hg_node.element_children.each { |e|
22
- hg_vals << e.text unless e.text.empty?
23
- }
19
+ mods_ng_xml.subject.hierarchicalGeographic.each { |hg_node|
20
+ hg_vals = hg_node.element_children.map(&:text).reject(&:empty?)
24
21
  result << hg_vals.join(sep) unless hg_vals.empty?
25
22
  }
26
23
 
27
- trans_code_vals = @mods_ng_xml.subject.geographicCode.translated_value
28
- if trans_code_vals
29
- trans_code_vals.each { |val|
30
- result << val unless result.include?(val)
31
- }
32
- end
33
-
24
+ trans_code_vals = mods_ng_xml.subject.geographicCode.translated_value || []
25
+ trans_code_vals.each { |val|
26
+ result << val unless result.include?(val)
27
+ }
34
28
  result
35
29
  end
36
30
 
@@ -40,12 +34,11 @@ module Stanford
40
34
  # @param [String] sep - the separator string for joining namePart sub elements
41
35
  # @return [Array<String>] values for names inside subject elements or [] if none
42
36
  def sw_subject_names(sep = ', ')
43
- result = []
44
- @mods_ng_xml.subject.name_el.select { |n_el| n_el.namePart }.each { |name_el_w_np|
45
- parts = name_el_w_np.namePart.map { |npn| npn.text unless npn.text.empty? }.compact
46
- result << parts.join(sep).strip unless parts.empty?
47
- }
48
- result
37
+ mods_ng_xml.subject.name_el
38
+ .select { |n_el| n_el.namePart }
39
+ .map { |name_el_w_np| name_el_w_np.namePart.map(&:text).reject(&:empty?) }
40
+ .reject(&:empty?)
41
+ .map { |parts| parts.join(sep).strip }
49
42
  end
50
43
 
51
44
  # Values are the contents of:
@@ -54,8 +47,8 @@ module Stanford
54
47
  # @return [Array<String>] values for titles inside subject elements or [] if none
55
48
  def sw_subject_titles(sep = ' ')
56
49
  result = []
57
- @mods_ng_xml.subject.titleInfo.each { |ti_el|
58
- parts = ti_el.element_children.map { |el| el.text unless el.text.empty? }.compact
50
+ mods_ng_xml.subject.titleInfo.each { |ti_el|
51
+ parts = ti_el.element_children.map(&:text).reject(&:empty?)
59
52
  result << parts.join(sep).strip unless parts.empty?
60
53
  }
61
54
  result
@@ -85,10 +78,7 @@ module Stanford
85
78
  vals.concat(subject_names) if subject_names
86
79
  vals.concat(subject_titles) if subject_titles
87
80
  vals.concat(subject_occupations) if subject_occupations
88
- vals.map! { |val|
89
- v = val.sub(/[\\,;]$/, '')
90
- v.strip
91
- }
81
+ vals.map! { |val| val.sub(/[\\,;]$/, '').strip }
92
82
  vals.empty? ? nil : vals
93
83
  end
94
84
 
@@ -119,9 +109,8 @@ module Stanford
119
109
  codes = term_values([:subject, :geographicCode])
120
110
  if codes && codes.size > xvals.size
121
111
  subject.geographicCode.each { |n|
122
- if n.authority != 'marcgac' && n.authority != 'marccountry'
123
- sw_logger.info("#{druid} has subject geographicCode element with untranslated encoding (#{n.authority}): #{n.to_xml}")
124
- end
112
+ next unless n.authority != 'marcgac' && n.authority != 'marccountry'
113
+ sw_logger.info("#{druid} has subject geographicCode element with untranslated encoding (#{n.authority}): #{n.to_xml}")
125
114
  }
126
115
  end
127
116
 
@@ -1,6 +1,6 @@
1
1
  module Stanford
2
2
  module Mods
3
3
  # this is the Ruby Gem version
4
- VERSION = "2.3.1".freeze
4
+ VERSION = "2.4.0".freeze
5
5
  end
6
6
  end
@@ -98,7 +98,7 @@ describe '#geo_extension_as_envelope' do
98
98
  expect(mods.geo_extensions_as_envelope).to eq []
99
99
  end
100
100
 
101
- describe 'with data' do
101
+ describe 'with geo extension bounding-box data' do
102
102
  let(:modsbody) do
103
103
  <<-EOF
104
104
  <extension displayLabel="geo">
@@ -128,4 +128,28 @@ describe '#geo_extension_as_envelope' do
128
128
  expect(mods.geo_extensions_as_envelope).to eq ["ENVELOPE(-122.191292, -122.149475, 37.4435369, 37.4063388)"]
129
129
  end
130
130
  end
131
+
132
+ describe 'with geo-extension point data' do
133
+ let(:modsbody) do
134
+ <<-EOF
135
+ <extension displayLabel="geo">
136
+ <rdf:RDF xmlns:gml="http://www.opengis.net/gml/3.2/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:gmd="http://www.isotc211.org/2005/gmd">
137
+ <rdf:Description rdf:about="http://www.stanford.edu/cm896kp1291">
138
+ <dc:format>image/jpeg</dc:format>
139
+ <dc:type>Image</dc:type>
140
+ <gmd:centerPoint>
141
+ <gml:Point gml:id="ID">
142
+ <gml:pos>41.8898687280593 12.4913412520789</gml:pos>
143
+ </gml:Point>
144
+ </gmd:centerPoint>
145
+ </rdf:Description>
146
+ </rdf:RDF>
147
+ </extension>
148
+ EOF
149
+ end
150
+
151
+ it 'extract point strings' do
152
+ expect(mods.geo_extensions_point_data).to eq ["12.4913412520789 41.8898687280593"]
153
+ end
154
+ end
131
155
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stanford-mods
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naomi Dushay
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-09-22 00:00:00.000000000 Z
12
+ date: 2017-01-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mods
@@ -177,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
177
177
  version: '0'
178
178
  requirements: []
179
179
  rubyforge_project:
180
- rubygems_version: 2.5.1
180
+ rubygems_version: 2.5.2
181
181
  signing_key:
182
182
  specification_version: 4
183
183
  summary: Stanford specific wrangling of MODS metadata