mods 0.0.17 → 0.0.18

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.
@@ -1,6 +1,7 @@
1
1
  = Mods
2
2
 
3
3
  {<img src="https://secure.travis-ci.org/sul-dlss/mods.png?branch=master" alt="Build Status" />}[http://travis-ci.org/sul-dlss/mods]
4
+ {<img src="https://gemnasium.com/sul-dlss/mods.png" alt="Dependency Status" />}[https://gemnasium.com/sul-dlss/mods]
4
5
 
5
6
  A Gem to parse MODS (Metadata Object Description Schema) records. More information about MODS can be found at http://www.loc.gov/standards/mods/registry.php.
6
7
 
@@ -37,6 +38,7 @@ TODO: Write usage instructions here
37
38
 
38
39
  == Releases
39
40
 
41
+ * <b>0.0.18</b> <subject><temporal> cannot have subelements
40
42
  * <b>0.0.17</b> add display_value and display_value_w_date to name node; add personal_names_w_dates to record
41
43
  * <b>0.0.16</b> add role convenience methods (within name node)
42
44
  * <b>0.0.15</b> make namespace aware processing the default
@@ -9,7 +9,7 @@ module Mods
9
9
  DATE_ATTRIBS = ['encoding', 'point', 'keyDate', 'qualifier']
10
10
  ENCODING_ATTRIB_VALUES = ['w3cdtf', 'iso8601', 'marc', 'edtf', 'temper']
11
11
  POINT_ATTRIB_VALUES = ['start', 'end']
12
- KEY_DATE_ATTRIB_VALUEs = ['yes']
12
+ KEY_DATE_ATTRIB_VALUES = ['yes']
13
13
  QUALIFIER_ATTRIB_VALUES = ['approximate', 'inferred', 'questionable']
14
14
 
15
15
  AUTHORITY_ATTRIBS = ['authority', 'authorityURI', 'valueURI']
@@ -425,10 +425,6 @@ module Mods
425
425
  }
426
426
  end
427
427
  n.temporal :path => 'm:temporal' do |n1|
428
- # date attributes as elements
429
- Mods::DATE_ATTRIBS.each { |attr_name|
430
- n1.send attr_name, :path => "#{attr_name}"
431
- }
432
428
  Mods::AUTHORITY_ATTRIBS.each { |attr_name|
433
429
  n1.send attr_name, :path => "@#{attr_name}", :accessor => lambda { |a| a.text }
434
430
  }
@@ -969,10 +965,6 @@ module Mods
969
965
  }
970
966
  end
971
967
  n.temporal :path => 'temporal' do |n1|
972
- # date attributes as elements
973
- Mods::DATE_ATTRIBS.each { |attr_name|
974
- n1.send attr_name, :path => "#{attr_name}"
975
- }
976
968
  Mods::AUTHORITY_ATTRIBS.each { |attr_name|
977
969
  n1.send attr_name, :path => "@#{attr_name}", :accessor => lambda { |a| a.text }
978
970
  }
@@ -81,26 +81,20 @@ module Mods
81
81
  # @return Array of Strings, each containing the computed display value of a personal name
82
82
  # (see nom_terminology for algorithm)
83
83
  def personal_names
84
- @mods_ng_xml.personal_name.map { |n|
85
- n.display_value
86
- }
84
+ @mods_ng_xml.personal_name.map { |n| n.display_value }
87
85
  end
88
86
 
89
87
  # @return Array of Strings, each containing the computed display value of a personal name
90
88
  # (see nom_terminology for algorithm)
91
89
  def personal_names_w_dates
92
- @mods_ng_xml.personal_name.map { |n|
93
- n.display_value_w_date
94
- }
90
+ @mods_ng_xml.personal_name.map { |n| n.display_value_w_date }
95
91
  end
96
92
 
97
93
  # use the displayForm of a corporate name if present
98
94
  # otherwise, return all nameParts concatenated together
99
95
  # @return Array of Strings, each containing the above described string
100
96
  def corporate_names
101
- @mods_ng_xml.corporate_name.map { |n|
102
- n.display_value
103
- }
97
+ @mods_ng_xml.corporate_name.map { |n| n.display_value }
104
98
  end
105
99
 
106
100
  # Translates iso-639 language codes, and leaves everything else alone.
@@ -1,4 +1,4 @@
1
1
  module Mods
2
2
  # this is the Ruby Gem version
3
- VERSION = "0.0.17"
3
+ VERSION = "0.0.18"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mods
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17
4
+ version: 0.0.18
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-12-20 00:00:00.000000000 Z
13
+ date: 2013-01-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: nokogiri
@@ -230,7 +230,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
230
230
  version: '0'
231
231
  segments:
232
232
  - 0
233
- hash: 3977666186634091349
233
+ hash: 1014279353675064863
234
234
  required_rubygems_version: !ruby/object:Gem::Requirement
235
235
  none: false
236
236
  requirements:
@@ -239,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
239
239
  version: '0'
240
240
  segments:
241
241
  - 0
242
- hash: 3977666186634091349
242
+ hash: 1014279353675064863
243
243
  requirements: []
244
244
  rubyforge_project:
245
245
  rubygems_version: 1.8.24