country_state_select 0.0.1 → 0.0.2
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.
- checksums.yaml +5 -13
- data/README.md +3 -0
- data/lib/country_state_select.rb +491 -3
- data/lib/country_state_select/version.rb +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
MjEzOTQ1MDI0NWYyZWQzYzY3YzMyMDI1ZDhiZGJlNTQ5NWEwNjMxZA==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 9f3a98588eef4a037b680693a3efa904b2e3ed3c
|
4
|
+
data.tar.gz: 5d2215337e433455e477892c4306095546a4dcfd
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
MjMyZDFiNTQwNGZmODFmNjFmOTcyNjFiYTQ3Zjk1NzMzMTU1YmMwMjVlNDdk
|
11
|
-
NzQ0NDI4OTMzYTEwZDk5MmUzYmRiMzZjOGM2Njg5MjQ5M2Q2NzE=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ZmUzODY5YjM3MzU4NjY0YjYwOWQ2ODFiMWFmYmIyNjNlMmM2M2I2ZDJkMjkz
|
14
|
-
NzcwYmY0OGU1NWVlZGFlOGYxNGE0Y2QyMjRhMGVhNWJkYTFjNTFiNmEwNjhm
|
15
|
-
M2JmZmM2NWYzMmQ5ZjhkZDU1Yjc0YWQ1MDMxNTU0ZjlhNjA0Mjk=
|
6
|
+
metadata.gz: 4d0713722f49ebdfdb39b64e6c1420f7ad6e35c4a4c12f75747906e49e7e18374b57d32e1f9f249b4fdebd583b8a272ca108a56379ffaae6ff1a00097b69aea9
|
7
|
+
data.tar.gz: 4198332bb9ab3982b79803efb2d970169291e9963fcb7b3b8071c56b48442fded9e5d2d022a850e6060ee4446253a0fd6fc242aef282889effe5d8365f20c5ef
|
data/README.md
CHANGED
@@ -23,3 +23,6 @@ Or install it yourself as:
|
|
23
23
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
24
24
|
4. Push to the branch (`git push origin my-new-feature`)
|
25
25
|
5. Create a new Pull Request
|
26
|
+
|
27
|
+
|
28
|
+
##Currently I m working on this, state will add soon on this also refector the code and need to add the test case
|
data/lib/country_state_select.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require "country_state_select/version"
|
2
2
|
|
3
3
|
module CountryStateSelect
|
4
|
-
|
4
|
+
#added all the countries
|
5
5
|
COUNTRIES = ["Afghanistan", "Aland Islands", "Albania", "Algeria", "American Samoa", "Andorra", "Angola",
|
6
6
|
"Anguilla", "Antarctica", "Antigua And Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria",
|
7
7
|
"Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin",
|
@@ -35,7 +35,495 @@ module CountryStateSelect
|
|
35
35
|
"Venezuela, Bolivarian Republic of", "Viet Nam", "Virgin Islands, British", "Virgin Islands, U.S.",
|
36
36
|
"Wallis and Futuna", "Western Sahara", "Yemen", "Zambia", "Zimbabwe"]
|
37
37
|
|
38
|
+
INDIAN_STATES = [
|
39
|
+
'AP' => 'Andhra Pradesh',
|
40
|
+
'AR' => 'Arunachal Pradesh',
|
41
|
+
'AS' => 'Assam',
|
42
|
+
'BR' => 'Bihar',
|
43
|
+
'CT' => 'Chhattisgarh',
|
44
|
+
'GA' => 'Goa',
|
45
|
+
'GJ' => 'Gujarat',
|
46
|
+
'HR' => 'Haryana',
|
47
|
+
'HP' => 'Himachal Pradesh',
|
48
|
+
'JK' => 'Jammu & Kashmir',
|
49
|
+
'JH' => 'Jharkhand',
|
50
|
+
'KA' => 'Karnataka',
|
51
|
+
'KL' => 'Kerala',
|
52
|
+
'MP' => 'Madhya Pradesh',
|
53
|
+
'MH' => 'Maharashtra',
|
54
|
+
'MN' => 'Manipur',
|
55
|
+
'ML' => 'Meghalaya',
|
56
|
+
'MZ' => 'Mizoram',
|
57
|
+
'NL' => 'Nagaland',
|
58
|
+
'OR' => 'Odisha',
|
59
|
+
'PB' => 'Punjab',
|
60
|
+
'RJ' => 'Rajasthan',
|
61
|
+
'SK' => 'Sikkim',
|
62
|
+
'TN' => 'Tamil Nadu',
|
63
|
+
'TR' => 'Tripura',
|
64
|
+
'UK' => 'Uttarakhand',
|
65
|
+
'UP' => 'Uttar Pradesh',
|
66
|
+
'WB' => 'West Bengal',
|
67
|
+
]
|
68
|
+
INDIAN_TERRIOTORY = [
|
69
|
+
'AN' => 'Andaman & Nicobar',
|
70
|
+
'CH' => 'Chandigarh',
|
71
|
+
'DN' => 'Dadra and Nagar Haveli',
|
72
|
+
'DD' => 'Daman & Diu',
|
73
|
+
'DL' => 'Delhi',
|
74
|
+
'LD' => 'Lakshadweep',
|
75
|
+
'PY' => 'Puducherry',
|
76
|
+
]
|
77
|
+
|
78
|
+
USA_STATE_LIST = [
|
79
|
+
'AL'=>"Alabama",
|
80
|
+
'AK'=>"Alaska",
|
81
|
+
'AZ'=>"Arizona",
|
82
|
+
'AR'=>"Arkansas",
|
83
|
+
'CA'=>"California",
|
84
|
+
'CO'=>"Colorado",
|
85
|
+
'CT'=>"Connecticut",
|
86
|
+
'DE'=>"Delaware",
|
87
|
+
'DC'=>"District Of Columbia",
|
88
|
+
'FL'=>"Florida",
|
89
|
+
'GA'=>"Georgia",
|
90
|
+
'HI'=>"Hawaii",
|
91
|
+
'ID'=>"Idaho",
|
92
|
+
'IL'=>"Illinois",
|
93
|
+
'IN'=>"Indiana",
|
94
|
+
'IA'=>"Iowa",
|
95
|
+
'KS'=>"Kansas",
|
96
|
+
'KY'=>"Kentucky",
|
97
|
+
'LA'=>"Louisiana",
|
98
|
+
'ME'=>"Maine",
|
99
|
+
'MD'=>"Maryland",
|
100
|
+
'MA'=>"Massachusetts",
|
101
|
+
'MI'=>"Michigan",
|
102
|
+
'MN'=>"Minnesota",
|
103
|
+
'MS'=>"Mississippi",
|
104
|
+
'MO'=>"Missouri",
|
105
|
+
'MT'=>"Montana",
|
106
|
+
'NE'=>"Nebraska",
|
107
|
+
'NV'=>"Nevada",
|
108
|
+
'NH'=>"New Hampshire",
|
109
|
+
'NJ'=>"New Jersey",
|
110
|
+
'NM'=>"New Mexico",
|
111
|
+
'NY'=>"New York",
|
112
|
+
'NC'=>"North Carolina",
|
113
|
+
'ND'=>"North Dakota",
|
114
|
+
'OH'=>"Ohio",
|
115
|
+
'OK'=>"Oklahoma",
|
116
|
+
'OR'=>"Oregon",
|
117
|
+
'PA'=>"Pennsylvania",
|
118
|
+
'RI'=>"Rhode Island",
|
119
|
+
'SC'=>"South Carolina",
|
120
|
+
'SD'=>"South Dakota",
|
121
|
+
'TN'=>"Tennessee",
|
122
|
+
'TX'=>"Texas",
|
123
|
+
'UT'=>"Utah",
|
124
|
+
'VT'=>"Vermont",
|
125
|
+
'VA'=>"Virginia",
|
126
|
+
'WA'=>"Washington",
|
127
|
+
'WV'=>"West Virginia",
|
128
|
+
'WI'=>"Wisconsin",
|
129
|
+
'WY'=>"Wyoming"
|
130
|
+
]
|
131
|
+
|
132
|
+
CANADIAN_STATES = [
|
133
|
+
"BC" => "British Columbia",
|
134
|
+
"ON" => "Ontario",
|
135
|
+
"NL" => "Newfoundland and Labrador",
|
136
|
+
"NS" => "Nova Scotia",
|
137
|
+
"PE" => "Prince Edward Island",
|
138
|
+
"NB" => "New Brunswick",
|
139
|
+
"QC" => "Quebec",
|
140
|
+
"MB" => "Manitoba",
|
141
|
+
"SK" => "Saskatchewan",
|
142
|
+
"AB" => "Alberta",
|
143
|
+
"NT" => "Northwest Territories",
|
144
|
+
"NU" => "Nunavut",
|
145
|
+
"YT" => "Yukon Territory"
|
146
|
+
]
|
147
|
+
|
148
|
+
|
149
|
+
UK_STATES = [
|
150
|
+
'GSY' => "Guernsey",
|
151
|
+
'JSY' => "Jersey",
|
152
|
+
'BDG' => "Barking and Dagenham",
|
153
|
+
'BNE' => "Barnet",
|
154
|
+
'BNS' => "Barnsley",
|
155
|
+
'BAS' => "Bath and North East Somerset",
|
156
|
+
'BDF' => "Bedfordshire",
|
157
|
+
'BEX' => "Bexley",
|
158
|
+
'BIR' => "Birmingham",
|
159
|
+
'BBD' => "Blackburn with Darwen",
|
160
|
+
'BPL' => "Blackpool",
|
161
|
+
'BOL' => "Bolton",
|
162
|
+
'BMH' => "Bournemouth",
|
163
|
+
'BRC' => "Bracknell Forest",
|
164
|
+
'BRD' => "Bradford",
|
165
|
+
'BEN' => "Brent",
|
166
|
+
'BNH' => "Brighton and Hove",
|
167
|
+
'BST' => "Bristol City of",
|
168
|
+
'BRY' => "Bromley",
|
169
|
+
'BKM' => "Buckinghamshire",
|
170
|
+
'BUR' => "Bury",
|
171
|
+
'CLD' => "Calderdale",
|
172
|
+
'CAM' => "Cambridgeshire",
|
173
|
+
'CMD' => "Camden",
|
174
|
+
'CHS' => "Cheshire",
|
175
|
+
'CON' => "Cornwall",
|
176
|
+
'COV' => "Coventry (West Midlands district)",
|
177
|
+
'CRY' => "Croydon",
|
178
|
+
'CMA' => "Cumbria",
|
179
|
+
'DAL' => "Darlington",
|
180
|
+
'DER' => "Derby",
|
181
|
+
'DBY' => "Derbyshire",
|
182
|
+
'DEV' => "Devon",
|
183
|
+
'DNC' => "Doncaster",
|
184
|
+
'DOR' => "Dorset",
|
185
|
+
'DUD' => "Dudley (West Midlands district)",
|
186
|
+
'DUR' => "Durham",
|
187
|
+
'EAL' => "Ealing",
|
188
|
+
'ERY' => "East Riding of Yorkshire",
|
189
|
+
'ESX' => "East Sussex",
|
190
|
+
'ENF' => "Enfield",
|
191
|
+
'ESS' => "Essex",
|
192
|
+
'GAT' => "Gateshead (Tyne & Wear district)",
|
193
|
+
'GLS' => "Gloucestershire",
|
194
|
+
'GRE' => "Greenwich",
|
195
|
+
'HCK' => "Hackney",
|
196
|
+
'HAL' => "Halton",
|
197
|
+
'HMF' => "Hammersmith and Fulham",
|
198
|
+
'HAM' => "Hampshire",
|
199
|
+
'HRY' => "Haringey",
|
200
|
+
'HRW' => "Harrow",
|
201
|
+
'HPL' => "Hartlepool",
|
202
|
+
'HAV' => "Havering",
|
203
|
+
'HEF' => "Herefordshire County of",
|
204
|
+
'HRT' => "Hertfordshire",
|
205
|
+
'HIL' => "Hillingdon",
|
206
|
+
'HNS' => "Hounslow",
|
207
|
+
'IOW' => "Isle of Wight",
|
208
|
+
'IOS' => "Isles of Scilly",
|
209
|
+
'ISL' => "Islington",
|
210
|
+
'KEC' => "Kensington and Chelsea",
|
211
|
+
'KEN' => "Kent",
|
212
|
+
'KHL' => "Kingston upon Hull City of",
|
213
|
+
'KTT' => "Kingston upon Thames",
|
214
|
+
'KIR' => "Kirklees",
|
215
|
+
'KWL' => "Knowsley",
|
216
|
+
'LBH' => "Lambeth",
|
217
|
+
'LAN' => "Lancashire",
|
218
|
+
'LDS' => "Leeds",
|
219
|
+
'LCE' => "Leicester",
|
220
|
+
'LEC' => "Leicestershire",
|
221
|
+
'LEW' => "Lewisham",
|
222
|
+
'LIN' => "Lincolnshire",
|
223
|
+
'LIV' => "Liverpool",
|
224
|
+
'LND' => "London City of",
|
225
|
+
'LUT' => "Luton",
|
226
|
+
'MAN' => "Manchester",
|
227
|
+
'MDW' => "Medway",
|
228
|
+
'MRT' => "Merton",
|
229
|
+
'MDB' => "Middlesbrough",
|
230
|
+
'MIK' => "Milton Keynes",
|
231
|
+
'NET' => "Newcastle upon Tyne",
|
232
|
+
'NWM' => "Newham",
|
233
|
+
'NFK' => "Norfolk",
|
234
|
+
'NEL' => "North East Lincolnshire",
|
235
|
+
'NLN' => "North Lincolnshire",
|
236
|
+
'NSM' => "North Somerset",
|
237
|
+
'NTY' => "North Tyneside",
|
238
|
+
'NYK' => "North Yorkshire",
|
239
|
+
'NTH' => "Northamptonshire",
|
240
|
+
'NBL' => "Northumberland",
|
241
|
+
'NGM' => "Nottingham",
|
242
|
+
'NTT' => "Nottinghamshire",
|
243
|
+
'OLD' => "Oldham",
|
244
|
+
'OXF' => "Oxfordshire",
|
245
|
+
'PTE' => "Peterborough",
|
246
|
+
'PLY' => "Plymouth",
|
247
|
+
'POL' => "Poole",
|
248
|
+
'POR' => "Portsmouth",
|
249
|
+
'RDG' => "Reading",
|
250
|
+
'RDB' => "Redbridge",
|
251
|
+
'RCC' => "Redcar and Cleveland",
|
252
|
+
'RIC' => "Richmond upon Thames",
|
253
|
+
'RCH' => "Rochdale",
|
254
|
+
'ROT' => "Rotherham",
|
255
|
+
'RUT' => "Rutland",
|
256
|
+
'SHN' => "St Helens",
|
257
|
+
'SLF' => "Salford",
|
258
|
+
'SAW' => "Sandwell",
|
259
|
+
'SFT' => "Sefton",
|
260
|
+
'SHF' => "Sheffield",
|
261
|
+
'SHR' => "Shropshire",
|
262
|
+
'SLG' => "Slough",
|
263
|
+
'SOL' => "Solihull",
|
264
|
+
'SOM' => "Somerset",
|
265
|
+
'SGC' => "South Gloucestershire",
|
266
|
+
'STY' => "South Tyneside",
|
267
|
+
'STH' => "Southampton",
|
268
|
+
'SOS' => "Southend-on-Sea",
|
269
|
+
'SWK' => "Southwark",
|
270
|
+
'STS' => "Staffordshire",
|
271
|
+
'SKP' => "Stockport",
|
272
|
+
'STT' => "Stockton-on-Tees",
|
273
|
+
'STE' => "Stoke-on-Trent",
|
274
|
+
'SFK' => "Suffolk",
|
275
|
+
'SND' => "Sunderland",
|
276
|
+
'SRY' => "Surrey",
|
277
|
+
'STN' => "Sutton",
|
278
|
+
'SWD' => "Swindon",
|
279
|
+
'TAM' => "Tameside",
|
280
|
+
'TFW' => "Telford and Wrekin",
|
281
|
+
'THR' => "Thurrock",
|
282
|
+
'TOB' => "Torbay",
|
283
|
+
'TWH' => "Tower Hamlets",
|
284
|
+
'TRF' => "Trafford",
|
285
|
+
'WKF' => "Wakefield",
|
286
|
+
'WLL' => "Walsall",
|
287
|
+
'WFT' => "Waltham Forest",
|
288
|
+
'WND' => "Wandsworth",
|
289
|
+
'WRT' => "Warrington",
|
290
|
+
'WAR' => "Warwickshire",
|
291
|
+
'WBK' => "West Berkshire",
|
292
|
+
'WSX' => "West Sussex",
|
293
|
+
'WSM' => "Westminster",
|
294
|
+
'WGN' => "Wigan",
|
295
|
+
'WIL' => "Wiltshire",
|
296
|
+
'WNM' => "Windsor and Maidenhead",
|
297
|
+
'WRL' => "Wirral",
|
298
|
+
'WOK' => "Wokingham",
|
299
|
+
'WLV' => "Wolverhampton",
|
300
|
+
'WOR' => "Worcestershire",
|
301
|
+
'YOR' => "York",
|
302
|
+
'ANT' => "Antrim",
|
303
|
+
'ARD' => "Ards",
|
304
|
+
'ARM' => "Armagh",
|
305
|
+
'BLA' => "Ballymena",
|
306
|
+
'BLY' => "Ballymoney",
|
307
|
+
'BNB' => "Banbridge",
|
308
|
+
'BFS' => "Belfast",
|
309
|
+
'CKF' => "Carrickfergus",
|
310
|
+
'CSR' => "Castlereagh",
|
311
|
+
'CLR' => "Coleraine",
|
312
|
+
'CKT' => "Cookstown",
|
313
|
+
'CGV' => "Craigavon",
|
314
|
+
'DRY' => "Derry",
|
315
|
+
'DOW' => "Down",
|
316
|
+
'DGN' => "Dungannon and South Tyrone",
|
317
|
+
'FER' => "Fermanagh",
|
318
|
+
'LRN' => "Larne",
|
319
|
+
'LMV' => "Limavady",
|
320
|
+
'LSB' => "Lisburn",
|
321
|
+
'MFT' => "Magherafelt",
|
322
|
+
'MYL' => "Moyle",
|
323
|
+
'NYM' => "Newry and Mourne",
|
324
|
+
'NTA' => "Newtownabbey",
|
325
|
+
'NDN' => "North Down",
|
326
|
+
'OMH' => "Omagh",
|
327
|
+
'STB' => "Strabane",
|
328
|
+
'ABE' => "Aberdeen",
|
329
|
+
'ABD' => "Aberdeenshire",
|
330
|
+
'ANS' => "Angus",
|
331
|
+
'AGB' => "Argyll and Bute",
|
332
|
+
'CLK' => "Clackmannanshire",
|
333
|
+
'DGY' => "Dumfries and Galloway",
|
334
|
+
'DND' => "Dundee",
|
335
|
+
'EAY' => "East Ayrshire",
|
336
|
+
'EDU' => "East Dunbartonshire",
|
337
|
+
'ELN' => "East Lothian",
|
338
|
+
'ERW' => "East Renfrewshire",
|
339
|
+
'EDH' => "Edinburgh",
|
340
|
+
'ELS' => "Eilean Siar",
|
341
|
+
'FAL' => "Falkirk",
|
342
|
+
'FIF' => "Fife",
|
343
|
+
'GLG' => "Glasgow",
|
344
|
+
'HLD' => "Highland",
|
345
|
+
'IVC' => "Inverclyde",
|
346
|
+
'NAY' => "North Ayrshire",
|
347
|
+
'NLK' => "North Lanarkshire",
|
348
|
+
'ORK' => "Orkney Islands",
|
349
|
+
'PKN' => "Perth and Kinross",
|
350
|
+
'MLN' => "Midlothian",
|
351
|
+
'MRY' => "Moray",
|
352
|
+
'RFW' => "Renfrewshire",
|
353
|
+
'SCB' => "Scottish Borders The",
|
354
|
+
'ZET' => "Shetland Islands",
|
355
|
+
'SAY' => "South Ayrshire",
|
356
|
+
'SLK' => "South Lanarkshire",
|
357
|
+
'STG' => "Stirling",
|
358
|
+
'WDU' => "West Dunbartonshire",
|
359
|
+
'WLN' => "West Lothian",
|
360
|
+
'BGW' => "Blaenau Gwent",
|
361
|
+
'BGE' => "Bridgend",
|
362
|
+
'CAY' => "Caerphilly",
|
363
|
+
'CRF' => "Cardiff",
|
364
|
+
'CMN' => "Carmarthenshire",
|
365
|
+
'CGN' => "Ceredigion",
|
366
|
+
'CWY' => "Conwy",
|
367
|
+
'DEN' => "Denbighshire",
|
368
|
+
'FLN' => "Flintshire",
|
369
|
+
'GWN' => "Gwynedd",
|
370
|
+
'AGY' => "Isle of Anglesey",
|
371
|
+
'MTY' => "Merthyr Tydfil",
|
372
|
+
'MON' => "Monmouthshire",
|
373
|
+
'NTL' => "Neath Port Talbot",
|
374
|
+
'NWP' => "Newport",
|
375
|
+
'PEM' => "Pembrokeshire",
|
376
|
+
'POW' => "Powys",
|
377
|
+
'RCT' => "Rhondda Cynon Taf",
|
378
|
+
'SWA' => "Swansea",
|
379
|
+
'TOF' => "Torfaen",
|
380
|
+
'VGL' => "Vale of Glamorgan",
|
381
|
+
'WRX' => "Wrexham",
|
382
|
+
'ABD' => 'Aberdeenshire',
|
383
|
+
'ALD' => 'Alderney',
|
384
|
+
'AGY' => 'Anglesey (Isle of)',
|
385
|
+
'ANS' => 'Angus',
|
386
|
+
'AGB' => 'Argyll and Bute',
|
387
|
+
'AYR' => 'Ayrshire',
|
388
|
+
'BAN' => 'Banffshire',
|
389
|
+
'BDF' => 'Bedfordshire',
|
390
|
+
'BRK' => 'Berkshire',
|
391
|
+
'BEW' => 'Berwickshire',
|
392
|
+
'BGW' => 'Blaenau Gwent',
|
393
|
+
'BOR' => 'Borders',
|
394
|
+
'BGE' => 'Bridgend',
|
395
|
+
'BST' => 'Bristol',
|
396
|
+
'BKM' => 'Buckinghamshire',
|
397
|
+
'CAY' => 'Caerphilly',
|
398
|
+
'CAI' => 'Caithness',
|
399
|
+
'CAM' => 'Cambridgeshire',
|
400
|
+
'CRF' => 'Cardiff',
|
401
|
+
'CMN' => 'Carmarthenshire',
|
402
|
+
'CEN' => 'Central Scotland',
|
403
|
+
'CGN' => 'Ceredigion',
|
404
|
+
'CHI' => 'Channel Islands',
|
405
|
+
'CHS' => 'Cheshire',
|
406
|
+
'CLK' => 'Clackmannanshire',
|
407
|
+
'CWD' => 'Clwyd',
|
408
|
+
'CWY' => 'Conwy',
|
409
|
+
'CON' => 'Cornwall',
|
410
|
+
'ANT' => 'County Antrim',
|
411
|
+
'ARM' => 'County Armagh',
|
412
|
+
'DOW' => 'County Down',
|
413
|
+
'DUR' => 'County Durham',
|
414
|
+
'TYR' => 'County Tyrone',
|
415
|
+
'CMA' => 'Cumbria',
|
416
|
+
'DEN' => 'Denbighshire',
|
417
|
+
'DER' => 'Derbyshire',
|
418
|
+
'DEV' => 'Devon',
|
419
|
+
'DOR' => 'Dorset',
|
420
|
+
'DGY' => 'Dumfries & Galloway',
|
421
|
+
'DNB' => 'Dunbartonshire',
|
422
|
+
'DYD' => 'Dyfed',
|
423
|
+
'ELN' => 'East Lothian',
|
424
|
+
'ERY' => 'East Riding of Yorkshire',
|
425
|
+
'ESX' => 'East Sussex',
|
426
|
+
'ESS' => 'Essex',
|
427
|
+
'FER' => 'Fermanagh',
|
428
|
+
'FIF' => 'Fife',
|
429
|
+
'FLN' => 'Flintshire',
|
430
|
+
'GLA' => 'Glamorgan',
|
431
|
+
'GLS' => 'Gloucestershire',
|
432
|
+
'GMP' => 'Grampian',
|
433
|
+
'GSY' => 'Guernsey',
|
434
|
+
'GNT' => 'Gwent',
|
435
|
+
'GWN' => 'Gwynedd',
|
436
|
+
'HAM' => 'Hampshire',
|
437
|
+
'HEF' => 'Herefordshire',
|
438
|
+
'HRT' => 'Hertfordshire',
|
439
|
+
'HLD' => 'Highlands',
|
440
|
+
'INV' => 'Inverness-shire',
|
441
|
+
'IOM' => 'Isle of Man',
|
442
|
+
'IOW' => 'Isle of Wight',
|
443
|
+
'JSY' => 'Jersey',
|
444
|
+
'KEN' => 'Kent',
|
445
|
+
'KCD' => 'Kincardineshire',
|
446
|
+
'KRS' => 'Kinross-shire',
|
447
|
+
'KKD' => 'Kirkcudbrightshire',
|
448
|
+
'LKS' => 'Lanarkshire',
|
449
|
+
'LAN' => 'Lancashire',
|
450
|
+
'LEI' => 'Leicestershire',
|
451
|
+
'LIN' => 'Lincolnshire',
|
452
|
+
'LND' => 'London',
|
453
|
+
'LDY' => 'Londonderry',
|
454
|
+
'GTM' => 'Manchester (Greater)',
|
455
|
+
'MSY' => 'Merseyside',
|
456
|
+
'MTY' => 'Merthyr Tydfil',
|
457
|
+
'MDX' => 'Middlesex',
|
458
|
+
'MLN' => 'Midlothian',
|
459
|
+
'MON' => 'Monmouthshire',
|
460
|
+
'MOR' => 'Moray',
|
461
|
+
'NAI' => 'Nairnshire',
|
462
|
+
'NTL' => 'Neath Port Talbot',
|
463
|
+
'NWP' => 'Newport',
|
464
|
+
'NFK' => 'Norfolk',
|
465
|
+
'NYK' => 'North Yorkshire',
|
466
|
+
'NTH' => 'Northamptonshire',
|
467
|
+
'NBL' => 'Northumberland',
|
468
|
+
'NTT' => 'Nottinghamshire',
|
469
|
+
'OKI' => 'Orkney',
|
470
|
+
'OXF' => 'Oxfordshire',
|
471
|
+
'PEE' => 'Peeblesshire',
|
472
|
+
'PEM' => 'Pembrokeshire',
|
473
|
+
'PER' => 'Perthshire',
|
474
|
+
'POW' => 'Powys',
|
475
|
+
'RFW' => 'Renfrewshire',
|
476
|
+
'RCT' => 'Rhondda Cynon Taff',
|
477
|
+
'ROC' => 'Ross and Cromarty',
|
478
|
+
'ROX' => 'Roxburghshire',
|
479
|
+
'SEL' => 'Selkirkshire',
|
480
|
+
'SHI' => 'Shetland',
|
481
|
+
'SHR' => 'Shropshire',
|
482
|
+
'SOM' => 'Somerset',
|
483
|
+
'SYK' => 'South Yorkshire',
|
484
|
+
'STS' => 'Staffordshire',
|
485
|
+
'STI' => 'Stirlingshire',
|
486
|
+
'STD' => 'Strathclyde',
|
487
|
+
'SFK' => 'Suffolk',
|
488
|
+
'SRY' => 'Surrey',
|
489
|
+
'SUT' => 'Sutherland',
|
490
|
+
'SWA' => 'Swansea',
|
491
|
+
'TAY' => 'Tayside',
|
492
|
+
'TOF' => 'Torfaen',
|
493
|
+
'TWR' => 'Tyne & Wear',
|
494
|
+
'WAR' => 'Warwickshire',
|
495
|
+
'WLN' => 'West Lothian',
|
496
|
+
'WMD' => 'West Midlands',
|
497
|
+
'SXW' => 'West Sussex',
|
498
|
+
'WYK' => 'West Yorkshire',
|
499
|
+
'WIS' => 'Western Isles',
|
500
|
+
'WIG' => 'Wigtownshire',
|
501
|
+
'WIL' => 'Wiltshire',
|
502
|
+
'WOR' => 'Worcestershire',
|
503
|
+
'WRX' => 'Wrexham'
|
504
|
+
]
|
505
|
+
|
38
506
|
def self.countries
|
39
|
-
|
507
|
+
COUNTRIES
|
508
|
+
end
|
509
|
+
|
510
|
+
def self.inaia_all_states
|
511
|
+
(INDIAN_STATES << INDIAN_TERRIOTORY).uniq.flatten
|
512
|
+
end
|
513
|
+
|
514
|
+
def self.us_states
|
515
|
+
USA_STATE_LIST
|
516
|
+
end
|
517
|
+
|
518
|
+
def self.canadian_states
|
519
|
+
CANADIAN_STATES
|
520
|
+
end
|
521
|
+
|
522
|
+
def self.uk_states
|
523
|
+
UK_STATES
|
524
|
+
end
|
525
|
+
|
526
|
+
def self.all_states
|
527
|
+
(INDIAN_STATES << INDIAN_TERRIOTORY << USA_STATE_LIST << CANADIAN_STATES << UK_STATES).uniq.flatten
|
40
528
|
end
|
41
|
-
end
|
529
|
+
end
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: country_state_select
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arvind Vyas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.6'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.6'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
description: Can list out country and according to that can list stae.
|
@@ -45,7 +45,7 @@ executables: []
|
|
45
45
|
extensions: []
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
|
-
- .gitignore
|
48
|
+
- ".gitignore"
|
49
49
|
- Gemfile
|
50
50
|
- LICENSE.txt
|
51
51
|
- README.md
|
@@ -63,12 +63,12 @@ require_paths:
|
|
63
63
|
- lib
|
64
64
|
required_ruby_version: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
70
|
requirements:
|
71
|
-
- -
|
71
|
+
- - ">="
|
72
72
|
- !ruby/object:Gem::Version
|
73
73
|
version: '0'
|
74
74
|
requirements: []
|