traject_umich_format 0.1.3 → 0.1.4

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: b652f947db6ed90de3a4b46c4671bc1981a0f304
4
- data.tar.gz: ea65ea424d8b7c5d2c9fbed68b88cd34e2be2290
3
+ metadata.gz: 9b48d73e081182d5ff11cc4cea1feeb8c7399203
4
+ data.tar.gz: 2efd88bdcf70a50755ef9c8645157eab75f19701
5
5
  SHA512:
6
- metadata.gz: 64606c11bc932cdfa19fba7eaf02f57b2b115bdab69e4810599020e207a4fee00f0e1902d05c9abbc25e42b7f2673e11ba35bb87f8afccddb1e97f48838ec05a
7
- data.tar.gz: 8b33bd361e47ac93613ca0e2878fa0566e3c22ac5c0b2fcb458036baa06867371a18ff8932b787c9c5ada5a4d57f5c5c9680a925f0abeadb20052adf5d9e83f0
6
+ metadata.gz: f434506d6395f923aa85cd52adf30857b7c8e9810af227db66196c1a5fd230a491f6012edd98a1c574ff47a7119b96984ba60f97926b5ab68917bc4284642dc8
7
+ data.tar.gz: 73c8a064b737ee6efea3ee31b97d8039f7a4257527d7f23fbf9ad1ec8d0295de419c991c44d6aaf1e8bfac34d2c6bb92a7b6121fa9fcce86af9e2d80a0e08b71
@@ -394,8 +394,8 @@ class Traject::UMichFormat::BibTypes
394
394
  end
395
395
  end
396
396
 
397
- if (bib_format == 'MU') &&
398
- (record['008'].value[30-31] =~ /c/)
397
+ if (bib_format == 'MU') && record['008'] &&
398
+ (record['008'].value[30..31] =~ /c/)
399
399
  return ['XC']
400
400
  end
401
401
 
@@ -1,5 +1,5 @@
1
1
  module Traject
2
2
  class UMichFormat
3
- VERSION = "0.1.3"
3
+ VERSION = "0.1.4"
4
4
  end
5
5
  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.3
4
+ version: 0.1.4
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-22 00:00:00.000000000 Z
11
+ date: 2013-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -70,7 +70,6 @@ files:
70
70
  - lib/traject/umich_format.rb
71
71
  - lib/traject/umich_format/bib_format.rb
72
72
  - lib/traject/umich_format/bib_types.rb
73
- - lib/traject/umich_format/format_finder.rb
74
73
  - lib/traject/umich_format/macros.rb
75
74
  - lib/traject/umich_format/version.rb
76
75
  - lib/traject/umich_format/xv6xx.rb
@@ -102,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
101
  version: '0'
103
102
  requirements: []
104
103
  rubyforge_project:
105
- rubygems_version: 2.1.5
104
+ rubygems_version: 2.1.9
106
105
  signing_key:
107
106
  specification_version: 4
108
107
  summary: Extract the format and type from a MARC record, the UMich way
@@ -1,32 +0,0 @@
1
- require 'traject'
2
- require 'traject/umich_format/bib_format'
3
- require 'traject/umich_format/bib_types'
4
-
5
- # Encapsulates logic that uses University of Michigan University Library
6
- # rules to determine both bib format (book, serial, visual
7
- # material, etc.) and type, a more expansive list including both format
8
- # (blu-ray, microform) and more semantic categories (bibliography,
9
- # conference)
10
-
11
- class Traject::UMichFormat
12
-
13
-
14
- # @!attribute [r] record
15
- # The record passed into the constructor
16
- # @!attribute [r] bib_format
17
- # The bib format code as computed from the passed record
18
- # @!attribute [r] types
19
- # A (possibly empty) array of type codes as computed from record data
20
- attr_reader :bib_format, :record, :types
21
-
22
- # Construct a Formats object from the given record, calcuclating
23
- # the bib_format and types
24
- #
25
- # @param [MARC::Record] record
26
- def initialize(marc_record)
27
- @record = marc_record
28
- @bib_format = BibFormat.new(record).code
29
- @types = BibTypes.new(record).codes
30
- end
31
-
32
- end