countries 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,6 +4,7 @@
4
4
  name: "Banteay Mean Chey [Bântéay Méanchey]"
5
5
  names:
6
6
  - "Banteay Mean Chey [Bântéay Méanchey]"
7
+ - banteay meanchey
7
8
  - b.chey
8
9
  - bm
9
10
  - b.m
@@ -12,6 +13,7 @@
12
13
  name: "Kracheh [Krâchéh]"
13
14
  names:
14
15
  - Kratié
16
+ - Kratie
15
17
  - kr.ch
16
18
  - kr
17
19
  - k.r
@@ -20,6 +22,7 @@
20
22
  name: "Mondol Kiri [Môndól Kiri]"
21
23
  names:
22
24
  - Mondolkiri
25
+ - Mondulkiri
23
26
  - m.ri
24
27
  - mk
25
28
  - m.k
@@ -36,13 +39,14 @@
36
39
  names:
37
40
  - "Preah Vihear [Preah Vihéar]"
38
41
  - pr.h
39
- - pr
40
- - p.r
42
+ - ph
43
+ - p.h
41
44
  ? "14"
42
45
  :
43
46
  name: "Prey Veaeng [Prey Vêng]"
44
47
  names:
45
48
  - "Prey Vêng"
49
+ - Prey Veng
46
50
  - pr.v
47
51
  - pv
48
52
  - p.v
@@ -80,8 +84,11 @@
80
84
  - "Preah Seihânu"
81
85
  - Sihanoukville
82
86
  - Kompong Som
87
+ - Kampong Som
88
+ - Kompong Saom
89
+ - Kampong Saom
83
90
  - k.som
84
- - sv
91
+ - k.saom
85
92
  - s.v
86
93
  ? "19"
87
94
  :
@@ -104,9 +111,9 @@
104
111
  name: "Svaay Rieng [Svay Rieng]"
105
112
  names:
106
113
  - "Svaay Rieng [Svay Rieng]"
114
+ - svay rieng
107
115
  - sv.r
108
- - sg
109
- - s.g
116
+ - svr
110
117
  ? "21"
111
118
  :
112
119
  name: "Taakaev [Takêv]"
@@ -120,6 +127,7 @@
120
127
  name: "Otdar Mean Chey [Otdâr Méanchey] "
121
128
  names:
122
129
  - "Otdar Mean Chey [Otdâr Méanchey] "
130
+ - Oddar Meanchey
123
131
  - o.chey
124
132
  - om
125
133
  - o.m
@@ -128,14 +136,13 @@
128
136
  name: "Krong Kep [Krong Kêb]"
129
137
  names:
130
138
  - "Krong Kep [Krong Kêb]"
131
- - kep
132
- - ke
133
- - k.e
139
+ - Kep
134
140
  ? "24"
135
141
  :
136
142
  name: "Krong Pailin [Krong Pailin]"
137
143
  names:
138
144
  - "Krong Pailin [Krong Pailin]"
145
+ - Pailin
139
146
  - pl
140
147
  - p.l
141
148
  ? "3"
@@ -143,6 +150,8 @@
143
150
  name: "Kampong Chaam [Kâmpóng Cham]"
144
151
  names:
145
152
  - "Kompong Cham"
153
+ - "Kompong Chaam"
154
+ - "Kampong Cham"
146
155
  - k.cham
147
156
  - kc
148
157
  - k.c
@@ -160,6 +169,8 @@
160
169
  names:
161
170
  - "Kompong Speu"
162
171
  - "Kompong Spoe"
172
+ - "Kampong Speu"
173
+ - "Kampong Spoe"
163
174
  - k.speu
164
175
  - ks
165
176
  - k.s
@@ -169,6 +180,8 @@
169
180
  names:
170
181
  - "Kompong Thom"
171
182
  - "Kompong Thum"
183
+ - "Kampong Thom"
184
+ - "Kampong Thum"
172
185
  - k.thom
173
186
  - kt
174
187
  - k.t
@@ -185,6 +198,8 @@
185
198
  name: "Kandaal [Kândal]"
186
199
  names:
187
200
  - "Kandaal [Kândal]"
201
+ - Kandal
202
+ - Kondal
188
203
  - kd
189
204
  - k.d
190
205
  ? "9"
@@ -1,6 +1,4 @@
1
- $LOAD_PATH << File.expand_path(File.dirname(__FILE__))
2
-
3
- require 'yaml' unless defined?(YAML::ENGINE)
1
+ require 'yaml'
4
2
  require 'iso4217'
