ruby2xlsx 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ruby2xlsx/document.rb +6 -3
- data/lib/ruby2xlsx/version.rb +1 -1
- data/lib/ruby2xlsx/xrb.rb +1 -1
- data/test/dummy/log/test.log +309 -0
- data/test/integration/navigation_test.rb +13 -3
- metadata +12 -10
data/lib/ruby2xlsx/document.rb
CHANGED
@@ -10,10 +10,13 @@ module Ruby2xlsx
|
|
10
10
|
columns_names.each_with_index do |column, num|
|
11
11
|
value = record.send(column)
|
12
12
|
|
13
|
-
|
13
|
+
case value
|
14
|
+
when Date then
|
14
15
|
worksheet.write_string(row, num, value.strftime("%Y-%m-%dT"), date_format)
|
15
|
-
|
16
|
+
when DateTime, Time then
|
16
17
|
worksheet.write_date_time(row, num, value.strftime("%Y-%m-%dT%H:%M:%S.%L"), time_format)
|
18
|
+
when String then
|
19
|
+
worksheet.write_string(row, num, value)
|
17
20
|
else
|
18
21
|
worksheet.write(row, num, value)
|
19
22
|
end
|
@@ -39,7 +42,7 @@ module Ruby2xlsx
|
|
39
42
|
end
|
40
43
|
|
41
44
|
def filename
|
42
|
-
@filename ||= [(@options[:filename] || @klass.model_name.plural || "document"), ".
|
45
|
+
@filename ||= [(@options[:filename] || @klass.model_name.plural || "document"), ".xls"].join
|
43
46
|
end
|
44
47
|
|
45
48
|
def each_with_index
|
data/lib/ruby2xlsx/version.rb
CHANGED
data/lib/ruby2xlsx/xrb.rb
CHANGED
@@ -6,7 +6,7 @@ module Ruby2xlsx
|
|
6
6
|
|
7
7
|
def call(template)
|
8
8
|
%{ controller.send_data ::Ruby2xlsx::Template.new(#{template.source.inspect}).render(self, assigns.merge(local_assigns)),
|
9
|
-
:filename => [controller.action_name, ".
|
9
|
+
:filename => [controller.action_name, ".xls"].join,
|
10
10
|
:type => "application/vnd.ms-excel",
|
11
11
|
:disposition => "attachment" }
|
12
12
|
end
|
@@ -0,0 +1,309 @@
|
|
1
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
2
|
+
Migrating to CreateArticles (20120116125427)
|
3
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
4
|
+
[1m[36mSQL (50.5ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:14:38 UTC +00:00], ["title", "Some article 1"], ["updated_at", Tue, 27 Mar 2012 09:14:38 UTC +00:00]]
|
5
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
6
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
7
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:14:38 UTC +00:00], ["title", "Some article 2"], ["updated_at", Tue, 27 Mar 2012 09:14:38 UTC +00:00]]
|
8
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
9
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
10
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:14:38 UTC +00:00], ["title", "Some article 3"], ["updated_at", Tue, 27 Mar 2012 09:14:38 UTC +00:00]]
|
11
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
12
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
13
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:14:38 UTC +00:00], ["title", "Some article 4"], ["updated_at", Tue, 27 Mar 2012 09:14:38 UTC +00:00]]
|
14
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
15
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
16
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:14:38 UTC +00:00], ["title", "Some article 5"], ["updated_at", Tue, 27 Mar 2012 09:14:38 UTC +00:00]]
|
17
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
18
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
19
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:14:38 UTC +00:00], ["title", "Some article 1"], ["updated_at", Tue, 27 Mar 2012 09:14:38 UTC +00:00]]
|
20
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
21
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
22
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:14:38 UTC +00:00], ["title", "Some article 2"], ["updated_at", Tue, 27 Mar 2012 09:14:38 UTC +00:00]]
|
23
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
24
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
25
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:14:38 UTC +00:00], ["title", "Some article 3"], ["updated_at", Tue, 27 Mar 2012 09:14:38 UTC +00:00]]
|
26
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
27
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
28
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:14:38 UTC +00:00], ["title", "Some article 4"], ["updated_at", Tue, 27 Mar 2012 09:14:38 UTC +00:00]]
|
29
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
30
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
31
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:14:38 UTC +00:00], ["title", "Some article 5"], ["updated_at", Tue, 27 Mar 2012 09:14:38 UTC +00:00]]
|
32
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
33
|
+
|
34
|
+
|
35
|
+
Started GET "/another.xlsx" for 127.0.0.1 at 2012-03-27 12:14:39 +0300
|
36
|
+
Processing by ArticlesController#another as XLSX
|
37
|
+
[1m[35mArticle Load (0.2ms)[0m SELECT "articles".* FROM "articles" ORDER BY id DESC
|
38
|
+
Rendered text template (0.0ms)
|
39
|
+
Sent data another.xls (19.1ms)
|
40
|
+
Rendered articles/another.xlsx.xrb (355.3ms)
|
41
|
+
Completed 200 OK in 446ms (Views: 445.8ms | ActiveRecord: 0.0ms)
|
42
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
43
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:14:39 UTC +00:00], ["title", "Some article 1"], ["updated_at", Tue, 27 Mar 2012 09:14:39 UTC +00:00]]
|
44
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
45
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
46
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:14:39 UTC +00:00], ["title", "Some article 2"], ["updated_at", Tue, 27 Mar 2012 09:14:39 UTC +00:00]]
|
47
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
48
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
49
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:14:39 UTC +00:00], ["title", "Some article 3"], ["updated_at", Tue, 27 Mar 2012 09:14:39 UTC +00:00]]
|
50
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
51
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:14:39 UTC +00:00], ["title", "Some article 4"], ["updated_at", Tue, 27 Mar 2012 09:14:39 UTC +00:00]]
|
53
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
54
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
55
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:14:39 UTC +00:00], ["title", "Some article 5"], ["updated_at", Tue, 27 Mar 2012 09:14:39 UTC +00:00]]
|
56
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
57
|
+
|
58
|
+
|
59
|
+
Started GET "/articles" for 127.0.0.1 at 2012-03-27 12:14:39 +0300
|
60
|
+
Processing by ArticlesController#index as HTML
|
61
|
+
[1m[35mArticle Load (0.2ms)[0m SELECT "articles".* FROM "articles" ORDER BY id DESC
|
62
|
+
Rendered articles/index.html.erb within layouts/application (71.9ms)
|
63
|
+
Completed 200 OK in 131ms (Views: 130.6ms | ActiveRecord: 0.2ms)
|
64
|
+
|
65
|
+
|
66
|
+
Started GET "/articles.xlsx" for 127.0.0.1 at 2012-03-27 12:14:40 +0300
|
67
|
+
Processing by ArticlesController#index as XLSX
|
68
|
+
Scoped order and limit are ignored, it's forced to be batch order and batch size
|
69
|
+
[1m[36mArticle Load (0.2ms)[0m [1mSELECT "articles".* FROM "articles" WHERE ("articles"."id" >= 0) ORDER BY "articles"."id" ASC LIMIT 1000[0m
|
70
|
+
Rendered text template (0.0ms)
|
71
|
+
Sent data articles.xls (0.5ms)
|
72
|
+
Completed 200 OK in 41ms (Views: 41.1ms | ActiveRecord: 0.0ms)
|
73
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
74
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:14:40 UTC +00:00], ["title", "Some article 1"], ["updated_at", Tue, 27 Mar 2012 09:14:40 UTC +00:00]]
|
75
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
76
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
77
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:14:40 UTC +00:00], ["title", "Some article 2"], ["updated_at", Tue, 27 Mar 2012 09:14:40 UTC +00:00]]
|
78
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
79
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
80
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:14:40 UTC +00:00], ["title", "Some article 3"], ["updated_at", Tue, 27 Mar 2012 09:14:40 UTC +00:00]]
|
81
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
82
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
83
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:14:40 UTC +00:00], ["title", "Some article 4"], ["updated_at", Tue, 27 Mar 2012 09:14:40 UTC +00:00]]
|
84
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
85
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
86
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:14:40 UTC +00:00], ["title", "Some article 5"], ["updated_at", Tue, 27 Mar 2012 09:14:40 UTC +00:00]]
|
87
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
88
|
+
|
89
|
+
|
90
|
+
Started GET "/empty.xlsx" for 127.0.0.1 at 2012-03-27 12:14:40 +0300
|
91
|
+
Processing by ArticlesController#empty as XLSX
|
92
|
+
Rendered text template (0.0ms)
|
93
|
+
Sent data ruby2xlsx_defaults.xls (0.6ms)
|
94
|
+
Completed 200 OK in 29ms (Views: 28.2ms | ActiveRecord: 0.0ms)
|
95
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
96
|
+
Migrating to CreateArticles (20120116125427)
|
97
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
98
|
+
[1m[36mSQL (4.5ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00], ["title", "Some article 1"], ["updated_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00]]
|
99
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
100
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
101
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00], ["title", "Some article 2"], ["updated_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00]]
|
102
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
103
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
104
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00], ["title", "Some article 3"], ["updated_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00]]
|
105
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
106
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
107
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00], ["title", "Some article 4"], ["updated_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00]]
|
108
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
109
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
110
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00], ["title", "Some article 5"], ["updated_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00]]
|
111
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
112
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
113
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00], ["title", "Some article 1"], ["updated_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00]]
|
114
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
115
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
116
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00], ["title", "Some article 2"], ["updated_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00]]
|
117
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
118
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
119
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00], ["title", "Some article 3"], ["updated_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00]]
|
120
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
121
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
122
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00], ["title", "Some article 4"], ["updated_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00]]
|
123
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
124
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
125
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00], ["title", "Some article 5"], ["updated_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00]]
|
126
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
127
|
+
|
128
|
+
|
129
|
+
Started GET "/another.xlsx" for 127.0.0.1 at 2012-03-27 12:17:09 +0300
|
130
|
+
Processing by ArticlesController#another as XLSX
|
131
|
+
[1m[35mArticle Load (0.2ms)[0m SELECT "articles".* FROM "articles" ORDER BY id DESC
|
132
|
+
Rendered text template (0.0ms)
|
133
|
+
Sent data another.xls (2.0ms)
|
134
|
+
Rendered articles/another.xlsx.xrb (208.0ms)
|
135
|
+
Completed 200 OK in 247ms (Views: 246.8ms | ActiveRecord: 0.0ms)
|
136
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
137
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00], ["title", "Some article 1"], ["updated_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00]]
|
138
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
139
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
140
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00], ["title", "Some article 2"], ["updated_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00]]
|
141
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
142
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
143
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00], ["title", "Some article 3"], ["updated_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00]]
|
144
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
145
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
146
|
+
[1m[36mSQL (1.0ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00], ["title", "Some article 4"], ["updated_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00]]
|
147
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
148
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
149
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00], ["title", "Some article 5"], ["updated_at", Tue, 27 Mar 2012 09:17:09 UTC +00:00]]
|
150
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
151
|
+
|
152
|
+
|
153
|
+
Started GET "/articles" for 127.0.0.1 at 2012-03-27 12:17:09 +0300
|
154
|
+
Processing by ArticlesController#index as HTML
|
155
|
+
[1m[35mArticle Load (0.2ms)[0m SELECT "articles".* FROM "articles" ORDER BY id DESC
|
156
|
+
Rendered articles/index.html.erb within layouts/application (44.0ms)
|
157
|
+
Completed 200 OK in 47ms (Views: 46.2ms | ActiveRecord: 0.2ms)
|
158
|
+
|
159
|
+
|
160
|
+
Started GET "/articles.xlsx" for 127.0.0.1 at 2012-03-27 12:17:10 +0300
|
161
|
+
Processing by ArticlesController#index as XLSX
|
162
|
+
Scoped order and limit are ignored, it's forced to be batch order and batch size
|
163
|
+
[1m[36mArticle Load (0.2ms)[0m [1mSELECT "articles".* FROM "articles" WHERE ("articles"."id" >= 0) ORDER BY "articles"."id" ASC LIMIT 1000[0m
|
164
|
+
Rendered text template (0.0ms)
|
165
|
+
Sent data articles.xls (0.5ms)
|
166
|
+
Completed 200 OK in 41ms (Views: 41.2ms | ActiveRecord: 0.0ms)
|
167
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
168
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:17:10 UTC +00:00], ["title", "Some article 1"], ["updated_at", Tue, 27 Mar 2012 09:17:10 UTC +00:00]]
|
169
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
170
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
171
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:17:10 UTC +00:00], ["title", "Some article 2"], ["updated_at", Tue, 27 Mar 2012 09:17:10 UTC +00:00]]
|
172
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
173
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
174
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:17:10 UTC +00:00], ["title", "Some article 3"], ["updated_at", Tue, 27 Mar 2012 09:17:10 UTC +00:00]]
|
175
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
176
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
177
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:17:10 UTC +00:00], ["title", "Some article 4"], ["updated_at", Tue, 27 Mar 2012 09:17:10 UTC +00:00]]
|
178
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
179
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
180
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:17:10 UTC +00:00], ["title", "Some article 5"], ["updated_at", Tue, 27 Mar 2012 09:17:10 UTC +00:00]]
|
181
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
182
|
+
|
183
|
+
|
184
|
+
Started GET "/empty.xlsx" for 127.0.0.1 at 2012-03-27 12:17:10 +0300
|
185
|
+
Processing by ArticlesController#empty as XLSX
|
186
|
+
Rendered text template (0.0ms)
|
187
|
+
Sent data ruby2xlsx_defaults.xls (0.5ms)
|
188
|
+
Completed 200 OK in 8ms (Views: 7.3ms | ActiveRecord: 0.0ms)
|
189
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
190
|
+
Migrating to CreateArticles (20120116125427)
|
191
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
192
|
+
[1m[36mSQL (4.5ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:20:03 UTC +00:00], ["title", "Some article 1"], ["updated_at", Tue, 27 Mar 2012 09:20:03 UTC +00:00]]
|
193
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
194
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
195
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:20:03 UTC +00:00], ["title", "Some article 2"], ["updated_at", Tue, 27 Mar 2012 09:20:03 UTC +00:00]]
|
196
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
197
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
198
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:20:03 UTC +00:00], ["title", "Some article 3"], ["updated_at", Tue, 27 Mar 2012 09:20:03 UTC +00:00]]
|
199
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
200
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
201
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:20:03 UTC +00:00], ["title", "Some article 4"], ["updated_at", Tue, 27 Mar 2012 09:20:03 UTC +00:00]]
|
202
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
203
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
204
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:20:03 UTC +00:00], ["title", "Some article 5"], ["updated_at", Tue, 27 Mar 2012 09:20:03 UTC +00:00]]
|
205
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
206
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
207
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:20:03 UTC +00:00], ["title", "(\")\")"], ["updated_at", Tue, 27 Mar 2012 09:20:03 UTC +00:00]]
|
208
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
209
|
+
|
210
|
+
|
211
|
+
Started GET "/articles.xlsx" for 127.0.0.1 at 2012-03-27 12:20:04 +0300
|
212
|
+
Processing by ArticlesController#index as XLSX
|
213
|
+
Scoped order and limit are ignored, it's forced to be batch order and batch size
|
214
|
+
[1m[35mArticle Load (0.2ms)[0m SELECT "articles".* FROM "articles" WHERE ("articles"."id" >= 0) ORDER BY "articles"."id" ASC LIMIT 1000
|
215
|
+
Rendered text template (0.0ms)
|
216
|
+
Sent data articles.xls (39.3ms)
|
217
|
+
Completed 200 OK in 239ms (Views: 238.5ms | ActiveRecord: 0.0ms)
|
218
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
219
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00], ["title", "Some article 1"], ["updated_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00]]
|
220
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
221
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
222
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00], ["title", "Some article 2"], ["updated_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00]]
|
223
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
224
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
225
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00], ["title", "Some article 3"], ["updated_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00]]
|
226
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
227
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
228
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00], ["title", "Some article 4"], ["updated_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00]]
|
229
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
230
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
231
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00], ["title", "Some article 5"], ["updated_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00]]
|
232
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
233
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
234
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00], ["title", "Some article 1"], ["updated_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00]]
|
235
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
236
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
237
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00], ["title", "Some article 2"], ["updated_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00]]
|
238
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
239
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
240
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00], ["title", "Some article 3"], ["updated_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00]]
|
241
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
242
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
243
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00], ["title", "Some article 4"], ["updated_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00]]
|
244
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
245
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
246
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00], ["title", "Some article 5"], ["updated_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00]]
|
247
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
248
|
+
|
249
|
+
|
250
|
+
Started GET "/another.xlsx" for 127.0.0.1 at 2012-03-27 12:20:04 +0300
|
251
|
+
Processing by ArticlesController#another as XLSX
|
252
|
+
[1m[36mArticle Load (0.2ms)[0m [1mSELECT "articles".* FROM "articles" ORDER BY id DESC[0m
|
253
|
+
Rendered text template (0.0ms)
|
254
|
+
Sent data another.xls (0.6ms)
|
255
|
+
Rendered articles/another.xlsx.xrb (46.0ms)
|
256
|
+
Completed 200 OK in 47ms (Views: 46.8ms | ActiveRecord: 0.0ms)
|
257
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
258
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00], ["title", "Some article 1"], ["updated_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00]]
|
259
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
260
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
261
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00], ["title", "Some article 2"], ["updated_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00]]
|
262
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
263
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
264
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00], ["title", "Some article 3"], ["updated_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00]]
|
265
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
266
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
267
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00], ["title", "Some article 4"], ["updated_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00]]
|
268
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
269
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
270
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00], ["title", "Some article 5"], ["updated_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00]]
|
271
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
272
|
+
|
273
|
+
|
274
|
+
Started GET "/articles" for 127.0.0.1 at 2012-03-27 12:20:04 +0300
|
275
|
+
Processing by ArticlesController#index as HTML
|
276
|
+
[1m[36mArticle Load (0.2ms)[0m [1mSELECT "articles".* FROM "articles" ORDER BY id DESC[0m
|
277
|
+
Rendered articles/index.html.erb within layouts/application (12.3ms)
|
278
|
+
Completed 200 OK in 15ms (Views: 14.4ms | ActiveRecord: 0.2ms)
|
279
|
+
|
280
|
+
|
281
|
+
Started GET "/articles.xlsx" for 127.0.0.1 at 2012-03-27 12:20:04 +0300
|
282
|
+
Processing by ArticlesController#index as XLSX
|
283
|
+
Scoped order and limit are ignored, it's forced to be batch order and batch size
|
284
|
+
[1m[35mArticle Load (0.2ms)[0m SELECT "articles".* FROM "articles" WHERE ("articles"."id" >= 0) ORDER BY "articles"."id" ASC LIMIT 1000
|
285
|
+
Rendered text template (0.0ms)
|
286
|
+
Sent data articles.xls (0.5ms)
|
287
|
+
Completed 200 OK in 9ms (Views: 9.1ms | ActiveRecord: 0.0ms)
|
288
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
289
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00], ["title", "Some article 1"], ["updated_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00]]
|
290
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
291
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
292
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00], ["title", "Some article 2"], ["updated_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00]]
|
293
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
294
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
295
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00], ["title", "Some article 3"], ["updated_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00]]
|
296
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
297
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
298
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00], ["title", "Some article 4"], ["updated_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00]]
|
299
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
300
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
301
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", nil], ["created_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00], ["title", "Some article 5"], ["updated_at", Tue, 27 Mar 2012 09:20:04 UTC +00:00]]
|
302
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
303
|
+
|
304
|
+
|
305
|
+
Started GET "/empty.xlsx" for 127.0.0.1 at 2012-03-27 12:20:04 +0300
|
306
|
+
Processing by ArticlesController#empty as XLSX
|
307
|
+
Rendered text template (0.0ms)
|
308
|
+
Sent data ruby2xlsx_defaults.xls (0.6ms)
|
309
|
+
Completed 200 OK in 38ms (Views: 38.0ms | ActiveRecord: 0.0ms)
|
@@ -17,7 +17,7 @@ class NavigationTest < ActiveSupport::IntegrationCase
|
|
17
17
|
click_link 'Excel'
|
18
18
|
|
19
19
|
assert_equal 'binary', headers['Content-Transfer-Encoding']
|
20
|
-
assert_equal 'attachment; filename="articles.
|
20
|
+
assert_equal 'attachment; filename="articles.xls"', headers['Content-Disposition']
|
21
21
|
assert_equal 'application/vnd.ms-excel', headers['Content-Type']
|
22
22
|
end
|
23
23
|
|
@@ -25,7 +25,7 @@ class NavigationTest < ActiveSupport::IntegrationCase
|
|
25
25
|
visit '/another.xlsx'
|
26
26
|
|
27
27
|
assert_equal 'binary', headers['Content-Transfer-Encoding']
|
28
|
-
assert_equal 'attachment; filename="another.
|
28
|
+
assert_equal 'attachment; filename="another.xls"', headers['Content-Disposition']
|
29
29
|
assert_equal 'application/vnd.ms-excel', headers['Content-Type']
|
30
30
|
end
|
31
31
|
|
@@ -33,7 +33,17 @@ class NavigationTest < ActiveSupport::IntegrationCase
|
|
33
33
|
visit '/empty.xlsx'
|
34
34
|
|
35
35
|
assert_equal 'binary', headers['Content-Transfer-Encoding']
|
36
|
-
assert_equal 'attachment; filename="ruby2xlsx_defaults.
|
36
|
+
assert_equal 'attachment; filename="ruby2xlsx_defaults.xls"', headers['Content-Disposition']
|
37
|
+
assert_equal 'application/vnd.ms-excel', headers['Content-Type']
|
38
|
+
end
|
39
|
+
|
40
|
+
test 'should encode special charsets' do
|
41
|
+
Article.create(:title => '(")")')
|
42
|
+
|
43
|
+
visit '/articles.xlsx'
|
44
|
+
|
45
|
+
assert_equal 'binary', headers['Content-Transfer-Encoding']
|
46
|
+
assert_equal 'attachment; filename="articles.xls"', headers['Content-Disposition']
|
37
47
|
assert_equal 'application/vnd.ms-excel', headers['Content-Type']
|
38
48
|
end
|
39
49
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby2xlsx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-03-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: writeexcel
|
16
|
-
requirement: &
|
16
|
+
requirement: &85238090 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.6.12
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *85238090
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: activemodel
|
27
|
-
requirement: &
|
27
|
+
requirement: &85237880 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *85237880
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: sqlite3
|
38
|
-
requirement: &
|
38
|
+
requirement: &85237650 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *85237650
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: capybara
|
49
|
-
requirement: &
|
49
|
+
requirement: &85237400 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: 1.1.2
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *85237400
|
58
58
|
description: Another gem for exporting data to Excel
|
59
59
|
email:
|
60
60
|
- galeta.igor@gmail.com
|
@@ -97,6 +97,7 @@ files:
|
|
97
97
|
- test/dummy/app/assets/javascripts/application.js
|
98
98
|
- test/dummy/app/controllers/application_controller.rb
|
99
99
|
- test/dummy/app/controllers/articles_controller.rb
|
100
|
+
- test/dummy/log/test.log
|
100
101
|
- test/dummy/Rakefile
|
101
102
|
- test/dummy/script/rails
|
102
103
|
- test/dummy/config/routes.rb
|
@@ -168,6 +169,7 @@ test_files:
|
|
168
169
|
- test/dummy/app/assets/javascripts/application.js
|
169
170
|
- test/dummy/app/controllers/application_controller.rb
|
170
171
|
- test/dummy/app/controllers/articles_controller.rb
|
172
|
+
- test/dummy/log/test.log
|
171
173
|
- test/dummy/Rakefile
|
172
174
|
- test/dummy/script/rails
|
173
175
|
- test/dummy/config/routes.rb
|