track_changes 0.5.1 → 1.0.0.pre1

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 (73) hide show
  1. data/README.rdoc +46 -32
  2. data/TODO +1 -1
  3. data/VERSION.yml +4 -4
  4. data/lib/generators/track_changes/templates/initializer.rb +1 -0
  5. data/lib/generators/track_changes/templates/migration.rb +18 -0
  6. data/lib/generators/track_changes/templates/stylesheet.css +12 -0
  7. data/lib/generators/track_changes/track_changes_generator.rb +30 -0
  8. data/lib/track_changes/action_controller.rb +31 -0
  9. data/lib/track_changes/active_record.rb +26 -0
  10. data/lib/track_changes/around_save.rb +9 -0
  11. data/lib/track_changes/changes.rb +15 -0
  12. data/lib/track_changes/configuration.rb +3 -32
  13. data/lib/track_changes/current_user.rb +5 -0
  14. data/lib/track_changes/current_user_filter.rb +12 -0
  15. data/lib/track_changes/engine.rb +7 -0
  16. data/lib/track_changes.rb +11 -10
  17. data/test/functional/posts_controller_test.rb +39 -10
  18. data/test/railsapp/Gemfile +12 -0
  19. data/test/railsapp/Gemfile.lock +84 -0
  20. data/test/railsapp/Rakefile +4 -0
  21. data/test/{rails_root → railsapp}/app/controllers/application_controller.rb +1 -0
  22. data/test/railsapp/app/controllers/posts_controller.rb +40 -0
  23. data/test/railsapp/app/models/post.rb +3 -0
  24. data/test/railsapp/app/models/user.rb +3 -0
  25. data/test/railsapp/app/views/layouts/application.html.erb +12 -0
  26. data/test/railsapp/app/views/posts/_form.html.erb +13 -0
  27. data/test/railsapp/app/views/posts/_post.html.erb +3 -0
  28. data/test/railsapp/app/views/posts/edit.html.erb +5 -0
  29. data/test/railsapp/app/views/posts/index.html.erb +2 -0
  30. data/test/railsapp/config/application.rb +12 -0
  31. data/test/railsapp/config/boot.rb +13 -0
  32. data/test/railsapp/config/database.yml +5 -0
  33. data/test/railsapp/config/environment.rb +5 -0
  34. data/test/railsapp/config/environments/test.rb +10 -0
  35. data/test/railsapp/config/routes.rb +3 -0
  36. data/test/railsapp/config.ru +2 -0
  37. data/test/railsapp/db/test.sqlite3 +0 -0
  38. data/test/railsapp/log/test.log +6385 -0
  39. data/test/railsapp/script/rails +6 -0
  40. data/test/schema.rb +19 -0
  41. data/test/test_helper.rb +4 -26
  42. data/test/track_changes_test.rb +34 -0
  43. metadata +124 -88
  44. data/lib/track_changes/audit_filter.rb +0 -69
  45. data/lib/track_changes/base.rb +0 -9
  46. data/lib/track_changes/class_methods.rb +0 -74
  47. data/lib/track_changes/filter.rb +0 -43
  48. data/lib/track_changes/initializer.rb +0 -18
  49. data/lib/track_changes/instance_methods.rb +0 -5
  50. data/lib/track_changes/result.rb +0 -36
  51. data/test/base_test.rb +0 -20
  52. data/test/class_methods_test.rb +0 -29
  53. data/test/filter_test.rb +0 -73
  54. data/test/rails_root/app/controllers/posts_controller.rb +0 -36
  55. data/test/rails_root/app/models/audit.rb +0 -4
  56. data/test/rails_root/app/models/post.rb +0 -3
  57. data/test/rails_root/config/boot.rb +0 -110
  58. data/test/rails_root/config/database.yml +0 -3
  59. data/test/rails_root/config/environment.rb +0 -7
  60. data/test/rails_root/config/environments/test.rb +0 -7
  61. data/test/rails_root/config/initializers/new_rails_defaults.rb +0 -7
  62. data/test/rails_root/config/initializers/session_store.rb +0 -4
  63. data/test/rails_root/config/initializers/track_changes_setup.rb +0 -8
  64. data/test/rails_root/config/routes.rb +0 -3
  65. data/test/rails_root/db/migrate/20100115021125_create_audits.rb +0 -16
  66. data/test/rails_root/db/migrate/20100115021151_create_posts.rb +0 -15
  67. data/test/rails_root/log/test.log +0 -543
  68. data/test/rails_root/script/console +0 -3
  69. data/test/rails_root/script/generate +0 -3
  70. data/test/result_test.rb +0 -35
  71. data/test/track_changes/audit_filter_test.rb +0 -154
  72. data/test/track_changes/configuration_test.rb +0 -36
  73. data/test/track_changes/initializer_test.rb +0 -37
