traject_umich_format 0.1.4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9b48d73e081182d5ff11cc4cea1feeb8c7399203
4
- data.tar.gz: 2efd88bdcf70a50755ef9c8645157eab75f19701
3
+ metadata.gz: f5840a2cb5a3216a97f89aa39536522fb186bee0
4
+ data.tar.gz: ffbf3c1256e2963c0d45023300ea8f709514dfb8
5
5
  SHA512:
6
- metadata.gz: f434506d6395f923aa85cd52adf30857b7c8e9810af227db66196c1a5fd230a491f6012edd98a1c574ff47a7119b96984ba60f97926b5ab68917bc4284642dc8
7
- data.tar.gz: 73c8a064b737ee6efea3ee31b97d8039f7a4257527d7f23fbf9ad1ec8d0295de419c991c44d6aaf1e8bfac34d2c6bb92a7b6121fa9fcce86af9e2d80a0e08b71
6
+ metadata.gz: 9c21019dca8737e70741a1e4accb21e6037eea48b00eeaf0d5d2fa1e7fb4343663745314ae891bd37fc557d078eb1aedbe5412816b2efb5697fa4bfb8f07d608
7
+ data.tar.gz: 2dbc59a4351ba8e3329d1ab3cb7d62c60931eb00d45f47cf941bc441e39f5758f35ccecd64cbc23a69fe5ef834a5992eaba47cadd89126a944355e481b5e0c9a
data/ChangeLog.md CHANGED
@@ -1,3 +1,8 @@
1
+ ### 0.2.0 / 2013-11-13
2
+
3
+ * Make LP format detection more liberal (thank you for pull request, @jrochkind)
4
+ * Narrow definition of DVD to avoid getting DVD-ROMs incorrectly (again, with the @jrochkind)
5
+
1
6
  ### 0.1.3 / 2013-10-22
2
7
 
3
8
  * Call #uniq! before exiting from each indiviual type checker to allow easier calling of just the ones you want.
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
  gemspec
3
3
 
4
- gem 'traject'
4
+ gem 'traject', '>=1.0.0.beta.7'
5
5
  gem 'yell'
6
6
 
7
7
  group :development do
@@ -98,7 +98,7 @@ class Traject::UMichFormat::BibTypes
98
98
  end
99
99
 
100
100
 
101
- types << 'VD' if self['538a'].grep(/\Advd/i).size > 0
101
+ types << 'VD' if self['538a'].grep(/\Advd(?!\-rom)/i).size > 0
102
102
 
103
103
  types << 'VH' if self['538a'].grep(/\AVHS/i).size > 0
104
104
 
@@ -174,7 +174,8 @@ class Traject::UMichFormat::BibTypes
174
174
 
175
175
  if (bib_format == 'MU') && %w[i j].include?(ldr6) && self['007[1]'].include?('d')
176
176
  record.fields('300').each do |f|
177
- if (f['a'] =~ /SOUND DISC/i) && (f['b'] =~ /33 1\/3 RPM/i)
177
+ str = f.subfields.collect {|s| s.value}.join(' ')
178
+ if (str =~ /DISC/i) && str =~ /33 1\/3 RPM/i
178
179
  types << 'RL'
179
180
  break
180
181
  end
@@ -1,5 +1,5 @@
1
1
  module Traject
2
2
  class UMichFormat
3
- VERSION = "0.1.4"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
data/spec/audio_spec.rb CHANGED
@@ -44,6 +44,14 @@ describe 'audio' do
44
44
  ].sort(), output['formats'].sort
45
45
  end
46
46
 
47
+ it "identifies a somewhat weird LP as an LP" do
48
+ @record = MARC::Reader.new(support_file_path 'audio_lp.mrc').first
49
+ @umf = Traject::UMichFormat.new(@record)
50
+
51
+ assert_equal 'MU', @umf.bib_format
52
+ assert @umf.types.include?("RL"), "types include 'RL'"
53
+ end
54
+
47
55
  end
48
56
 
49
57
  describe "macros" do
