phony_attribute 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 (47) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +49 -0
  4. data/Rakefile +38 -0
  5. data/lib/phony_attribute.rb +7 -0
  6. data/lib/phony_attribute/attribute.rb +23 -0
  7. data/lib/phony_attribute/phone_number.rb +111 -0
  8. data/lib/phony_attribute/phony_plausible_validator.rb +17 -0
  9. data/lib/phony_attribute/railtie.rb +12 -0
  10. data/lib/phony_attribute/version.rb +3 -0
  11. data/lib/tasks/phony_attribute_tasks.rake +4 -0
  12. data/test/dummy/README.rdoc +261 -0
  13. data/test/dummy/Rakefile +7 -0
  14. data/test/dummy/app/assets/javascripts/application.js +15 -0
  15. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  16. data/test/dummy/app/controllers/application_controller.rb +3 -0
  17. data/test/dummy/app/helpers/application_helper.rb +2 -0
  18. data/test/dummy/app/models/user.rb +6 -0
  19. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  20. data/test/dummy/config.ru +4 -0
  21. data/test/dummy/config/application.rb +53 -0
  22. data/test/dummy/config/boot.rb +10 -0
  23. data/test/dummy/config/database.yml +25 -0
  24. data/test/dummy/config/environment.rb +5 -0
  25. data/test/dummy/config/environments/development.rb +37 -0
  26. data/test/dummy/config/environments/production.rb +67 -0
  27. data/test/dummy/config/environments/test.rb +33 -0
  28. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  29. data/test/dummy/config/initializers/inflections.rb +15 -0
  30. data/test/dummy/config/initializers/mime_types.rb +5 -0
  31. data/test/dummy/config/initializers/secret_token.rb +7 -0
  32. data/test/dummy/config/initializers/session_store.rb +8 -0
  33. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  34. data/test/dummy/config/locales/en.yml +5 -0
  35. data/test/dummy/config/routes.rb +58 -0
  36. data/test/dummy/db/migrate/20130913211052_add_user.rb +9 -0
  37. data/test/dummy/log/development.log +0 -0
  38. data/test/dummy/log/test.log +646 -0
  39. data/test/dummy/public/404.html +26 -0
  40. data/test/dummy/public/422.html +26 -0
  41. data/test/dummy/public/500.html +25 -0
  42. data/test/dummy/public/favicon.ico +0 -0
  43. data/test/dummy/script/rails +6 -0
  44. data/test/phone_number_test.rb +67 -0
  45. data/test/phony_attribute_test.rb +7 -0
  46. data/test/test_helper.rb +18 -0
  47. metadata +180 -0
