mods 2.0.3 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -8
- data/Gemfile +4 -1
- data/README.md +83 -0
- data/lib/mods/version.rb +1 -1
- data/mods.gemspec +2 -2
- metadata +7 -8
- data/README.rdoc +0 -74
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 647ec59551ee3659ad2773521607be33a427e17d
|
4
|
+
data.tar.gz: 8db65d1df9ce8ed378a65fbceff90cb3b9fa8b7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c403fba107f834d3e57a173aaf28762a82cc815b66ba08df1c63610e4ce20197d545d88f06f67f50ae80039da1aff7d5b18912564c5f5a8ff270dd435e82d3ad
|
7
|
+
data.tar.gz: e063dc8a2fdc7a039c8eac7723409369d2473938b972653ac53ef27839d7cc2a5bee82912068effc340a3588811169b51e61ac518748065f7afd43f27755bea4
|
data/.travis.yml
CHANGED
@@ -1,14 +1,9 @@
|
|
1
1
|
language: ruby
|
2
2
|
script: rake rspec
|
3
3
|
rvm:
|
4
|
-
- 2.
|
5
|
-
- 2.
|
6
|
-
- 2.
|
7
|
-
- 1.9.3
|
8
|
-
- ruby-head
|
9
|
-
- jruby-1.7.9-d19 # fails after 1.7.10 for some reason
|
10
|
-
# - jruby-19mode # JRuby in 1.9 mode
|
11
|
-
# - jruby-head
|
4
|
+
- 2.3.1
|
5
|
+
- 2.2.5
|
6
|
+
- 2.1.2
|
12
7
|
notifications:
|
13
8
|
email:
|
14
9
|
- ndushay@stanford.edu
|
data/Gemfile
CHANGED
data/README.md
ADDED
@@ -0,0 +1,83 @@
|
|
1
|
+
# Mods
|
2
|
+
|
3
|
+
[<img src="https://secure.travis-ci.org/sul-dlss/mods.png?branch=master" alt="Build Status"/>](http://travis-ci.org/sul-dlss/mods) [<img
|
4
|
+
src="https://coveralls.io/repos/sul-dlss/mods/badge.png" alt="Coverage Status"/>](https://coveralls.io/r/sul-dlss/mods) [<img
|
5
|
+
src="https://gemnasium.com/sul-dlss/mods.png" alt="Dependency Status"/>](https://gemnasium.com/sul-dlss/mods) [<img
|
6
|
+
src="https://badge.fury.io/rb/mods.svg" alt="Gem Version"/>](http://badge.fury.io/rb/mods)
|
7
|
+
|
8
|
+
A Gem to parse MODS (Metadata Object Description Schema) records. More information about MODS can be found at
|
9
|
+
[Library of Congress](http://www.loc.gov/standards/mods/registry.php).
|
10
|
+
|
11
|
+
Source code at [github](https://github.com/sul-dlss/mods/)
|
12
|
+
|
13
|
+
Generated API docs at [rubydoc.info](http://rubydoc.info/github/sul-dlss/mods/)
|
14
|
+
|
15
|
+
## Installation
|
16
|
+
|
17
|
+
Add this line to your application's Gemfile:
|
18
|
+
|
19
|
+
gem 'mods'
|
20
|
+
|
21
|
+
And then execute:
|
22
|
+
|
23
|
+
$ bundle
|
24
|
+
|
25
|
+
Or install it yourself as:
|
26
|
+
|
27
|
+
$ gem install mods
|
28
|
+
|
29
|
+
## Usage
|
30
|
+
|
31
|
+
Create a new Mods::Record from a url:
|
32
|
+
```ruby
|
33
|
+
foo = Mods::Record.new.from_url('http://purl.stanford.edu/bb340tm8592.mods')
|
34
|
+
```
|
35
|
+
|
36
|
+
Create a new Mods::Record from a file:
|
37
|
+
```ruby
|
38
|
+
foo = Mods::Record.new.from_file('/path/to/mods/file.xml')
|
39
|
+
```
|
40
|
+
|
41
|
+
## Contributing
|
42
|
+
|
43
|
+
1. Fork it
|
44
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
45
|
+
3. Write code and tests.
|
46
|
+
4. Commit your changes (`git commit -am 'Added some feature'`)
|
47
|
+
5. Push to the branch (`git push origin my-new-feature`)
|
48
|
+
6. Create new Pull Request
|
49
|
+
|
50
|
+
## Releases
|
51
|
+
|
52
|
+
* (see git commit history for more recent info)
|
53
|
+
* **2.0.1** Fixed nokogiri issue so no need to pin version number
|
54
|
+
* **2.0.0** Pinned version of nokogiri to < 1.6.6 because of addition of
|
55
|
+
Node#lang in 1.6.6.1 which conflicts which currently used nodes
|
56
|
+
* **1.0.0** change jruby version in .travis to 1.7.9-d19; doesn't work with version 1.7.10
|
57
|
+
* **0.0.23** minor bug and typo fixes
|
58
|
+
* **0.0.22** add displayLabel and lang attributes to every element
|
59
|
+
* **0.0.21** bug fix to check for nil values in name nodes
|
60
|
+
* **0.0.21** Check for the possibility that name_node.display_value is nil
|
61
|
+
* **0.0.20** added translated_value convenience method to geographicCode
|
62
|
+
(mods.subject.geographicCode.translated_value)
|
63
|
+
* **0.0.19** term_values and term_value method added to Record object
|
64
|
+
* **0.0.18** <subject><temporal> cannot have subelements
|
65
|
+
* **0.0.17** add display_value and display_value_w_date to name node; add
|
66
|
+
personal_names_w_dates to record
|
67
|
+
* **0.0.16** add role convenience methods (within name node)
|
68
|
+
* **0.0.15** make namespace aware processing the default
|
69
|
+
* **0.0.14** don't lose xml encoding in reader.normalize_mods under jruby
|
70
|
+
* **0.0.13** really really fix removal of xsi:schemaLocation in jruby
|
71
|
+
* **0.0.12** fix failing jruby test
|
72
|
+
* **0.0.11** fix remove xsi:schemaLocation attribute from mods element when not using namespaces
|
73
|
+
* **0.0.10** remove xsi:schemaLocation attribute from mods element when not using namespaces
|
74
|
+
* **0.0.9** implement from_nk_node as way to load record object
|
75
|
+
* **0.0.8** implement relatedItem and attributes on all simple top level elements
|
76
|
+
* **0.0.7** implement part
|
77
|
+
* **0.0.6** implement recordInfo, fix to work under jruby
|
78
|
+
* **0.0.5** implement subject, change a few constants
|
79
|
+
* **0.0.4** implement language, location, origin_info, physical_description
|
80
|
+
* **0.0.3** use nom-xml gem and make this more nokogiri-ish; implement name,
|
81
|
+
title, and simple top level elements with no subelements
|
82
|
+
* **0.0.2** Set up rake tasks, publishing rdoc, and continuous integration.
|
83
|
+
* **0.0.1** Grab the name
|
data/lib/mods/version.rb
CHANGED
data/mods.gemspec
CHANGED
@@ -10,14 +10,14 @@ Gem::Specification.new do |gem|
|
|
10
10
|
gem.summary = "Parse MODS (Metadata Object Description Schema) records."
|
11
11
|
gem.homepage = "https://github.com/sul-dlss/mods"
|
12
12
|
|
13
|
-
gem.extra_rdoc_files = ["LICENSE", "README.
|
13
|
+
gem.extra_rdoc_files = ["LICENSE", "README.md"]
|
14
14
|
gem.files = `git ls-files`.split($\)
|
15
15
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
16
16
|
gem.test_files = gem.files.grep(%r{^spec/})
|
17
17
|
gem.require_paths = ["lib"]
|
18
18
|
|
19
19
|
gem.add_dependency 'nokogiri'
|
20
|
-
gem.add_dependency 'nom-xml', '~> 0.
|
20
|
+
gem.add_dependency 'nom-xml', '~> 0.6.0'
|
21
21
|
gem.add_dependency 'iso-639'
|
22
22
|
|
23
23
|
# Runtime dependencies
|
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: 2.0
|
4
|
+
version: 2.1.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:
|
12
|
+
date: 2016-09-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
@@ -31,14 +31,14 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 0.
|
34
|
+
version: 0.6.0
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 0.
|
41
|
+
version: 0.6.0
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: iso-639
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -132,7 +132,7 @@ executables: []
|
|
132
132
|
extensions: []
|
133
133
|
extra_rdoc_files:
|
134
134
|
- LICENSE
|
135
|
-
- README.
|
135
|
+
- README.md
|
136
136
|
files:
|
137
137
|
- ".coveralls.yml"
|
138
138
|
- ".gitignore"
|
@@ -141,7 +141,7 @@ files:
|
|
141
141
|
- ".yardopts"
|
142
142
|
- Gemfile
|
143
143
|
- LICENSE
|
144
|
-
- README.
|
144
|
+
- README.md
|
145
145
|
- Rakefile
|
146
146
|
- lib/mods.rb
|
147
147
|
- lib/mods/constants.rb
|
@@ -190,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
190
|
version: '0'
|
191
191
|
requirements: []
|
192
192
|
rubyforge_project:
|
193
|
-
rubygems_version: 2.
|
193
|
+
rubygems_version: 2.5.1
|
194
194
|
signing_key:
|
195
195
|
specification_version: 4
|
196
196
|
summary: Parse MODS (Metadata Object Description Schema) records.
|
@@ -210,4 +210,3 @@ test_files:
|
|
210
210
|
- spec/subject_spec.rb
|
211
211
|
- spec/title_spec.rb
|
212
212
|
- spec/top_level_elmnts_simple_spec.rb
|
213
|
-
has_rdoc:
|
data/README.rdoc
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
= Mods
|
2
|
-
|
3
|
-
{<img src="https://secure.travis-ci.org/sul-dlss/mods.png?branch=master" alt="Build Status" />}[http://travis-ci.org/sul-dlss/mods] {<img src="https://coveralls.io/repos/sul-dlss/mods/badge.png" alt="Coverage Status" />}[https://coveralls.io/r/sul-dlss/mods] {<img src="https://gemnasium.com/sul-dlss/mods.png" alt="Dependency Status" />}[https://gemnasium.com/sul-dlss/mods] {<img src="https://badge.fury.io/rb/mods.svg" alt="Gem Version" />}[http://badge.fury.io/rb/mods]
|
4
|
-
|
5
|
-
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
|
-
Source code at https://github.com/sul-dlss/mods/
|
8
|
-
|
9
|
-
Generated API docs at http://rubydoc.info/github/sul-dlss/mods/
|
10
|
-
|
11
|
-
== Installation
|
12
|
-
|
13
|
-
Add this line to your application's Gemfile:
|
14
|
-
|
15
|
-
gem 'mods'
|
16
|
-
|
17
|
-
And then execute:
|
18
|
-
|
19
|
-
$ bundle
|
20
|
-
|
21
|
-
Or install it yourself as:
|
22
|
-
|
23
|
-
$ gem install mods
|
24
|
-
|
25
|
-
== Usage
|
26
|
-
|
27
|
-
Create a new Mods::Record from a url:
|
28
|
-
|
29
|
-
foo = Mods::Record.new.from_url('http://purl.stanford.edu/bb340tm8592.mods')
|
30
|
-
|
31
|
-
Create a new Mods::Record from a file:
|
32
|
-
|
33
|
-
foo = Mods::Record.new.from_file('/path/to/mods/file.xml')
|
34
|
-
|
35
|
-
== Contributing
|
36
|
-
|
37
|
-
1. Fork it
|
38
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
39
|
-
3. Write code and tests.
|
40
|
-
4. Commit your changes (`git commit -am 'Added some feature'`)
|
41
|
-
5. Push to the branch (`git push origin my-new-feature`)
|
42
|
-
6. Create new Pull Request
|
43
|
-
|
44
|
-
== Releases
|
45
|
-
|
46
|
-
=======
|
47
|
-
* (see git commit history for more recent info)
|
48
|
-
* <b>2.0.1</b> Fixed nokogiri issue so no need to pin version number
|
49
|
-
* <b>2.0.0</b> Pinned version of nokogiri to < 1.6.6 because of addition of Node#lang in 1.6.6.1 which conflicts which currently used nodes
|
50
|
-
* <b>1.0.0</b> change jruby version in .travis to 1.7.9-d19; doesn't work with version 1.7.10
|
51
|
-
* <b>0.0.23</b> minor bug and typo fixes
|
52
|
-
* <b>0.0.22</b> add displayLabel and lang attributes to every element
|
53
|
-
* <b>0.0.21</b> bug fix to check for nil values in name nodes
|
54
|
-
* <b>0.0.21</b> Check for the possibility that name_node.display_value is nil
|
55
|
-
* <b>0.0.20</b> added translated_value convenience method to geographicCode (mods.subject.geographicCode.translated_value)
|
56
|
-
* <b>0.0.19</b> term_values and term_value method added to Record object
|
57
|
-
* <b>0.0.18</b> <subject><temporal> cannot have subelements
|
58
|
-
* <b>0.0.17</b> add display_value and display_value_w_date to name node; add personal_names_w_dates to record
|
59
|
-
* <b>0.0.16</b> add role convenience methods (within name node)
|
60
|
-
* <b>0.0.15</b> make namespace aware processing the default
|
61
|
-
* <b>0.0.14</b> don't lose xml encoding in reader.normalize_mods under jruby
|
62
|
-
* <b>0.0.13</b> really really fix removal of xsi:schemaLocation in jruby
|
63
|
-
* <b>0.0.12</b> fix failing jruby test
|
64
|
-
* <b>0.0.11</b> fix remove xsi:schemaLocation attribute from mods element when not using namespaces
|
65
|
-
* <b>0.0.10</b> remove xsi:schemaLocation attribute from mods element when not using namespaces
|
66
|
-
* <b>0.0.9</b> implement from_nk_node as way to load record object
|
67
|
-
* <b>0.0.8</b> implement relatedItem and attributes on all simple top level elements
|
68
|
-
* <b>0.0.7</b> implement part
|
69
|
-
* <b>0.0.6</b> implement recordInfo, fix to work under jruby
|
70
|
-
* <b>0.0.5</b> implement subject, change a few constants
|
71
|
-
* <b>0.0.4</b> implement language, location, origin_info, physical_description
|
72
|
-
* <b>0.0.3</b> use nom-xml gem and make this more nokogiri-ish; implement name, title, and simple top level elements with no subelements
|
73
|
-
* <b>0.0.2</b> Set up rake tasks, publishing rdoc, and continuous integration.
|
74
|
-
* <b>0.0.1</b> Grab the name
|