@@ -0,0 +1 @@
1
+ 01393cjm a22003851 450000100070000000500170000700700150002400800410003901000170008002800230009703500110012003500140013103500220014504000580016704500090022504900080023410000340024224000280027624501440030426000210044830000390046950000530050851100690056151800390063065000160066971000440068574000270072974000280075679900280078491000250081295000280083795500130086599500710087899100580094932793720080401115400.0sd|bmmennmplne930927s1959 causy ei d ar 59001168 02aLPBR 6029bEverest a327937 aDAF2977FL a(CStRLIN)93-R2345 aPManMcPManMdOCoLCdm.c.dOCoLCdFTaSUdCStRLINdNIC ax3x500aJHP1 aChávez, Carlos,d1899-1978.10aSymphonies.kSelections10aSinfonía índiah[sound recording]b(Symphony no. 2) Sinfonía Antígona (Symphony no. 1) and Sinfonía romántica (Symphony no. 4). bEverestc[1959]. a1 disc.b12 in.c33 1/3 rpm. mono. aProgram notes by Herbert Weinstock on container.0 aStadium Symphony Orchestra of New York, the composer conducting. aFirst recording of Symphony no. 4. 0aSymphonies.2 aStadium Symphony Orchestra of New York.0 aSinfonía Antígona.0 aSinfonía romántica.0 aMDJSLIS.D930923.T143214 a327937bHorizon bib# lSDRECa\C44.211\b.A2A1 lSDRECc1 a09/27/93tcs9125nMdBPCwNYCX93R1209d09/27/93bLISi930927lMDJS aC44.211 .A2 A1fnonebavcc. 1q0i376018lasrecmafl
@@ -0,0 +1 @@
1
+ 02434cas a2200493Ia 4500001000800000005001700008006001900025007001500044008004100059035001200100035001700112035002100129040003500150043002100185049000900206090001800215245004900233246007500282260006500357300000900422310001100431362006500442500007600507520029900583530002400882533019700906538007101103650005201174650004401226650006601270650005801336650005701394650004901451651004901500651004101549710003701590752004501627752005201672776007201724856004901796910002601845994001201871991005701883359469020101005100900.0m d co bg|||||||||100723d19651968gauwr neq 0 0eng d a3594690 aocn649825202 a(OCoLC)649825202 aSBMbengcSBMdSBMdOCLCQdUMC an-usu--an-us-al aJHEE aE185.5b.S68904aThe Southern courierh[electronic resource].1 iDisc container title:aSouthern courier :bcomplete series (1965-1968) aAtlanta, Ga. :bSouthern Educational Conference,c1965-1968. a4 v. aWeekly0 aVol. 1, no. 1 (July 16, 1965)-v. 4, no. 49 (Dec. 7-8, 1968). aPublication moved to Montgomery, Ala. with the Sept. 11-12, 1965 issue. a"From 1965 to 1968, the Southern courier provided weekly local coverage of the people, places, and events that shaped the civil rights movement in the American South ... This digital edition allows readers ... to browse, read and search all 177 issues of the Southern courier."--Disc container. aAlso issued online. aElectronic reproduction.mVol. 1, no. 1 (July 16, 1965)-v. 4, no. 49 (Dec. 7-8, 1968).b[Washington, D.C.] :cSouthern Courier Association,d2010.e1 DVD-ROM.n1st digital ed.7d19651968dcuuuq aDVD-ROM capable optical drive; Adobe Reader Version 9.0 or higher. 0aAfrican AmericanszSouthern StatesvNewspapers. 0aAfrican AmericanszAlabamavNewspapers. 0aAfrican AmericansxCivil rightszSouthern StatesvNewspapers. 0aAfrican AmericansxCivil rightszAlabamavNewspapers. 0aCivil rights movementszSouthern StatesvNewspapers. 0aCivil rights movementszAlabamavNewspapers. 0aSouthern StatesxRace relationsvNewspapers. 0aAlabamaxRace relationsvNewspapers.2 aSouthern Educational Conference. aUnited StatesbGeorgiacFultondAtlanta. aUnited StatesbAlabamacMontgomerydMontgomery.08iPrint version:tSouthern courierw(DLC)sn 84025852w(OCoLC)1046210241uhttp://www.southerncourier.org/archives.html a3594690bHorizon bib# aC0bJHE aDVD-ROM 94falabeformatcc. 1q0i5593136leavmeav
@@ -0,0 +1 @@
1
+ 01607nmm a2200421 a 4500001001000000003000400010005001700014006001900031007001000050008004100060035002400101040001800125074001100143074002000154086002100174245009300195260006800288300005800356538001300414538010500427500002100532500002800553500003600581500005600617500003500673530015500708650005300863650005400916710005300970852004901023970002201072970002001094971000801114972001301122973001901135997000901154998002201163005624954MiU20081212134128.0m m vd mvaiz|071203s2007 dcu m f eng d a(OCoLC)ocn182721203 aGPOcGPOdMvI a0431-R a0431-R (online)0 aEP 1.104:M 53/CD00aKeep your paws off mercuryh[electronic resource] :ban educational video about mercury. aWashington, DC :bU.S. Environmental Protection Agency,c[2007] a1 DVD-ROM (4 min., 26 sec.) :bsd., col. ;c4 3/4 in. aDVD-ROM. aSystem requirements: DVD player, or pc with DVD drive, Adobe Acrobat Reader required to view poster. aTitle from disc. a"July 2007"--Container. aShipping list no.: 2008-0004-E. aIncludes PDF file of poster available for download. a"EPA-530-C-07-004"--Container. aAlso available via Internet. Address as of 11/29/07: http://www.epa.gov/epaoswer/hazwaste/mercury/videos.htm#paws ; current access available via PURL. 0aMercuryxHealth aspectsvInteractive multimedia. 0aMercuryxSafety measuresvInteractive multimedia.1 aUnited States.bEnvironmental Protection Agency.4 aMiUbAAELcSLDjDVD-ROM TD 196 .M38 K55 2007 aCFbComputer File aVDbVideo (DVD) aMiU c20071126 aACbavail_circ aMARS cbdede-du 20081009
@@ -0,0 +1,32 @@
1
+ require 'helper'
2
+ require 'traject'
3
+ require 'traject/umich_format'
4
+ require 'marc'
5
+
6
+
7
+ describe "video" do
8
+ describe "DVD-ROM actual video" do
9
+ before do
10
+ @record = MARC::Reader.new(support_file_path 'video_dvd_rom.mrc').first
11
+ @umf = Traject::UMichFormat.new(@record)
12
+ end
13
+
14
+ it "is marked type VD" do
15
+ assert @umf.types.include?("VD"), "includes VD"
16
+ end
17
+
18
+ end
19
+
20
+
21
+ describe "DVD-ROM non-video" do
22
+ before do
23
+ @record = MARC::Reader.new(support_file_path 'dvd_rom.mrc').first
24
+ @umf = Traject::UMichFormat.new(@record)
25
+ end
26
+
27
+ it "is not marked as type VD" do
28
+ refute @umf.types.include?("VD"), "does not include VD"
29
+ end
30
+ end
31
+
32
+ end
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
4
+ version: 0.2.0
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-11-04 00:00:00.000000000 Z
11
+ date: 2013-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -78,8 +78,12 @@ files:
78
78
  - spec/helper.rb
79
79
  - spec/spec_support/RL.seq
80
80
  - spec/spec_support/audio.mrc
81
+ - spec/spec_support/audio_lp.mrc
82
+ - spec/spec_support/dvd_rom.mrc
81
83
  - spec/spec_support/fmt_sample.mrc
84
+ - spec/spec_support/video_dvd_rom.mrc
82
85
  - spec/version_spec.rb
86
+ - spec/video_spec.rb
83
87
  - traject_umich_format.gemspec
84
88
  homepage: https://github.com/billdueber/traject_umich_format#readme
85
89
  licenses:
@@ -110,6 +114,10 @@ test_files:
110
114
  - spec/helper.rb
111
115
  - spec/spec_support/RL.seq
112
116
  - spec/spec_support/audio.mrc
117
+ - spec/spec_support/audio_lp.mrc
118
+ - spec/spec_support/dvd_rom.mrc
113
119
  - spec/spec_support/fmt_sample.mrc
120
+ - spec/spec_support/video_dvd_rom.mrc
114
121
  - spec/version_spec.rb
122
+ - spec/video_spec.rb
115
123
  has_rdoc: