countries 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/countries.gemspec +8 -9
- data/lib/countries/country.rb +3 -1
- data/lib/countries/select_helper.rb +4 -4
- data/lib/data/countries.yaml +492 -0
- data/spec/country_spec.rb +9 -1
- metadata +22 -35
data/spec/country_spec.rb
CHANGED
@@ -41,6 +41,14 @@ describe ISO3166::Country do
|
|
41
41
|
it 'should return subregion' do
|
42
42
|
country.subregion.should == 'Northern America'
|
43
43
|
end
|
44
|
+
|
45
|
+
it 'should return ioc code' do
|
46
|
+
country.ioc.should == 'USA'
|
47
|
+
end
|
48
|
+
|
49
|
+
it 'should return UN/LOCODE' do
|
50
|
+
country.un_locode.should == 'US'
|
51
|
+
end
|
44
52
|
|
45
53
|
describe 'e164' do
|
46
54
|
it 'should return country_code' do
|
@@ -108,7 +116,7 @@ describe ISO3166::Country do
|
|
108
116
|
ISO3166::Country.search('US').should be_a(ISO3166::Country)
|
109
117
|
end
|
110
118
|
|
111
|
-
it 'should return
|
119
|
+
it 'should return false when an invalid alpha2 string is passed' do
|
112
120
|
ISO3166::Country.search('fubar').should be_false
|
113
121
|
end
|
114
122
|
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: countries
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 59
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 8
|
9
|
-
-
|
10
|
-
|
11
|
-
version: 0.8.1
|
9
|
+
- 2
|
10
|
+
version: 0.8.2
|
12
11
|
platform: ruby
|
13
12
|
authors:
|
14
13
|
- hexorx
|
@@ -17,11 +16,9 @@ autorequire:
|
|
17
16
|
bindir: bin
|
18
17
|
cert_chain: []
|
19
18
|
|
20
|
-
date:
|
21
|
-
default_executable:
|
19
|
+
date: 2012-03-05 00:00:00 Z
|
22
20
|
dependencies:
|
23
21
|
- !ruby/object:Gem::Dependency
|
24
|
-
name: currencies
|
25
22
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
26
23
|
none: false
|
27
24
|
requirements:
|
@@ -32,13 +29,12 @@ dependencies:
|
|
32
29
|
- 0
|
33
30
|
- 4
|
34
31
|
- 0
|
35
|
-
segments_generated: true
|
36
32
|
version: 0.4.0
|
37
|
-
prerelease: false
|
38
33
|
requirement: *id001
|
39
34
|
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
name: currencies
|
40
37
|
- !ruby/object:Gem::Dependency
|
41
|
-
name: jeweler
|
42
38
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
43
39
|
none: false
|
44
40
|
requirements:
|
@@ -49,13 +45,12 @@ dependencies:
|
|
49
45
|
- 1
|
50
46
|
- 6
|
51
47
|
- 4
|
52
|
-
segments_generated: true
|
53
48
|
version: 1.6.4
|
54
|
-
prerelease: false
|
55
49
|
requirement: *id002
|
56
50
|
type: :development
|
51
|
+
prerelease: false
|
52
|
+
name: jeweler
|
57
53
|
- !ruby/object:Gem::Dependency
|
58
|
-
name: rspec
|
59
54
|
version_requirements: &id003 !ruby/object:Gem::Requirement
|
60
55
|
none: false
|
61
56
|
requirements:
|
@@ -66,13 +61,12 @@ dependencies:
|
|
66
61
|
- 1
|
67
62
|
- 3
|
68
63
|
- 1
|
69
|
-
segments_generated: true
|
70
64
|
version: 1.3.1
|
71
|
-
prerelease: false
|
72
65
|
requirement: *id003
|
73
66
|
type: :development
|
67
|
+
prerelease: false
|
68
|
+
name: rspec
|
74
69
|
- !ruby/object:Gem::Dependency
|
75
|
-
name: rake
|
76
70
|
version_requirements: &id004 !ruby/object:Gem::Requirement
|
77
71
|
none: false
|
78
72
|
requirements:
|
@@ -83,13 +77,12 @@ dependencies:
|
|
83
77
|
- 0
|
84
78
|
- 8
|
85
79
|
- 7
|
86
|
-
segments_generated: true
|
87
80
|
version: 0.8.7
|
88
|
-
prerelease: false
|
89
81
|
requirement: *id004
|
90
82
|
type: :development
|
83
|
+
prerelease: false
|
84
|
+
name: rake
|
91
85
|
- !ruby/object:Gem::Dependency
|
92
|
-
name: yard
|
93
86
|
version_requirements: &id005 !ruby/object:Gem::Requirement
|
94
87
|
none: false
|
95
88
|
requirements:
|
@@ -100,13 +93,12 @@ dependencies:
|
|
100
93
|
- 0
|
101
94
|
- 6
|
102
95
|
- 4
|
103
|
-
segments_generated: true
|
104
96
|
version: 0.6.4
|
105
|
-
prerelease: false
|
106
97
|
requirement: *id005
|
107
98
|
type: :development
|
99
|
+
prerelease: false
|
100
|
+
name: yard
|
108
101
|
- !ruby/object:Gem::Dependency
|
109
|
-
name: currencies
|
110
102
|
version_requirements: &id006 !ruby/object:Gem::Requirement
|
111
103
|
none: false
|
112
104
|
requirements:
|
@@ -117,13 +109,12 @@ dependencies:
|
|
117
109
|
- 0
|
118
110
|
- 2
|
119
111
|
- 0
|
120
|
-
segments_generated: true
|
121
112
|
version: 0.2.0
|
122
|
-
prerelease: false
|
123
113
|
requirement: *id006
|
124
114
|
type: :runtime
|
115
|
+
prerelease: false
|
116
|
+
name: currencies
|
125
117
|
- !ruby/object:Gem::Dependency
|
126
|
-
name: rspec
|
127
118
|
version_requirements: &id007 !ruby/object:Gem::Requirement
|
128
119
|
none: false
|
129
120
|
requirements:
|
@@ -132,13 +123,12 @@ dependencies:
|
|
132
123
|
hash: 3
|
133
124
|
segments:
|
134
125
|
- 0
|
135
|
-
segments_generated: true
|
136
126
|
version: "0"
|
137
|
-
prerelease: false
|
138
127
|
requirement: *id007
|
139
128
|
type: :development
|
129
|
+
prerelease: false
|
130
|
+
name: rspec
|
140
131
|
- !ruby/object:Gem::Dependency
|
141
|
-
name: yard
|
142
132
|
version_requirements: &id008 !ruby/object:Gem::Requirement
|
143
133
|
none: false
|
144
134
|
requirements:
|
@@ -147,11 +137,11 @@ dependencies:
|
|
147
137
|
hash: 3
|
148
138
|
segments:
|
149
139
|
- 0
|
150
|
-
segments_generated: true
|
151
140
|
version: "0"
|
152
|
-
prerelease: false
|
153
141
|
requirement: *id008
|
154
142
|
type: :development
|
143
|
+
prerelease: false
|
144
|
+
name: yard
|
155
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.
|
156
146
|
email: hexorx@gmail.com
|
157
147
|
executables: []
|
@@ -373,7 +363,6 @@ files:
|
|
373
363
|
- lib/iso3166.rb
|
374
364
|
- spec/country_spec.rb
|
375
365
|
- spec/spec_helper.rb
|
376
|
-
has_rdoc: true
|
377
366
|
homepage: http://github.com/hexorx/countries
|
378
367
|
licenses: []
|
379
368
|
|
@@ -390,7 +379,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
390
379
|
hash: 3
|
391
380
|
segments:
|
392
381
|
- 0
|
393
|
-
segments_generated: true
|
394
382
|
version: "0"
|
395
383
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
396
384
|
none: false
|
@@ -400,12 +388,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
400
388
|
hash: 3
|
401
389
|
segments:
|
402
390
|
- 0
|
403
|
-
segments_generated: true
|
404
391
|
version: "0"
|
405
392
|
requirements: []
|
406
393
|
|
407
394
|
rubyforge_project:
|
408
|
-
rubygems_version: 1.
|
395
|
+
rubygems_version: 1.8.10
|
409
396
|
signing_key:
|
410
397
|
specification_version: 3
|
411
398
|
summary: Gives you a country object full of all sorts of useful information.
|