enhanced_marc 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{enhanced_marc}
8
- s.version = "0.2.1"
8
+ s.version = "0.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ross Singer"]
@@ -22,7 +22,6 @@ Gem::Specification.new do |s|
22
22
  "README",
23
23
  "Rakefile",
24
24
  "VERSION",
25
- "enhanced_marc-0.1.gem",
26
25
  "enhanced_marc.gemspec",
27
26
  "lib/enhanced_marc.rb",
28
27
  "lib/enhanced_marc/book_record.rb",
@@ -47,15 +46,6 @@ Gem::Specification.new do |s|
47
46
  "lib/enhanced_marc/visual_record.rb",
48
47
  "lib/enhanced_marc/visual_type.rb",
49
48
  "lib/enhanced_marc/xmlreader.rb",
50
- "pkg/enhanced_marc-0.1.5.gem",
51
- "pkg/enhanced_marc-0.1.gem",
52
- "pkg/enhanced_marc-0.1.tgz",
53
- "pkg/enhanced_marc-0.1.zip",
54
- "pkg/enhanced_marc-0.1/Changes",
55
- "pkg/enhanced_marc-0.1/LICENSE",
56
- "pkg/enhanced_marc-0.1/README",
57
- "pkg/enhanced_marc-0.1/Rakefile",
58
- "pkg/enhanced_marc-0.1/test/ts_enhanced_marc.rb",
59
49
  "test/ts_enhanced_marc.rb"
60
50
  ]
61
51
  s.homepage = %q{http://github.com/rsinger/enhanced-marc/tree}
@@ -84,7 +84,8 @@ module MARC
84
84
  def languages
85
85
  languages = []
86
86
  unless self['008'].value[35,3].empty?
87
- languages << Locale::Info.get_language(self['008'].value[35,3])
87
+ language = Locale::Info.get_language(self['008'].value[35,3])
88
+ languages << language if language
88
89
  end
89
90
  @fields.each_by_tag("041") do | oh_four_one |
90
91
  langs = oh_four_one.find_all { |sub| sub.code == 'a'}
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enhanced_marc
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 1
10
- version: 0.2.1
9
+ - 2
10
+ version: 0.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ross Singer
@@ -61,7 +61,6 @@ files:
61
61
  - README
62
62
  - Rakefile
63
63
  - VERSION
64
- - enhanced_marc-0.1.gem
65
64
  - enhanced_marc.gemspec
66
65
  - lib/enhanced_marc.rb
67
66
  - lib/enhanced_marc/book_record.rb
@@ -86,15 +85,6 @@ files:
86
85
  - lib/enhanced_marc/visual_record.rb
87
86
  - lib/enhanced_marc/visual_type.rb
88
87
  - lib/enhanced_marc/xmlreader.rb
89
- - pkg/enhanced_marc-0.1.5.gem
90
- - pkg/enhanced_marc-0.1.gem
91
- - pkg/enhanced_marc-0.1.tgz
92
- - pkg/enhanced_marc-0.1.zip
93
- - pkg/enhanced_marc-0.1/Changes
94
- - pkg/enhanced_marc-0.1/LICENSE
95
- - pkg/enhanced_marc-0.1/README
96
- - pkg/enhanced_marc-0.1/Rakefile
97
- - pkg/enhanced_marc-0.1/test/ts_enhanced_marc.rb
98
88
  - test/ts_enhanced_marc.rb
99
89
  has_rdoc: true
100
90
  homepage: http://github.com/rsinger/enhanced-marc/tree
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1 +0,0 @@
1
- 2009-08-07: Refactored to monkeypatch ruby-marc rather than replace it.
@@ -1,21 +0,0 @@
1
- The MIT License
2
-
3
- Copyright (c) 2007 Ross Singer
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
@@ -1,51 +0,0 @@
1
- Enhanced MARC is a set of classes, modules and methods that sit on top of ruby-marc (http://rubyforge.org/projects/marc) to help parse the contents of MARC records more easily and conveniently.
2
- Installation:
3
- gem sources -a http://gemcutter.org
4
- sudo gem install enhanced_marc
5
-
6
- Usage:
7
-
8
- require 'enhanced_marc'
9
-
10
- reader = MARC::Reader.new('marc.dat')
11
-
12
- records = []
13
-
14
- reader.each do | record |
15
- records << record
16
- end
17
-
18
- >> records[0].class
19
- => MARC::BookRecord
20
-
21
- >> records[0].is_conference?
22
- => false
23
-
24
- >> records[0].is_manuscript?
25
- => false
26
-
27
- # Send a boolean true if you want human readable forms, rather than MARC codes.
28
- >> records[0].literary_form(true)
29
- => "Non-fiction"
30
-
31
- >> records[0].nature_of_contents(true)
32
- => ["Bibliography", "Catalog"]
33
-
34
- >> records[1].class
35
- => MARC::SoundRecord
36
-
37
- >> records[1].composition_form(true)
38
- => "Jazz"
39
-
40
- >> records[2].class
41
- => MARC::MapRecord
42
-
43
- >> records[2].projection(true)
44
- => ["Cylindrical", "Mercator"]
45
-
46
- >> records[2].relief(true)
47
- => ["Color"]
48
-
49
-
50
-
51
-
@@ -1,41 +0,0 @@
1
- RUBY_ENHANCED_MARC_VERSION = '0.1'
2
-
3
- require 'rubygems'
4
- require 'rake'
5
- require 'rake/testtask'
6
- require 'rake/rdoctask'
7
- require 'rake/packagetask'
8
- require 'rake/gempackagetask'
9
-
10
- task :default => [:test]
11
-
12
- Rake::TestTask.new('test') do |t|
13
- t.libs << 'lib'
14
- t.pattern = 'test/tc_*.rb'
15
- t.verbose = true
16
- t.ruby_opts = ['-r marc', '-r test/unit']
17
- end
18
-
19
- Rake::RDocTask.new('doc') do |rd|
20
- rd.rdoc_files.include("enhanced_marc/**/*.rb")
21
- rd.main = 'MARC::Record'
22
- rd.rdoc_dir = 'doc'
23
- end
24
-
25
- begin
26
- require 'jeweler'
27
- Jeweler::Tasks.new do |s|
28
-
29
- s.add_dependency('marc')
30
- s.add_dependency('locale')
31
- s.name = 'enhanced_marc'
32
- s.author = 'Ross Singer'
33
- s.email = 'rossfsinger@gmail.com'
34
- s.homepage = 'http://github.com/rsinger/enhanced-marc/tree'
35
- s.summary = 'A DSL for MARC data'
36
- s.description = 'A set of enhancements to ruby-marc to make parsing MARC data easier'
37
- end
38
- rescue LoadError
39
- puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
40
- end
41
-
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- # local marc library gets tested
4
- # not already installed one
5
- $LOAD_PATH.unshift("enhanced_marc")