5
3
 
6
4
  require 'countries/select_helper'
@@ -50,6 +50,14 @@ describe ISO3166::Country do
50
50
  country.un_locode.should == 'US'
51
51
  end
52
52
 
53
+ it 'should be identical to itself' do
54
+ country.should == ISO3166::Country.search('US')
55
+ end
56
+
57
+ it 'should return language' do
58
+ country.languages[0].should == 'en'
59
+ end
60
+
53
61
  describe 'e164' do
54
62
  it 'should return country_code' do
55
63
  country.country_code.should == '1'
@@ -204,6 +212,7 @@ describe ISO3166::Country do
204
212
  its(:first) { should be_a(String) }
205
213
  its(:last) { should be_a(Hash) }
206
214
  end
215
+
207
216
  end
208
217
 
209
218
  describe "country finder methods" do
@@ -275,4 +284,12 @@ describe ISO3166::Country do
275
284
  end
276
285
  end
277
286
 
287
+ describe 'Languages' do
288
+ let(:german_speaking_countries) { ISO3166::Country.find_all_countries_by_languages('de') }
289
+
290
+ it "should find countries by language" do
291
+ german_speaking_countries.size.should == 6
292
+ end
293
+ end
294
+
278
295
  end
@@ -1,10 +1 @@
1
- $LOAD_PATH.unshift(File.dirname(__FILE__))
2
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
- require 'rubygems'
4
1
  require 'iso3166'
5
- require 'spec'
6
- require 'spec/autorun'
7
-
8
- Spec::Runner.configure do |config|
9
-
10
- end
metadata CHANGED
@@ -1,169 +1,71 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: countries
3
- version: !ruby/object:Gem::Version
4
- hash: 59
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.8.3
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 8
9
- - 2
10
- version: 0.8.2
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - hexorx
14
9
  - Joe Corcoran
15
10
  autorequire:
16
11
  bindir: bin
17
12
  cert_chain: []
18
-
19
- date: 2012-03-05 00:00:00 Z
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
22
- version_requirements: &id001 !ruby/object:Gem::Requirement
13
+ date: 2012-10-04 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: currencies
17
+ requirement: &70325488529920 !ruby/object:Gem::Requirement
23
18
  none: false
24
- requirements:
25
- - - "="
26
- - !ruby/object:Gem::Version
27
- hash: 15
28
- segments:
29
- - 0
30
- - 4
31
- - 0
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
32
22
  version: 0.4.0
33
- requirement: *id001
34
23
  type: :runtime
35
24
  prerelease: false
36
- name: currencies
37
- - !ruby/object:Gem::Dependency
38
- version_requirements: &id002 !ruby/object:Gem::Requirement
39
- none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- hash: 7
44
- segments:
45
- - 1
46
- - 6
47
- - 4
48
- version: 1.6.4
49
- requirement: *id002
50
- type: :development
51
- prerelease: false
52
- name: jeweler
53
- - !ruby/object:Gem::Dependency
54
- version_requirements: &id003 !ruby/object:Gem::Requirement
55
- none: false
56
- requirements:
57
- - - "="
58
- - !ruby/object:Gem::Version
59
- hash: 25
60
- segments:
61
- - 1
62
- - 3
63
- - 1
64
- version: 1.3.1
65
- requirement: *id003
66
- type: :development
67
- prerelease: false
25
+ version_requirements: *70325488529920
26
+ - !ruby/object:Gem::Dependency
68
27
  name: rspec
69
- - !ruby/object:Gem::Dependency
70
- version_requirements: &id004 !ruby/object:Gem::Requirement
71
- none: false
72
- requirements:
73
- - - "="
74
- - !ruby/object:Gem::Version
75
- hash: 49
76
- segments:
77
- - 0
78
- - 8
79
- - 7
80
- version: 0.8.7
81
- requirement: *id004
82
- type: :development
83
- prerelease: false
84
- name: rake
85
- - !ruby/object:Gem::Dependency
86
- version_requirements: &id005 !ruby/object:Gem::Requirement
28
+ requirement: &70325488529480 !ruby/object:Gem::Requirement
87
29
  none: false
88
- requirements:
89
- - - "="
90
- - !ruby/object:Gem::Version
91
- hash: 15
92
- segments:
93
- - 0
94
- - 6
95
- - 4
96
- version: 0.6.4
97
- requirement: *id005
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
98
34
  type: :development
99
35
  prerelease: false