@@ -0,0 +1,9 @@
1
+ class AddUser < ActiveRecord::Migration
2
+ def change
3
+ create_table :users do |t|
4
+ t.string :name, null: false
5
+ t.string :phone_number, null: false
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
File without changes
@@ -0,0 +1,646 @@
1
+  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
2
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
3
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
4
+ Migrating to AddUser (20130913211052)
5
+  (0.0ms) begin transaction
6
+  (0.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "phone_number" varchar(255) NOT NULL, "created_at" datetime, "updated_at" datetime) 
7
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130913211052"]]
8
+  (0.0ms) commit transaction
9
+  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
10
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
11
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
12
+ Migrating to AddUser (20130913211052)
13
+  (0.0ms) begin transaction
14
+  (0.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "phone_number" varchar(255) NOT NULL, "created_at" datetime, "updated_at" datetime) 
15
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130913211052"]]
16
+  (0.0ms) commit transaction
17
+  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
18
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
19
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
20
+ Migrating to AddUser (20130913211052)
21
+  (0.0ms) begin transaction
22
+  (0.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "phone_number" varchar(255) NOT NULL, "created_at" datetime, "updated_at" datetime) 
23
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130913211052"]]
24
+  (0.0ms) commit transaction
25
+  (0.0ms) begin transaction
26
+ ------------------------------------------------------------------------------------------------------------
27
+ PhoneNumberTest: test: database model validations should format phone numbers before going to the database.
28
+ ------------------------------------------------------------------------------------------------------------
29
+  (0.1ms) rollback transaction
30
+  (0.0ms) begin transaction
31
+ -----------------------------------------------------------------------------------
32
+ PhoneNumberTest: test: database model validations should handle bad phone numbers.
33
+ -----------------------------------------------------------------------------------
34
+  (0.0ms) rollback transaction
35
+  (0.0ms) begin transaction
36
+ --------------------------------------------------------------
37
+ PhoneNumberTest: test: parsing should not accept bad formats.
38
+ --------------------------------------------------------------
39
+  (0.0ms) rollback transaction
40
+  (0.0ms) begin transaction
41
+ -----------------------------------------------------------------
42
+ PhoneNumberTest: test: parsing should work for standard formats.
43
+ -----------------------------------------------------------------
44
+  (0.0ms) rollback transaction
45
+  (0.0ms) begin transaction
46
+ --------------------------------------
47
+ PhoneNumberTest: test_a_blocked_number
48
+ --------------------------------------
49
+  (0.0ms) rollback transaction
50
+  (0.0ms) begin transaction
51
+ ------------------------------
52
+ PhonyAttributeTest: test_truth
53
+ ------------------------------
54
+  (0.0ms) rollback transaction
55
+  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
56
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
57
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
58
+ Migrating to AddUser (20130913211052)
59
+  (0.0ms) begin transaction
60
+  (0.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "phone_number" varchar(255) NOT NULL, "created_at" datetime, "updated_at" datetime) 
61
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130913211052"]]
62
+  (0.0ms) commit transaction
63
+  (0.0ms) begin transaction
64
+ ------------------------------------------------------------------------------------------------------------
65
+ PhoneNumberTest: test: database model validations should format phone numbers before going to the database.
66
+ ------------------------------------------------------------------------------------------------------------
67
+  (0.1ms) rollback transaction
68
+  (0.0ms) begin transaction
69
+ -----------------------------------------------------------------------------------
70
+ PhoneNumberTest: test: database model validations should handle bad phone numbers.
71
+ -----------------------------------------------------------------------------------
72
+  (0.0ms) rollback transaction
73
+  (0.0ms) begin transaction
74
+ --------------------------------------------------------------
75
+ PhoneNumberTest: test: parsing should not accept bad formats.
76
+ --------------------------------------------------------------
77
+  (0.0ms) rollback transaction
78
+  (0.0ms) begin transaction
79
+ -----------------------------------------------------------------
80
+ PhoneNumberTest: test: parsing should work for standard formats.
81
+ -----------------------------------------------------------------
82
+  (0.0ms) rollback transaction
83
+  (0.0ms) begin transaction
84
+ --------------------------------------
85
+ PhoneNumberTest: test_a_blocked_number
86
+ --------------------------------------
87
+  (0.0ms) rollback transaction
88
+  (0.0ms) begin transaction
89
+ ------------------------------
90
+ PhonyAttributeTest: test_truth
91
+ ------------------------------
92
+  (0.0ms) rollback transaction
93
+  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
94
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
95
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
96
+ Migrating to AddUser (20130913211052)
97
+  (0.0ms) begin transaction
98
+  (0.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "phone_number" varchar(255) NOT NULL, "created_at" datetime, "updated_at" datetime) 
99
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130913211052"]]
100
+  (0.0ms) commit transaction
101
+  (0.0ms) begin transaction
102
+ ------------------------------------------------------------------------------------------------------------
103
+ PhoneNumberTest: test: database model validations should format phone numbers before going to the database.
104
+ ------------------------------------------------------------------------------------------------------------
105
+  (0.1ms) rollback transaction
106
+  (0.0ms) begin transaction
107
+ -----------------------------------------------------------------------------------
108
+ PhoneNumberTest: test: database model validations should handle bad phone numbers.
109
+ -----------------------------------------------------------------------------------
110
+  (0.1ms) rollback transaction
111
+  (0.0ms) begin transaction
112
+ --------------------------------------------------------------
113
+ PhoneNumberTest: test: parsing should not accept bad formats.
114
+ --------------------------------------------------------------
115
+  (0.0ms) rollback transaction
116
+  (0.0ms) begin transaction
117
+ -----------------------------------------------------------------
118
+ PhoneNumberTest: test: parsing should work for standard formats.
119
+ -----------------------------------------------------------------
120
+  (0.0ms) rollback transaction
121
+  (0.0ms) begin transaction
122
+ --------------------------------------
123
+ PhoneNumberTest: test_a_blocked_number
124
+ --------------------------------------
125
+  (0.1ms) rollback transaction
126
+  (0.0ms) begin transaction
127
+ ------------------------------
128
+ PhonyAttributeTest: test_truth
129
+ ------------------------------
130
+  (0.0ms) rollback transaction
131
+  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
132
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
133
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
134
+ Migrating to AddUser (20130913211052)
135
+  (0.1ms) begin transaction
136
+  (0.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "phone_number" varchar(255) NOT NULL, "created_at" datetime, "updated_at" datetime) 
137
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130913211052"]]
138
+  (0.0ms) commit transaction
139
+  (0.0ms) begin transaction
140
+ ------------------------------------------------------------------------------------------------------------
141
+ PhoneNumberTest: test: database model validations should format phone numbers before going to the database.
142
+ ------------------------------------------------------------------------------------------------------------
143
+  (0.1ms) SELECT COUNT(*) FROM "users"
144
+  (0.0ms) rollback transaction
145
+  (0.1ms) begin transaction
146
+ -----------------------------------------------------------------------------------
147
+ PhoneNumberTest: test: database model validations should handle bad phone numbers.
148
+ -----------------------------------------------------------------------------------
149
+  (0.0ms) rollback transaction
150
+  (0.0ms) begin transaction
151
+ --------------------------------------------------------------
152
+ PhoneNumberTest: test: parsing should not accept bad formats.
153
+ --------------------------------------------------------------
154
+  (0.0ms) rollback transaction
155
+  (0.0ms) begin transaction
156
+ -----------------------------------------------------------------
157
+ PhoneNumberTest: test: parsing should work for standard formats.
158
+ -----------------------------------------------------------------
159
+  (0.0ms) rollback transaction
160
+  (0.0ms) begin transaction
161
+ --------------------------------------
162
+ PhoneNumberTest: test_a_blocked_number
163
+ --------------------------------------
164
+  (0.0ms) rollback transaction
165
+  (0.0ms) begin transaction
166
+ ------------------------------
167
+ PhonyAttributeTest: test_truth
168
+ ------------------------------
169
+  (0.0ms) rollback transaction
170
+  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
171
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
172
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
173
+ Migrating to AddUser (20130913211052)
174
+  (0.0ms) begin transaction
175
+  (0.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "phone_number" varchar(255) NOT NULL, "created_at" datetime, "updated_at" datetime) 
176
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130913211052"]]
177
+  (0.0ms) commit transaction
178
+  (0.0ms) begin transaction
179
+ ------------------------------------------------------------------------------------------------------------
180
+ PhoneNumberTest: test: database model validations should format phone numbers before going to the database.
181
+ ------------------------------------------------------------------------------------------------------------
182
+  (0.1ms) SELECT COUNT(*) FROM "users"
183
+  (0.0ms) SAVEPOINT active_record_1
184
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
185
+  (0.0ms) rollback transaction
186
+  (0.0ms) begin transaction
187
+ -----------------------------------------------------------------------------------
188
+ PhoneNumberTest: test: database model validations should handle bad phone numbers.
189
+ -----------------------------------------------------------------------------------
190
+  (0.0ms) rollback transaction
191
+  (0.0ms) begin transaction
192
+ --------------------------------------------------------------
193
+ PhoneNumberTest: test: parsing should not accept bad formats.
194
+ --------------------------------------------------------------
195
+  (0.0ms) rollback transaction
196
+  (0.0ms) begin transaction
197
+ -----------------------------------------------------------------
198
+ PhoneNumberTest: test: parsing should work for standard formats.
199
+ -----------------------------------------------------------------
200
+  (0.0ms) rollback transaction
201
+  (0.0ms) begin transaction
202
+ --------------------------------------
203
+ PhoneNumberTest: test_a_blocked_number
204
+ --------------------------------------
205
+  (0.0ms) rollback transaction
206
+  (0.0ms) begin transaction
207
+ ------------------------------
208
+ PhonyAttributeTest: test_truth
209
+ ------------------------------
210
+  (0.1ms) rollback transaction
211
+  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
212
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
213
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
214
+ Migrating to AddUser (20130913211052)
215
+  (0.0ms) begin transaction
216
+  (0.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "phone_number" varchar(255) NOT NULL, "created_at" datetime, "updated_at" datetime) 
217
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130913211052"]]
218
+  (0.0ms) commit transaction
219
+  (0.0ms) begin transaction
220
+ ------------------------------------------------------------------------------------------------------------
221
+ PhoneNumberTest: test: database model validations should format phone numbers before going to the database.
222
+ ------------------------------------------------------------------------------------------------------------
223
+  (0.1ms) SELECT COUNT(*) FROM "users"
224
+  (0.1ms) SAVEPOINT active_record_1
225
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
226
+  (0.0ms) rollback transaction
227
+  (0.1ms) begin transaction
228
+ -----------------------------------------------------------------------------------
229
+ PhoneNumberTest: test: database model validations should handle bad phone numbers.
230
+ -----------------------------------------------------------------------------------
231
+  (0.1ms) rollback transaction
232
+  (0.0ms) begin transaction
233
+ --------------------------------------------------------------
234
+ PhoneNumberTest: test: parsing should not accept bad formats.
235
+ --------------------------------------------------------------
236
+  (0.1ms) rollback transaction
237
+  (0.0ms) begin transaction
238
+ -----------------------------------------------------------------
239
+ PhoneNumberTest: test: parsing should work for standard formats.
240
+ -----------------------------------------------------------------
241
+  (0.0ms) rollback transaction
242
+  (0.0ms) begin transaction
243
+ --------------------------------------
244
+ PhoneNumberTest: test_a_blocked_number
245
+ --------------------------------------
246
+  (0.0ms) rollback transaction
247
+  (0.0ms) begin transaction
248
+ ------------------------------
249
+ PhonyAttributeTest: test_truth
250
+ ------------------------------
251
+  (0.0ms) rollback transaction
252
+  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
253
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
254
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
255
+ Migrating to AddUser (20130913211052)
256
+  (0.0ms) begin transaction
257
+  (0.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "phone_number" varchar(255) NOT NULL, "created_at" datetime, "updated_at" datetime) 
258
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130913211052"]]
259
+  (0.0ms) commit transaction
260
+  (0.0ms) begin transaction
261
+ ------------------------------------------------------------------------------------------------------------
262
+ PhoneNumberTest: test: database model validations should format phone numbers before going to the database.
263
+ ------------------------------------------------------------------------------------------------------------
264
+  (0.1ms) SELECT COUNT(*) FROM "users"
265
+  (0.0ms) SAVEPOINT active_record_1
266
+ SQL (3.6ms) INSERT INTO "users" ("created_at", "name", "phone_number", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 13 Sep 2013 21:20:04 UTC +00:00], ["name", "Jeff"], ["phone_number", "+12065556667"], ["updated_at", Fri, 13 Sep 2013 21:20:04 UTC +00:00]]
267
+  (0.0ms) RELEASE SAVEPOINT active_record_1
268
+  (0.0ms) SELECT COUNT(*) FROM "users"
269
+  (0.1ms) rollback transaction
270
+  (0.1ms) begin transaction
271
+ -----------------------------------------------------------------------------------
272
+ PhoneNumberTest: test: database model validations should handle bad phone numbers.
273
+ -----------------------------------------------------------------------------------
274
+  (0.0ms) rollback transaction
275
+  (0.0ms) begin transaction
276
+ --------------------------------------------------------------
277
+ PhoneNumberTest: test: parsing should not accept bad formats.
278
+ --------------------------------------------------------------
279
+  (0.0ms) rollback transaction
280
+  (0.0ms) begin transaction
281
+ -----------------------------------------------------------------
282
+ PhoneNumberTest: test: parsing should work for standard formats.
283
+ -----------------------------------------------------------------
284
+  (0.0ms) rollback transaction
285
+  (0.0ms) begin transaction
286
+ --------------------------------------
287
+ PhoneNumberTest: test_a_blocked_number
288
+ --------------------------------------
289
+  (0.0ms) rollback transaction
290
+  (0.0ms) begin transaction
291
+ ------------------------------
292
+ PhonyAttributeTest: test_truth
293
+ ------------------------------
294
+  (0.0ms) rollback transaction
295
+  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
296
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
297
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
298
+ Migrating to AddUser (20130913211052)
299
+  (0.0ms) begin transaction
300
+  (0.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "phone_number" varchar(255) NOT NULL, "created_at" datetime, "updated_at" datetime) 
301
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130913211052"]]
302
+  (0.0ms) commit transaction
303
+  (0.0ms) begin transaction
304
+ ------------------------------------------------------------------------------------------------------------
305
+ PhoneNumberTest: test: database model validations should format phone numbers before going to the database.
306
+ ------------------------------------------------------------------------------------------------------------
307
+  (0.1ms) SELECT COUNT(*) FROM "users"
308
+  (0.0ms) SAVEPOINT active_record_1
309
+ SQL (1.7ms) INSERT INTO "users" ("created_at", "name", "phone_number", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 13 Sep 2013 21:20:29 UTC +00:00], ["name", "Jeff"], ["phone_number", "+12065556667"], ["updated_at", Fri, 13 Sep 2013 21:20:29 UTC +00:00]]
310
+  (0.0ms) RELEASE SAVEPOINT active_record_1
311
+  (0.1ms) SELECT COUNT(*) FROM "users"
312
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
313
+  (0.1ms) rollback transaction
314
+  (0.1ms) begin transaction
315
+ -----------------------------------------------------------------------------------
316
+ PhoneNumberTest: test: database model validations should handle bad phone numbers.
317
+ -----------------------------------------------------------------------------------
318
+  (0.0ms) rollback transaction
319
+  (0.0ms) begin transaction
320
+ --------------------------------------------------------------
321
+ PhoneNumberTest: test: parsing should not accept bad formats.
322
+ --------------------------------------------------------------
323
+  (0.0ms) rollback transaction
324
+  (0.0ms) begin transaction
325
+ -----------------------------------------------------------------
326
+ PhoneNumberTest: test: parsing should work for standard formats.
327
+ -----------------------------------------------------------------
328
+  (0.0ms) rollback transaction
329
+  (0.0ms) begin transaction
330
+ --------------------------------------
331
+ PhoneNumberTest: test_a_blocked_number
332
+ --------------------------------------
333
+  (0.0ms) rollback transaction
334
+  (0.0ms) begin transaction
335
+ ------------------------------
336
+ PhonyAttributeTest: test_truth
337
+ ------------------------------
338
+  (0.0ms) rollback transaction
339
+  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
340
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
341
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
342
+ Migrating to AddUser (20130913211052)
343
+  (0.0ms) begin transaction
344
+  (0.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "phone_number" varchar(255) NOT NULL, "created_at" datetime, "updated_at" datetime) 
345
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130913211052"]]
346
+  (0.0ms) commit transaction
347
+  (0.0ms) begin transaction
348
+ ------------------------------------------------------------------------------------------------------------
349
+ PhoneNumberTest: test: database model validations should format phone numbers before going to the database.
350
+ ------------------------------------------------------------------------------------------------------------
351
+  (0.1ms) SELECT COUNT(*) FROM "users"
352
+  (0.0ms) SAVEPOINT active_record_1
353
+ SQL (1.6ms) INSERT INTO "users" ("created_at", "name", "phone_number", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 13 Sep 2013 21:20:53 UTC +00:00], ["name", "Jeff"], ["phone_number", "+12065556667"], ["updated_at", Fri, 13 Sep 2013 21:20:53 UTC +00:00]]
354
+  (0.0ms) RELEASE SAVEPOINT active_record_1
355
+  (0.0ms) SELECT COUNT(*) FROM "users"
356
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
357
+  (0.1ms) rollback transaction
358
+  (0.0ms) begin transaction
359
+ -----------------------------------------------------------------------------------
360
+ PhoneNumberTest: test: database model validations should handle bad phone numbers.
361
+ -----------------------------------------------------------------------------------
362
+  (0.1ms) rollback transaction
363
+  (0.0ms) begin transaction
364
+ --------------------------------------------------------------
365
+ PhoneNumberTest: test: parsing should not accept bad formats.
366
+ --------------------------------------------------------------
367
+  (0.1ms) rollback transaction
368
+  (0.0ms) begin transaction
369
+ -----------------------------------------------------------------
370
+ PhoneNumberTest: test: parsing should work for standard formats.
371
+ -----------------------------------------------------------------
372
+  (0.0ms) rollback transaction
373
+  (0.0ms) begin transaction
374
+ --------------------------------------
375
+ PhoneNumberTest: test_a_blocked_number
376
+ --------------------------------------
377
+  (0.0ms) rollback transaction
378
+  (0.0ms) begin transaction
379
+ ------------------------------
380
+ PhonyAttributeTest: test_truth
381
+ ------------------------------
382
+  (0.0ms) rollback transaction
383
+  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
384
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
385
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
386
+ Migrating to AddUser (20130913211052)
387
+  (0.1ms) begin transaction
388
+  (0.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "phone_number" varchar(255) NOT NULL, "created_at" datetime, "updated_at" datetime) 
389
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130913211052"]]
390
+  (0.0ms) commit transaction
391
+  (0.0ms) begin transaction
392
+ ------------------------------------------------------------------------------------------------------------
393
+ PhoneNumberTest: test: database model validations should format phone numbers before going to the database.
394
+ ------------------------------------------------------------------------------------------------------------
395
+  (0.1ms) SELECT COUNT(*) FROM "users"
396
+  (0.0ms) SAVEPOINT active_record_1
397
+ SQL (1.6ms) INSERT INTO "users" ("created_at", "name", "phone_number", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 13 Sep 2013 21:36:12 UTC +00:00], ["name", "Jeff"], ["phone_number", "+12065556667"], ["updated_at", Fri, 13 Sep 2013 21:36:12 UTC +00:00]]
398
+  (0.0ms) RELEASE SAVEPOINT active_record_1
399
+  (0.0ms) SELECT COUNT(*) FROM "users"
400
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
401
+  (0.1ms) rollback transaction
402
+  (0.1ms) begin transaction
403
+ -----------------------------------------------------------------------------------
404
+ PhoneNumberTest: test: database model validations should handle bad phone numbers.
405
+ -----------------------------------------------------------------------------------
406
+  (0.0ms) rollback transaction
407
+  (0.0ms) begin transaction
408
+ --------------------------------------------------------------
409
+ PhoneNumberTest: test: parsing should not accept bad formats.
410
+ --------------------------------------------------------------
411
+  (0.1ms) rollback transaction
412
+  (0.0ms) begin transaction
413
+ -----------------------------------------------------------------
414
+ PhoneNumberTest: test: parsing should work for standard formats.
415
+ -----------------------------------------------------------------
416
+  (0.0ms) rollback transaction
417
+  (0.0ms) begin transaction
418
+ --------------------------------------
419
+ PhoneNumberTest: test_a_blocked_number
420
+ --------------------------------------
421
+  (0.0ms) rollback transaction
422
+  (0.0ms) begin transaction
423
+ ------------------------------
424
+ PhonyAttributeTest: test_truth
425
+ ------------------------------
426
+  (0.0ms) rollback transaction
427
+  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
428
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
429
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
430
+ Migrating to AddUser (20130913211052)
431
+  (0.0ms) begin transaction
432
+  (0.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "phone_number" varchar(255) NOT NULL, "created_at" datetime, "updated_at" datetime) 
433
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130913211052"]]
434
+  (0.0ms) commit transaction
435
+  (0.0ms) begin transaction
436
+ ------------------------------------------------------------------------------------------------------------
437
+ PhoneNumberTest: test: database model validations should format phone numbers before going to the database.
438
+ ------------------------------------------------------------------------------------------------------------
439
+  (0.1ms) SELECT COUNT(*) FROM "users"
440
+  (0.0ms) SAVEPOINT active_record_1
441
+ SQL (1.7ms) INSERT INTO "users" ("created_at", "name", "phone_number", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 13 Sep 2013 21:37:53 UTC +00:00], ["name", "Jeff"], ["phone_number", "+12065556667"], ["updated_at", Fri, 13 Sep 2013 21:37:53 UTC +00:00]]
442
+  (0.0ms) RELEASE SAVEPOINT active_record_1
443
+  (0.0ms) SELECT COUNT(*) FROM "users"
444
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
445
+  (0.1ms) rollback transaction
446
+  (0.1ms) begin transaction
447
+ -----------------------------------------------------------------------------------
448
+ PhoneNumberTest: test: database model validations should handle bad phone numbers.
449
+ -----------------------------------------------------------------------------------
450
+  (0.1ms) rollback transaction
451
+  (0.1ms) begin transaction
452
+ --------------------------------------------------------------
453
+ PhoneNumberTest: test: parsing should not accept bad formats.
454
+ --------------------------------------------------------------
455
+  (0.0ms) rollback transaction
456
+  (0.0ms) begin transaction
457
+ -----------------------------------------------------------------
458
+ PhoneNumberTest: test: parsing should work for standard formats.
459
+ -----------------------------------------------------------------
460
+  (0.0ms) rollback transaction
461
+  (0.0ms) begin transaction
462
+ --------------------------------------
463
+ PhoneNumberTest: test_a_blocked_number
464
+ --------------------------------------
465
+  (0.0ms) rollback transaction
466
+  (0.0ms) begin transaction
467
+ ------------------------------
468
+ PhonyAttributeTest: test_truth
469
+ ------------------------------
470
+  (0.0ms) rollback transaction
471
+  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
472
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
473
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
474
+ Migrating to AddUser (20130913211052)
475
+  (0.0ms) begin transaction
476
+  (0.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "phone_number" varchar(255) NOT NULL, "created_at" datetime, "updated_at" datetime) 
477
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130913211052"]]
478
+  (0.0ms) commit transaction
479
+  (0.1ms) begin transaction
480
+ ------------------------------------------------------------------------------------------------------------
481
+ PhoneNumberTest: test: database model validations should format phone numbers before going to the database.
482
+ ------------------------------------------------------------------------------------------------------------
483
+  (0.1ms) SELECT COUNT(*) FROM "users"
484
+  (0.0ms) SAVEPOINT active_record_1
485
+ SQL (1.7ms) INSERT INTO "users" ("created_at", "name", "phone_number", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 13 Sep 2013 21:38:18 UTC +00:00], ["name", "Jeff"], ["phone_number", "+12065556667"], ["updated_at", Fri, 13 Sep 2013 21:38:18 UTC +00:00]]
486
+  (0.1ms) RELEASE SAVEPOINT active_record_1
487
+  (0.1ms) SELECT COUNT(*) FROM "users"
488
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
489
+  (0.1ms) rollback transaction
490
+  (0.1ms) begin transaction
491
+ -----------------------------------------------------------------------------------
492
+ PhoneNumberTest: test: database model validations should handle bad phone numbers.
493
+ -----------------------------------------------------------------------------------
494
+  (0.1ms) rollback transaction
495
+  (0.0ms) begin transaction
496
+ --------------------------------------------------------------
497
+ PhoneNumberTest: test: parsing should not accept bad formats.
498
+ --------------------------------------------------------------
499
+  (0.0ms) rollback transaction
500
+  (0.0ms) begin transaction
501
+ -----------------------------------------------------------------
502
+ PhoneNumberTest: test: parsing should work for standard formats.
503
+ -----------------------------------------------------------------
504
+  (0.0ms) rollback transaction
505
+  (0.0ms) begin transaction
506
+ --------------------------------------
507
+ PhoneNumberTest: test_a_blocked_number
508
+ --------------------------------------
509
+  (0.0ms) rollback transaction
510
+  (0.0ms) begin transaction
511
+ ------------------------------
512
+ PhonyAttributeTest: test_truth
513
+ ------------------------------
514
+  (0.0ms) rollback transaction
515
+  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
516
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
517
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
518
+ Migrating to AddUser (20130913211052)
519
+  (0.0ms) begin transaction
520
+  (0.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "phone_number" varchar(255) NOT NULL, "created_at" datetime, "updated_at" datetime) 
521
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130913211052"]]
522
+  (0.0ms) commit transaction
523
+  (0.1ms) begin transaction
524
+ ------------------------------------------------------------------------------------------------------------
525
+ PhoneNumberTest: test: database model validations should format phone numbers before going to the database.
526
+ ------------------------------------------------------------------------------------------------------------
527
+  (0.1ms) SELECT COUNT(*) FROM "users"
528
+  (0.0ms) SAVEPOINT active_record_1
529
+ SQL (1.6ms) INSERT INTO "users" ("created_at", "name", "phone_number", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 13 Sep 2013 21:38:50 UTC +00:00], ["name", "Jeff"], ["phone_number", "+12065556667"], ["updated_at", Fri, 13 Sep 2013 21:38:50 UTC +00:00]]
530
+  (0.0ms) RELEASE SAVEPOINT active_record_1
531
+  (0.0ms) SELECT COUNT(*) FROM "users"
532
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
533
+  (0.1ms) rollback transaction
534
+  (0.0ms) begin transaction
535
+ -----------------------------------------------------------------------------------
536
+ PhoneNumberTest: test: database model validations should handle bad phone numbers.
537
+ -----------------------------------------------------------------------------------
538
+  (0.1ms) rollback transaction
539
+  (0.0ms) begin transaction
540
+ --------------------------------------------------------------
541
+ PhoneNumberTest: test: parsing should not accept bad formats.
542
+ --------------------------------------------------------------
543
+  (0.1ms) rollback transaction
544
+  (0.0ms) begin transaction
545
+ -----------------------------------------------------------------
546
+ PhoneNumberTest: test: parsing should work for standard formats.
547
+ -----------------------------------------------------------------
548
+  (0.0ms) rollback transaction
549
+  (0.0ms) begin transaction
550
+ --------------------------------------
551
+ PhoneNumberTest: test_a_blocked_number
552
+ --------------------------------------
553
+  (0.0ms) rollback transaction
554
+  (0.0ms) begin transaction
555
+ ------------------------------
556
+ PhonyAttributeTest: test_truth
557
+ ------------------------------
558
+  (0.0ms) rollback transaction
559
+  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
560
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
561
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
562
+ Migrating to AddUser (20130913211052)
563
+  (0.0ms) begin transaction
564
+  (0.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "phone_number" varchar(255) NOT NULL, "created_at" datetime, "updated_at" datetime) 
565
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130913211052"]]
566
+  (0.0ms) commit transaction
567
+  (0.1ms) begin transaction
568
+ ------------------------------------------------------------------------------------------------------------
569
+ PhoneNumberTest: test: database model validations should format phone numbers before going to the database.
570
+ ------------------------------------------------------------------------------------------------------------
571
+  (0.1ms) SELECT COUNT(*) FROM "users"
572
+  (0.0ms) SAVEPOINT active_record_1
573
+ SQL (1.6ms) INSERT INTO "users" ("created_at", "name", "phone_number", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 13 Sep 2013 21:39:12 UTC +00:00], ["name", "Jeff"], ["phone_number", "+12065556667"], ["updated_at", Fri, 13 Sep 2013 21:39:12 UTC +00:00]]
574
+  (0.0ms) RELEASE SAVEPOINT active_record_1
575
+  (0.0ms) SELECT COUNT(*) FROM "users"
576
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
577
+  (0.1ms) rollback transaction
578
+  (0.1ms) begin transaction
579
+ -----------------------------------------------------------------------------------
580
+ PhoneNumberTest: test: database model validations should handle bad phone numbers.
581
+ -----------------------------------------------------------------------------------
582
+  (0.1ms) rollback transaction
583
+  (0.1ms) begin transaction
584
+ --------------------------------------------------------------
585
+ PhoneNumberTest: test: parsing should not accept bad formats.
586
+ --------------------------------------------------------------
587
+  (0.0ms) rollback transaction
588
+  (0.0ms) begin transaction
589
+ -----------------------------------------------------------------
590
+ PhoneNumberTest: test: parsing should work for standard formats.
591
+ -----------------------------------------------------------------
592
+  (0.0ms) rollback transaction
593
+  (0.0ms) begin transaction
594
+ --------------------------------------
595
+ PhoneNumberTest: test_a_blocked_number
596
+ --------------------------------------
597
+  (0.0ms) rollback transaction
598
+  (0.0ms) begin transaction
599
+ ------------------------------
600
+ PhonyAttributeTest: test_truth
601
+ ------------------------------
602
+  (0.0ms) rollback transaction
603
+  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
604
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
605
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
606
+ Migrating to AddUser (20130913211052)
607
+  (0.0ms) begin transaction
608
+  (0.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "phone_number" varchar(255) NOT NULL, "created_at" datetime, "updated_at" datetime) 
609
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130913211052"]]
610
+  (0.0ms) commit transaction
611
+  (0.1ms) begin transaction
612
+ ------------------------------------------------------------------------------------------------------------
613
+ PhoneNumberTest: test: database model validations should format phone numbers before going to the database.
614
+ ------------------------------------------------------------------------------------------------------------
615
+  (0.1ms) SELECT COUNT(*) FROM "users"
616
+  (0.0ms) SAVEPOINT active_record_1
617
+ SQL (1.6ms) INSERT INTO "users" ("created_at", "name", "phone_number", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 13 Sep 2013 21:39:45 UTC +00:00], ["name", "Jeff"], ["phone_number", "+12065556667"], ["updated_at", Fri, 13 Sep 2013 21:39:45 UTC +00:00]]
618
+  (0.0ms) RELEASE SAVEPOINT active_record_1
619
+  (0.0ms) SELECT COUNT(*) FROM "users"
620
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
621
+  (0.1ms) rollback transaction
622
+  (0.0ms) begin transaction
623
+ -----------------------------------------------------------------------------------
624
+ PhoneNumberTest: test: database model validations should handle bad phone numbers.
625
+ -----------------------------------------------------------------------------------
626
+  (0.1ms) rollback transaction
627
+  (0.0ms) begin transaction
628
+ --------------------------------------------------------------
629
+ PhoneNumberTest: test: parsing should not accept bad formats.
630
+ --------------------------------------------------------------
631
+  (0.0ms) rollback transaction
632
+  (0.0ms) begin transaction
633
+ -----------------------------------------------------------------
634
+ PhoneNumberTest: test: parsing should work for standard formats.
635
+ -----------------------------------------------------------------
636
+  (0.0ms) rollback transaction
637
+  (0.0ms) begin transaction
638
+ --------------------------------------
639
+ PhoneNumberTest: test_a_blocked_number
640
+ --------------------------------------
641
+  (0.0ms) rollback transaction
642
+  (0.0ms) begin transaction
643
+ ------------------------------
644
+ PhonyAttributeTest: test_truth
645
+ ------------------------------
646
+  (0.0ms) rollback transaction