express_pigeon 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/express_pigeon.rb +306 -0
- data/lib/express_pigeon/version.rb +1 -1
- metadata +2 -2
data/lib/express_pigeon.rb
CHANGED
@@ -1,9 +1,315 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
require "express_pigeon/version"
|
2
4
|
require 'active_model'
|
3
5
|
require 'curb-fu'
|
4
6
|
require 'active_model/validations/date_format_validator'
|
5
7
|
|
6
8
|
module ExpressPigeon
|
9
|
+
module WebFormHelpers
|
10
|
+
def express_pigeon_states
|
11
|
+
{
|
12
|
+
"Alaska" => "AK",
|
13
|
+
"Alabama" => "AL",
|
14
|
+
"Arkansas" => "AR",
|
15
|
+
"Arizona" => "AZ",
|
16
|
+
"California" => "CA",
|
17
|
+
"Colorado" => "CO",
|
18
|
+
"Connecticut" => "CT",
|
19
|
+
"Delaware" => "DE",
|
20
|
+
"Florida" => "FL",
|
21
|
+
"Georgia" => "GA",
|
22
|
+
"Hawaii" => "HI",
|
23
|
+
"Iowa" => "IA",
|
24
|
+
"Idaho" => "ID",
|
25
|
+
"Illinois" => "IL",
|
26
|
+
"Indiana" => "IN",
|
27
|
+
"Kansas" => "KS",
|
28
|
+
"Kentucky" => "KY",
|
29
|
+
"Louisiana" => "LA",
|
30
|
+
"Massachusetts" => "MA",
|
31
|
+
"Maryland" => "MD",
|
32
|
+
"Maine" => "ME",
|
33
|
+
"Michigan" => "MI",
|
34
|
+
"Minnesota" => "MN",
|
35
|
+
"Missouri" => "MO",
|
36
|
+
"Mississippi" => "MS",
|
37
|
+
"Montana" => "MT",
|
38
|
+
"North Carolina" => "NC",
|
39
|
+
"North Dakota" => "ND",
|
40
|
+
"Nebraska" => "NE",
|
41
|
+
"New Hampshire" => "NH",
|
42
|
+
"New Jersey" => "NJ",
|
43
|
+
"New Mexico" => "NM",
|
44
|
+
"Nevada" => "NV",
|
45
|
+
"New York" => "NY",
|
46
|
+
"Ohio" => "OH",
|
47
|
+
"Oklahoma" => "OK",
|
48
|
+
"Oregon" => "OR",
|
49
|
+
"Pennsylvania" => "PA",
|
50
|
+
"Rhode Island" => "RI",
|
51
|
+
"South Carolina" => "SC",
|
52
|
+
"South Dakota" => "SD",
|
53
|
+
"Tennessee" => "TN",
|
54
|
+
"Texas" => "TX",
|
55
|
+
"Utah" => "UT",
|
56
|
+
"Virginia" => "VA",
|
57
|
+
"Vermont" => "VT",
|
58
|
+
"Washington" => "WA",
|
59
|
+
"Wisconsin" => "WI",
|
60
|
+
"West Virginia" => "WV",
|
61
|
+
"Wyoming" => "WY",
|
62
|
+
}
|
63
|
+
end
|
64
|
+
|
65
|
+
def express_pigeon_countries
|
66
|
+
{
|
67
|
+
"Afghanistan" => "Afghanistan",
|
68
|
+
"Albania" => "Albania",
|
69
|
+
"Algeria" => "Algeria",
|
70
|
+
"American Samoa" => "American Samoa",
|
71
|
+
"Andorra" => "Andorra",
|
72
|
+
"Angola" => "Angola",
|
73
|
+
"Anguilla" => "Anguilla",
|
74
|
+
"Antarctica" => "Antarctica",
|
75
|
+
"Antigua and Barbuda" => "Antigua and Barbuda",
|
76
|
+
"Argentina" => "Argentina",
|
77
|
+
"Armenia" => "Armenia",
|
78
|
+
"Aruba" => "Aruba",
|
79
|
+
"Australia" => "Australia",
|
80
|
+
"Austria" => "Austria",
|
81
|
+
"Azerbaijan" => "Azerbaijan",
|
82
|
+
"Bahamas" => "Bahamas",
|
83
|
+
"Bahrain" => "Bahrain",
|
84
|
+
"Bangladesh" => "Bangladesh",
|
85
|
+
"Barbados" => "Barbados",
|
86
|
+
"Belarus" => "Belarus",
|
87
|
+
"Belgium" => "Belgium",
|
88
|
+
"Belize" => "Belize",
|
89
|
+
"Benin" => "Benin",
|
90
|
+
"Bermuda" => "Bermuda",
|
91
|
+
"Bhutan" => "Bhutan",
|
92
|
+
"Bolivia" => "Bolivia",
|
93
|
+
"Bosnia and Herzegovina" => "Bosnia and Herzegovina",
|
94
|
+
"Botswana" => "Botswana",
|
95
|
+
"Brazil" => "Brazil",
|
96
|
+
"British Indian Ocean Territory" => "British Indian Ocean Territory",
|
97
|
+
"Brunei" => "Brunei",
|
98
|
+
"Bulgaria" => "Bulgaria",
|
99
|
+
"Burkina Faso" => "Burkina Faso",
|
100
|
+
"Burundi" => "Burundi",
|
101
|
+
"Cambodia" => "Cambodia",
|
102
|
+
"Cameroon" => "Cameroon",
|
103
|
+
"Canada" => "Canada",
|
104
|
+
"Cape Verde" => "Cape Verde",
|
105
|
+
"Cayman Islands" => "Cayman Islands",
|
106
|
+
"Central African Republic" => "Central African Republic",
|
107
|
+
"Chad" => "Chad",
|
108
|
+
"Chile" => "Chile",
|
109
|
+
"China" => "China",
|
110
|
+
"Christmas Island" => "Christmas Island",
|
111
|
+
"Cocos Islands" => "Cocos Islands",
|
112
|
+
"Colombia" => "Colombia",
|
113
|
+
"Comoros" => "Comoros",
|
114
|
+
"Congo" => "Congo",
|
115
|
+
"Congo, Democratic Republic of the" => "Congo, Democratic Republic of the",
|
116
|
+
"Cook Islands" => "Cook Islands",
|
117
|
+
"Costa Rica" => "Costa Rica",
|
118
|
+
"Croatia" => "Croatia",
|
119
|
+
"Cuba" => "Cuba",
|
120
|
+
"Cyprus" => "Cyprus",
|
121
|
+
"Czech Republic" => "Czech Republic",
|
122
|
+
"Côte d'Ivoire" => "Côte d'Ivoire",
|
123
|
+
"Denmark" => "Denmark",
|
124
|
+
"Djibouti" => "Djibouti",
|
125
|
+
"Dominica" => "Dominica",
|
126
|
+
"Dominican Republic" => "Dominican Republic",
|
127
|
+
"Ecuador" => "Ecuador",
|
128
|
+
"Egypt" => "Egypt",
|
129
|
+
"El Salvador" => "El Salvador",
|
130
|
+
"Equatorial Guinea (Guinea Ecuatorial)" => "Equatorial Guinea (Guinea Ecuatorial)",
|
131
|
+
"Eritrea" => "Eritrea",
|
132
|
+
"Estonia" => "Estonia",
|
133
|
+
"Ethiopia" => "Ethiopia",
|
134
|
+
"Falkland Islands" => "Falkland Islands",
|
135
|
+
"Faroe Islands" => "Faroe Islands",
|
136
|
+
"Fiji" => "Fiji",
|
137
|
+
"Finland" => "Finland",
|
138
|
+
"France" => "France",
|
139
|
+
"French Guiana" => "French Guiana",
|
140
|
+
"French Polynesia" => "French Polynesia",
|
141
|
+
"French Southern Territories" => "French Southern Territories",
|
142
|
+
"Gabon" => "Gabon",
|
143
|
+
"Gambia" => "Gambia",
|
144
|
+
"Georgia" => "Georgia",
|
145
|
+
"Germany" => "Germany",
|
146
|
+
"Ghana" => "Ghana",
|
147
|
+
"Gibraltar" => "Gibraltar",
|
148
|
+
"Greece" => "Greece",
|
149
|
+
"Greenland" => "Greenland",
|
150
|
+
"Grenada" => "Grenada",
|
151
|
+
"Guadeloupe" => "Guadeloupe",
|
152
|
+
"Guam" => "Guam",
|
153
|
+
"Guatemala" => "Guatemala",
|
154
|
+
"Guinea" => "Guinea",
|
155
|
+
"Guinea-Bissau" => "Guinea-Bissau",
|
156
|
+
"Guyana" => "Guyana",
|
157
|
+
"Haiti" => "Haiti",
|
158
|
+
"Honduras" => "Honduras",
|
159
|
+
"Hong Kong" => "Hong Kong",
|
160
|
+
"Hungary" => "Hungary",
|
161
|
+
"Iceland" => "Iceland",
|
162
|
+
"India" => "India",
|
163
|
+
"Indonesia" => "Indonesia",
|
164
|
+
"Iran" => "Iran",
|
165
|
+
"Iraq" => "Iraq",
|
166
|
+
"Ireland" => "Ireland",
|
167
|
+
"Israel" => "Israel",
|
168
|
+
"Italy" => "Italy",
|
169
|
+
"Jamaica" => "Jamaica",
|
170
|
+
"Japan" => "Japan",
|
171
|
+
"Jordan" => "Jordan",
|
172
|
+
"Kazakhstan" => "Kazakhstan",
|
173
|
+
"Kenya" => "Kenya",
|
174
|
+
"Kiribati" => "Kiribati",
|
175
|
+
"Kuwait" => "Kuwait",
|
176
|
+
"Kyrgyzstan" => "Kyrgyzstan",
|
177
|
+
"Laos" => "Laos",
|
178
|
+
"Latvia" => "Latvia",
|
179
|
+
"Lebanon" => "Lebanon",
|
180
|
+
"Lesotho" => "Lesotho",
|
181
|
+
"Liberia" => "Liberia",
|
182
|
+
"Libya" => "Libya",
|
183
|
+
"Liechtenstein" => "Liechtenstein",
|
184
|
+
"Lithuania" => "Lithuania",
|
185
|
+
"Luxembourg" => "Luxembourg",
|
186
|
+
"Macao" => "Macao",
|
187
|
+
"Macedonia" => "Macedonia",
|
188
|
+
"Madagascar" => "Madagascar",
|
189
|
+
"Malawi" => "Malawi",
|
190
|
+
"Malaysia" => "Malaysia",
|
191
|
+
"Maldives" => "Maldives",
|
192
|
+
"Mali" => "Mali",
|
193
|
+
"Malta" => "Malta",
|
194
|
+
"Marshall Islands" => "Marshall Islands",
|
195
|
+
"Martinique" => "Martinique",
|
196
|
+
"Mauritania" => "Mauritania",
|
197
|
+
"Mauritius" => "Mauritius",
|
198
|
+
"Mayotte" => "Mayotte",
|
199
|
+
"Mexico" => "Mexico",
|
200
|
+
"Micronesia" => "Micronesia",
|
201
|
+
"Moldova" => "Moldova",
|
202
|
+
"Monaco" => "Monaco",
|
203
|
+
"Mongolia" => "Mongolia",
|
204
|
+
"Montenegro" => "Montenegro",
|
205
|
+
"Montserrat" => "Montserrat",
|
206
|
+
"Morocco" => "Morocco",
|
207
|
+
"Mozambique" => "Mozambique",
|
208
|
+
"Myanmar" => "Myanmar",
|
209
|
+
"Namibia" => "Namibia",
|
210
|
+
"Nauru" => "Nauru",
|
211
|
+
"Nepal" => "Nepal",
|
212
|
+
"Netherlands Antilles" => "Netherlands Antilles",
|
213
|
+
"Netherlands" => "Netherlands",
|
214
|
+
"New Caledonia" => "New Caledonia",
|
215
|
+
"New Zealand" => "New Zealand",
|
216
|
+
"Nicaragua" => "Nicaragua",
|
217
|
+
"Niger" => "Niger",
|
218
|
+
"Nigeria" => "Nigeria",
|
219
|
+
"Niue" => "Niue",
|
220
|
+
"Norfolk Island" => "Norfolk Island",
|
221
|
+
"North Korea" => "North Korea",
|
222
|
+
"Northern Mariana Islands" => "Northern Mariana Islands",
|
223
|
+
"Norway" => "Norway",
|
224
|
+
"Oman" => "Oman",
|
225
|
+
"Pakistan" => "Pakistan",
|
226
|
+
"Palau" => "Palau",
|
227
|
+
"Palestinian Territories" => "Palestinian Territories",
|
228
|
+
"Panama" => "Panama",
|
229
|
+
"Papua New Guinea" => "Papua New Guinea",
|
230
|
+
"Paraguay" => "Paraguay",
|
231
|
+
"Peru" => "Peru",
|
232
|
+
"Philippines" => "Philippines",
|
233
|
+
"Pitcairn" => "Pitcairn",
|
234
|
+
"Poland" => "Poland",
|
235
|
+
"Portugal" => "Portugal",
|
236
|
+
"Puerto Rico" => "Puerto Rico",
|
237
|
+
"Qatar" => "Qatar",
|
238
|
+
"Reunion" => "Reunion",
|
239
|
+
"Romania" => "Romania",
|
240
|
+
"Russia" => "Russia",
|
241
|
+
"Rwanda" => "Rwanda",
|
242
|
+
"Saint Helena" => "Saint Helena",
|
243
|
+
"Saint Kitts and Nevis" => "Saint Kitts and Nevis",
|
244
|
+
"Saint Lucia" => "Saint Lucia",
|
245
|
+
"Saint Pierre and Miquelon" => "Saint Pierre and Miquelon",
|
246
|
+
"Saint Vincent and the Grenadines" => "Saint Vincent and the Grenadines",
|
247
|
+
"Samoa" => "Samoa",
|
248
|
+
"San Marino" => "San Marino",
|
249
|
+
"Saudi Arabia" => "Saudi Arabia",
|
250
|
+
"Senegal" => "Senegal",
|
251
|
+
"Serbia" => "Serbia",
|
252
|
+
"Seychelles" => "Seychelles",
|
253
|
+
"Sierra Leone" => "Sierra Leone",
|
254
|
+
"Singapore" => "Singapore",
|
255
|
+
"Slovakia" => "Slovakia",
|
256
|
+
"Slovenia" => "Slovenia",
|
257
|
+
"Solomon Islands" => "Solomon Islands",
|
258
|
+
"Somalia" => "Somalia",
|
259
|
+
"South Africa" => "South Africa",
|
260
|
+
"South Georgia and the South Sandwich Islands" => "South Georgia and the South Sandwich Islands",
|
261
|
+
"South Korea" => "South Korea",
|
262
|
+
"Spain" => "Spain",
|
263
|
+
"Sri Lanka" => "Sri Lanka",
|
264
|
+
"Sudan" => "Sudan",
|
265
|
+
"Suriname" => "Suriname",
|
266
|
+
"Svalbard and Jan Mayen" => "Svalbard and Jan Mayen",
|
267
|
+
"Swaziland" => "Swaziland",
|
268
|
+
"Sweden" => "Sweden",
|
269
|
+
"Switzerland" => "Switzerland",
|
270
|
+
"Syria" => "Syria",
|
271
|
+
"São Tomé and Príncipe" => "São Tomé and Príncipe",
|
272
|
+
"Taiwan" => "Taiwan",
|
273
|
+
"Tajikistan" => "Tajikistan",
|
274
|
+
"Tanzania" => "Tanzania",
|
275
|
+
"Thailand" => "Thailand",
|
276
|
+
"Timor-Leste" => "Timor-Leste",
|
277
|
+
"Togo" => "Togo",
|
278
|
+
"Tokelau" => "Tokelau",
|
279
|
+
"Tonga" => "Tonga",
|
280
|
+
"Trinidad and Tobago" => "Trinidad and Tobago",
|
281
|
+
"Tunisia" => "Tunisia",
|
282
|
+
"Turkey" => "Turkey",
|
283
|
+
"Turkmenistan" => "Turkmenistan",
|
284
|
+
"Turks and Caicos Islands" => "Turks and Caicos Islands",
|
285
|
+
"Tuvalu" => "Tuvalu",
|
286
|
+
"Uganda" => "Uganda",
|
287
|
+
"Ukraine" => "Ukraine",
|
288
|
+
"United Arab Emirates" => "United Arab Emirates",
|
289
|
+
"United Kingdom" => "United Kingdom",
|
290
|
+
"United States minor outlying islands" => "United States minor outlying islands",
|
291
|
+
"United States" => "United States",
|
292
|
+
"Uruguay" => "Uruguay",
|
293
|
+
"Uzbekistan" => "Uzbekistan",
|
294
|
+
"Vanuatu" => "Vanuatu",
|
295
|
+
"Vatican City" => "Vatican City",
|
296
|
+
"Venezuela" => "Venezuela",
|
297
|
+
"Vietnam" => "Vietnam",
|
298
|
+
"Virgin Islands,
|
299
|
+
British" => "Virgin Islands,
|
300
|
+
British",
|
301
|
+
"Virgin Islands,
|
302
|
+
U.S." => "Virgin Islands,
|
303
|
+
U.S.",
|
304
|
+
"Wallis and Futuna" => "Wallis and Futuna",
|
305
|
+
"Western Sahara" => "Western Sahara",
|
306
|
+
"Yemen" => "Yemen",
|
307
|
+
"Zambia" => "Zambia",
|
308
|
+
"Zimbabwe" => "Zimbabwe",
|
309
|
+
}
|
310
|
+
end
|
311
|
+
end
|
312
|
+
|
7
313
|
module WebFormValidations
|
8
314
|
def self.included(base)
|
9
315
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: express_pigeon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-06-
|
12
|
+
date: 2012-06-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|