worldfactbook 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/worldfactbook/country.rb +63 -52
- data/lib/worldfactbook/country_code.rb +74 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Worldfactbook
|
2
2
|
require 'iconv'
|
3
|
-
|
3
|
+
|
4
4
|
class Country
|
5
5
|
attr_accessor :country, :wfb_location
|
6
6
|
|
@@ -9,7 +9,6 @@ module Worldfactbook
|
|
9
9
|
@code = CountryCode.new(@country).code
|
10
10
|
@ic = Iconv.new('UTF-8//IGNORE', 'UTF-8')
|
11
11
|
@wfb_location = "http://rubyworldfactbook.com"
|
12
|
-
|
13
12
|
end
|
14
13
|
|
15
14
|
def countries
|
@@ -93,34 +92,34 @@ module Worldfactbook
|
|
93
92
|
## PEOPLE ##
|
94
93
|
|
95
94
|
def population
|
96
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(
|
95
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(14) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
97
96
|
end
|
98
97
|
|
99
98
|
def age_structure
|
100
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(
|
99
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(17) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
101
100
|
end
|
102
101
|
|
103
102
|
def median_age
|
104
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(
|
103
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(20) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
105
104
|
end
|
106
105
|
|
107
|
-
def population_growth
|
108
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(
|
106
|
+
def population_growth
|
107
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(23) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
109
108
|
end
|
110
109
|
|
111
110
|
def birth_rate
|
112
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(
|
111
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(26) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
113
112
|
end
|
114
113
|
|
115
114
|
def death_rate
|
116
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(
|
115
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(29) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
117
116
|
end
|
118
117
|
|
119
118
|
def net_migration
|
120
119
|
if ['xx'].include?(@code)
|
121
120
|
return nil
|
122
121
|
else
|
123
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(
|
122
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(32) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
124
123
|
end
|
125
124
|
end
|
126
125
|
|
@@ -128,9 +127,9 @@ module Worldfactbook
|
|
128
127
|
if ['ee'].include?(@code)
|
129
128
|
return nil
|
130
129
|
elsif ['xx'].include?(@code)
|
131
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(
|
130
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(26) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
132
131
|
else
|
133
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(
|
132
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(35) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
134
133
|
end
|
135
134
|
end
|
136
135
|
|
@@ -138,90 +137,78 @@ module Worldfactbook
|
|
138
137
|
if ['ee', 'xx'].include?(@code)
|
139
138
|
return nil
|
140
139
|
else
|
141
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(
|
140
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(38) .category_data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
142
141
|
end
|
143
142
|
end
|
144
143
|
|
145
144
|
def sex_ratio
|
146
145
|
if ['ee', 'xx'].include?(@code)
|
147
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(23) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
148
|
-
else
|
149
146
|
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(29) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
147
|
+
else
|
148
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(41) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
150
149
|
end
|
151
150
|
end
|
152
151
|
|
153
152
|
def infant_mortality
|
154
153
|
if ['ee', 'xx'].include?(@code)
|
155
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(26) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
156
|
-
else
|
157
154
|
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(32) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
155
|
+
else
|
156
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(47) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
158
157
|
end
|
159
158
|
end
|
160
159
|
|
161
160
|
def life_expectancy
|
162
161
|
if ['ee', 'xx'].include?(@code)
|
163
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(29) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
164
|
-
else
|
165
162
|
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(35) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
163
|
+
else
|
164
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(50) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
166
165
|
end
|
167
166
|
end
|
168
167
|
|
169
168
|
def fertility_rate
|
170
169
|
if ['ee', 'xx'].include?(@code)
|
171
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(
|
170
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(38) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
172
171
|
else
|
173
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(
|
172
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(53) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
174
173
|
end
|
175
174
|
end
|
176
175
|
|
177
176
|
def ethnic_groups
|
178
|
-
if
|
179
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(62) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
180
|
-
elsif ['ee', 'xx'].include?(@code)
|
177
|
+
if ['ee', 'xx'].include?(@code)
|
181
178
|
return nil
|
182
179
|
else
|
183
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(
|
180
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(5) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
184
181
|
end
|
185
182
|
end
|
186
183
|
|
187
184
|
def religions
|
188
|
-
if
|
189
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(
|
190
|
-
elsif ['xx'].include?(@code)
|
191
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(50) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
192
|
-
elsif ['ee'].include?(@code)
|
193
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(44) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
185
|
+
if ['ee', 'xx'].include?(@code)
|
186
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(5) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
194
187
|
else
|
195
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(
|
188
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(11) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
196
189
|
end
|
197
190
|
end
|
198
191
|
|
199
192
|
def languages
|
200
|
-
if
|
201
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(
|
202
|
-
elsif ['xx'].include?(@code)
|
203
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(53) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
204
|
-
elsif ['ee'].include?(@code)
|
205
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(47) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
193
|
+
if ['ee', 'xx'].include?(@code)
|
194
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(2) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
206
195
|
else
|
207
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(
|
196
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(8) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
208
197
|
end
|
209
198
|
end
|
210
199
|
|
211
200
|
def literacy
|
212
|
-
if
|
213
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(
|
214
|
-
elsif ['xx'].include?(@code)
|
215
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(56) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
201
|
+
if ['xx'].include?(@code)
|
202
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(62) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
216
203
|
elsif ['ee'].include?(@code)
|
217
204
|
return nil
|
218
205
|
else
|
219
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(
|
206
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_People tr:nth-child(89) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
220
207
|
end
|
221
208
|
end
|
222
209
|
|
223
210
|
|
224
|
-
## GOVERNMENT ##
|
211
|
+
## GOVERNMENT ##
|
225
212
|
|
226
213
|
def government_type
|
227
214
|
(@ic.iconv(doc.css('#CollapsiblePanel1_Govt tr:nth-child(5) .category_data').text + ' ')[0..-2])
|
@@ -279,8 +266,32 @@ module Worldfactbook
|
|
279
266
|
end
|
280
267
|
end
|
281
268
|
|
282
|
-
|
283
|
-
|
269
|
+
def flag_description
|
270
|
+
if (@ic.iconv(doc.to_s + ' ')[0..-2]).match("Definitions and Notes: Dependent areas")
|
271
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_Govt tr:nth-child(53) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/[\r\t\n]/,'').strip
|
272
|
+
else
|
273
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_Govt tr:nth-child(56) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/[\r\t\n]/,'').strip
|
274
|
+
end
|
275
|
+
end
|
276
|
+
|
277
|
+
def national_symbols
|
278
|
+
if (@ic.iconv(doc.to_s + ' ')[0..-2]).match("Definitions and Notes: Dependent areas")
|
279
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_Govt tr:nth-child(59) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/[\r\t\n]/,'').strip
|
280
|
+
else
|
281
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_Govt tr:nth-child(56) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/[\r\t\n]/,'').strip
|
282
|
+
end
|
283
|
+
end
|
284
|
+
|
285
|
+
def national_anthem
|
286
|
+
if (@ic.iconv(doc.to_s + ' ')[0..-2]).match("Definitions and Notes: Dependent areas")
|
287
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_Govt tr:nth-child(62) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/[\r\t\n]/,'').strip
|
288
|
+
else
|
289
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_Govt tr:nth-child(59) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/[\r\t\n]/,'').strip
|
290
|
+
end
|
291
|
+
end
|
292
|
+
|
293
|
+
|
294
|
+
## ECONOMY ##
|
284
295
|
|
285
296
|
def economy_overview
|
286
297
|
(@ic.iconv(doc.css('#CollapsiblePanel1_Econ tr:nth-child(2) .category_data').text + ' ')[0..-2])
|
@@ -315,23 +326,23 @@ module Worldfactbook
|
|
315
326
|
end
|
316
327
|
|
317
328
|
def inflation
|
318
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_Econ tr:nth-child(
|
329
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_Econ tr:nth-child(53) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
319
330
|
end
|
320
331
|
|
321
332
|
def markets
|
322
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_Econ tr:nth-child(
|
333
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_Econ tr:nth-child(71) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
323
334
|
end
|
324
335
|
|
325
336
|
def exports
|
326
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_Econ tr:nth-child(
|
337
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_Econ tr:nth-child(128) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
327
338
|
end
|
328
339
|
|
329
340
|
def imports
|
330
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_Econ tr:nth-child(
|
341
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_Econ tr:nth-child(137) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
331
342
|
end
|
332
343
|
|
333
344
|
def debt
|
334
|
-
(@ic.iconv(doc.css('#CollapsiblePanel1_Econ tr:nth-child(
|
345
|
+
(@ic.iconv(doc.css('#CollapsiblePanel1_Econ tr:nth-child(149) #data').text + ' ')[0..-2]).squeeze(' ').gsub(/ \n \n /,'; ').gsub(/[\r\t\n]/,'').squeeze(' ').strip
|
335
346
|
end
|
336
347
|
|
337
348
|
def military
|
@@ -7,7 +7,9 @@ module Worldfactbook
|
|
7
7
|
def initialize(country)
|
8
8
|
@country = country
|
9
9
|
@codes = { 'world' => 'xx',
|
10
|
+
'aruba' => 'aa',
|
10
11
|
'afghanistan' => 'af',
|
12
|
+
'american samoa' => 'aq',
|
11
13
|
'albania' => 'al',
|
12
14
|
'algeria' => 'ag',
|
13
15
|
'andorra' => 'an',
|
@@ -21,7 +23,11 @@ module Worldfactbook
|
|
21
23
|
'armenia' => 'am',
|
22
24
|
'algeria' => 'ag',
|
23
25
|
'australia' => 'as',
|
26
|
+
'ashmore and cartier islands' => 'at',
|
24
27
|
'austria' => 'au',
|
28
|
+
'anguilla' => 'av',
|
29
|
+
'akrotiri' => 'ax',
|
30
|
+
'antarctica' => 'ay',
|
25
31
|
'azerbaijan' => 'aj',
|
26
32
|
'bahamas' => 'bf',
|
27
33
|
'the bahamas' => 'bf',
|
@@ -36,28 +42,36 @@ module Worldfactbook
|
|
36
42
|
'bhutan' => 'bt',
|
37
43
|
'bolivia' => 'bl',
|
38
44
|
'bosnia' => 'bk',
|
45
|
+
'curacao' => 'cc',
|
39
46
|
'herzegovina' => 'bk',
|
40
47
|
'bosnia and herzegovina' => 'bk',
|
48
|
+
'navassa island' => 'bq',
|
41
49
|
'botswana' => 'bc',
|
42
50
|
'brazil' => 'br',
|
43
51
|
'brunei' => 'bx',
|
44
52
|
'bulgaria' => 'bu',
|
53
|
+
'bouvet island' => 'bv',
|
45
54
|
'burkina faso' => 'uv',
|
46
55
|
'burma' => 'bm',
|
47
56
|
'burundi' => 'by',
|
48
57
|
'cambodia' => 'cb',
|
58
|
+
'cocos islands' => 'ck',
|
49
59
|
'cameroon' => 'cm',
|
50
60
|
'canada' => 'ca',
|
51
61
|
'cape verde' => 'cv',
|
62
|
+
'cayman islands' => 'cj',
|
52
63
|
'central african republic' => 'ct',
|
53
64
|
'chad' => 'cd',
|
54
65
|
'chile' => 'ci',
|
55
66
|
'china' => 'ch',
|
56
67
|
'colombia' => 'co',
|
57
68
|
'comoros' => 'cn',
|
69
|
+
'coral sea islands' => 'cr',
|
58
70
|
'democratic republic of the congo' => 'cg',
|
59
71
|
'republic of the congo' => 'cf',
|
72
|
+
'northern mariana islands' => 'cq',
|
60
73
|
'costa rica' => 'cs',
|
74
|
+
'cook islands' => 'cw',
|
61
75
|
"cote d'ivoire" => 'iv',
|
62
76
|
'croatia' => 'hr',
|
63
77
|
'cuba' => 'cu',
|
@@ -67,6 +81,7 @@ module Worldfactbook
|
|
67
81
|
'djibouti' => 'dj',
|
68
82
|
'dominica' => 'do',
|
69
83
|
'dominican republic' => 'dr',
|
84
|
+
'dhekelia' => 'dx',
|
70
85
|
'ecuador' => 'ec',
|
71
86
|
'egypt' => 'eg',
|
72
87
|
'el salvador' => 'es',
|
@@ -75,40 +90,55 @@ module Worldfactbook
|
|
75
90
|
'estonia' => 'en',
|
76
91
|
'ethiopia' => 'et',
|
77
92
|
'fiji' => 'fj',
|
93
|
+
'falkland islands' => 'fk',
|
78
94
|
'finland' => 'fi',
|
95
|
+
'faroe islands' => 'fo',
|
96
|
+
'french polynesia' => 'fp',
|
79
97
|
'france' => 'fr',
|
98
|
+
'french southern antarctic lands' => 'fs',
|
99
|
+
'the gambia' => 'ga',
|
80
100
|
'gabon' => 'gb',
|
81
|
-
'the gambia' => 'gb',
|
82
101
|
'gaza strip' => 'gz',
|
83
102
|
'georgia' => 'gg',
|
84
103
|
'germany' => 'gm',
|
104
|
+
'gibraltar' => 'gi',
|
85
105
|
'ghana' => 'gh',
|
86
106
|
'greece' => 'gr',
|
87
107
|
'greenland' => 'gl',
|
88
108
|
'grenada' => 'gj',
|
109
|
+
'guam' => 'gq',
|
89
110
|
'guatemala' => 'gt',
|
111
|
+
'guernsey' => 'gk',
|
90
112
|
'guinea' => 'gv',
|
91
113
|
'guinea-bissau' => 'pu',
|
92
114
|
'guyana' => 'gy',
|
93
115
|
'haiti' => 'ha',
|
116
|
+
'heard and mcdonald island' => 'hm',
|
94
117
|
'honduras' => 'ho',
|
95
118
|
'hong kong' => 'hk',
|
96
119
|
'hungary' => 'hu',
|
97
120
|
'iceland' => 'ic',
|
121
|
+
'indonesia' => 'id',
|
122
|
+
'isle of man' => 'im',
|
98
123
|
'india' => 'in',
|
124
|
+
'british indian ocean territory' => 'io',
|
125
|
+
'clipperton island' => 'ip',
|
99
126
|
'iran' => 'ir',
|
100
127
|
'iraq' => 'iz',
|
101
128
|
'ireland' => 'ei',
|
102
129
|
'israel' => 'is',
|
103
130
|
'italy' => 'it',
|
131
|
+
'jersey' => 'je',
|
104
132
|
'jamaica' => 'jm',
|
105
133
|
'japan' => 'ja',
|
134
|
+
'jan mayten' => 'jn',
|
106
135
|
'jordan' => 'jo',
|
107
136
|
'kazakhstan' => 'kz',
|
108
137
|
'kenya' => 'ke',
|
109
138
|
'kiribati' => 'kr',
|
110
139
|
'north korea' => 'kn',
|
111
140
|
'south korea' => 'ks',
|
141
|
+
'christmas island' => 'kt',
|
112
142
|
'kosovo' => 'kv',
|
113
143
|
'kuwait' => 'ku',
|
114
144
|
'kyrgyzstan' => 'kg',
|
@@ -123,6 +153,8 @@ module Worldfactbook
|
|
123
153
|
'luxembourg' => 'lu',
|
124
154
|
'macedonia' => 'mk',
|
125
155
|
'madagascar' => 'ma',
|
156
|
+
'macau' => 'mc',
|
157
|
+
'mayotte' => 'mf',
|
126
158
|
'malawi' => 'mi',
|
127
159
|
'malaysia' => 'my',
|
128
160
|
'maldives' => 'mv',
|
@@ -139,34 +171,53 @@ module Worldfactbook
|
|
139
171
|
'montenegro' => 'mj',
|
140
172
|
'morocco' => 'mo',
|
141
173
|
'moldova' => 'md',
|
174
|
+
'montserrat' => 'mh',
|
142
175
|
'mozambique' => 'mz',
|
143
176
|
'nambia' => 'wa',
|
144
177
|
'nauru' => 'nr',
|
145
178
|
'nepal' => 'np',
|
146
179
|
'netherlands' => 'nl',
|
180
|
+
'new caledonia' => 'nc',
|
147
181
|
'new zealand' => 'nz',
|
148
182
|
'nicaragua' => 'nu',
|
149
183
|
'niger' => 'ng',
|
150
184
|
'nigeria' => 'ni',
|
185
|
+
'niue' => 'ne',
|
151
186
|
'norway' => 'no',
|
187
|
+
'norfolk island' => 'nf',
|
152
188
|
'oman' => 'mu',
|
153
189
|
'pakistan' => 'pk',
|
154
190
|
'palau' => 'ps',
|
155
191
|
'panama' => 'pm',
|
156
192
|
'papua new guinea' => 'pp',
|
157
193
|
'paraguay' => 'pa',
|
194
|
+
'pitcairn islands' => 'pc',
|
158
195
|
'peru' => 'pe',
|
196
|
+
'paracel islands' => 'pf',
|
197
|
+
'sbratly islands' => 'pg',
|
159
198
|
'philippines' => 'rp',
|
160
199
|
'poland' => 'pl',
|
161
200
|
'portugal' => 'po',
|
162
201
|
'puerto rico' => 'rq',
|
163
202
|
'qatar' => 'qa',
|
164
203
|
'romania' => 'ro',
|
204
|
+
'saint martin' => 'rn',
|
165
205
|
'russia' => 'rs',
|
166
206
|
'rwanda' => 'rw',
|
207
|
+
'saint pierre and miquelon' => 'sb',
|
208
|
+
'saint pierre' => 'sb',
|
209
|
+
'miquelon' => 'sb',
|
167
210
|
'saint kitts and nevis' => 'sc',
|
211
|
+
'sint maarten' => 'sk',
|
168
212
|
'saint lucia' => 'st',
|
169
|
-
'
|
213
|
+
'svalbard' => 'sv',
|
214
|
+
'south georgia' => 'sx',
|
215
|
+
'south sandwich islands' => 'sx',
|
216
|
+
'south georgia and south sandwich islans' => 'sx',
|
217
|
+
'saint barthelemy' => 'tb',
|
218
|
+
'turks and caicos islands' => 'tk',
|
219
|
+
'tokelau' => 'tl',
|
220
|
+
'saint vincent' => 'vc',
|
170
221
|
'the grenadines' => 'vc',
|
171
222
|
'saint vincent and the grenadines' => 'vc',
|
172
223
|
'samoa' => 'ws',
|
@@ -185,6 +236,8 @@ module Worldfactbook
|
|
185
236
|
'solomon islands' => 'bp',
|
186
237
|
'somalia' => 'so',
|
187
238
|
'south africa' => 'sf',
|
239
|
+
'south sudan' => 'od',
|
240
|
+
'southern ocean' => 'oo',
|
188
241
|
'spain' => 'sp',
|
189
242
|
'sri lanka' => 'ce',
|
190
243
|
'sudan' => 'su',
|
@@ -202,6 +255,7 @@ module Worldfactbook
|
|
202
255
|
'tonga' => 'tn',
|
203
256
|
'trinidad' => 'td',
|
204
257
|
'tobago' => 'td',
|
258
|
+
'trinidad and tobago' => 'td',
|
205
259
|
'tunisia' => 'ts',
|
206
260
|
'turkey' => 'tu',
|
207
261
|
'turkmenistan' => 'tx',
|
@@ -210,17 +264,35 @@ module Worldfactbook
|
|
210
264
|
'ukraine' => 'up',
|
211
265
|
'united arab emirates' => 'ae',
|
212
266
|
'united kingdom' => 'uk',
|
267
|
+
'united states pacific islands wildlife refuges' => 'um',
|
213
268
|
'united states' => 'us',
|
214
269
|
'uruguay' => 'uy',
|
215
270
|
'uzbekistan' => 'uz',
|
216
271
|
'vanuatu' => 'nh',
|
217
272
|
'venezuela' => 've',
|
273
|
+
'british virgin islands' => 'vi',
|
274
|
+
'virgin islands' => 'vq',
|
218
275
|
'vietnam' => 'vm',
|
276
|
+
'vatican city' => 'vt',
|
219
277
|
'west bank' => 'we',
|
278
|
+
'wallis and futuna' => 'wf',
|
279
|
+
'wallis' => 'wf',
|
280
|
+
'futuna' => 'wf',
|
281
|
+
'western sahara' => 'wi',
|
282
|
+
'wake island' => 'wq',
|
283
|
+
'samoa' => 'ws',
|
284
|
+
'indian ocean' => 'xo',
|
285
|
+
'arctic ocean' => 'xq',
|
220
286
|
'yemen' => 'ym',
|
221
287
|
'zambia' => 'za',
|
222
288
|
'zimbabwe' => 'zi',
|
289
|
+
'atlantic ocean' => 'zh',
|
290
|
+
'pacific ocean' => 'zn',
|
223
291
|
'european union' => 'ee' }
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
224
296
|
end
|
225
297
|
|
226
298
|
def code
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: worldfactbook
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Sayem Islam
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-11-05 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|
@@ -154,7 +154,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
154
154
|
requirements:
|
155
155
|
- - ">="
|
156
156
|
- !ruby/object:Gem::Version
|
157
|
-
hash:
|
157
|
+
hash: 3726361664372757620
|
158
158
|
segments:
|
159
159
|
- 0
|
160
160
|
version: "0"
|