iso-codes 0.2.1 → 0.3.0
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.
- data/VERSION +1 -1
- data/iso-codes.gemspec +2 -2
- data/lib/iso_codes.rb +21 -11
- metadata +5 -5
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.3.0
|
data/iso-codes.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = "iso-codes"
|
|
8
|
-
s.version = "0.
|
|
8
|
+
s.version = "0.3.0"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Marius L. J\303\270hndal"]
|
|
12
|
-
s.date = "2011-11
|
|
12
|
+
s.date = "2011-12-11"
|
|
13
13
|
s.description = "A database of ISO language and script codes."
|
|
14
14
|
s.email = "mariuslj (at) ifi [dot] uio (dot) no"
|
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/iso_codes.rb
CHANGED
|
@@ -134,21 +134,30 @@ module ISOCodes
|
|
|
134
134
|
|
|
135
135
|
klass =
|
|
136
136
|
case scope
|
|
137
|
-
when 'I'
|
|
138
|
-
|
|
139
|
-
when '
|
|
137
|
+
when 'I'
|
|
138
|
+
IndividualLanguage
|
|
139
|
+
when 'M'
|
|
140
|
+
Macrolanguage
|
|
141
|
+
when 'S'
|
|
142
|
+
nil
|
|
140
143
|
else
|
|
141
144
|
raise ArgumentError, "invalid scope"
|
|
142
145
|
end
|
|
143
146
|
|
|
144
147
|
language_type =
|
|
145
148
|
case language_type
|
|
146
|
-
when 'L'
|
|
147
|
-
|
|
148
|
-
when '
|
|
149
|
-
|
|
150
|
-
when '
|
|
151
|
-
|
|
149
|
+
when 'L'
|
|
150
|
+
:living
|
|
151
|
+
when 'E'
|
|
152
|
+
:extinct
|
|
153
|
+
when 'A'
|
|
154
|
+
:ancient
|
|
155
|
+
when 'H'
|
|
156
|
+
:historic
|
|
157
|
+
when 'C'
|
|
158
|
+
:constructed
|
|
159
|
+
when 'S'
|
|
160
|
+
:special
|
|
152
161
|
else
|
|
153
162
|
raise ArgumentError, "invalid language type"
|
|
154
163
|
end
|
|
@@ -160,8 +169,9 @@ module ISOCodes
|
|
|
160
169
|
macrolanguage_identifier, individual_language_identifier, status = args
|
|
161
170
|
|
|
162
171
|
case status
|
|
163
|
-
when 'R'
|
|
164
|
-
|
|
172
|
+
when 'R'
|
|
173
|
+
next #FIXME
|
|
174
|
+
when 'A'
|
|
165
175
|
else
|
|
166
176
|
raise ArgumentError, "invalid status"
|
|
167
177
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: iso-codes
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 19
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
version: 0.
|
|
8
|
+
- 3
|
|
9
|
+
- 0
|
|
10
|
+
version: 0.3.0
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- "Marius L. J\xC3\xB8hndal"
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2011-11
|
|
18
|
+
date: 2011-12-11 00:00:00 Z
|
|
19
19
|
dependencies: []
|
|
20
20
|
|
|
21
21
|
description: A database of ISO language and script codes.
|