statify_model 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +52 -0
  4. data/Rakefile +34 -0
  5. data/lib/statify_model/has_status.rb +14 -0
  6. data/lib/statify_model/status_manager.rb +28 -0
  7. data/lib/statify_model/version.rb +3 -0
  8. data/lib/statify_model.rb +5 -0
  9. data/lib/tasks/statify_model_tasks.rake +4 -0
  10. data/test/dummy/README.rdoc +28 -0
  11. data/test/dummy/Rakefile +6 -0
  12. data/test/dummy/app/assets/javascripts/application.js +13 -0
  13. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  14. data/test/dummy/app/controllers/application_controller.rb +5 -0
  15. data/test/dummy/app/helpers/application_helper.rb +2 -0
  16. data/test/dummy/app/models/talk.rb +3 -0
  17. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  18. data/test/dummy/bin/bundle +3 -0
  19. data/test/dummy/bin/rails +4 -0
  20. data/test/dummy/bin/rake +4 -0
  21. data/test/dummy/bin/setup +29 -0
  22. data/test/dummy/config/application.rb +26 -0
  23. data/test/dummy/config/boot.rb +5 -0
  24. data/test/dummy/config/database.yml +25 -0
  25. data/test/dummy/config/environment.rb +5 -0
  26. data/test/dummy/config/environments/development.rb +41 -0
  27. data/test/dummy/config/environments/production.rb +79 -0
  28. data/test/dummy/config/environments/test.rb +42 -0
  29. data/test/dummy/config/initializers/assets.rb +11 -0
  30. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  31. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  32. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  33. data/test/dummy/config/initializers/inflections.rb +16 -0
  34. data/test/dummy/config/initializers/mime_types.rb +4 -0
  35. data/test/dummy/config/initializers/session_store.rb +3 -0
  36. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  37. data/test/dummy/config/locales/en.yml +23 -0
  38. data/test/dummy/config/routes.rb +56 -0
  39. data/test/dummy/config/secrets.yml +22 -0
  40. data/test/dummy/config.ru +4 -0
  41. data/test/dummy/db/migrate/20151010104407_create_talks.rb +9 -0
  42. data/test/dummy/db/schema.rb +22 -0
  43. data/test/dummy/log/development.log +19 -0
  44. data/test/dummy/log/test.log +381 -0
  45. data/test/dummy/public/404.html +67 -0
  46. data/test/dummy/public/422.html +67 -0
  47. data/test/dummy/public/500.html +66 -0
  48. data/test/dummy/public/favicon.ico +0 -0
  49. data/test/dummy/test/fixtures/talks.yml +7 -0
  50. data/test/dummy/test/models/talk_test.rb +59 -0
  51. data/test/has_status_test.rb +0 -0
  52. data/test/statify_model_test.rb +7 -0
  53. data/test/test_helper.rb +21 -0
  54. metadata +176 -0
