enhanced_marc 0.2.0 → 0.2.1

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.0"
8
+ s.version = "0.2.1"
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"]
@@ -86,13 +86,18 @@ module MARC
86
86
  unless self['008'].value[35,3].empty?
87
87
  languages << Locale::Info.get_language(self['008'].value[35,3])
88
88
  end
89
- @fields.each_by_tag("041").each do | oh_four_one |
89
+ @fields.each_by_tag("041") do | oh_four_one |
90
90
  langs = oh_four_one.find_all { |sub| sub.code == 'a'}
91
91
  langs.each do | lang |
92
- languages << Locale::Info.get_language(lang.value)
92
+ i = 0
93
+ while (i + 3) <= lang.value.length
94
+ language = Locale::Info.get_language(lang.value[i,3])
95
+ languages << language if language
96
+ i += 3
97
+ end
93
98
  end
94
99
  end
95
- languages
100
+ languages.uniq
96
101
  end
97
102
  end
98
103
  end
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: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ross Singer