mods 2.3.0 → 3.0.0.alpha1
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 +5 -5
- data/.github/workflows/ruby.yml +24 -0
- data/.gitignore +1 -0
- data/Gemfile +1 -5
- data/README.md +1 -3
- data/lib/mods/marc_country_codes.rb +12 -10
- data/lib/mods/nom_terminology.rb +109 -848
- data/lib/mods/origin_info.rb +3 -1
- data/lib/mods/reader.rb +9 -39
- data/lib/mods/record.rb +13 -28
- data/lib/mods/version.rb +1 -1
- data/mods.gemspec +4 -4
- data/spec/fixture_data/hp566jq8781.xml +334 -0
- data/spec/integration/parker_spec.rb +217 -0
- data/spec/{date_spec.rb → lib/date_spec.rb} +0 -0
- data/spec/lib/language_spec.rb +123 -0
- data/spec/lib/location_spec.rb +175 -0
- data/spec/lib/name_spec.rb +366 -0
- data/spec/lib/origin_info_spec.rb +134 -0
- data/spec/lib/part_spec.rb +162 -0
- data/spec/lib/physical_description_spec.rb +72 -0
- data/spec/{reader_spec.rb → lib/reader_spec.rb} +1 -41
- data/spec/lib/record_info_spec.rb +114 -0
- data/spec/lib/record_spec.rb +287 -0
- data/spec/lib/related_item_spec.rb +124 -0
- data/spec/lib/subject_spec.rb +427 -0
- data/spec/lib/title_spec.rb +108 -0
- data/spec/lib/top_level_elmnts_simple_spec.rb +169 -0
- data/spec/spec_helper.rb +87 -6
- data/spec/support/fixtures.rb +9 -0
- metadata +65 -47
- data/.coveralls.yml +0 -1
- data/.travis.yml +0 -12
- data/spec/language_spec.rb +0 -118
- data/spec/location_spec.rb +0 -295
- data/spec/name_spec.rb +0 -759
- data/spec/origin_info_spec.rb +0 -442
- data/spec/part_spec.rb +0 -471
- data/spec/physical_description_spec.rb +0 -144
- data/spec/record_info_spec.rb +0 -493
- data/spec/record_spec.rb +0 -356
- data/spec/related_item_spec.rb +0 -305
- data/spec/subject_spec.rb +0 -809
- data/spec/title_spec.rb +0 -226
- data/spec/top_level_elmnts_simple_spec.rb +0 -369
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 58a2e2e97e06da6d141ec207b55af9a95a651590b6c5b5e1d6e79d29e717c902
|
4
|
+
data.tar.gz: 608a6c50337ce64b7c0472f2a0f852a8d25adba44429a5d3be47d58eed58cfa5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fb07b17da4a3e0b7aaf9a5bda6ba9e719cb370298eabe1da75bcfc9ea57c0f76889ffaf16d81d2946b38885d34b1338b23e6448dfccd6dd4d2d677c21ac6aba
|
7
|
+
data.tar.gz: c125714df2b9764306b540fe762fa4c72e3e0cc1089beefa44add644117681e0b2a182f70bcebc25b60c0f69917305857bde6476ff8f893f016aeb83dc303de8
|
@@ -0,0 +1,24 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
tests:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
strategy:
|
13
|
+
matrix:
|
14
|
+
ruby: [jruby-9.3.2.0, 2.7, '3.0', 3.1]
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v2
|
17
|
+
- name: Set up Ruby
|
18
|
+
uses: ruby/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
ruby-version: ${{ matrix.ruby }}
|
21
|
+
- name: Install dependencies
|
22
|
+
run: bundle install
|
23
|
+
- name: Run tests
|
24
|
+
run: bundle exec rake
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
@@ -3,10 +3,6 @@ source 'https://rubygems.org'
|
|
3
3
|
# See mods.gemspec for this gem's dependencies
|
4
4
|
gemspec
|
5
5
|
|
6
|
-
group :test do
|
7
|
-
gem 'coveralls', require: false
|
8
|
-
end
|
9
|
-
|
10
6
|
# Pin to activesupport 4.x for older versions of ruby
|
11
7
|
gem 'activesupport', '~> 4.2' if RUBY_VERSION < '2.2.2'
|
12
|
-
gem 'byebug'
|
8
|
+
gem 'byebug', platform: :mri
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# Mods
|
2
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
|
3
|
+
[<img src="https://secure.travis-ci.org/sul-dlss/mods.png?branch=master" alt="Build Status"/>](http://travis-ci.org/sul-dlss/mods) [](https://codeclimate.com/github/sul-dlss/mods/coverage) [<img
|
6
4
|
src="https://badge.fury.io/rb/mods.svg" alt="Gem Version"/>](http://badge.fury.io/rb/mods)
|
7
5
|
|
8
6
|
A Gem to parse MODS (Metadata Object Description Schema) records. More information about MODS can be found at
|
@@ -1,8 +1,8 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
|
3
1
|
# Represents the Marc Country Codes mapped to names, from http://www.loc.gov/marc/countries/countries_code.html 2013-01-03
|
4
|
-
#key - Marc Country code
|
5
|
-
#value - Marc Country term
|
2
|
+
# key - Marc Country code
|
3
|
+
# value - Marc Country term
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
6
|
MARC_COUNTRY = {
|
7
7
|
'aa' => "Albania",
|
8
8
|
'abc' => "Alberta",
|
@@ -11,7 +11,6 @@ MARC_COUNTRY = {
|
|
11
11
|
'ae' => "Algeria",
|
12
12
|
'af' => "Afghanistan",
|
13
13
|
'ag' => "Argentina",
|
14
|
-
#'ai' => "Anguilla", # discontinued
|
15
14
|
'ai' => "Armenia (Republic)",
|
16
15
|
'air' => "Armenian S.S.R.", # discontinued
|
17
16
|
'aj' => "Azerbaijan",
|
@@ -40,7 +39,7 @@ MARC_COUNTRY = {
|
|
40
39
|
'bi' => "British Indian Ocean Territory",
|
41
40
|
'bl' => "Brazil",
|
42
41
|
'bm' => "Bermuda Islands",
|
43
|
-
'bn' => "Bosnia and
|
42
|
+
'bn' => "Bosnia and Herzegovina",
|
44
43
|
'bo' => "Bolivia",
|
45
44
|
'bp' => "Solomon Islands",
|
46
45
|
'br' => "Burma",
|
@@ -74,7 +73,7 @@ MARC_COUNTRY = {
|
|
74
73
|
'cs' => "Czechoslovakia", # discontinued
|
75
74
|
'ctu' => "Connecticut",
|
76
75
|
'cu' => "Cuba",
|
77
|
-
'cv' => "
|
76
|
+
'cv' => "Cabo Verde",
|
78
77
|
'cw' => "Cook Islands",
|
79
78
|
'cx' => "Central African Republic",
|
80
79
|
'cy' => "Cyprus",
|
@@ -109,6 +108,7 @@ MARC_COUNTRY = {
|
|
109
108
|
'gb' => "Kiribati",
|
110
109
|
'gd' => "Grenada",
|
111
110
|
'ge' => "Germany (East)", # discontinued
|
111
|
+
'gg' => "Guernsey",
|
112
112
|
'gh' => "Ghana",
|
113
113
|
'gi' => "Gibraltar",
|
114
114
|
'gl' => "Greenland",
|
@@ -137,6 +137,7 @@ MARC_COUNTRY = {
|
|
137
137
|
'ie' => "Ireland",
|
138
138
|
'ii' => "India",
|
139
139
|
'ilu' => "Illinois",
|
140
|
+
'im' => "Isle of Man",
|
140
141
|
'inu' => "Indiana",
|
141
142
|
'io' => "Indonesia",
|
142
143
|
'iq' => "Iraq",
|
@@ -148,6 +149,7 @@ MARC_COUNTRY = {
|
|
148
149
|
'iw' => "Israel-Jordan Demilitarized Zones", # discontinued
|
149
150
|
'iy' => "Iraq-Saudi Arabia Neutral Zone",
|
150
151
|
'ja' => "Japan",
|
152
|
+
'je' => "Jersey",
|
151
153
|
'ji' => "Johnston Atoll",
|
152
154
|
'jm' => "Jamaica",
|
153
155
|
'jn' => "Jan Mayen", # discontinued
|
@@ -284,7 +286,7 @@ MARC_COUNTRY = {
|
|
284
286
|
'snc' => "Saskatchewan",
|
285
287
|
'so' => "Somalia",
|
286
288
|
'sp' => "Spain",
|
287
|
-
'sq' => "
|
289
|
+
'sq' => "Eswatini",
|
288
290
|
'sr' => "Surinam",
|
289
291
|
'ss' => "Western Sahara",
|
290
292
|
'st' => "Saint-Martin",
|
@@ -365,7 +367,7 @@ MARC_COUNTRY = {
|
|
365
367
|
'xk' => "Saint Lucia",
|
366
368
|
'xl' => "Saint Pierre and Miquelon",
|
367
369
|
'xm' => "Saint Vincent and the Grenadines",
|
368
|
-
'xn' => "Macedonia",
|
370
|
+
'xn' => "North Macedonia",
|
369
371
|
'xna' => "New South Wales",
|
370
372
|
'xo' => "Slovakia",
|
371
373
|
'xoa' => "Northern Territory",
|
@@ -384,4 +386,4 @@ MARC_COUNTRY = {
|
|
384
386
|
'ys' => "Yemen (People's Democratic Republic)", # discontinued
|
385
387
|
'yu' => "Serbia and Montenegro", # discontinued
|
386
388
|
'za' => "Zambia"
|
387
|
-
}
|
389
|
+
}.freeze
|