@@ -0,0 +1,56 @@
1
+ Rails.application.routes.draw do
2
+ # The priority is based upon order of creation: first created -> highest priority.
3
+ # See how all your routes lay out with "rake routes".
4
+
5
+ # You can have the root of your site routed with "root"
6
+ # root 'welcome#index'
7
+
8
+ # Example of regular route:
9
+ # get 'products/:id' => 'catalog#view'
10
+
11
+ # Example of named route that can be invoked with purchase_url(id: product.id)
12
+ # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
13
+
14
+ # Example resource route (maps HTTP verbs to controller actions automatically):
15
+ # resources :products
16
+
17
+ # Example resource route with options:
18
+ # resources :products do
19
+ # member do
20
+ # get 'short'
21
+ # post 'toggle'
22
+ # end
23
+ #
24
+ # collection do
25
+ # get 'sold'
26
+ # end
27
+ # end
28
+
29
+ # Example resource route with sub-resources:
30
+ # resources :products do
31
+ # resources :comments, :sales
32
+ # resource :seller
33
+ # end
34
+
35
+ # Example resource route with more complex sub-resources:
36
+ # resources :products do
37
+ # resources :comments
38
+ # resources :sales do
39
+ # get 'recent', on: :collection
40
+ # end
41
+ # end
42
+
43
+ # Example resource route with concerns:
44
+ # concern :toggleable do
45
+ # post 'toggle'
46
+ # end
47
+ # resources :posts, concerns: :toggleable
48
+ # resources :photos, concerns: :toggleable
49
+
50
+ # Example resource route within a namespace:
51
+ # namespace :admin do
52
+ # # Directs /admin/products/* to Admin::ProductsController
53
+ # # (app/controllers/admin/products_controller.rb)
54
+ # resources :products
55
+ # end
56
+ end
@@ -0,0 +1,22 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure the secrets in this file are kept private
11
+ # if you're sharing your code publicly.
12
+
13
+ development:
14
+ secret_key_base: dd45a2793d87498cd88db6063dcbc3888ae86f3bfe61505c9a943ae1eefef93adcd5f7dddceed088968725dd17fb0175d1c1c639c0f01c4d0e0136e50fe77bb6
15
+
16
+ test:
17
+ secret_key_base: bd450b6be187858dc91a7cd37616161c9a253cb098ee78d652d7fad0bf39874af774cfb02b9e6673767ac4c231f1fb299bde1a88024872aaa98228ec54f813dc
18
+
19
+ # Do not keep production secrets in the repository,
20
+ # instead read values from the environment.
21
+ production:
22
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Rails.application
@@ -0,0 +1,9 @@
1
+ class CreateTalks < ActiveRecord::Migration
2
+ def change
3
+ create_table :talks do |t|
4
+ t.boolean :enabled
5
+
6
+ t.timestamps null: false
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,22 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended that you check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(version: 20151010104407) do
15
+
16
+ create_table "talks", force: :cascade do |t|
17
+ t.boolean "enabled"
18
+ t.datetime "created_at", null: false
19
+ t.datetime "updated_at", null: false
20
+ end
21
+
22
+ end
@@ -0,0 +1,19 @@
1
+  (33.3ms) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
2
+  (20.0ms) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
3
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT `schema_migrations`.* FROM `schema_migrations`
4
+ Migrating to CreateTalks (20151010104407)
5
+  (25.7ms) CREATE TABLE `talks` (`id` int(11) auto_increment PRIMARY KEY, `enabled` tinyint(1), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
6
+  (0.2ms) BEGIN
7
+ SQL (12.5ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20151010104407')
8
+  (6.1ms) COMMIT
9
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT `schema_migrations`.* FROM `schema_migrations`
10
+  (0.4ms) SELECT fk.referenced_table_name as 'to_table'
11
+ ,fk.referenced_column_name as 'primary_key'
12
+ ,fk.column_name as 'column'
13
+ ,fk.constraint_name as 'name'
14
+ FROM information_schema.key_column_usage fk
15
+ WHERE fk.referenced_column_name is not null
16
+ AND fk.table_schema = 'statify_development'
17
+ AND fk.table_name = 'talks'
18
+ 
19
+  (0.2ms) SHOW CREATE TABLE `talks`
@@ -0,0 +1,381 @@
1
+  (8.9ms) DROP DATABASE IF EXISTS `statify_test`
2
+  (0.5ms) CREATE DATABASE `statify_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`
3
+  (0.1ms) BEGIN
4
+ ----------------------------
5
+ StatifyModelTest: test_truth
6
+ ----------------------------
7
+  (0.1ms) ROLLBACK
8
+  (0.5ms) DROP DATABASE IF EXISTS `statify_test`
9
+  (0.3ms) CREATE DATABASE `statify_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`
10
+  (0.1ms) BEGIN
11
+ ----------------------------
12
+ StatifyModelTest: test_truth
13
+ ----------------------------
14
+  (0.1ms) ROLLBACK
15
+  (0.5ms) DROP DATABASE IF EXISTS `statify_test`
16
+  (0.4ms) CREATE DATABASE `statify_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`
17
+  (26.5ms) CREATE TABLE `talks` (`id` int(11) auto_increment PRIMARY KEY, `enabled` tinyint(1), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB
18
+  (13.4ms) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
19
+  (16.0ms) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`) 
20
+  (0.2ms) SELECT version FROM `schema_migrations`
21
+  (0.4ms) INSERT INTO `schema_migrations` (version) VALUES ('20151010104407')
22
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT `schema_migrations`.* FROM `schema_migrations`
23
+  (0.1ms) BEGIN
24
+ ------------------------
25
+ TalkTest: test_the_truth
26
+ ------------------------
27
+  (0.1ms) ROLLBACK
28
+  (0.1ms) BEGIN
29
+ ----------------------------
30
+ StatifyModelTest: test_truth
31
+ ----------------------------
32
+  (0.1ms) ROLLBACK
33
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT `schema_migrations`.* FROM `schema_migrations`
34
+  (0.2ms) BEGIN
35
+ ------------------------
36
+ TalkTest: test_the_truth
37
+ ------------------------
38
+  (0.1ms) ROLLBACK
39
+  (0.1ms) BEGIN
40
+ ----------------------------
41
+ StatifyModelTest: test_truth
42
+ ----------------------------
43
+  (0.1ms) ROLLBACK
44
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT `schema_migrations`.* FROM `schema_migrations`
45
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT `schema_migrations`.* FROM `schema_migrations`
46
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT `schema_migrations`.* FROM `schema_migrations`
47
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT `schema_migrations`.* FROM `schema_migrations`
48
+  (0.2ms) BEGIN
49
+ ----------------------------
50
+ StatifyModelTest: test_truth
51
+ ----------------------------
52
+  (0.1ms) ROLLBACK
53
+  (0.1ms) BEGIN
54
+ ------------------------
55
+ TalkTest: test_the_truth
56
+ ------------------------
57
+  (0.1ms) ROLLBACK
58
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT `schema_migrations`.* FROM `schema_migrations`
59
+  (0.2ms) BEGIN
60
+ ------------------------
61
+ TalkTest: test_the_truth
62
+ ------------------------
63
+  (0.1ms) ROLLBACK
64
+  (0.1ms) BEGIN
65
+ ----------------------------
66
+ StatifyModelTest: test_truth
67
+ ----------------------------
68
+  (0.1ms) ROLLBACK
69
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT `schema_migrations`.* FROM `schema_migrations`
70
+  (0.1ms) BEGIN
71
+ ----------------------------
72
+ StatifyModelTest: test_truth
73
+ ----------------------------
74
+  (0.1ms) ROLLBACK
75
+  (0.1ms) BEGIN
76
+ ------------------------
77
+ TalkTest: test_the_truth
78
+ ------------------------
79
+  (0.1ms) ROLLBACK
80
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT `schema_migrations`.* FROM `schema_migrations`
81
+  (0.2ms) BEGIN
82
+ ------------------------
83
+ TalkTest: test_the_truth
84
+ ------------------------
85
+  (0.1ms) ROLLBACK
86
+  (0.1ms) BEGIN
87
+ ----------------------------
88
+ StatifyModelTest: test_truth
89
+ ----------------------------
90
+  (0.1ms) ROLLBACK
91
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT `schema_migrations`.* FROM `schema_migrations`
92
+  (0.1ms) BEGIN
93
+ ----------------------------
94
+ StatifyModelTest: test_truth
95
+ ----------------------------
96
+  (0.1ms) ROLLBACK
97
+  (0.1ms) BEGIN
98
+ ------------------------
99
+ TalkTest: test_the_truth
100
+ ------------------------
101
+  (0.1ms) SAVEPOINT active_record_1
102
+ SQL (0.3ms) INSERT INTO `talks` (`enabled`, `created_at`, `updated_at`) VALUES (1, '2015-10-10 11:05:57', '2015-10-10 11:05:57')
103
+  (0.1ms) RELEASE SAVEPOINT active_record_1
104
+  (12.1ms) ROLLBACK
105
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT `schema_migrations`.* FROM `schema_migrations`
106
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT `schema_migrations`.* FROM `schema_migrations`
107
+  (0.2ms) BEGIN
108
+ ----------------------------
109
+ StatifyModelTest: test_truth
110
+ ----------------------------
111
+  (0.1ms) ROLLBACK
112
+  (0.1ms) BEGIN
113
+ --------------------------
114
+ TalkTest: test_the_disable
115
+ --------------------------
116
+  (0.1ms) SAVEPOINT active_record_1
117
+ SQL (0.2ms) INSERT INTO `talks` (`enabled`, `created_at`, `updated_at`) VALUES (0, '2015-10-10 11:06:49', '2015-10-10 11:06:49')
118
+  (0.1ms) RELEASE SAVEPOINT active_record_1
119
+  (0.4ms) ROLLBACK
120
+  (0.1ms) BEGIN
121
+ -------------------------
122
+ TalkTest: test_the_enable
123
+ -------------------------
124
+  (0.1ms) SAVEPOINT active_record_1
125
+ SQL (0.2ms) INSERT INTO `talks` (`enabled`, `created_at`, `updated_at`) VALUES (1, '2015-10-10 11:06:49', '2015-10-10 11:06:49')
126
+  (0.1ms) RELEASE SAVEPOINT active_record_1
127
+  (0.3ms) ROLLBACK
128
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT `schema_migrations`.* FROM `schema_migrations`
129
+  (0.1ms) BEGIN
130
+ ----------------------------
131
+ StatifyModelTest: test_truth
132
+ ----------------------------
133
+  (0.1ms) ROLLBACK
134
+  (0.1ms) BEGIN
135
+ ------------------------
136
+ TalkTest: test_.disabled
137
+ ------------------------
138
+  (0.1ms) SAVEPOINT active_record_1
139
+ SQL (0.4ms) INSERT INTO `talks` (`enabled`, `created_at`, `updated_at`) VALUES (1, '2015-10-10 11:19:31', '2015-10-10 11:19:31')
140
+  (0.1ms) RELEASE SAVEPOINT active_record_1
141
+  (0.1ms) SAVEPOINT active_record_1
142
+ SQL (0.1ms) INSERT INTO `talks` (`enabled`, `created_at`, `updated_at`) VALUES (1, '2015-10-10 11:19:31', '2015-10-10 11:19:31')
143
+  (0.1ms) RELEASE SAVEPOINT active_record_1
144
+  (0.1ms) SAVEPOINT active_record_1
145
+ SQL (0.1ms) INSERT INTO `talks` (`enabled`, `created_at`, `updated_at`) VALUES (0, '2015-10-10 11:19:31', '2015-10-10 11:19:31')
146
+  (0.1ms) RELEASE SAVEPOINT active_record_1
147
+  (0.2ms) SELECT `talks`.`id` FROM `talks` WHERE `talks`.`enabled` = 0
148
+  (6.0ms) ROLLBACK
149
+  (0.1ms) BEGIN
150
+ ---------------------
151
+ TalkTest: test_enable
152
+ ---------------------
153
+  (0.1ms) SAVEPOINT active_record_1
154
+  (0.1ms) RELEASE SAVEPOINT active_record_1
155
+  (0.1ms) ROLLBACK
156
+  (0.2ms) BEGIN
157
+ ----------------------
158
+ TalkTest: test_disable
159
+ ----------------------
160
+  (0.1ms) SAVEPOINT active_record_1
161
+ SQL (0.2ms) UPDATE `talks` SET `enabled` = 0, `updated_at` = '2015-10-10 11:19:31' WHERE `talks`.`id` = 4
162
+  (0.1ms) RELEASE SAVEPOINT active_record_1
163
+  (0.1ms) ROLLBACK
164
+  (0.1ms) BEGIN
165
+ -----------------------------
166
+ TalkTest: test_disabled?_true
167
+ -----------------------------
168
+  (0.1ms) SAVEPOINT active_record_1
169
+  (0.1ms) RELEASE SAVEPOINT active_record_1
170
+  (0.1ms) ROLLBACK
171
+  (0.1ms) BEGIN
172
+ -----------------------
173
+ TalkTest: test_.enabled
174
+ -----------------------
175
+  (0.1ms) SAVEPOINT active_record_1
176
+ SQL (0.1ms) UPDATE `talks` SET `enabled` = 1, `updated_at` = '2015-10-10 11:19:31' WHERE `talks`.`id` = 4
177
+  (0.1ms) RELEASE SAVEPOINT active_record_1
178
+  (0.1ms) SAVEPOINT active_record_1
179
+  (0.1ms) RELEASE SAVEPOINT active_record_1
180
+  (0.1ms) SAVEPOINT active_record_1
181
+  (0.1ms) RELEASE SAVEPOINT active_record_1
182
+  (0.1ms) SELECT `talks`.`id` FROM `talks` WHERE `talks`.`enabled` = 1
183
+  (0.1ms) ROLLBACK
184
+  (0.1ms) BEGIN
185
+ ------------------------------
186
+ TalkTest: test_disabled?_false
187
+ ------------------------------
188
+  (0.1ms) SAVEPOINT active_record_1
189
+  (0.1ms) RELEASE SAVEPOINT active_record_1
190
+  (0.1ms) ROLLBACK
191
+  (0.1ms) BEGIN
192
+ -----------------------------------------
193
+ TalkTest: test_toggle_status_when_enabled
194
+ -----------------------------------------
195
+  (0.1ms) SAVEPOINT active_record_1
196
+  (0.1ms) RELEASE SAVEPOINT active_record_1
197
+  (0.1ms) SAVEPOINT active_record_1
198
+ SQL (0.1ms) UPDATE `talks` SET `enabled` = 0, `updated_at` = '2015-10-10 11:19:31' WHERE `talks`.`id` = 4
199
+  (0.1ms) RELEASE SAVEPOINT active_record_1
200
+  (0.1ms) ROLLBACK
201
+  (0.1ms) BEGIN
202
+ ------------------------------------------
203
+ TalkTest: test_toggle_status_when_disabled
204
+ ------------------------------------------
205
+  (0.1ms) SAVEPOINT active_record_1
206
+  (0.1ms) RELEASE SAVEPOINT active_record_1
207
+  (0.0ms) SAVEPOINT active_record_1
208
+ SQL (0.1ms) UPDATE `talks` SET `enabled` = 1, `updated_at` = '2015-10-10 11:19:31' WHERE `talks`.`id` = 4
209
+  (0.1ms) RELEASE SAVEPOINT active_record_1
210
+  (0.1ms) ROLLBACK
211
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT `schema_migrations`.* FROM `schema_migrations`
212
+  (0.1ms) BEGIN
213
+ ----------------------------
214
+ StatifyModelTest: test_truth
215
+ ----------------------------
216
+  (0.1ms) ROLLBACK
217
+  (0.1ms) BEGIN
218
+ -----------------------
219
+ TalkTest: test_.enabled
220
+ -----------------------
221
+  (0.1ms) SAVEPOINT active_record_1
222
+ SQL (0.2ms) INSERT INTO `talks` (`enabled`, `created_at`, `updated_at`) VALUES (1, '2015-10-10 11:21:32', '2015-10-10 11:21:32')
223
+  (0.1ms) RELEASE SAVEPOINT active_record_1
224
+  (0.1ms) SAVEPOINT active_record_1
225
+ SQL (0.1ms) INSERT INTO `talks` (`enabled`, `created_at`, `updated_at`) VALUES (1, '2015-10-10 11:21:32', '2015-10-10 11:21:32')
226
+  (0.1ms) RELEASE SAVEPOINT active_record_1
227
+  (0.1ms) SAVEPOINT active_record_1
228
+ SQL (0.1ms) INSERT INTO `talks` (`enabled`, `created_at`, `updated_at`) VALUES (0, '2015-10-10 11:21:32', '2015-10-10 11:21:32')
229
+  (0.1ms) RELEASE SAVEPOINT active_record_1
230
+  (0.2ms) SELECT `talks`.`id` FROM `talks` WHERE `talks`.`enabled` = 0
231
+  (0.3ms) ROLLBACK
232
+  (0.1ms) BEGIN
233
+ ---------------------
234
+ TalkTest: test_enable
235
+ ---------------------
236
+  (0.1ms) SAVEPOINT active_record_1
237
+  (0.1ms) RELEASE SAVEPOINT active_record_1
238
+  (0.1ms) ROLLBACK
239
+  (0.1ms) BEGIN
240
+ ----------------------
241
+ TalkTest: test_disable
242
+ ----------------------
243
+  (0.1ms) SAVEPOINT active_record_1
244
+ SQL (0.2ms) UPDATE `talks` SET `enabled` = 0, `updated_at` = '2015-10-10 11:21:32' WHERE `talks`.`id` = 7
245
+  (0.1ms) RELEASE SAVEPOINT active_record_1
246
+  (0.1ms) ROLLBACK
247
+  (0.1ms) BEGIN
248
+ ------------------------------------------
249
+ TalkTest: test_toggle_status_when_disabled
250
+ ------------------------------------------
251
+  (0.1ms) SAVEPOINT active_record_1
252
+  (0.1ms) RELEASE SAVEPOINT active_record_1
253
+  (0.1ms) SAVEPOINT active_record_1
254
+ SQL (0.1ms) UPDATE `talks` SET `enabled` = 1, `updated_at` = '2015-10-10 11:21:32' WHERE `talks`.`id` = 7
255
+  (0.1ms) RELEASE SAVEPOINT active_record_1
256
+  (0.1ms) ROLLBACK
257
+  (0.1ms) BEGIN
258
+ ------------------------
259
+ TalkTest: test_.disabled
260
+ ------------------------
261
+  (0.1ms) SAVEPOINT active_record_1
262
+  (0.1ms) RELEASE SAVEPOINT active_record_1
263
+  (0.1ms) SAVEPOINT active_record_1
264
+  (0.1ms) RELEASE SAVEPOINT active_record_1
265
+  (0.1ms) SAVEPOINT active_record_1
266
+  (0.1ms) RELEASE SAVEPOINT active_record_1
267
+  (0.2ms) SELECT `talks`.`id` FROM `talks` WHERE `talks`.`enabled` = 0
268
+  (0.1ms) ROLLBACK
269
+  (0.1ms) BEGIN
270
+ -----------------------------------------
271
+ TalkTest: test_toggle_status_when_enabled
272
+ -----------------------------------------
273
+  (0.1ms) SAVEPOINT active_record_1
274
+  (0.1ms) RELEASE SAVEPOINT active_record_1
275
+  (0.1ms) SAVEPOINT active_record_1
276
+ SQL (0.1ms) UPDATE `talks` SET `enabled` = 0, `updated_at` = '2015-10-10 11:21:32' WHERE `talks`.`id` = 7
277
+  (0.1ms) RELEASE SAVEPOINT active_record_1
278
+  (0.1ms) ROLLBACK
279
+  (0.1ms) BEGIN
280
+ ------------------------------
281
+ TalkTest: test_disabled?_false
282
+ ------------------------------
283
+  (0.1ms) SAVEPOINT active_record_1
284
+ SQL (0.1ms) UPDATE `talks` SET `enabled` = 1, `updated_at` = '2015-10-10 11:21:32' WHERE `talks`.`id` = 7
285
+  (0.1ms) RELEASE SAVEPOINT active_record_1
286
+  (0.1ms) ROLLBACK
287
+  (0.1ms) BEGIN
288
+ -----------------------------
289
+ TalkTest: test_disabled?_true
290
+ -----------------------------
291
+  (0.1ms) SAVEPOINT active_record_1
292
+ SQL (0.1ms) UPDATE `talks` SET `enabled` = 0, `updated_at` = '2015-10-10 11:21:32' WHERE `talks`.`id` = 7
293
+  (0.1ms) RELEASE SAVEPOINT active_record_1
294
+  (0.1ms) ROLLBACK
295
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT `schema_migrations`.* FROM `schema_migrations`
296
+  (0.1ms) BEGIN
297
+ ----------------------------
298
+ StatifyModelTest: test_truth
299
+ ----------------------------
300
+  (0.1ms) ROLLBACK
301
+  (0.1ms) BEGIN
302
+ -----------------------------------------
303
+ TalkTest: test_toggle_status_when_enabled
304
+ -----------------------------------------
305
+  (0.1ms) SAVEPOINT active_record_1
306
+ SQL (0.2ms) INSERT INTO `talks` (`enabled`, `created_at`, `updated_at`) VALUES (1, '2015-10-10 11:22:38', '2015-10-10 11:22:38')
307
+  (0.1ms) RELEASE SAVEPOINT active_record_1
308
+  (0.1ms) SAVEPOINT active_record_1
309
+ SQL (0.2ms) UPDATE `talks` SET `enabled` = 0, `updated_at` = '2015-10-10 11:22:38' WHERE `talks`.`id` = 10
310
+  (0.1ms) RELEASE SAVEPOINT active_record_1
311
+  (0.4ms) ROLLBACK
312
+  (0.1ms) BEGIN
313
+ -----------------------------
314
+ TalkTest: test_disabled?_true
315
+ -----------------------------
316
+  (0.1ms) SAVEPOINT active_record_1
317
+  (0.1ms) RELEASE SAVEPOINT active_record_1
318
+  (0.1ms) ROLLBACK
319
+  (0.1ms) BEGIN
320
+ ------------------------------------------
321
+ TalkTest: test_toggle_status_when_disabled
322
+ ------------------------------------------
323
+  (0.1ms) SAVEPOINT active_record_1
324
+  (0.1ms) RELEASE SAVEPOINT active_record_1
325
+  (0.1ms) SAVEPOINT active_record_1
326
+ SQL (0.2ms) UPDATE `talks` SET `enabled` = 1, `updated_at` = '2015-10-10 11:22:38' WHERE `talks`.`id` = 10
327
+  (0.1ms) RELEASE SAVEPOINT active_record_1
328
+  (0.1ms) ROLLBACK
329
+  (0.1ms) BEGIN
330
+ ----------------------
331
+ TalkTest: test_disable
332
+ ----------------------
333
+  (0.1ms) SAVEPOINT active_record_1
334
+ SQL (0.2ms) UPDATE `talks` SET `enabled` = 0, `updated_at` = '2015-10-10 11:22:38' WHERE `talks`.`id` = 10
335
+  (0.1ms) RELEASE SAVEPOINT active_record_1
336
+  (0.1ms) ROLLBACK
337
+  (0.1ms) BEGIN
338
+ ------------------------------
339
+ TalkTest: test_disabled?_false
340
+ ------------------------------
341
+  (0.1ms) SAVEPOINT active_record_1
342
+ SQL (0.1ms) UPDATE `talks` SET `enabled` = 1, `updated_at` = '2015-10-10 11:22:38' WHERE `talks`.`id` = 10
343
+  (0.1ms) RELEASE SAVEPOINT active_record_1
344
+  (0.1ms) ROLLBACK
345
+  (0.1ms) BEGIN
346
+ ---------------------
347
+ TalkTest: test_enable
348
+ ---------------------
349
+  (0.1ms) SAVEPOINT active_record_1
350
+  (0.1ms) RELEASE SAVEPOINT active_record_1
351
+  (0.1ms) ROLLBACK
352
+  (0.1ms) BEGIN
353
+ -----------------------
354
+ TalkTest: test_.enabled
355
+ -----------------------
356
+  (0.1ms) SAVEPOINT active_record_1
357
+ SQL (0.2ms) INSERT INTO `talks` (`enabled`, `created_at`, `updated_at`) VALUES (1, '2015-10-10 11:22:38', '2015-10-10 11:22:38')
358
+  (0.1ms) RELEASE SAVEPOINT active_record_1
359
+  (0.1ms) SAVEPOINT active_record_1
360
+ SQL (0.1ms) INSERT INTO `talks` (`enabled`, `created_at`, `updated_at`) VALUES (1, '2015-10-10 11:22:38', '2015-10-10 11:22:38')
361
+  (0.1ms) RELEASE SAVEPOINT active_record_1
362
+  (0.1ms) SAVEPOINT active_record_1
363
+ SQL (0.1ms) INSERT INTO `talks` (`enabled`, `created_at`, `updated_at`) VALUES (0, '2015-10-10 11:22:38', '2015-10-10 11:22:38')
364
+  (0.1ms) RELEASE SAVEPOINT active_record_1
365
+  (0.2ms) SELECT `talks`.`id` FROM `talks` WHERE `talks`.`enabled` = 1
366
+  (0.3ms) ROLLBACK
367
+  (0.1ms) BEGIN
368
+ ------------------------
369
+ TalkTest: test_.disabled
370
+ ------------------------
371
+  (0.1ms) SAVEPOINT active_record_1
372
+ SQL (0.1ms) INSERT INTO `talks` (`enabled`, `created_at`, `updated_at`) VALUES (1, '2015-10-10 11:22:38', '2015-10-10 11:22:38')
373
+  (0.1ms) RELEASE SAVEPOINT active_record_1
374
+  (0.1ms) SAVEPOINT active_record_1
375
+ SQL (0.1ms) INSERT INTO `talks` (`enabled`, `created_at`, `updated_at`) VALUES (1, '2015-10-10 11:22:38', '2015-10-10 11:22:38')
376
+  (0.1ms) RELEASE SAVEPOINT active_record_1
377
+  (0.1ms) SAVEPOINT active_record_1
378
+ SQL (0.1ms) INSERT INTO `talks` (`enabled`, `created_at`, `updated_at`) VALUES (0, '2015-10-10 11:22:38', '2015-10-10 11:22:38')
379
+  (0.1ms) RELEASE SAVEPOINT active_record_1
380
+  (0.1ms) SELECT `talks`.`id` FROM `talks` WHERE `talks`.`enabled` = 0
381
+  (0.3ms) ROLLBACK
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/404.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The page you were looking for doesn't exist.</h1>
62
+ <p>You may have mistyped the address or the page may have moved.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/422.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The change you wanted was rejected.</h1>
62
+ <p>Maybe you tried to change something you didn't have access to.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>