traject_umich_format 0.1.1 → 0.1.2
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 +4 -4
- data/ChangeLog.md +6 -0
- data/lib/traject/umich_format/bib_types.rb +18 -19
- data/lib/traject/umich_format/version.rb +1 -1
- 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: 6d411084705b48267f928fb3b54469048cebacc8
|
4
|
+
data.tar.gz: c795fbc6fd5b11e7a7a27dd295df10fb7cf7e13b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e093846baa19ebbc61532e41a049d774ce08432bac0ca510a17c1133ab425716f870a4bf4b4f5e40a8b0f81875b085439b1638ed3b3272beb87e86cd63e3333
|
7
|
+
data.tar.gz: ea0abc902497b4c46c9f403ce865752b3333eadf7712ca0b59aab0205c8cba3e659805c18750a4431e0e2d2488b9306598f8015b5b6f7bcc0188635f65054bd8
|
data/ChangeLog.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
### 0.1.2 / 2013-10-22
|
2
|
+
|
3
|
+
* Fix types logic so tests against different characters in the 007 or 006 must come from the
|
4
|
+
same field (e.g., not 006[1]='s' in one 006, and 006[2]='t' in another 006). Affects VD, VH,
|
5
|
+
CF, and RC types.
|
6
|
+
|
1
7
|
### 0.1.1 / 2013-10-14
|
2
8
|
|
3
9
|
* Fixed README to have correct load path (traject/umich_format, not traject_umich_format)
|
@@ -84,22 +84,18 @@ class Traject::UMichFormat::BibTypes
|
|
84
84
|
types << 'VB' if self['007[0-5]'].grep(/v...s/i).size > 0
|
85
85
|
types << 'VB' if self['852j'].grep(/\A(?:bd-rom|video-b)/i).size > 0
|
86
86
|
|
87
|
+
@record.fields('007').map{|f| f.value}.each do |f|
|
88
|
+
if (f[0] == 'v') || self['008[33]'].include?('v')
|
89
|
+
types << 'VD' if f[4] == 'v'
|
90
|
+
types << 'VH' if f[4] == 'b'
|
91
|
+
end
|
92
|
+
end
|
87
93
|
|
88
|
-
types << 'VD' if self['007[4]'].include?('v') &&
|
89
|
-
(
|
90
|
-
self['007[0]'].include?('v') ||
|
91
|
-
self['008[33]'].include?('v')
|
92
|
-
)
|
93
94
|
|
94
95
|
types << 'VD' if self['538a'].grep(/\Advd/i).size > 0
|
95
96
|
|
96
97
|
types << 'VH' if self['538a'].grep(/\AVHS/i).size > 0
|
97
98
|
|
98
|
-
types << 'VH' if self['007[4]'].include?('b') &&
|
99
|
-
(
|
100
|
-
self['007[0]'].include?('v') ||
|
101
|
-
self['008[33]'].include?('v')
|
102
|
-
)
|
103
99
|
|
104
100
|
types << 'VL' if self['007[0]'].include?('m')
|
105
101
|
types << 'VL' if (self.bib_format == 'VM') && self['008[33]'].include?('m')
|
@@ -151,10 +147,14 @@ class Traject::UMichFormat::BibTypes
|
|
151
147
|
f8524 = record.fields('852').select{|f| f.indicator1 == '4'}
|
152
148
|
|
153
149
|
# RC
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
150
|
+
if %w[i j].include?(ldr6) && (bib_format == 'MU')
|
151
|
+
@record.fields('007').map{|f| f.value}.each do |f|
|
152
|
+
if f[1] == 'd' && f[12] == 'e'
|
153
|
+
types << 'RC'
|
154
|
+
break
|
155
|
+
end
|
156
|
+
end
|
157
|
+
end
|
158
158
|
|
159
159
|
f8524.each do |f|
|
160
160
|
if (f['b'].upcase == 'MUSIC') && (f['j'] =~ /\ACD/i)
|
@@ -214,7 +214,6 @@ class Traject::UMichFormat::BibTypes
|
|
214
214
|
# TYP WM Microform FMT F00-02 EQUAL VM
|
215
215
|
# 008 F29-01 EQUAL [a,b,c]
|
216
216
|
|
217
|
-
|
218
217
|
def microform_types
|
219
218
|
return [] unless record['008']
|
220
219
|
types = ['WM']
|
@@ -377,10 +376,10 @@ class Traject::UMichFormat::BibTypes
|
|
377
376
|
|
378
377
|
return ['XC'] if (record['008'] && (record['008'].value[29] == '1')) || record.fields(['111', '711', '811']).size > 0
|
379
378
|
|
380
|
-
if (bib_format == 'CF')
|
381
|
-
|
382
|
-
|
383
|
-
|
379
|
+
if (bib_format == 'CF')
|
380
|
+
@record.fields('006').map{|f| f.value}.each do |f|
|
381
|
+
return ['XC'] if %w[a s].include?(f[0]) && (f[12] == '1')
|
382
|
+
end
|
384
383
|
end
|
385
384
|
|
386
385
|
if (bib_format == 'MU') &&
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: traject_umich_format
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bill Dueber
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|