36
+ version_requirements: *70325488529480
37
+ - !ruby/object:Gem::Dependency
100
38
  name: yard
101
- - !ruby/object:Gem::Dependency
102
- version_requirements: &id006 !ruby/object:Gem::Requirement
103
- none: false
104
- requirements:
105
- - - ">="
106
- - !ruby/object:Gem::Version
107
- hash: 23
108
- segments:
109
- - 0
110
- - 2
111
- - 0
112
- version: 0.2.0
113
- requirement: *id006
114
- type: :runtime
115
- prerelease: false
116
- name: currencies
117
- - !ruby/object:Gem::Dependency
118
- version_requirements: &id007 !ruby/object:Gem::Requirement
119
- none: false
120
- requirements:
121
- - - ">="
122
- - !ruby/object:Gem::Version
123
- hash: 3
124
- segments:
125
- - 0
126
- version: "0"
127
- requirement: *id007
128
- type: :development
129
- prerelease: false
130
- name: rspec
131
- - !ruby/object:Gem::Dependency
132
- version_requirements: &id008 !ruby/object:Gem::Requirement
39
+ requirement: &70325488529000 !ruby/object:Gem::Requirement
133
40
  none: false
134
- requirements:
135
- - - ">="
136
- - !ruby/object:Gem::Version
137
- hash: 3
138
- segments:
139
- - 0
140
- version: "0"
141
- requirement: *id008
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
44
+ version: '0'
142
45
  type: :development
143
46
  prerelease: false
144
- name: yard
145
- description: All sorts of useful information about every country packaged as pretty little country objects. It includes data from ISO 3166 (countries and subdivisions), ISO 4217 (currency), and E.164 (phone numbers). As a bonus it even adds a country_select helper to rails projects.
146
- email: hexorx@gmail.com
47
+ version_requirements: *70325488529000
48
+ description: All sorts of useful information about every country packaged as pretty
49
+ little country objects. It includes data from ISO 3166
50
+ email:
51
+ - hexorx@gmail.com
147
52
  executables: []
148
-
149
53
  extensions: []
150
-
151
- extra_rdoc_files:
152
- - LICENSE
153
- - README.markdown
154
- files:
54
+ extra_rdoc_files: []
55
+ files:
155
56
  - .document
57
+ - .gitignore
156
58
  - .rvmrc
157
59
  - Gemfile
158
60
  - Gemfile.lock
159
61
  - LICENSE
160
62
  - README.markdown
161
63
  - Rakefile
162
- - VERSION
163
64
  - countries.gemspec
164
65
  - lib/countries.rb
165
66
  - lib/countries/country.rb
166
67
  - lib/countries/select_helper.rb
68
+ - lib/countries/version.rb
167
69
  - lib/data/countries.yaml
168
70
  - lib/data/subdivisions/AD.yaml
169
71
  - lib/data/subdivisions/AE.yaml
@@ -365,36 +267,28 @@ files:
365
267
  - spec/spec_helper.rb
366
268
  homepage: http://github.com/hexorx/countries
367
269
  licenses: []
368
-
369
270
  post_install_message:
370
271
  rdoc_options: []
371
-
372
- require_paths:
272
+ require_paths:
373
273
  - lib
374
- required_ruby_version: !ruby/object:Gem::Requirement
274
+ required_ruby_version: !ruby/object:Gem::Requirement
375
275
  none: false
376
- requirements:
377
- - - ">="
378
- - !ruby/object:Gem::Version
379
- hash: 3
380
- segments:
381
- - 0
382
- version: "0"
383
- required_rubygems_version: !ruby/object:Gem::Requirement
276
+ requirements:
277
+ - - ! '>='
278
+ - !ruby/object:Gem::Version
279
+ version: '0'
280
+ required_rubygems_version: !ruby/object:Gem::Requirement
384
281
  none: false
385
- requirements:
386
- - - ">="
387
- - !ruby/object:Gem::Version
388
- hash: 3
389
- segments:
390
- - 0
391
- version: "0"
282
+ requirements:
283
+ - - ! '>='
284
+ - !ruby/object:Gem::Version
285
+ version: '0'
392
286
  requirements: []
393
-
394
287
  rubyforge_project:
395
288
  rubygems_version: 1.8.10
396
289
  signing_key:
397
290
  specification_version: 3
398
291
  summary: Gives you a country object full of all sorts of useful information.
399
- test_files: []
400
-
292
+ test_files:
293
+ - spec/country_spec.rb
294
+ - spec/spec_helper.rb
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.8.2