get_country_codes 0.0.1

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.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/get_country_codes.rb +243 -0
  3. metadata +46 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6073a9176c87db994c54b25ca92fe4eab4ebef11
4
+ data.tar.gz: 3cb11d50321143f7e57b874ed0dfba65e273d24f
5
+ SHA512:
6
+ metadata.gz: a5eb9df35c2235a1e8f8be1f8b068ec8dfdff625233e649b1d934d4f46d429b0c8395a82652a63db49a5e2f622792653d8f4aa096e9432e96cb725cb0bd1645f
7
+ data.tar.gz: ad0835924a7c0811b893bef9f777a4e36627c69c49cf172fb433ec71a664796da9b6dde4f102f43f3bd1e39a11864cddfac3d89df56b3088093a473fab14422b
@@ -0,0 +1,243 @@
1
+ module CountryCodes
2
+ COUNTRY_CODES = {
3
+ 'AF'=>'Afghanistan',
4
+ 'AL'=>'Albania',
5
+ 'DZ'=>'Algeria',
6
+ 'AS'=>'American Samoa',
7
+ 'AD'=>'Andorra',
8
+ 'AO'=>'Angola',
9
+ 'AI'=>'Anguilla',
10
+ 'AQ'=>'Antarctica',
11
+ 'AG'=>'Antigua And Barbuda',
12
+ 'AR'=>'Argentina',
13
+ 'AM'=>'Armenia',
14
+ 'AW'=>'Aruba',
15
+ 'AU'=>'Australia',
16
+ 'AT'=>'Austria',
17
+ 'AZ'=>'Azerbaijan',
18
+ 'BS'=>'Bahamas',
19
+ 'BH'=>'Bahrain',
20
+ 'BD'=>'Bangladesh',
21
+ 'BB'=>'Barbados',
22
+ 'BY'=>'Belarus',
23
+ 'BE'=>'Belgium',
24
+ 'BZ'=>'Belize',
25
+ 'BJ'=>'Benin',
26
+ 'BM'=>'Bermuda',
27
+ 'BT'=>'Bhutan',
28
+ 'BO'=>'Bolivia',
29
+ 'BA'=>'Bosnia And Herzegovina',
30
+ 'BW'=>'Botswana',
31
+ 'BV'=>'Bouvet Island',
32
+ 'BR'=>'Brazil',
33
+ 'IO'=>'British Indian Ocean Territory',
34
+ 'BN'=>'Brunei',
35
+ 'BG'=>'Bulgaria',
36
+ 'BF'=>'Burkina Faso',
37
+ 'BI'=>'Burundi',
38
+ 'KH'=>'Cambodia',
39
+ 'CM'=>'Cameroon',
40
+ 'CA'=>'Canada',
41
+ 'CV'=>'Cape Verde',
42
+ 'KY'=>'Cayman Islands',
43
+ 'CF'=>'Central African Republic',
44
+ 'TD'=>'Chad',
45
+ 'CL'=>'Chile',
46
+ 'CN'=>'China',
47
+ 'CX'=>'Christmas Island',
48
+ 'CC'=>'Cocos (Keeling) Islands',
49
+ 'CO'=>'Columbia',
50
+ 'KM'=>'Comoros',
51
+ 'CG'=>'Congo',
52
+ 'CK'=>'Cook Islands',
53
+ 'CR'=>'Costa Rica',
54
+ 'CI'=>'Cote D\'Ivorie (Ivory Coast)',
55
+ 'HR'=>'Croatia (Hrvatska)',
56
+ 'CU'=>'Cuba',
57
+ 'CY'=>'Cyprus',
58
+ 'CZ'=>'Czech Republic',
59
+ 'CD'=>'Democratic Republic Of Congo (Zaire)',
60
+ 'DK'=>'Denmark',
61
+ 'DJ'=>'Djibouti',
62
+ 'DM'=>'Dominica',
63
+ 'DO'=>'Dominican Republic',
64
+ 'TP'=>'East Timor',
65
+ 'EC'=>'Ecuador',
66
+ 'EG'=>'Egypt',
67
+ 'SV'=>'El Salvador',
68
+ 'GQ'=>'Equatorial Guinea',
69
+ 'ER'=>'Eritrea',
70
+ 'EE'=>'Estonia',
71
+ 'ET'=>'Ethiopia',
72
+ 'FK'=>'Falkland Islands (Malvinas)',
73
+ 'FO'=>'Faroe Islands',
74
+ 'FJ'=>'Fiji',
75
+ 'FI'=>'Finland',
76
+ 'FR'=>'France',
77
+ 'FX'=>'France, Metropolitan',
78
+ 'GF'=>'French Guinea',
79
+ 'PF'=>'French Polynesia',
80
+ 'TF'=>'French Southern Territories',
81
+ 'GA'=>'Gabon',
82
+ 'GM'=>'Gambia',
83
+ 'GE'=>'Georgia',
84
+ 'DE'=>'Germany',
85
+ 'GH'=>'Ghana',
86
+ 'GI'=>'Gibraltar',
87
+ 'GR'=>'Greece',
88
+ 'GL'=>'Greenland',
89
+ 'GD'=>'Grenada',
90
+ 'GP'=>'Guadeloupe',
91
+ 'GU'=>'Guam',
92
+ 'GT'=>'Guatemala',
93
+ 'GN'=>'Guinea',
94
+ 'GW'=>'Guinea-Bissau',
95
+ 'GY'=>'Guyana',
96
+ 'HT'=>'Haiti',
97
+ 'HM'=>'Heard And McDonald Islands',
98
+ 'HN'=>'Honduras',
99
+ 'HK'=>'Hong Kong',
100
+ 'HU'=>'Hungary',
101
+ 'IS'=>'Iceland',
102
+ 'IN'=>'India',
103
+ 'ID'=>'Indonesia',
104
+ 'IR'=>'Iran',
105
+ 'IQ'=>'Iraq',
106
+ 'IE'=>'Ireland',
107
+ 'IL'=>'Israel',
108
+ 'IT'=>'Italy',
109
+ 'JM'=>'Jamaica',
110
+ 'JP'=>'Japan',
111
+ 'JO'=>'Jordan',
112
+ 'KZ'=>'Kazakhstan',
113
+ 'KE'=>'Kenya',
114
+ 'KI'=>'Kiribati',
115
+ 'KW'=>'Kuwait',
116
+ 'KG'=>'Kyrgyzstan',
117
+ 'LA'=>'Laos',
118
+ 'LV'=>'Latvia',
119
+ 'LB'=>'Lebanon',
120
+ 'LS'=>'Lesotho',
121
+ 'LR'=>'Liberia',
122
+ 'LY'=>'Libya',
123
+ 'LI'=>'Liechtenstein',
124
+ 'LT'=>'Lithuania',
125
+ 'LU'=>'Luxembourg',
126
+ 'MO'=>'Macau',
127
+ 'MK'=>'Macedonia',
128
+ 'MG'=>'Madagascar',
129
+ 'MW'=>'Malawi',
130
+ 'MY'=>'Malaysia',
131
+ 'MV'=>'Maldives',
132
+ 'ML'=>'Mali',
133
+ 'MT'=>'Malta',
134
+ 'MH'=>'Marshall Islands',
135
+ 'MQ'=>'Martinique',
136
+ 'MR'=>'Mauritania',
137
+ 'MU'=>'Mauritius',
138
+ 'YT'=>'Mayotte',
139
+ 'MX'=>'Mexico',
140
+ 'FM'=>'Micronesia',
141
+ 'MD'=>'Moldova',
142
+ 'MC'=>'Monaco',
143
+ 'MN'=>'Mongolia',
144
+ 'MS'=>'Montserrat',
145
+ 'MA'=>'Morocco',
146
+ 'MZ'=>'Mozambique',
147
+ 'MM'=>'Myanmar (Burma)',
148
+ 'NA'=>'Namibia',
149
+ 'NR'=>'Nauru',
150
+ 'NP'=>'Nepal',
151
+ 'NL'=>'Netherlands',
152
+ 'AN'=>'Netherlands Antilles',
153
+ 'NC'=>'New Caledonia',
154
+ 'NZ'=>'New Zealand',
155
+ 'NI'=>'Nicaragua',
156
+ 'NE'=>'Niger',
157
+ 'NG'=>'Nigeria',
158
+ 'NU'=>'Niue',
159
+ 'NF'=>'Norfolk Island',
160
+ 'KP'=>'North Korea',
161
+ 'MP'=>'Northern Mariana Islands',
162
+ 'NO'=>'Norway',
163
+ 'OM'=>'Oman',
164
+ 'PK'=>'Pakistan',
165
+ 'PW'=>'Palau',
166
+ 'PA'=>'Panama',
167
+ 'PG'=>'Papua New Guinea',
168
+ 'PY'=>'Paraguay',
169
+ 'PE'=>'Peru',
170
+ 'PH'=>'Philippines',
171
+ 'PN'=>'Pitcairn',
172
+ 'PL'=>'Poland',
173
+ 'PT'=>'Portugal',
174
+ 'PR'=>'Puerto Rico',
175
+ 'QA'=>'Qatar',
176
+ 'RE'=>'Reunion',
177
+ 'RO'=>'Romania',
178
+ 'RU'=>'Russia',
179
+ 'RW'=>'Rwanda',
180
+ 'SH'=>'Saint Helena',
181
+ 'KN'=>'Saint Kitts And Nevis',
182
+ 'LC'=>'Saint Lucia',
183
+ 'PM'=>'Saint Pierre And Miquelon',
184
+ 'VC'=>'Saint Vincent And The Grenadines',
185
+ 'SM'=>'San Marino',
186
+ 'ST'=>'Sao Tome And Principe',
187
+ 'SA'=>'Saudi Arabia',
188
+ 'SN'=>'Senegal',
189
+ 'SC'=>'Seychelles',
190
+ 'SL'=>'Sierra Leone',
191
+ 'SG'=>'Singapore',
192
+ 'SK'=>'Slovak Republic',
193
+ 'SI'=>'Slovenia',
194
+ 'SB'=>'Solomon Islands',
195
+ 'SO'=>'Somalia',
196
+ 'ZA'=>'South Africa',
197
+ 'GS'=>'South Georgia And South Sandwich Islands',
198
+ 'KR'=>'South Korea',
199
+ 'ES'=>'Spain',
200
+ 'LK'=>'Sri Lanka',
201
+ 'SD'=>'Sudan',
202
+ 'SR'=>'Suriname',
203
+ 'SJ'=>'Svalbard And Jan Mayen',
204
+ 'SZ'=>'Swaziland',
205
+ 'SE'=>'Sweden',
206
+ 'CH'=>'Switzerland',
207
+ 'SY'=>'Syria',
208
+ 'TW'=>'Taiwan',
209
+ 'TJ'=>'Tajikistan',
210
+ 'TZ'=>'Tanzania',
211
+ 'TH'=>'Thailand',
212
+ 'TG'=>'Togo',
213
+ 'TK'=>'Tokelau',
214
+ 'TO'=>'Tonga',
215
+ 'TT'=>'Trinidad And Tobago',
216
+ 'TN'=>'Tunisia',
217
+ 'TR'=>'Turkey',
218
+ 'TM'=>'Turkmenistan',
219
+ 'TC'=>'Turks And Caicos Islands',
220
+ 'TV'=>'Tuvalu',
221
+ 'UG'=>'Uganda',
222
+ 'UA'=>'Ukraine',
223
+ 'AE'=>'United Arab Emirates',
224
+ 'UK'=>'United Kingdom',
225
+ 'US'=>'United States',
226
+ 'UM'=>'United States Minor Outlying Islands',
227
+ 'UY'=>'Uruguay',
228
+ 'UZ'=>'Uzbekistan',
229
+ 'VU'=>'Vanuatu',
230
+ 'VA'=>'Vatican City (Holy See)',
231
+ 'VE'=>'Venezuela',
232
+ 'VN'=>'Vietnam',
233
+ 'VG'=>'Virgin Islands (British)',
234
+ 'VI'=>'Virgin Islands (US)',
235
+ 'WF'=>'Wallis And Futuna Islands',
236
+ 'EH'=>'Western Sahara',
237
+ 'WS'=>'Western Samoa',
238
+ 'YE'=>'Yemen',
239
+ 'YU'=>'Yugoslavia',
240
+ 'ZM'=>'Zambia',
241
+ 'ZW'=>'Zimbabwe'
242
+ }
243
+ end
metadata ADDED
@@ -0,0 +1,46 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: get_country_codes
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Satheesh kumar
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-09-03 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: ! 'The library gets the country name and returns the corresponding country
14
+ code. USAGE : include CountryCodes ex: COUNTRY_CODES.key(''india'')'
15
+ email:
16
+ - satheeshcsedct@gmail.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - lib/get_country_codes.rb
22
+ homepage: http://satheeshkumark.blogspot.in/
23
+ licenses: []
24
+ metadata: {}
25
+ post_install_message:
26
+ rdoc_options: []
27
+ require_paths:
28
+ - lib
29
+ required_ruby_version: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ required_rubygems_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ! '>='
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ requirements: []
40
+ rubyforge_project:
41
+ rubygems_version: 2.2.2
42
+ signing_key:
43
+ specification_version: 4
44
+ summary: Get the country code from country name
45
+ test_files: []
46
+ has_rdoc: