to_spreadsheet 0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/LICENSE +24 -0
  2. data/README +48 -0
  3. data/Rakefile +21 -0
  4. data/lib/to_spreadsheet/action_pack_renderers.rb +21 -0
  5. data/lib/to_spreadsheet/mime_types.rb +2 -0
  6. data/lib/to_spreadsheet/version.rb +3 -0
  7. data/lib/to_spreadsheet/xls.rb +23 -0
  8. data/lib/to_spreadsheet.rb +7 -0
  9. data/test/test_app/Gemfile +10 -0
  10. data/test/test_app/Gemfile.lock +88 -0
  11. data/test/test_app/README +1 -0
  12. data/test/test_app/Rakefile +7 -0
  13. data/test/test_app/app/controllers/application_controller.rb +3 -0
  14. data/test/test_app/app/controllers/contacts_controller.rb +7 -0
  15. data/test/test_app/app/models/contact.rb +3 -0
  16. data/test/test_app/app/views/contacts/_table.erb +24 -0
  17. data/test/test_app/app/views/contacts/index.html.erb +1 -0
  18. data/test/test_app/app/views/contacts/index.xls.erb +1 -0
  19. data/test/test_app/app/views/layouts/application.html.erb +7 -0
  20. data/test/test_app/config/application.rb +15 -0
  21. data/test/test_app/config/boot.rb +6 -0
  22. data/test/test_app/config/database.yml +22 -0
  23. data/test/test_app/config/environment.rb +5 -0
  24. data/test/test_app/config/environments/development.rb +26 -0
  25. data/test/test_app/config/environments/production.rb +49 -0
  26. data/test/test_app/config/environments/test.rb +35 -0
  27. data/test/test_app/config/initializers/backtrace_silencers.rb +7 -0
  28. data/test/test_app/config/initializers/inflections.rb +10 -0
  29. data/test/test_app/config/initializers/mime_types.rb +5 -0
  30. data/test/test_app/config/initializers/secret_token.rb +7 -0
  31. data/test/test_app/config/initializers/session_store.rb +8 -0
  32. data/test/test_app/config/locales/en.yml +5 -0
  33. data/test/test_app/config/routes.rb +4 -0
  34. data/test/test_app/config.ru +4 -0
  35. data/test/test_app/db/development.sqlite3 +0 -0
  36. data/test/test_app/db/migrate/01_create_contacts.rb +15 -0
  37. data/test/test_app/db/schema.rb +21 -0
  38. data/test/test_app/db/seeds.rb +7 -0
  39. data/test/test_app/db/test.sqlite3 +0 -0
  40. data/test/test_app/log/development.log +509 -0
  41. data/test/test_app/log/production.log +0 -0
  42. data/test/test_app/log/server.log +0 -0
  43. data/test/test_app/log/test.log +104 -0
  44. data/test/test_app/script/rails +6 -0
  45. data/test/test_app/test/fixtures/contacts.yml +5 -0
  46. data/test/test_app/test/integration/rails_integration_test.rb +14 -0
  47. data/test/test_app/test/test_helper.rb +7 -0
  48. data/test/test_app/test/unit/contact_test.rb +7 -0
  49. data/test/test_helper.rb +1 -0
  50. metadata +153 -0