@@ -1,543 +0,0 @@
1
- # Logfile created on Fri Jul 30 11:18:38 -0700 2010 SQL (2.0ms)  SELECT name
2
- FROM sqlite_master
3
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
4
- 
5
- SQL (0.0ms) CREATE TABLE schema_migrations (version VARCHAR(255) NOT NULL) 
6
- SQL (0.0ms) CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations (version)
7
- SQL (2.0ms)  SELECT name
8
- FROM sqlite_master
9
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
10
- 
11
- SQL (0.0ms) SELECT version FROM schema_migrations
12
- Migrating to CreateAudits (20100115021125)
13
- SQL (0.0ms) CREATE TABLE audits (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, audited_type VARCHAR(255), audited_id integer(0), user VARCHAR(255), change_set text, created_at DATETIME, updated_at DATETIME) 
14
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021125')
15
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
16
- Migrating to CreatePosts (20100115021151)
17
- SQL (0.0ms) CREATE TABLE posts (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, title VARCHAR(255), body text, author VARCHAR(255), created_at DATETIME, updated_at DATETIME) 
18
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021151')
19
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
20
- SQL (0.0ms)  SELECT name
21
- FROM sqlite_master
22
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
23
- 
24
- SQL (0.0ms) CREATE TABLE schema_migrations (version VARCHAR(255) NOT NULL) 
25
- SQL (0.0ms) CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations (version)
26
- SQL (0.0ms)  SELECT name
27
- FROM sqlite_master
28
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
29
- 
30
- SQL (0.0ms) SELECT version FROM schema_migrations
31
- Migrating to CreateAudits (20100115021125)
32
- SQL (0.0ms) CREATE TABLE audits (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, audited_type VARCHAR(255), audited_id integer(0), user VARCHAR(255), change_set text, created_at DATETIME, updated_at DATETIME) 
33
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021125')
34
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
35
- Migrating to CreatePosts (20100115021151)
36
- SQL (0.0ms) CREATE TABLE posts (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, title VARCHAR(255), body text, author VARCHAR(255), created_at DATETIME, updated_at DATETIME) 
37
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021151')
38
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
39
- Post Create (0.0ms) INSERT INTO posts (title, body, author, created_at, updated_at) VALUES('Hello, World', 'This is a test.', 'Matt Haley', '2010-07-30 18:25:28', '2010-07-30 18:25:28')
40
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'posts'
41
- SQL (0.0ms) SELECT count(*) AS count_all FROM audits 
42
-
43
-
44
- Processing PostsController#update (for 0.0.0.0 at 2010-07-30 11:25:29) [PUT]
45
- Parameters: {"post"=>{"title"=>"First post!"}, "id"=>"1"}
46
- Post Load (2.0ms) SELECT * FROM posts WHERE (posts.id = 1) 
47
- Post Update (0.0ms) UPDATE posts SET title = 'First post!', updated_at = '2010-07-30 18:25:29' WHERE id = 1
48
- Redirected to http://test.host/posts/1
49
- WARNING: Can't mass-assign these protected attributes: id
50
- SQL (3.0ms)  SELECT name
51
- FROM sqlite_master
52
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
53
- 
54
- SQL (0.0ms) CREATE TABLE schema_migrations (version VARCHAR(255) NOT NULL) 
55
- SQL (0.0ms) CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations (version)
56
- SQL (0.0ms)  SELECT name
57
- FROM sqlite_master
58
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
59
- 
60
- SQL (0.0ms) SELECT version FROM schema_migrations
61
- Migrating to CreateAudits (20100115021125)
62
- SQL (0.0ms) CREATE TABLE audits (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, audited_type VARCHAR(255), audited_id integer(0), user VARCHAR(255), change_set text, created_at DATETIME, updated_at DATETIME) 
63
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021125')
64
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
65
- Migrating to CreatePosts (20100115021151)
66
- SQL (0.0ms) CREATE TABLE posts (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, title VARCHAR(255), body text, author VARCHAR(255), created_at DATETIME, updated_at DATETIME) 
67
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021151')
68
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
69
- SQL (0.0ms)  SELECT name
70
- FROM sqlite_master
71
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
72
- 
73
- SQL (0.0ms) CREATE TABLE schema_migrations (version VARCHAR(255) NOT NULL) 
74
- SQL (0.0ms) CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations (version)
75
- SQL (0.0ms)  SELECT name
76
- FROM sqlite_master
77
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
78
- 
79
- SQL (0.0ms) SELECT version FROM schema_migrations
80
- Migrating to CreateAudits (20100115021125)
81
- SQL (2.0ms) CREATE TABLE audits (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, audited_type VARCHAR(255), audited_id integer(0), user VARCHAR(255), change_set text, created_at DATETIME, updated_at DATETIME) 
82
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021125')
83
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
84
- Migrating to CreatePosts (20100115021151)
85
- SQL (0.0ms) CREATE TABLE posts (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, title VARCHAR(255), body text, author VARCHAR(255), created_at DATETIME, updated_at DATETIME) 
86
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021151')
87
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
88
- Post Create (0.0ms) INSERT INTO posts (title, body, author, created_at, updated_at) VALUES('Hello, World', 'This is a test.', 'Matt Haley', '2010-07-30 19:34:50', '2010-07-30 19:34:50')
89
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'posts'
90
- SQL (2.0ms) SELECT count(*) AS count_all FROM audits 
91
-
92
-
93
- Processing PostsController#update (for 0.0.0.0 at 2010-07-30 12:34:50) [PUT]
94
- Parameters: {"post"=>{"title"=>"First post!"}, "id"=>"1"}
95
- Post Load (0.0ms) SELECT * FROM posts WHERE (posts.id = 1) 
96
- Post Update (0.0ms) UPDATE posts SET title = 'First post!', updated_at = '2010-07-30 19:34:50' WHERE id = 1
97
- Redirected to http://test.host/posts/1
98
- WARNING: Can't mass-assign these protected attributes: id
99
- SQL (2.0ms)  SELECT name
100
- FROM sqlite_master
101
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
102
- 
103
- SQL (0.0ms) CREATE TABLE schema_migrations (version VARCHAR(255) NOT NULL) 
104
- SQL (0.0ms) CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations (version)
105
- SQL (0.0ms)  SELECT name
106
- FROM sqlite_master
107
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
108
- 
109
- SQL (0.0ms) SELECT version FROM schema_migrations
110
- Migrating to CreateAudits (20100115021125)
111
- SQL (0.0ms) CREATE TABLE audits (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, audited_type VARCHAR(255), audited_id integer(0), user VARCHAR(255), change_set text, created_at DATETIME, updated_at DATETIME) 
112
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021125')
113
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
114
- Migrating to CreatePosts (20100115021151)
115
- SQL (0.0ms) CREATE TABLE posts (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, title VARCHAR(255), body text, author VARCHAR(255), created_at DATETIME, updated_at DATETIME) 
116
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021151')
117
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
118
- SQL (0.0ms)  SELECT name
119
- FROM sqlite_master
120
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
121
- 
122
- SQL (2.0ms) CREATE TABLE schema_migrations (version VARCHAR(255) NOT NULL) 
123
- SQL (0.0ms) CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations (version)
124
- SQL (0.0ms)  SELECT name
125
- FROM sqlite_master
126
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
127
- 
128
- SQL (0.0ms) SELECT version FROM schema_migrations
129
- Migrating to CreateAudits (20100115021125)
130
- SQL (0.0ms) CREATE TABLE audits (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, audited_type VARCHAR(255), audited_id integer(0), user VARCHAR(255), change_set text, created_at DATETIME, updated_at DATETIME) 
131
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021125')
132
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
133
- Migrating to CreatePosts (20100115021151)
134
- SQL (3.0ms) CREATE TABLE posts (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, title VARCHAR(255), body text, author VARCHAR(255), created_at DATETIME, updated_at DATETIME) 
135
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021151')
136
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
137
- Post Create (0.0ms) INSERT INTO posts (title, body, author, created_at, updated_at) VALUES('Hello, World', 'This is a test.', 'Matt Haley', '2010-07-30 19:36:29', '2010-07-30 19:36:29')
138
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'posts'
139
- SQL (0.0ms) SELECT count(*) AS count_all FROM audits 
140
-
141
-
142
- Processing PostsController#update (for 0.0.0.0 at 2010-07-30 12:36:29) [PUT]
143
- Parameters: {"post"=>{"title"=>"First post!"}, "id"=>"1"}
144
- Post Load (0.0ms) SELECT * FROM posts WHERE (posts.id = 1) 
145
- Post Update (0.0ms) UPDATE posts SET title = 'First post!', updated_at = '2010-07-30 19:36:29' WHERE id = 1
146
- Redirected to http://test.host/posts/1
147
- WARNING: Can't mass-assign these protected attributes: id
148
- Audit Create (0.0ms) INSERT INTO audits (audited_type, audited_id, user, change_set, created_at, updated_at) VALUES('Post', 1, 'John Smith', '---
149
- title:
150
- - Hello, World
151
- - First post!
152
- updated_at:
153
- - 2010-07-30 19:36:29 Z
154
- - 2010-07-30 19:36:29.290000 Z
155
- ', '2010-07-30 19:36:29', '2010-07-30 19:36:29')
156
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'audits'
157
- Completed in 295ms (DB: 5) | 302 Found [http://test.host/posts/1?post%5Btitle%5D=First+post%21]
158
- Audit Load (0.0ms) SELECT * FROM audits WHERE (audits.audited_id = 1 AND audits.audited_type = 'Post') LIMIT 1
159
- SQL (0.0ms) SELECT count(*) AS count_all FROM audits 
160
- SQL (0.0ms)  SELECT name
161
- FROM sqlite_master
162
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
163
- 
164
- SQL (0.0ms) CREATE TABLE schema_migrations (version VARCHAR(255) NOT NULL) 
165
- SQL (0.0ms) CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations (version)
166
- SQL (0.0ms)  SELECT name
167
- FROM sqlite_master
168
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
169
- 
170
- SQL (0.0ms) SELECT version FROM schema_migrations
171
- Migrating to CreateAudits (20100115021125)
172
- SQL (0.0ms) CREATE TABLE audits (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, audited_type VARCHAR(255), audited_id integer(0), user VARCHAR(255), change_set text, created_at DATETIME, updated_at DATETIME) 
173
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021125')
174
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
175
- Migrating to CreatePosts (20100115021151)
176
- SQL (0.0ms) CREATE TABLE posts (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, title VARCHAR(255), body text, author VARCHAR(255), created_at DATETIME, updated_at DATETIME) 
177
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021151')
178
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
179
- SQL (0.0ms)  SELECT name
180
- FROM sqlite_master
181
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
182
- 
183
- SQL (0.0ms) CREATE TABLE schema_migrations (version VARCHAR(255) NOT NULL) 
184
- SQL (2.0ms) CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations (version)
185
- SQL (0.0ms)  SELECT name
186
- FROM sqlite_master
187
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
188
- 
189
- SQL (0.0ms) SELECT version FROM schema_migrations
190
- Migrating to CreateAudits (20100115021125)
191
- SQL (0.0ms) CREATE TABLE audits (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, audited_type VARCHAR(255), audited_id integer(0), user VARCHAR(255), change_set text, created_at DATETIME, updated_at DATETIME) 
192
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021125')
193
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
194
- Migrating to CreatePosts (20100115021151)
195
- SQL (0.0ms) CREATE TABLE posts (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, title VARCHAR(255), body text, author VARCHAR(255), created_at DATETIME, updated_at DATETIME) 
196
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021151')
197
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
198
- Post Create (0.0ms) INSERT INTO posts (title, body, author, created_at, updated_at) VALUES('Hello, World', 'This is a test.', 'Matt Haley', '2010-07-30 21:02:01', '2010-07-30 21:02:01')
199
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'posts'
200
- SQL (0.0ms) SELECT count(*) AS count_all FROM audits 
201
-
202
-
203
- Processing PostsController#update (for 0.0.0.0 at 2010-07-30 14:02:01) [PUT]
204
- Parameters: {"post"=>{"title"=>"First post!"}, "id"=>"1"}
205
- Post Load (0.0ms) SELECT * FROM posts WHERE (posts.id = 1) 
206
- Post Update (0.0ms) UPDATE posts SET title = 'First post!', updated_at = '2010-07-30 21:02:01' WHERE id = 1
207
- Redirected to http://test.host/posts/1
208
- WARNING: Can't mass-assign these protected attributes: id
209
- Audit Create (0.0ms) INSERT INTO audits (audited_type, audited_id, user, change_set, created_at, updated_at) VALUES('Post', 1, 'John Smith', '---
210
- title:
211
- - Hello, World
212
- - First post!
213
- updated_at:
214
- - 2010-07-30 21:02:01 Z
215
- - 2010-07-30 21:02:01.746000 Z
216
- ', '2010-07-30 21:02:01', '2010-07-30 21:02:01')
217
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'audits'
218
- Completed in 133ms (DB: 2) | 302 Found [http://test.host/posts/1?post%5Btitle%5D=First+post%21]
219
- Audit Load (0.0ms) SELECT * FROM audits WHERE (audits.audited_id = 1 AND audits.audited_type = 'Post') LIMIT 1
220
- SQL (0.0ms) SELECT count(*) AS count_all FROM audits 
221
- SQL (3.0ms)  SELECT name
222
- FROM sqlite_master
223
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
224
- 
225
- SQL (0.0ms) CREATE TABLE schema_migrations (version VARCHAR(255) NOT NULL) 
226
- SQL (2.0ms) CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations (version)
227
- SQL (0.0ms)  SELECT name
228
- FROM sqlite_master
229
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
230
- 
231
- SQL (0.0ms) SELECT version FROM schema_migrations
232
- Migrating to CreateAudits (20100115021125)
233
- SQL (0.0ms) CREATE TABLE audits (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, audited_type VARCHAR(255), audited_id integer(0), user VARCHAR(255), change_set text, created_at DATETIME, updated_at DATETIME) 
234
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021125')
235
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
236
- Migrating to CreatePosts (20100115021151)
237
- SQL (0.0ms) CREATE TABLE posts (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, title VARCHAR(255), body text, author VARCHAR(255), created_at DATETIME, updated_at DATETIME) 
238
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021151')
239
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
240
- SQL (0.0ms)  SELECT name
241
- FROM sqlite_master
242
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
243
- 
244
- SQL (0.0ms) CREATE TABLE schema_migrations (version VARCHAR(255) NOT NULL) 
245
- SQL (0.0ms) CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations (version)
246
- SQL (0.0ms)  SELECT name
247
- FROM sqlite_master
248
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
249
- 
250
- SQL (0.0ms) SELECT version FROM schema_migrations
251
- Migrating to CreateAudits (20100115021125)
252
- SQL (0.0ms) CREATE TABLE audits (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, audited_type VARCHAR(255), audited_id integer(0), user VARCHAR(255), change_set text, created_at DATETIME, updated_at DATETIME) 
253
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021125')
254
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
255
- Migrating to CreatePosts (20100115021151)
256
- SQL (0.0ms) CREATE TABLE posts (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, title VARCHAR(255), body text, author VARCHAR(255), created_at DATETIME, updated_at DATETIME) 
257
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021151')
258
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
259
- SQL (2.0ms)  SELECT name
260
- FROM sqlite_master
261
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
262
- 
263
- SQL (0.0ms) CREATE TABLE schema_migrations (version VARCHAR(255) NOT NULL) 
264
- SQL (0.0ms) CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations (version)
265
- SQL (0.0ms)  SELECT name
266
- FROM sqlite_master
267
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
268
- 
269
- SQL (0.0ms) SELECT version FROM schema_migrations
270
- Migrating to CreateAudits (20100115021125)
271
- SQL (0.0ms) CREATE TABLE audits (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, audited_type VARCHAR(255), audited_id integer(0), user VARCHAR(255), change_set text, created_at DATETIME, updated_at DATETIME) 
272
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021125')
273
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
274
- Migrating to CreatePosts (20100115021151)
275
- SQL (0.0ms) CREATE TABLE posts (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, title VARCHAR(255), body text, author VARCHAR(255), created_at DATETIME, updated_at DATETIME) 
276
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021151')
277
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
278
- SQL (0.0ms)  SELECT name
279
- FROM sqlite_master
280
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
281
- 
282
- SQL (0.0ms) CREATE TABLE schema_migrations (version VARCHAR(255) NOT NULL) 
283
- SQL (0.0ms) CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations (version)
284
- SQL (0.0ms)  SELECT name
285
- FROM sqlite_master
286
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
287
- 
288
- SQL (0.0ms) SELECT version FROM schema_migrations
289
- Migrating to CreateAudits (20100115021125)
290
- SQL (0.0ms) CREATE TABLE audits (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, audited_type VARCHAR(255), audited_id integer(0), user VARCHAR(255), change_set text, created_at DATETIME, updated_at DATETIME) 
291
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021125')
292
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
293
- Migrating to CreatePosts (20100115021151)
294
- SQL (0.0ms) CREATE TABLE posts (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, title VARCHAR(255), body text, author VARCHAR(255), created_at DATETIME, updated_at DATETIME) 
295
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021151')
296
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
297
- Post Create (0.0ms) INSERT INTO posts (title, body, author, created_at, updated_at) VALUES('Hello, World', 'This is a test.', 'Matt Haley', '2010-07-30 21:10:23', '2010-07-30 21:10:23')
298
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'posts'
299
- SQL (0.0ms) SELECT count(*) AS count_all FROM audits 
300
-
301
-
302
- Processing PostsController#update (for 0.0.0.0 at 2010-07-30 14:10:23) [PUT]
303
- Parameters: {"post"=>{"title"=>"First post!"}, "id"=>"1"}
304
- Post Load (0.0ms) SELECT * FROM posts WHERE (posts.id = 1) 
305
- Post Update (0.0ms) UPDATE posts SET title = 'First post!', updated_at = '2010-07-30 21:10:23' WHERE id = 1
306
- Redirected to http://test.host/posts/1
307
- WARNING: Can't mass-assign these protected attributes: id
308
- Audit Create (0.0ms) INSERT INTO audits (audited_type, audited_id, user, change_set, created_at, updated_at) VALUES('Post', 1, 'John Smith', '---
309
- title:
310
- - Hello, World
311
- - First post!
312
- updated_at:
313
- - 2010-07-30 21:10:23 Z
314
- - 2010-07-30 21:10:23.221000 Z
315
- ', '2010-07-30 21:10:23', '2010-07-30 21:10:23')
316
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'audits'
317
- Completed in 137ms (DB: 0) | 302 Found [http://test.host/posts/1?post%5Btitle%5D=First+post%21]
318
- Audit Load (0.0ms) SELECT * FROM audits WHERE (audits.audited_id = 1 AND audits.audited_type = 'Post') LIMIT 1
319
- SQL (0.0ms) SELECT count(*) AS count_all FROM audits 
320
- SQL (0.0ms)  SELECT name
321
- FROM sqlite_master
322
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
323
- 
324
- SQL (0.0ms) CREATE TABLE schema_migrations (version VARCHAR(255) NOT NULL) 
325
- SQL (0.0ms) CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations (version)
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 version FROM schema_migrations
331
- Migrating to CreateAudits (20100115021125)
332
- SQL (0.0ms) CREATE TABLE audits (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, audited_type VARCHAR(255), audited_id integer(0), user VARCHAR(255), change_set text, created_at DATETIME, updated_at DATETIME) 
333
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021125')
334
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
335
- Migrating to CreatePosts (20100115021151)
336
- SQL (0.0ms) CREATE TABLE posts (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, title VARCHAR(255), body text, author VARCHAR(255), created_at DATETIME, updated_at DATETIME) 
337
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021151')
338
- SQL (2.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
339
- SQL (0.0ms)  SELECT name
340
- FROM sqlite_master
341
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
342
- 
343
- SQL (0.0ms) CREATE TABLE schema_migrations (version VARCHAR(255) NOT NULL) 
344
- SQL (0.0ms) CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations (version)
345
- SQL (0.0ms)  SELECT name
346
- FROM sqlite_master
347
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
348
- 
349
- SQL (0.0ms) SELECT version FROM schema_migrations
350
- Migrating to CreateAudits (20100115021125)
351
- SQL (0.0ms) CREATE TABLE audits (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, audited_type VARCHAR(255), audited_id integer(0), user VARCHAR(255), change_set text, created_at DATETIME, updated_at DATETIME) 
352
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021125')
353
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
354
- Migrating to CreatePosts (20100115021151)
355
- SQL (0.0ms) CREATE TABLE posts (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, title VARCHAR(255), body text, author VARCHAR(255), created_at DATETIME, updated_at DATETIME) 
356
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021151')
357
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'schema_migrations'
358
- Post Create (0.0ms) INSERT INTO posts (title, body, author, created_at, updated_at) VALUES('Hello, World', 'This is a test.', 'Matt Haley', '2010-07-30 21:17:03', '2010-07-30 21:17:03')
359
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'posts'
360
- SQL (0.0ms) SELECT count(*) AS count_all FROM audits 
361
-
362
-
363
- Processing PostsController#update (for 0.0.0.0 at 2010-07-30 14:17:04) [PUT]
364
- Parameters: {"post"=>{"title"=>"First post!"}, "id"=>"1"}
365
- Post Load (0.0ms) SELECT * FROM posts WHERE (posts.id = 1) 
366
- Post Update (0.0ms) UPDATE posts SET title = 'First post!', updated_at = '2010-07-30 21:17:04' WHERE id = 1
367
- Redirected to http://test.host/posts/1
368
- WARNING: Can't mass-assign these protected attributes: id
369
- Audit Create (0.0ms) INSERT INTO audits (audited_type, audited_id, user, change_set, created_at, updated_at) VALUES('Post', 1, 'John Smith', '---
370
- title:
371
- - Hello, World
372
- - First post!
373
- updated_at:
374
- - 2010-07-30 21:17:03 Z
375
- - 2010-07-30 21:17:04.021000 Z
376
- ', '2010-07-30 21:17:04', '2010-07-30 21:17:04')
377
- SQL (0.0ms) SELECT SEQ FROM SQLITE_SEQUENCE WHERE NAME = 'audits'
378
- Completed in 133ms (DB: 0) | 302 Found [http://test.host/posts/1?post%5Btitle%5D=First+post%21]
379
- Audit Load (0.0ms) SELECT * FROM audits WHERE (audits.audited_id = 1 AND audits.audited_type = 'Post') LIMIT 1
380
- SQL (0.0ms) SELECT count(*) AS count_all FROM audits 
381
- SQL (0.0ms)  SELECT name
382
- FROM sqlite_master
383
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
384
- 
385
- SQL (0.0ms) select sqlite_version(*)
386
- SQL (0.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
387
- SQL (0.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
388
- SQL (0.0ms)  SELECT name
389
- FROM sqlite_master
390
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
391
- 
392
- SQL (0.0ms) SELECT version FROM schema_migrations
393
- Migrating to CreateAudits (20100115021125)
394
- SQL (0.0ms) CREATE TABLE "audits" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "audited_type" varchar(255), "audited_id" integer, "user" varchar(255), "change_set" text, "created_at" datetime, "updated_at" datetime) 
395
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021125')
396
- Migrating to CreatePosts (20100115021151)
397
- SQL (0.0ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "body" text, "author" varchar(255), "created_at" datetime, "updated_at" datetime) 
398
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021151')
399
- SQL (0.0ms)  SELECT name
400
- FROM sqlite_master
401
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
402
- 
403
- SQL (0.0ms) SELECT version FROM schema_migrations
404
- Migrating to CreateAudits (20100115021125)
405
- Migrating to CreatePosts (20100115021151)
406
- Post Create (0.0ms) INSERT INTO "posts" ("created_at", "title", "body", "author", "updated_at") VALUES('2010-07-30 21:22:17', 'Hello, World', 'This is a test.', 'Matt Haley', '2010-07-30 21:22:17')
407
- SQL (0.0ms) SELECT count(*) AS count_all FROM "audits" 
408
-
409
-
410
- Processing PostsController#update (for 0.0.0.0 at 2010-07-30 14:22:17) [PUT]
411
- Parameters: {"post"=>{"title"=>"First post!"}, "id"=>"1"}
412
- Post Load (0.0ms) SELECT * FROM "posts" WHERE ("posts"."id" = 1) 
413
- Post Update (0.0ms) UPDATE "posts" SET "updated_at" = '2010-07-30 21:22:17', "title" = 'First post!' WHERE "id" = 1
414
- Redirected to http://test.host/posts/1
415
- WARNING: Can't mass-assign these protected attributes: id
416
- Audit Create (0.0ms) INSERT INTO "audits" ("audited_type", "created_at", "audited_id", "updated_at", "user", "change_set") VALUES('Post', '2010-07-30 21:22:17', 1, '2010-07-30 21:22:17', 'John Smith', '---
417
- title:
418
- - Hello, World
419
- - First post!
420
- updated_at:
421
- - 2010-07-30 21:22:17 Z
422
- - 2010-07-30 21:22:17.304181 Z
423
- ')
424
- Completed in 145ms (DB: 0) | 302 Found [http://test.host/posts/1?post%5Btitle%5D=First+post%21]
425
- Audit Load (0.0ms) SELECT * FROM "audits" WHERE ("audits".audited_id = 1 AND "audits".audited_type = 'Post') LIMIT 1
426
- SQL (0.0ms) SELECT count(*) AS count_all FROM "audits" 
427
- SQL (0.0ms)  SELECT name
428
- FROM sqlite_master
429
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
430
- 
431
- SQL (0.0ms) select sqlite_version(*)
432
- SQL (0.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
433
- SQL (0.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
434
- SQL (0.0ms)  SELECT name
435
- FROM sqlite_master
436
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
437
- 
438
- SQL (0.0ms) SELECT version FROM schema_migrations
439
- Migrating to CreateAudits (20100115021125)
440
- SQL (2.5ms) CREATE TABLE "audits" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "audited_type" varchar(255), "audited_id" integer, "user" varchar(255), "change_set" text, "created_at" datetime, "updated_at" datetime) 
441
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021125')
442
- Migrating to CreatePosts (20100115021151)
443
- SQL (0.0ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "body" text, "author" varchar(255), "created_at" datetime, "updated_at" datetime) 
444
- SQL (2.5ms) INSERT INTO schema_migrations (version) VALUES ('20100115021151')
445
- SQL (0.0ms)  SELECT name
446
- FROM sqlite_master
447
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
448
- 
449
- SQL (0.0ms) SELECT version FROM schema_migrations
450
- Migrating to CreateAudits (20100115021125)
451
- Migrating to CreatePosts (20100115021151)
452
- Post Create (0.0ms) INSERT INTO "posts" ("created_at", "title", "body", "author", "updated_at") VALUES('2010-07-30 21:28:47', 'Hello, World', 'This is a test.', 'Matt Haley', '2010-07-30 21:28:47')
453
- SQL (0.0ms) SELECT count(*) AS count_all FROM "audits" 
454
-
455
-
456
- Processing PostsController#update (for 0.0.0.0 at 2010-07-30 14:28:47) [PUT]
457
- Parameters: {"post"=>{"title"=>"First post!"}, "id"=>"1"}
458
- Post Load (0.0ms) SELECT * FROM "posts" WHERE ("posts"."id" = 1) 
459
- Post Update (0.0ms) UPDATE "posts" SET "updated_at" = '2010-07-30 21:28:47', "title" = 'First post!' WHERE "id" = 1
460
- Redirected to http://test.host/posts/1
461
- WARNING: Can't mass-assign these protected attributes: id
462
- Audit Create (0.0ms) INSERT INTO "audits" ("audited_type", "created_at", "audited_id", "updated_at", "user", "change_set") VALUES('Post', '2010-07-30 21:28:47', 1, '2010-07-30 21:28:47', 'John Smith', '---
463
- title:
464
- - Hello, World
465
- - First post!
466
- updated_at:
467
- - 2010-07-30 21:28:47 Z
468
- - 2010-07-30 21:28:47.812679 Z
469
- ')
470
- Completed in 43ms (DB: 5) | 302 Found [http://test.host/posts/1?post%5Btitle%5D=First+post%21]
471
- Audit Load (0.0ms) SELECT * FROM "audits" WHERE ("audits".audited_id = 1 AND "audits".audited_type = 'Post') LIMIT 1
472
- SQL (0.0ms) SELECT count(*) AS count_all FROM "audits" 
473
- SQL (0.0ms)  SELECT name
474
- FROM sqlite_master
475
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
476
- 
477
- SQL (0.0ms) select sqlite_version(*)
478
- SQL (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
479
- SQL (0.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
480
- SQL (0.0ms)  SELECT name
481
- FROM sqlite_master
482
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
483
- 
484
- SQL (0.0ms) SELECT version FROM schema_migrations
485
- Migrating to CreateAudits (20100115021125)
486
- SQL (0.0ms) CREATE TABLE "audits" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "audited_type" varchar(255), "audited_id" integer, "user" varchar(255), "change_set" text, "created_at" datetime, "updated_at" datetime) 
487
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021125')
488
- Migrating to CreatePosts (20100115021151)
489
- SQL (0.0ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "body" text, "author" varchar(255), "created_at" datetime, "updated_at" datetime) 
490
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021151')
491
- SQL (0.0ms)  SELECT name
492
- FROM sqlite_master
493
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
494
- 
495
- SQL (0.0ms) SELECT version FROM schema_migrations
496
- Migrating to CreateAudits (20100115021125)
497
- Migrating to CreatePosts (20100115021151)
498
- SQL (0.0ms)  SELECT name
499
- FROM sqlite_master
500
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
501
- 
502
- SQL (0.0ms) select sqlite_version(*)
503
- SQL (0.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
504
- SQL (0.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
505
- SQL (0.0ms)  SELECT name
506
- FROM sqlite_master
507
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
508
- 
509
- SQL (1.0ms) SELECT version FROM schema_migrations
510
- Migrating to CreateAudits (20100115021125)
511
- SQL (0.0ms) CREATE TABLE "audits" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "audited_type" varchar(255), "audited_id" integer, "user" varchar(255), "change_set" text, "created_at" datetime, "updated_at" datetime) 
512
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021125')
513
- Migrating to CreatePosts (20100115021151)
514
- SQL (0.0ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "body" text, "author" varchar(255), "created_at" datetime, "updated_at" datetime) 
515
- SQL (0.0ms) INSERT INTO schema_migrations (version) VALUES ('20100115021151')
516
- SQL (0.0ms)  SELECT name
517
- FROM sqlite_master
518
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
519
- 
520
- SQL (0.0ms) SELECT version FROM schema_migrations
521
- Migrating to CreateAudits (20100115021125)
522
- Migrating to CreatePosts (20100115021151)
523
- Post Create (0.0ms) INSERT INTO "posts" ("created_at", "title", "body", "author", "updated_at") VALUES('2010-07-30 23:40:17', 'Hello, World', 'This is a test.', 'Matt Haley', '2010-07-30 23:40:17')
524
- SQL (0.0ms) SELECT count(*) AS count_all FROM "audits" 
525
-
526
-
527
- Processing PostsController#update (for 0.0.0.0 at 2010-07-30 16:40:17) [PUT]
528
- Parameters: {"post"=>{"title"=>"First post!"}, "id"=>"1"}
529
- Post Load (0.0ms) SELECT * FROM "posts" WHERE ("posts"."id" = 1) 
530
- Post Update (0.0ms) UPDATE "posts" SET "updated_at" = '2010-07-30 23:40:17', "title" = 'First post!' WHERE "id" = 1
531
- Redirected to http://test.host/posts/1
532
- WARNING: Can't mass-assign these protected attributes: id
533
- Audit Create (0.0ms) INSERT INTO "audits" ("audited_type", "created_at", "audited_id", "updated_at", "user", "change_set") VALUES('Post', '2010-07-30 23:40:17', 1, '2010-07-30 23:40:17', 'John Smith', '---
534
- title:
535
- - Hello, World
536
- - First post!
537
- updated_at:
538
- - 2010-07-30 23:40:17 Z
539
- - 2010-07-30 23:40:17.347339 Z
540
- ')
541
- Completed in 158ms (DB: 1) | 302 Found [http://test.host/posts/1?post%5Btitle%5D=First+post%21]
542
- Audit Load (0.0ms) SELECT * FROM "audits" WHERE ("audits".audited_id = 1 AND "audits".audited_type = 'Post') LIMIT 1
543
- SQL (0.0ms) SELECT count(*) AS count_all FROM "audits" 
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.expand_path('../../config/boot', __FILE__)
3
- require 'commands/console'
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require File.expand_path('../../config/boot', __FILE__)
3
- require 'commands/generate'
data/test/result_test.rb DELETED
@@ -1,35 +0,0 @@
1
- require File.dirname(__FILE__) + '/test_helper'
2
-
3
- class ResultTest < Test::Unit::TestCase
4
- context "a Result instance" do
5
- setup do
6
- @controller = mock()
7
- @changes = { "attr" => ["old", "new"] }
8
-
9
- @filter = TrackChanges::Result.new(:model, @controller, @changes)
10
- end
11
-
12
- should "define given symbol as method" do
13
- @controller.expects(:instance_variable_get).with() {|v| v == "@model"}.returns(:ivar_result)
14
- assert_equal :ivar_result, @filter.model
15
- end
16
-
17
- should "send method_missing calls to controller" do
18
- @controller.expects(:bogus_method).returns(:got_it)
19
- assert_equal :got_it, @filter.bogus_method
20
- end
21
-
22
- should "get @current_user from controller" do
23
- @controller.expects(:instance_variable_get).with() {|v| v == "@current_user"}.returns(:ivar_result)
24
- assert_equal :ivar_result, @filter.current_user
25
- end
26
-
27
- should "return changes" do
28
- assert_equal @changes, @filter.changes
29
- end
30
-
31
- should "return controller" do
32
- assert_equal @controller, @filter.controller
33
- end
34
- end
35
- end