@@ -0,0 +1,509 @@
1
+ SQL (43.0ms)  SELECT name
2
+ FROM sqlite_master
3
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
4
+ 
5
+ SQL (1.0ms) select sqlite_version(*)
6
+ SQL (5.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
7
+ SQL (1.0ms) PRAGMA index_list("schema_migrations")
8
+ SQL (5.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
9
+ SQL (1.0ms) SELECT name
10
+ FROM sqlite_master
11
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
12
+ SQL (0.0ms)  SELECT name
13
+ FROM sqlite_master
14
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
15
+ 
16
+ SQL (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
17
+ SQL (1.0ms)  SELECT name
18
+ FROM sqlite_master
19
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
20
+ 
21
+ SQL (0.0ms) select sqlite_version(*)
22
+ SQL (0.0ms)  SELECT name
23
+ FROM sqlite_master
24
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
25
+ 
26
+ SQL (1.0ms) SELECT name
27
+ FROM sqlite_master
28
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
29
+ SQL (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
30
+ SQL (0.0ms) SELECT name
31
+ FROM sqlite_master
32
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
33
+ SQL (0.0ms)  SELECT name
34
+ FROM sqlite_master
35
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
36
+ 
37
+ SQL (0.0ms) SELECT name
38
+ FROM sqlite_master
39
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
40
+ SQL (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
41
+ SQL (1.0ms) SELECT name
42
+ FROM sqlite_master
43
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
44
+ SQL (0.0ms) select sqlite_version(*)
45
+ SQL (4.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
46
+ SQL (0.0ms) PRAGMA index_list("schema_migrations")
47
+ SQL (3.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
48
+ SQL (0.0ms)  SELECT name
49
+ FROM sqlite_master
50
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
51
+ 
52
+ SQL (1.0ms) SELECT version FROM "schema_migrations"
53
+ SQL (5.0ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
54
+ SQL (1.0ms)  SELECT name
55
+ FROM sqlite_master
56
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
57
+ 
58
+ SQL (0.0ms) SELECT name
59
+ FROM sqlite_master
60
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
61
+ SQL (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
62
+ SQL (1.0ms) SELECT name
63
+ FROM sqlite_master
64
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
65
+ SQL (0.0ms) select sqlite_version(*)
66
+ SQL (6.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
67
+ SQL (0.0ms) PRAGMA index_list("schema_migrations")
68
+ SQL (4.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
69
+ SQL (0.0ms)  SELECT name
70
+ FROM sqlite_master
71
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
72
+ 
73
+ SQL (0.0ms) SELECT version FROM "schema_migrations"
74
+ SQL (4.0ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
75
+ SQL (1.0ms)  SELECT name
76
+ FROM sqlite_master
77
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
78
+ 
79
+ SQL (0.0ms) SELECT name
80
+ FROM sqlite_master
81
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
82
+ SQL (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
83
+ SQL (0.0ms) SELECT name
84
+ FROM sqlite_master
85
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
86
+ SQL (0.0ms) select sqlite_version(*)
87
+ SQL (3.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
88
+ SQL (0.0ms) PRAGMA index_list("schema_migrations")
89
+ SQL (3.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
90
+ SQL (0.0ms)  SELECT name
91
+ FROM sqlite_master
92
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
93
+ 
94
+ SQL (0.0ms) SELECT version FROM "schema_migrations"
95
+ SQL (4.0ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
96
+ SQL (1.0ms)  SELECT name
97
+ FROM sqlite_master
98
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
99
+ 
100
+ SQL (1.0ms) SELECT name
101
+ FROM sqlite_master
102
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
103
+ SQL (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
104
+ SQL (1.0ms) SELECT name
105
+ FROM sqlite_master
106
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
107
+ SQL (0.0ms) select sqlite_version(*)
108
+ SQL (6.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
109
+ SQL (0.0ms) PRAGMA index_list("schema_migrations")
110
+ SQL (9.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
111
+ SQL (0.0ms)  SELECT name
112
+ FROM sqlite_master
113
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
114
+ 
115
+ SQL (0.0ms) SELECT version FROM "schema_migrations"
116
+ SQL (5.0ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
117
+ SQL (1.0ms)  SELECT name
118
+ FROM sqlite_master
119
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
120
+ 
121
+ SQL (0.0ms) SELECT name
122
+ FROM sqlite_master
123
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
124
+ SQL (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
125
+ SQL (0.0ms) SELECT name
126
+ FROM sqlite_master
127
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
128
+ SQL (1.0ms) select sqlite_version(*)
129
+ SQL (4.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
130
+ SQL (0.0ms) PRAGMA index_list("schema_migrations")
131
+ SQL (3.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
132
+ SQL (0.0ms)  SELECT name
133
+ FROM sqlite_master
134
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
135
+ 
136
+ SQL (0.0ms) SELECT version FROM "schema_migrations"
137
+ SQL (5.0ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
138
+ SQL (0.0ms)  SELECT name
139
+ FROM sqlite_master
140
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
141
+ 
142
+ SQL (1.0ms) SELECT name
143
+ FROM sqlite_master
144
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
145
+ SQL (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
146
+ SQL (1.0ms) SELECT name
147
+ FROM sqlite_master
148
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
149
+ SQL (0.0ms) select sqlite_version(*)
150
+ SQL (4.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
151
+ SQL (0.0ms) PRAGMA index_list("schema_migrations")
152
+ SQL (3.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
153
+ SQL (1.0ms)  SELECT name
154
+ FROM sqlite_master
155
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
156
+ 
157
+ SQL (0.0ms) SELECT version FROM "schema_migrations"
158
+ SQL (5.0ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
159
+ SQL (0.0ms)  SELECT name
160
+ FROM sqlite_master
161
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
162
+ 
163
+ SQL (0.0ms) SELECT name
164
+ FROM sqlite_master
165
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
166
+ SQL (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
167
+ SQL (1.0ms) SELECT name
168
+ FROM sqlite_master
169
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
170
+ SQL (0.0ms) select sqlite_version(*)
171
+ SQL (32.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
172
+ SQL (0.0ms) PRAGMA index_list("schema_migrations")
173
+ SQL (3.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
174
+ SQL (0.0ms)  SELECT name
175
+ FROM sqlite_master
176
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
177
+ 
178
+ SQL (0.0ms) SELECT version FROM "schema_migrations"
179
+ SQL (5.0ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
180
+ SQL (1.0ms)  SELECT name
181
+ FROM sqlite_master
182
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
183
+ 
184
+ SQL (1.0ms) SELECT name
185
+ FROM sqlite_master
186
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
187
+ SQL (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
188
+ SQL (1.0ms) SELECT name
189
+ FROM sqlite_master
190
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
191
+ SQL (0.0ms) select sqlite_version(*)
192
+ SQL (3.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
193
+ SQL (0.0ms) PRAGMA index_list("schema_migrations")
194
+ SQL (4.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
195
+ SQL (0.0ms)  SELECT name
196
+ FROM sqlite_master
197
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
198
+ 
199
+ SQL (0.0ms) SELECT version FROM "schema_migrations"
200
+ SQL (5.0ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
201
+ SQL (1.0ms)  SELECT name
202
+ FROM sqlite_master
203
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
204
+ 
205
+ SQL (1.0ms) SELECT name
206
+ FROM sqlite_master
207
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
208
+ SQL (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
209
+ SQL (1.0ms) SELECT name
210
+ FROM sqlite_master
211
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
212
+ SQL (0.0ms) select sqlite_version(*)
213
+ SQL (3.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
214
+ SQL (1.0ms) PRAGMA index_list("schema_migrations")
215
+ SQL (2.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
216
+ SQL (0.0ms)  SELECT name
217
+ FROM sqlite_master
218
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
219
+ 
220
+ SQL (0.0ms) SELECT version FROM "schema_migrations"
221
+ SQL (5.0ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
222
+ SQL (0.0ms)  SELECT name
223
+ FROM sqlite_master
224
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
225
+ 
226
+ SQL (0.0ms) SELECT name
227
+ FROM sqlite_master
228
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
229
+ SQL (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
230
+ SQL (1.0ms) SELECT name
231
+ FROM sqlite_master
232
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
233
+ SQL (0.0ms) select sqlite_version(*)
234
+ SQL (4.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
235
+ SQL (0.0ms) PRAGMA index_list("schema_migrations")
236
+ SQL (4.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
237
+ SQL (0.0ms)  SELECT name
238
+ FROM sqlite_master
239
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
240
+ 
241
+ SQL (0.0ms) SELECT version FROM "schema_migrations"
242
+ SQL (3.0ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
243
+ SQL (1.0ms)  SELECT name
244
+ FROM sqlite_master
245
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
246
+ 
247
+ SQL (0.0ms) select sqlite_version(*)
248
+ SQL (5.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
249
+ SQL (0.0ms) PRAGMA index_list("schema_migrations")
250
+ SQL (3.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
251
+ SQL (0.0ms) SELECT name
252
+ FROM sqlite_master
253
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
254
+ SQL (0.0ms) SELECT version FROM "schema_migrations"
255
+ SQL (5.0ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
256
+ SQL (1.0ms)  SELECT name
257
+ FROM sqlite_master
258
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
259
+ 
260
+ SQL (0.0ms) select sqlite_version(*)
261
+ SQL (4.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
262
+ SQL (0.0ms) PRAGMA index_list("schema_migrations")
263
+ SQL (3.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
264
+ SQL (0.0ms) SELECT name
265
+ FROM sqlite_master
266
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
267
+ SQL (0.0ms) SELECT version FROM "schema_migrations"
268
+ SQL (5.0ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
269
+ SQL (1.0ms)  SELECT name
270
+ FROM sqlite_master
271
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
272
+ 
273
+ SQL (0.0ms) SELECT name
274
+ FROM sqlite_master
275
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
276
+ SQL (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
277
+ SQL (0.0ms)  SELECT name
278
+ FROM sqlite_master
279
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
280
+ 
281
+ SQL (0.0ms) SELECT name
282
+ FROM sqlite_master
283
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
284
+ SQL (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
285
+ Migrating to CreateContacts (1)
286
+ SQL (0.0ms) select sqlite_version(*)
287
+ SQL (1.0ms) CREATE TABLE "contacts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "website" varchar(255), "age" integer) 
288
+ SQL (0.0ms) INSERT INTO "schema_migrations" ("version") VALUES ('1')
289
+ SQL (3.0ms)  SELECT name
290
+ FROM sqlite_master
291
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
292
+ 
293
+ SQL (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
294
+ SQL (0.0ms)  SELECT name
295
+ FROM sqlite_master
296
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
297
+ 
298
+ SQL (0.0ms) PRAGMA index_list("contacts")
299
+ SQL (0.0ms)  SELECT name
300
+ FROM sqlite_master
301
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
302
+ 
303
+ SQL (0.0ms) SELECT name
304
+ FROM sqlite_master
305
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
306
+ SQL (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
307
+ SQL (1.0ms) select sqlite_version(*)
308
+ SQL (0.0ms)  SELECT name
309
+ FROM sqlite_master
310
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
311
+ 
312
+ SQL (5.0ms) CREATE TABLE "contacts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "website" varchar(255), "age" integer)
313
+ SQL (0.0ms)  SELECT name
314
+ FROM sqlite_master
315
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
316
+ 
317
+ SQL (4.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
318
+ SQL (0.0ms) PRAGMA index_list("schema_migrations")
319
+ SQL (4.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
320
+ SQL (0.0ms)  SELECT name
321
+ FROM sqlite_master
322
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
323
+ 
324
+ SQL (1.0ms) SELECT version FROM "schema_migrations"
325
+ SQL (3.0ms) INSERT INTO "schema_migrations" (version) VALUES ('1')
326
+ SQL (0.0ms)  SELECT name
327
+ FROM sqlite_master
328
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
329
+ 
330
+ SQL (0.0ms) SELECT name
331
+ FROM sqlite_master
332
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
333
+ SQL (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
334
+ SQL (1.0ms) select sqlite_version(*)
335
+ SQL (0.0ms)  SELECT name
336
+ FROM sqlite_master
337
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
338
+ 
339
+ SQL (6.0ms) CREATE TABLE "contacts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "website" varchar(255), "age" integer)
340
+ SQL (0.0ms)  SELECT name
341
+ FROM sqlite_master
342
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
343
+ 
344
+ SQL (6.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
345
+ SQL (0.0ms) PRAGMA index_list("schema_migrations")
346
+ SQL (4.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
347
+ SQL (0.0ms)  SELECT name
348
+ FROM sqlite_master
349
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
350
+ 
351
+ SQL (0.0ms) SELECT version FROM "schema_migrations"
352
+ SQL (3.0ms) INSERT INTO "schema_migrations" (version) VALUES ('1')
353
+ SQL (0.0ms)  SELECT name
354
+ FROM sqlite_master
355
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
356
+ 
357
+ SQL (0.0ms) SELECT name
358
+ FROM sqlite_master
359
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
360
+ SQL (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
361
+ SQL (0.0ms) select sqlite_version(*)
362
+ SQL (0.0ms)  SELECT name
363
+ FROM sqlite_master
364
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
365
+ 
366
+ SQL (59.0ms) CREATE TABLE "contacts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "website" varchar(255), "age" integer)
367
+ SQL (0.0ms)  SELECT name
368
+ FROM sqlite_master
369
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
370
+ 
371
+ SQL (4.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
372
+ SQL (0.0ms) PRAGMA index_list("schema_migrations")
373
+ SQL (4.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
374
+ SQL (0.0ms)  SELECT name
375
+ FROM sqlite_master
376
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
377
+ 
378
+ SQL (1.0ms) SELECT version FROM "schema_migrations"
379
+ SQL (4.0ms) INSERT INTO "schema_migrations" (version) VALUES ('1')
380
+
381
+
382
+ Started GET "/" for 127.0.0.1 at 2011-03-15 02:12:42 +0100
383
+
384
+
385
+ Started GET "/contacts.html" for 127.0.0.1 at 2011-03-15 02:12:47 +0100
386
+ Processing by ContactsController#index as HTML
387
+ Contact Load (1.0ms) SELECT "contacts".* FROM "contacts"
388
+ Rendered contacts/_table.erb (0.0ms)
389
+ Rendered contacts/index.html.erb within layouts/application (7.0ms)
390
+ Completed 200 OK in 281ms (Views: 30.0ms | ActiveRecord: 1.0ms)
391
+
392
+
393
+ Started GET "/favicon.ico" for 127.0.0.1 at 2011-03-15 02:12:48 +0100
394
+
395
+ ActionController::RoutingError (No route matches "/favicon.ico"):
396
+
397
+
398
+ Rendered c:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.5/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (1.0ms)
399
+
400
+
401
+ Started GET "/contacts.xls" for 127.0.0.1 at 2011-03-15 02:13:37 +0100
402
+ Processing by ContactsController#index as XLS
403
+ Contact Load (0.0ms) SELECT "contacts".* FROM "contacts"
404
+ Rendered contacts/_table.erb (1.0ms)
405
+ Rendered contacts/index.xls.erb (5.0ms)
406
+ Rendered text template (0.0ms)
407
+ Sent data (20.0ms)
408
+ Completed 200 OK in 71ms (Views: 58.0ms | ActiveRecord: 0.0ms)
409
+
410
+
411
+ Started GET "/contacts.xls" for 127.0.0.1 at 2011-03-15 02:14:32 +0100
412
+ Processing by ContactsController#index as XLS
413
+ Contact Load (1.0ms) SELECT "contacts".* FROM "contacts"
414
+ Rendered contacts/_table.erb (0.0ms)
415
+ Rendered contacts/index.xls.erb (5.0ms)
416
+ Rendered text template (0.0ms)
417
+ Sent data (1.0ms)
418
+ Completed 200 OK in 76ms (Views: 40.0ms | ActiveRecord: 1.0ms)
419
+
420
+
421
+ Started GET "/contacts.xls" for 127.0.0.1 at 2011-03-15 02:15:10 +0100
422
+ Processing by ContactsController#index as XLS
423
+ Contact Load (1.0ms) SELECT "contacts".* FROM "contacts"
424
+ Rendered contacts/_table.erb (1.0ms)
425
+ Rendered contacts/index.xls.erb (5.0ms)
426
+ Rendered text template (0.0ms)
427
+ Sent data (20.0ms)
428
+ Completed 200 OK in 300ms (Views: 61.0ms | ActiveRecord: 1.0ms)
429
+ SQL (1.0ms)  SELECT name
430
+ FROM sqlite_master
431
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
432
+ 
433
+ SQL (1.0ms) SELECT name
434
+ FROM sqlite_master
435
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
436
+ SQL (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
437
+ SQL (0.0ms) select sqlite_version(*)
438
+ SQL (0.0ms)  SELECT name
439
+ FROM sqlite_master
440
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
441
+ 
442
+ SQL (4.0ms) CREATE TABLE "contacts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "website" varchar(255), "age" integer)
443
+ SQL (0.0ms)  SELECT name
444
+ FROM sqlite_master
445
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
446
+ 
447
+ SQL (4.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
448
+ SQL (0.0ms) PRAGMA index_list("schema_migrations")
449
+ SQL (4.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
450
+ SQL (0.0ms)  SELECT name
451
+ FROM sqlite_master
452
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
453
+ 
454
+ SQL (1.0ms) SELECT version FROM "schema_migrations"
455
+ SQL (3.0ms) INSERT INTO "schema_migrations" (version) VALUES ('1')
456
+ SQL (119.0ms)  SELECT name
457
+ FROM sqlite_master
458
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
459
+ 
460
+ SQL (1.0ms) SELECT name
461
+ FROM sqlite_master
462
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
463
+ SQL (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
464
+ SQL (1.0ms) select sqlite_version(*)
465
+ SQL (0.0ms)  SELECT name
466
+ FROM sqlite_master
467
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
468
+ 
469
+ SQL (30.0ms) CREATE TABLE "contacts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "website" varchar(255), "age" integer)
470
+ SQL (1.0ms)  SELECT name
471
+ FROM sqlite_master
472
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
473
+ 
474
+ SQL (41.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
475
+ SQL (0.0ms) PRAGMA index_list("schema_migrations")
476
+ SQL (9.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
477
+ SQL (1.0ms)  SELECT name
478
+ FROM sqlite_master
479
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
480
+ 
481
+ SQL (0.0ms) SELECT version FROM "schema_migrations"
482
+ SQL (8.0ms) INSERT INTO "schema_migrations" (version) VALUES ('1')
483
+ SQL (1.0ms)  SELECT name
484
+ FROM sqlite_master
485
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
486
+ 
487
+ SQL (0.0ms) SELECT name
488
+ FROM sqlite_master
489
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
490
+ SQL (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
491
+ SQL (1.0ms) select sqlite_version(*)
492
+ SQL (2.0ms)  SELECT name
493
+ FROM sqlite_master
494
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
495
+ 
496
+ SQL (10.0ms) CREATE TABLE "contacts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "website" varchar(255), "age" integer)
497
+ SQL (0.0ms)  SELECT name
498
+ FROM sqlite_master
499
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
500
+ 
501
+ SQL (23.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
502
+ SQL (0.0ms) PRAGMA index_list("schema_migrations")
503
+ SQL (8.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
504
+ SQL (1.0ms)  SELECT name
505
+ FROM sqlite_master
506
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
507
+ 
508
+ SQL (1.0ms) SELECT version FROM "schema_migrations"
509
+ SQL (12.0ms) INSERT INTO "schema_migrations" (version) VALUES ('1')
File without changes
File without changes
@@ -0,0 +1,104 @@
1
+ SQL (0.0ms) select sqlite_version(*)
2
+ SQL (4.0ms) CREATE TABLE "contacts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "website" varchar(255), "age" integer)
3
+ SQL (0.0ms)  SELECT name
4
+ FROM sqlite_master
5
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
6
+ 
7
+ SQL (0.0ms) SELECT version FROM "schema_migrations"
8
+ SQL (3.0ms) INSERT INTO "schema_migrations" (version) VALUES ('1')
9
+ SQL (1.0ms) SELECT COUNT(*) FROM "contacts"
10
+ SQL (1.0ms) select sqlite_version(*)
11
+ SQL (4.0ms) CREATE TABLE "contacts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "website" varchar(255), "age" integer)
12
+ SQL (0.0ms)  SELECT name
13
+ FROM sqlite_master
14
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
15
+ 
16
+ SQL (0.0ms) SELECT version FROM "schema_migrations"
17
+ SQL (4.0ms) INSERT INTO "schema_migrations" (version) VALUES ('1')
18
+ SQL (0.0ms) SELECT COUNT(*) FROM "contacts"
19
+ SQL (2.0ms) select sqlite_version(*)
20
+ SQL (11.0ms) CREATE TABLE "contacts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "website" varchar(255), "age" integer)
21
+ SQL (0.0ms)  SELECT name
22
+ FROM sqlite_master
23
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
24
+ 
25
+ SQL (0.0ms) SELECT version FROM "schema_migrations"
26
+ SQL (5.0ms) INSERT INTO "schema_migrations" (version) VALUES ('1')
27
+ SQL (1.0ms) SELECT COUNT(*) FROM "contacts"
28
+ SQL (1.0ms) select sqlite_version(*)
29
+ SQL (0.0ms) CREATE TABLE "contacts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "website" varchar(255), "age" integer)
30
+ SQLite3::SQLException: table "contacts" already exists: CREATE TABLE "contacts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "website" varchar(255), "age" integer)
31
+ SQL (0.0ms) SELECT COUNT(*) FROM "contacts"
32
+ SQL (0.0ms) SELECT COUNT(*) FROM "contacts"
33
+
34
+
35
+ Started GET "/contacts" for 127.0.0.1 at 2011-03-15 02:02:17 +0100
36
+ Processing by ContactsController#index as HTML
37
+ Contact Load (1.0ms) SELECT "contacts".* FROM "contacts"
38
+ Rendered contacts/_table.erb (6.0ms)
39
+ Rendered contacts/index.html.erb within layouts/application (18.0ms)
40
+ Completed 200 OK in 455ms (Views: 52.0ms | ActiveRecord: 3.0ms)
41
+
42
+
43
+ Started GET "/contacts.xls" for 127.0.0.1 at 2011-03-15 02:02:17 +0100
44
+
45
+
46
+ Started GET "/contacts" for 127.0.0.1 at 2011-03-15 02:05:09 +0100
47
+ Processing by ContactsController#index as HTML
48
+ Contact Load (1.0ms) SELECT "contacts".* FROM "contacts"
49
+ Rendered contacts/_table.erb (6.0ms)
50
+ Rendered contacts/index.html.erb within layouts/application (17.0ms)
51
+ Completed 200 OK in 418ms (Views: 48.0ms | ActiveRecord: 2.0ms)
52
+
53
+
54
+ Started GET "/contacts.xls" for 127.0.0.1 at 2011-03-15 02:05:10 +0100
55
+ Processing by ContactsController#index as XLS
56
+ Contact Load (1.0ms) SELECT "contacts".* FROM "contacts"
57
+ Rendered contacts/_table.erb (1.0ms)
58
+ Completed in 86ms
59
+
60
+
61
+ Started GET "/contacts" for 127.0.0.1 at 2011-03-15 02:09:43 +0100
62
+ Processing by ContactsController#index as HTML
63
+ Contact Load (1.0ms) SELECT "contacts".* FROM "contacts"
64
+ Rendered contacts/_table.erb (4.0ms)
65
+ Rendered contacts/index.html.erb within layouts/application (11.0ms)
66
+ Completed 200 OK in 240ms (Views: 27.0ms | ActiveRecord: 3.0ms)
67
+
68
+
69
+ Started GET "/contacts.xls" for 127.0.0.1 at 2011-03-15 02:09:43 +0100
70
+ Processing by ContactsController#index as XLS
71
+ Contact Load (1.0ms) SELECT "contacts".* FROM "contacts"
72
+ Rendered contacts/_table.erb (0.0ms)
73
+ Completed in 53ms
74
+
75
+
76
+ Started GET "/contacts" for 127.0.0.1 at 2011-03-15 02:10:47 +0100
77
+ Processing by ContactsController#index as HTML
78
+ Contact Load (0.0ms) SELECT "contacts".* FROM "contacts"
79
+ Rendered contacts/_table.erb (4.0ms)
80
+ Rendered contacts/index.html.erb within layouts/application (12.0ms)
81
+ Completed 200 OK in 277ms (Views: 34.0ms | ActiveRecord: 1.0ms)
82
+
83
+
84
+ Started GET "/contacts.xls" for 127.0.0.1 at 2011-03-15 02:10:47 +0100
85
+ Processing by ContactsController#index as XLS
86
+ Contact Load (1.0ms) SELECT "contacts".* FROM "contacts"
87
+ Rendered contacts/_table.erb (1.0ms)
88
+ Completed in 86ms
89
+
90
+
91
+ Started GET "/contacts" for 127.0.0.1 at 2011-03-15 02:11:41 +0100
92
+ Processing by ContactsController#index as HTML
93
+ Contact Load (1.0ms) SELECT "contacts".* FROM "contacts"
94
+ Rendered contacts/_table.erb (4.0ms)
95
+ Rendered contacts/index.html.erb within layouts/application (10.0ms)
96
+ Completed 200 OK in 260ms (Views: 26.0ms | ActiveRecord: 3.0ms)
97
+
98
+
99
+ Started GET "/contacts.xls" for 127.0.0.1 at 2011-03-15 02:11:41 +0100
100
+ Processing by ContactsController#index as XLS
101
+ Contact Load (1.0ms) SELECT "contacts".* FROM "contacts"
102
+ Rendered contacts/_table.erb (1.0ms)
103
+ Sent data (20.0ms)
104
+ Completed 200 OK in 52ms (Views: 51.0ms | ActiveRecord: 1.0ms)
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby.exe
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,5 @@
1
+ --- !omap
2
+ - contact:
3
+ id: 1
4
+ name: Gleb Mazovetskiy
5
+ website: http://glebm.blogspot.com
@@ -0,0 +1,14 @@
1
+ require 'test_helper'
2
+
3
+ class RailsIntegrationTest < ActionController::IntegrationTest
4
+ fixtures :all
5
+ test "html" do
6
+ get '/contacts'
7
+ assert_response :success
8
+ end
9
+
10
+ test "xls" do
11
+ get '/contacts.xls'
12
+ assert_response :success
13
+ end
14
+ end
@@ -0,0 +1,7 @@
1
+ ENV["RAILS_ENV"] = "test"
2
+ require File.expand_path('../../config/environment', __FILE__)
3
+ require 'rails/test_help'
4
+
5
+ class ActiveSupport::TestCase
6
+ fixtures :all
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class ContactTest < ActiveSupport::TestCase
4
+ def test_contact
5
+ assert_equal 1, Contact.count
6
+ end
7
+ end