repia 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: df15565383d30c01bcd9fa3ddbfcd47206eb6612
4
- data.tar.gz: b92757ddb813a152bdf8f4d6cfd4495e1414251d
3
+ metadata.gz: c43c35f68fca4bb9550fc155b016f19c6ece35a1
4
+ data.tar.gz: 7115749047f6e1813fb74d326a7d7c75c094c345
5
5
  SHA512:
6
- metadata.gz: c3c6f2b39b4f8067d9916fc537b5b872b7cbcecf86d0e79246a5e60eb2c940c1a641eaa9b12eaeb8046c9803659d4dfed783719739e83ca931bd7d4bf6aa44f2
7
- data.tar.gz: ce3d792fee9ddf1ddc9e1f1b1fcdc2b15450f02940e2f7da5905f413d046f330310ac02ad402182db68f10d728d341141f4ee6d1fd9ceaf427d30bf95abd28b8
6
+ metadata.gz: 559a23596a4dababa985291550e502bc23081e78d1a7b7d9fbdb4302660db441cdd3e06b532eb41285c9a5c20a260322b1fa9ebaa051ad26b0495e2ebb4c971b
7
+ data.tar.gz: 2b487c67856a82b5f077ed34d7748b9c26c254d371061a6bb80755130e25e7b8ee6c8da45eefe238950669c3ee2e0c7a7b4f411be8ea8b5f08bdb7c32cf04c29
data/lib/repia/core.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require 'json'
1
2
  require 'repia/errors'
2
3
 
3
4
  module Repia
@@ -42,19 +43,31 @@ module Repia
42
43
  render_error 500, "Unknown error occurred: #{exception.message}"
43
44
  end
44
45
 
46
+ # Catch all manually thrown HTTP errors (predefined by repia)
45
47
  rescue_from Errors::HTTPError do |exception|
46
48
  status_code = exception.class.const_get("STATUS_CODE")
47
- message = exception.message || exception.class.name
49
+ message = exception.message || exception.class::MESSAGE
48
50
  logger.error "#{status_code} - #{message}"
49
51
  render_error status_code, message
50
52
  end
51
53
 
54
+ ##
55
+ # Use this as an action triggered by exceptions_app to return a JSON
56
+ # response to any middleware level exceptions
57
+ #
58
+ def exceptions_app
59
+ status = ActionDispatch::ExceptionWrapper.new(env, @exception).status_code.to_i
60
+ error = Errors::STATUS_CODE_TO_ERROR[status]
61
+ message = error ? error::MESSAGE : "Unknown error"
62
+ render_error status, message
63
+ end
64
+
52
65
  ##
53
66
  # Renders a generic OPTIONS response. The actual controller must
54
67
  # override this action if desired to have specific OPTIONS handling
55
68
  # logic.
56
69
  #
57
- def options()
70
+ def options
58
71
  # echo back access-control-request-headers
59
72
  if request.headers["Access-Control-Request-Headers"]
60
73
  response["Access-Control-Allow-Headers"] =
data/lib/repia/errors.rb CHANGED
@@ -5,8 +5,35 @@ module Repia
5
5
  class HTTPError < StandardError; end
6
6
  class BadRequest < HTTPError; STATUS_CODE = 400; end
7
7
  class Unauthorized < HTTPError; STATUS_CODE = 401; end
8
+ class PaymentRequired < HTTPError; STATUS_CODE = 402; end
9
+ class Forbidden < HTTPError; STATUS_CODE = 403; end
8
10
  class NotFound < HTTPError; STATUS_CODE = 404; end
11
+ class MethodNotAllowed < HTTPError; STATUS_CODE = 405; end
12
+ class NotAcceptable < HTTPError; STATUS_CODE = 406; end
13
+ class ProxyAuthenticationRequired < HTTPError; STATUS_CODE = 407; end
14
+ class RequestTimeout < HTTPError; STATUS_CODE = 408; end
9
15
  class Conflict < HTTPError; STATUS_CODE = 409; end
16
+ class Gone < HTTPError; STATUS_CODE = 410; end
17
+ class LengthRequired < HTTPError; STATUS_CODE = 411; end
18
+ class PreconditionFailed < HTTPError; STATUS_CODE = 412; end
19
+ class RequestEntityTooLarge < HTTPError; STATUS_CODE = 413; end
20
+ class RequestURITooLong < HTTPError; STATUS_CODE = 414; end
21
+ class UnsupportedMediaType < HTTPError; STATUS_CODE = 415; end
22
+ class RequestedRangeNotSatisfiable < HTTPError; STATUS_CODE = 416; end
23
+ class ExpectationFailed < HTTPError; STATUS_CODE = 417; end
10
24
  class InternalServerError < HTTPError; STATUS_CODE = 500; end
25
+ class NotImplemented < HTTPError; STATUS_CODE = 501; end
26
+ class BadGateway < HTTPError; STATUS_CODE = 502; end
27
+ class ServiceUnavailable < HTTPError; STATUS_CODE = 503; end
28
+ class GatewayTimeout < HTTPError; STATUS_CODE = 504; end
29
+ class HTTPVersionNotSupported < HTTPError; STATUS_CODE = 505; end
30
+
31
+ # At loading time, create a map and store a humanized error message for
32
+ # convenience.
33
+ STATUS_CODE_TO_ERROR = {}
34
+ HTTPError.subclasses.each do |error|
35
+ STATUS_CODE_TO_ERROR[error::STATUS_CODE] = error
36
+ error::MESSAGE = error.name.split("::").last.underscore.humanize
37
+ end
11
38
  end
12
39
  end
@@ -0,0 +1,30 @@
1
+ module Repia
2
+ ##
3
+ # This class serves as a middleware to handle Method Not Allowed error
4
+ # (which is not handled by show_exceptions for some reason).
5
+ #
6
+ # Code was excerpted from https://gist.github.com/viola/1243572 and was
7
+ # modified to serve a JSON response.
8
+ #
9
+ # Add it after ActionDispatch::RequestId to keep the request ID in the
10
+ # response headers.
11
+ #
12
+ class HttpMethodNotAllowed
13
+ def initialize(app)
14
+ @app = app
15
+ end
16
+
17
+ def call(env)
18
+ if !ActionDispatch::Request::HTTP_METHODS.include?(env["REQUEST_METHOD"].upcase)
19
+ Rails.logger.info("ActionController::UnknownHttpMethod: #{env.inspect}")
20
+ [405,
21
+ {"Content-Type" => "application/json; charset=utf-8"},
22
+ [JSON.generate({errors: ["Method not allowed"]})]
23
+ ]
24
+ else
25
+ @status, @headers, @response = @app.call(env)
26
+ [@status, @headers, @response]
27
+ end
28
+ end
29
+ end
30
+ end
data/lib/repia/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Repia
2
- VERSION = "0.0.2"
2
+ VERSION = "0.1.0"
3
3
  end
data/lib/repia.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'repia/errors'
2
+ require 'repia/middlewares'
2
3
  require 'repia/core'
3
4
 
4
5
  module Repia
@@ -56,4 +56,5 @@ Rails.application.routes.draw do
56
56
 
57
57
  resources :dummies
58
58
  match 'dummies(/:id)' => 'dummies#options', via: [:options]
59
+ get '*unmatched_route', to: 'application#not_found'
59
60
  end
@@ -1,10 +1,2 @@
1
-  (1.7ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
2
-  (0.1ms) select sqlite_version(*)
3
-  (1.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
4
2
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5
- Migrating to CreateUniqueModels (20160423030023)
6
-  (0.1ms) begin transaction
7
-  (0.3ms) CREATE TABLE "unique_models" ("uuid" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
8
- SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20160423030023"]]
9
-  (0.8ms) commit transaction
10
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
@@ -1,69 +1,453 @@
1
-  (1.6ms) CREATE TABLE "unique_models" ("uuid" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
2
-  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
3
-  (0.1ms) select sqlite_version(*)
4
-  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5
-  (0.1ms) SELECT version FROM "schema_migrations"
6
-  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20160423030023')
7
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
8
2
   (0.1ms) begin transaction
3
+ ------------------------------------------------------
4
+ DummiesControllerTest: test_options_request_is_handled
5
+ ------------------------------------------------------
6
+ Processing by DummiesController#options as HTML
7
+ Rendered text template (0.0ms)
8
+ Completed 200 OK in 8ms (Views: 7.9ms | ActiveRecord: 0.0ms)
9
+ Processing by DummiesController#options as HTML
10
+ Rendered text template (0.0ms)
11
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
12
+  (0.1ms) rollback transaction
13
+  (0.0ms) begin transaction
14
+ --------------------------------------------------
15
+ DummiesControllerTest: test_render_multiple_errors
16
+ --------------------------------------------------
17
+ Processing by DummiesController#index as HTML
18
+ Completed 400 Bad Request in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
19
+  (0.0ms) rollback transaction
20
+  (0.0ms) begin transaction
21
+ -------------------------------------------------
22
+ DummiesControllerTest: test_handle_standard_error
23
+ -------------------------------------------------
24
+ Processing by DummiesController#create as HTML
25
+ String can't be coerced into Fixnum
26
+ Completed 500 Internal Server Error in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
27
+  (0.0ms) rollback transaction
28
+  (0.0ms) begin transaction
29
+ ---------------------------------------------------------------
30
+ DummiesControllerTest: test_Predefined_errors_should_be_handled
31
+ ---------------------------------------------------------------
32
+ Processing by DummiesController#show as HTML
33
+ Parameters: {"id"=>"400"}
34
+ 400 - Repia::Errors::BadRequest
35
+ Completed 400 Bad Request in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
36
+ Processing by DummiesController#show as HTML
37
+ Parameters: {"id"=>"401"}
38
+ 401 - Repia::Errors::Unauthorized
39
+ Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
40
+ Processing by DummiesController#show as HTML
41
+ Parameters: {"id"=>"404"}
42
+ 404 - Repia::Errors::NotFound
43
+ Completed 404 Not Found in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
44
+ Processing by DummiesController#show as HTML
45
+ Parameters: {"id"=>"409"}
46
+ 409 - Repia::Errors::Conflict
47
+ Completed 409 Conflict in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
48
+ Processing by DummiesController#show as HTML
49
+ Parameters: {"id"=>"500"}
50
+ 500 - Repia::Errors::InternalServerError
51
+ Completed 500 Internal Server Error in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
52
+  (0.0ms) rollback transaction
53
+  (0.0ms) begin transaction
9
54
  ------------------------------------------------------------
10
55
  RepiaTest: test_UniqueModel_gets_assigned_a_UUID_at_creation
11
56
  ------------------------------------------------------------
57
+  (0.1ms) SAVEPOINT active_record_1
58
+ SQL (0.7ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-27 00:50:50.676017"], ["updated_at", "2016-04-27 00:50:50.676017"], ["uuid", "16700686-0c12-11e6-aeed-6c4008a6fa2a"]]
59
+  (0.1ms) RELEASE SAVEPOINT active_record_1
60
+  (0.6ms) rollback transaction
61
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
62
+  (0.1ms) begin transaction
63
+ -------------------------------------------------
64
+ DummiesControllerTest: test_handle_standard_error
65
+ -------------------------------------------------
66
+ Processing by DummiesController#create as HTML
67
+ String can't be coerced into Fixnum
68
+ Completed 500 Internal Server Error in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
12
69
   (0.1ms) rollback transaction
13
70
   (0.0ms) begin transaction
14
- ---------------------
15
- RepiaTest: test_truth
16
- ---------------------
71
+ ------------------------------------------------------
72
+ DummiesControllerTest: test_options_request_is_handled
73
+ ------------------------------------------------------
74
+ Processing by DummiesController#options as HTML
75
+ Rendered text template (0.0ms)
76
+ Completed 200 OK in 4ms (Views: 4.2ms | ActiveRecord: 0.0ms)
77
+ Processing by DummiesController#options as HTML
78
+ Rendered text template (0.0ms)
79
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
80
+  (0.1ms) rollback transaction
81
+  (0.0ms) begin transaction
82
+ ---------------------------------------------------------------
83
+ DummiesControllerTest: test_Predefined_errors_should_be_handled
84
+ ---------------------------------------------------------------
85
+ Processing by DummiesController#show as HTML
86
+ Parameters: {"id"=>"400"}
87
+ 400 - Repia::Errors::BadRequest
88
+ Completed 400 Bad Request in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
89
+ Processing by DummiesController#show as HTML
90
+ Parameters: {"id"=>"401"}
91
+ 401 - Repia::Errors::Unauthorized
92
+ Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
93
+ Processing by DummiesController#show as HTML
94
+ Parameters: {"id"=>"404"}
95
+ 404 - Repia::Errors::NotFound
96
+ Completed 404 Not Found in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
97
+ Processing by DummiesController#show as HTML
98
+ Parameters: {"id"=>"409"}
99
+ 409 - Repia::Errors::Conflict
100
+ Completed 409 Conflict in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
101
+ Processing by DummiesController#show as HTML
102
+ Parameters: {"id"=>"500"}
103
+ 500 - Repia::Errors::InternalServerError
104
+ Completed 500 Internal Server Error in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
105
+  (0.0ms) rollback transaction
106
+  (0.0ms) begin transaction
107
+ ------------------------------------------------
108
+ DummiesControllerTest: test_handle_routing_error
109
+ ------------------------------------------------
110
+  (0.0ms) rollback transaction
111
+  (0.0ms) begin transaction
112
+ --------------------------------------------------
113
+ DummiesControllerTest: test_render_multiple_errors
114
+ --------------------------------------------------
115
+ Processing by DummiesController#index as HTML
116
+ Completed 400 Bad Request in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
17
117
   (0.0ms) rollback transaction
118
+  (0.0ms) begin transaction
119
+ ------------------------------------------------------------
120
+ RepiaTest: test_UniqueModel_gets_assigned_a_UUID_at_creation
121
+ ------------------------------------------------------------
122
+  (0.0ms) SAVEPOINT active_record_1
123
+ SQL (0.3ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-27 00:51:29.976773"], ["updated_at", "2016-04-27 00:51:29.976773"], ["uuid", "2ddcd376-0c12-11e6-b668-6c4008a6fa2a"]]
124
+  (0.1ms) RELEASE SAVEPOINT active_record_1
125
+  (1.1ms) rollback transaction
18
126
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
19
127
   (0.1ms) begin transaction
128
+ ------------------------------------------------
129
+ DummiesControllerTest: test_handle_routing_error
130
+ ------------------------------------------------
131
+  (0.1ms) rollback transaction
132
+  (0.0ms) begin transaction
133
+ ---------------------------------------------------------------
134
+ DummiesControllerTest: test_Predefined_errors_should_be_handled
135
+ ---------------------------------------------------------------
136
+ Processing by DummiesController#show as HTML
137
+ Parameters: {"id"=>"400"}
138
+ 400 - Repia::Errors::BadRequest
139
+ Completed 400 Bad Request in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
140
+ Processing by DummiesController#show as HTML
141
+ Parameters: {"id"=>"401"}
142
+ 401 - Repia::Errors::Unauthorized
143
+ Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
144
+ Processing by DummiesController#show as HTML
145
+ Parameters: {"id"=>"404"}
146
+ 404 - Repia::Errors::NotFound
147
+ Completed 404 Not Found in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
148
+ Processing by DummiesController#show as HTML
149
+ Parameters: {"id"=>"409"}
150
+ 409 - Repia::Errors::Conflict
151
+ Completed 409 Conflict in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
152
+ Processing by DummiesController#show as HTML
153
+ Parameters: {"id"=>"500"}
154
+ 500 - Repia::Errors::InternalServerError
155
+ Completed 500 Internal Server Error in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
156
+  (0.1ms) rollback transaction
157
+  (0.0ms) begin transaction
158
+ ------------------------------------------------------
159
+ DummiesControllerTest: test_options_request_is_handled
160
+ ------------------------------------------------------
161
+ Processing by DummiesController#options as HTML
162
+ Rendered text template (0.0ms)
163
+ Completed 200 OK in 5ms (Views: 4.9ms | ActiveRecord: 0.0ms)
164
+ Processing by DummiesController#options as HTML
165
+ Rendered text template (0.0ms)
166
+ Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
167
+  (0.1ms) rollback transaction
168
+  (0.0ms) begin transaction
169
+ --------------------------------------------------
170
+ DummiesControllerTest: test_render_multiple_errors
171
+ --------------------------------------------------
172
+ Processing by DummiesController#index as HTML
173
+ Completed 400 Bad Request in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
174
+  (0.1ms) rollback transaction
175
+  (0.0ms) begin transaction
176
+ -------------------------------------------------
177
+ DummiesControllerTest: test_handle_standard_error
178
+ -------------------------------------------------
179
+ Processing by DummiesController#create as HTML
180
+ String can't be coerced into Fixnum
181
+ Completed 500 Internal Server Error in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
182
+  (0.1ms) rollback transaction
183
+  (0.1ms) begin transaction
20
184
  ------------------------------------------------------------
21
185
  RepiaTest: test_UniqueModel_gets_assigned_a_UUID_at_creation
22
186
  ------------------------------------------------------------
23
-  (0.0ms) rollback transaction
24
-  (0.0ms) begin transaction
25
- ---------------------
26
- RepiaTest: test_truth
27
- ---------------------
28
-  (0.0ms) rollback transaction
187
+  (0.1ms) SAVEPOINT active_record_1
188
+ SQL (0.3ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-27 00:55:05.685091"], ["updated_at", "2016-04-27 00:55:05.685091"], ["uuid", "ae6f4ed8-0c12-11e6-9f25-6c4008a6fa2a"]]
189
+  (0.0ms) RELEASE SAVEPOINT active_record_1
190
+  (0.9ms) rollback transaction
29
191
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
30
192
   (0.1ms) begin transaction
31
193
  ------------------------------------------------------------
32
194
  RepiaTest: test_UniqueModel_gets_assigned_a_UUID_at_creation
33
195
  ------------------------------------------------------------
34
-  (0.0ms) SAVEPOINT active_record_1
35
- SQL (0.3ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-23 03:09:06.001188"], ["updated_at", "2016-04-23 03:09:06.001188"], ["uuid", "bd2f2c6e-0900-11e6-964e-6c4008a6fa2a"]]
36
-  (0.0ms) RELEASE SAVEPOINT active_record_1
37
-  (1.7ms) rollback transaction
196
+  (0.1ms) SAVEPOINT active_record_1
197
+ SQL (0.3ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-27 00:55:49.246418"], ["updated_at", "2016-04-27 00:55:49.246418"], ["uuid", "c8663d06-0c12-11e6-b9c9-6c4008a6fa2a"]]
198
+  (0.1ms) RELEASE SAVEPOINT active_record_1
199
+  (1.1ms) rollback transaction
38
200
   (0.1ms) begin transaction
39
- ---------------------
40
- RepiaTest: test_truth
41
- ---------------------
201
+ ---------------------------------------------------------------
202
+ DummiesControllerTest: test_Predefined_errors_should_be_handled
203
+ ---------------------------------------------------------------
204
+ Processing by DummiesController#show as HTML
205
+ Parameters: {"id"=>"400"}
206
+ 400 - Repia::Errors::BadRequest
207
+ Completed 400 Bad Request in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
208
+ Processing by DummiesController#show as HTML
209
+ Parameters: {"id"=>"401"}
210
+ 401 - Repia::Errors::Unauthorized
211
+ Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
212
+ Processing by DummiesController#show as HTML
213
+ Parameters: {"id"=>"404"}
214
+ 404 - Repia::Errors::NotFound
215
+ Completed 404 Not Found in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
216
+ Processing by DummiesController#show as HTML
217
+ Parameters: {"id"=>"409"}
218
+ 409 - Repia::Errors::Conflict
219
+ Completed 409 Conflict in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
220
+ Processing by DummiesController#show as HTML
221
+ Parameters: {"id"=>"500"}
222
+ 500 - Repia::Errors::InternalServerError
223
+ Completed 500 Internal Server Error in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
224
+  (0.1ms) rollback transaction
225
+  (0.0ms) begin transaction
226
+ -------------------------------------------------
227
+ DummiesControllerTest: test_handle_standard_error
228
+ -------------------------------------------------
229
+ Processing by DummiesController#create as HTML
230
+ String can't be coerced into Fixnum
231
+ Completed 500 Internal Server Error in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
232
+  (0.0ms) rollback transaction
233
+  (0.0ms) begin transaction
234
+ --------------------------------------------------
235
+ DummiesControllerTest: test_render_multiple_errors
236
+ --------------------------------------------------
237
+ Processing by DummiesController#index as HTML
238
+ Completed 400 Bad Request in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
239
+  (0.0ms) rollback transaction
240
+  (0.0ms) begin transaction
241
+ ------------------------------------------------------
242
+ DummiesControllerTest: test_options_request_is_handled
243
+ ------------------------------------------------------
244
+ Processing by DummiesController#options as HTML
245
+ Rendered text template (0.0ms)
246
+ Completed 200 OK in 5ms (Views: 4.7ms | ActiveRecord: 0.0ms)
247
+ Processing by DummiesController#options as HTML
248
+ Rendered text template (0.0ms)
249
+ Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
42
250
   (0.1ms) rollback transaction
251
+  (0.0ms) begin transaction
252
+ ------------------------------------------------
253
+ DummiesControllerTest: test_handle_routing_error
254
+ ------------------------------------------------
255
+  (0.0ms) rollback transaction
43
256
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
44
257
   (0.1ms) begin transaction
45
258
  ------------------------------------------------------------
46
259
  RepiaTest: test_UniqueModel_gets_assigned_a_UUID_at_creation
47
260
  ------------------------------------------------------------
48
261
   (0.1ms) SAVEPOINT active_record_1
49
- SQL (0.6ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-23 03:10:19.796047"], ["updated_at", "2016-04-23 03:10:19.796047"], ["uuid", "e92b6076-0900-11e6-bd16-6c4008a6fa2a"]]
262
+ SQL (0.7ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-27 00:58:29.077685"], ["updated_at", "2016-04-27 00:58:29.077685"], ["uuid", "27aa8e5c-0c13-11e6-a1c0-6c4008a6fa2a"]]
50
263
   (0.1ms) RELEASE SAVEPOINT active_record_1
51
-  (1.0ms) rollback transaction
264
+  (0.9ms) rollback transaction
265
+  (0.1ms) begin transaction
266
+ ---------------------------------------------------------------
267
+ DummiesControllerTest: test_Predefined_errors_should_be_handled
268
+ ---------------------------------------------------------------
269
+ Processing by DummiesController#show as HTML
270
+ Parameters: {"id"=>"400"}
271
+ 400 - Repia::Errors::BadRequest
272
+ Completed 400 Bad Request in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
273
+ Processing by DummiesController#show as HTML
274
+ Parameters: {"id"=>"401"}
275
+ 401 - Repia::Errors::Unauthorized
276
+ Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
277
+ Processing by DummiesController#show as HTML
278
+ Parameters: {"id"=>"404"}
279
+ 404 - Repia::Errors::NotFound
280
+ Completed 404 Not Found in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
281
+ Processing by DummiesController#show as HTML
282
+ Parameters: {"id"=>"409"}
283
+ 409 - Repia::Errors::Conflict
284
+ Completed 409 Conflict in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
285
+ Processing by DummiesController#show as HTML
286
+ Parameters: {"id"=>"500"}
287
+ 500 - Repia::Errors::InternalServerError
288
+ Completed 500 Internal Server Error in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
289
+  (0.1ms) rollback transaction
290
+  (0.0ms) begin transaction
291
+ ------------------------------------------------
292
+ DummiesControllerTest: test_handle_routing_error
293
+ ------------------------------------------------
294
+  (0.0ms) rollback transaction
295
+  (0.1ms) begin transaction
296
+ ------------------------------------------------------
297
+ DummiesControllerTest: test_options_request_is_handled
298
+ ------------------------------------------------------
299
+ Processing by DummiesController#options as HTML
300
+ Rendered text template (0.0ms)
301
+ Completed 200 OK in 5ms (Views: 5.2ms | ActiveRecord: 0.0ms)
302
+ Processing by DummiesController#options as HTML
303
+ Rendered text template (0.0ms)
304
+ Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
305
+  (0.1ms) rollback transaction
306
+  (0.0ms) begin transaction
307
+ -------------------------------------------------
308
+ DummiesControllerTest: test_handle_standard_error
309
+ -------------------------------------------------
310
+ Processing by DummiesController#create as HTML
311
+ String can't be coerced into Fixnum
312
+ Completed 500 Internal Server Error in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
313
+  (0.0ms) rollback transaction
314
+  (0.1ms) begin transaction
315
+ --------------------------------------------------
316
+ DummiesControllerTest: test_render_multiple_errors
317
+ --------------------------------------------------
318
+ Processing by DummiesController#index as HTML
319
+ Completed 400 Bad Request in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
320
+  (0.0ms) rollback transaction
52
321
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
53
322
   (0.1ms) begin transaction
54
- ----------------------------------------------------------
55
- RepiaTest: test_DummyController_can_handle_options_request
56
- ----------------------------------------------------------
323
+ -------------------------------------------------
324
+ DummiesControllerTest: test_handle_standard_error
325
+ -------------------------------------------------
326
+ Processing by DummiesController#create as HTML
327
+ String can't be coerced into Fixnum
328
+ Completed 500 Internal Server Error in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
329
+  (0.1ms) rollback transaction
330
+  (0.0ms) begin transaction
331
+ ------------------------------------------------
332
+ DummiesControllerTest: test_handle_routing_error
333
+ ------------------------------------------------
334
+  (0.1ms) rollback transaction
335
+  (0.0ms) begin transaction
336
+ ------------------------------------------------------
337
+ DummiesControllerTest: test_options_request_is_handled
338
+ ------------------------------------------------------
339
+ Processing by DummiesController#options as HTML
340
+ Rendered text template (0.0ms)
341
+ Completed 200 OK in 4ms (Views: 4.3ms | ActiveRecord: 0.0ms)
342
+ Processing by DummiesController#options as HTML
343
+ Rendered text template (0.0ms)
344
+ Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
345
+  (0.1ms) rollback transaction
346
+  (0.0ms) begin transaction
347
+ ---------------------------------------------------------------
348
+ DummiesControllerTest: test_Predefined_errors_should_be_handled
349
+ ---------------------------------------------------------------
350
+ Processing by DummiesController#show as HTML
351
+ Parameters: {"id"=>"400"}
352
+ 400 - Repia::Errors::BadRequest
353
+ Completed 400 Bad Request in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
354
+ Processing by DummiesController#show as HTML
355
+ Parameters: {"id"=>"401"}
356
+ 401 - Repia::Errors::Unauthorized
357
+ Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
358
+ Processing by DummiesController#show as HTML
359
+ Parameters: {"id"=>"404"}
360
+ 404 - Repia::Errors::NotFound
361
+ Completed 404 Not Found in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
362
+ Processing by DummiesController#show as HTML
363
+ Parameters: {"id"=>"409"}
364
+ 409 - Repia::Errors::Conflict
365
+ Completed 409 Conflict in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
366
+ Processing by DummiesController#show as HTML
367
+ Parameters: {"id"=>"500"}
368
+ 500 - Repia::Errors::InternalServerError
369
+ Completed 500 Internal Server Error in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
370
+  (0.0ms) rollback transaction
371
+  (0.0ms) begin transaction
372
+ --------------------------------------------------
373
+ DummiesControllerTest: test_render_multiple_errors
374
+ --------------------------------------------------
375
+ Processing by DummiesController#index as HTML
376
+ Completed 400 Bad Request in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
57
377
   (0.0ms) rollback transaction
58
378
   (0.0ms) begin transaction
59
379
  ------------------------------------------------------------
60
380
  RepiaTest: test_UniqueModel_gets_assigned_a_UUID_at_creation
61
381
  ------------------------------------------------------------
62
382
   (0.0ms) SAVEPOINT active_record_1
63
- SQL (0.3ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-23 03:16:38.863377"], ["updated_at", "2016-04-23 03:16:38.863377"], ["uuid", "cb1c75e2-0901-11e6-b747-6c4008a6fa2a"]]
64
-  (0.0ms) RELEASE SAVEPOINT active_record_1
383
+ SQL (0.3ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-27 01:03:52.448139"], ["updated_at", "2016-04-27 01:03:52.448139"], ["uuid", "e868f638-0c13-11e6-873a-6c4008a6fa2a"]]
384
+  (0.1ms) RELEASE SAVEPOINT active_record_1
65
385
   (0.9ms) rollback transaction
66
386
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
387
+  (0.1ms) begin transaction
388
+ ------------------------------------------------------------
389
+ RepiaTest: test_UniqueModel_gets_assigned_a_UUID_at_creation
390
+ ------------------------------------------------------------
391
+  (0.0ms) SAVEPOINT active_record_1
392
+ SQL (0.3ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-27 01:08:28.079585"], ["updated_at", "2016-04-27 01:08:28.079585"], ["uuid", "8cb2fbda-0c14-11e6-b1c2-6c4008a6fa2a"]]
393
+  (0.0ms) RELEASE SAVEPOINT active_record_1
394
+  (1.1ms) rollback transaction
395
+  (0.1ms) begin transaction
396
+ -------------------------------------------------
397
+ DummiesControllerTest: test_handle_standard_error
398
+ -------------------------------------------------
399
+ Processing by DummiesController#create as HTML
400
+ String can't be coerced into Fixnum
401
+ Completed 500 Internal Server Error in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
402
+  (0.1ms) rollback transaction
403
+  (0.1ms) begin transaction
404
+ ---------------------------------------------------------------
405
+ DummiesControllerTest: test_Predefined_errors_should_be_handled
406
+ ---------------------------------------------------------------
407
+ Processing by DummiesController#show as HTML
408
+ Parameters: {"id"=>"400"}
409
+ 400 - Repia::Errors::BadRequest
410
+ Completed 400 Bad Request in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
411
+ Processing by DummiesController#show as HTML
412
+ Parameters: {"id"=>"401"}
413
+ 401 - Repia::Errors::Unauthorized
414
+ Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
415
+ Processing by DummiesController#show as HTML
416
+ Parameters: {"id"=>"404"}
417
+ 404 - Repia::Errors::NotFound
418
+ Completed 404 Not Found in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
419
+ Processing by DummiesController#show as HTML
420
+ Parameters: {"id"=>"409"}
421
+ 409 - Repia::Errors::Conflict
422
+ Completed 409 Conflict in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
423
+ Processing by DummiesController#show as HTML
424
+ Parameters: {"id"=>"500"}
425
+ 500 - Repia::Errors::InternalServerError
426
+ Completed 500 Internal Server Error in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
427
+  (0.1ms) rollback transaction
428
+  (0.0ms) begin transaction
429
+ ------------------------------------------------
430
+ DummiesControllerTest: test_handle_routing_error
431
+ ------------------------------------------------
432
+  (0.0ms) rollback transaction
433
+  (0.1ms) begin transaction
434
+ ------------------------------------------------------
435
+ DummiesControllerTest: test_options_request_is_handled
436
+ ------------------------------------------------------
437
+ Processing by DummiesController#options as HTML
438
+ Rendered text template (0.0ms)
439
+ Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.0ms)
440
+ Processing by DummiesController#options as HTML
441
+ Rendered text template (0.0ms)
442
+ Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
443
+  (0.1ms) rollback transaction
444
+  (0.0ms) begin transaction
445
+ --------------------------------------------------
446
+ DummiesControllerTest: test_render_multiple_errors
447
+ --------------------------------------------------
448
+ Processing by DummiesController#index as HTML
449
+ Completed 400 Bad Request in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
450
+  (0.1ms) rollback transaction
67
451
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
68
452
   (0.1ms) begin transaction
69
453
  ---------------------------------------------------------------
@@ -71,34 +455,101 @@ DummiesControllerTest: test_Predefined_errors_should_be_handled
71
455
  ---------------------------------------------------------------
72
456
  Processing by DummiesController#show as HTML
73
457
  Parameters: {"id"=>"400"}
458
+ 400 - Repia::Errors::BadRequest
459
+ Completed 400 Bad Request in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
460
+ Processing by DummiesController#show as HTML
461
+ Parameters: {"id"=>"401"}
462
+ 401 - Repia::Errors::Unauthorized
463
+ Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
464
+ Processing by DummiesController#show as HTML
465
+ Parameters: {"id"=>"404"}
466
+ 404 - Repia::Errors::NotFound
467
+ Completed 404 Not Found in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
468
+ Processing by DummiesController#show as HTML
469
+ Parameters: {"id"=>"409"}
470
+ 409 - Repia::Errors::Conflict
471
+ Completed 409 Conflict in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
472
+ Processing by DummiesController#show as HTML
473
+ Parameters: {"id"=>"500"}
74
474
  500 - Repia::Errors::InternalServerError
75
- Completed 500 Internal Server Error in 30ms (Views: 29.3ms | ActiveRecord: 0.0ms)
475
+ Completed 500 Internal Server Error in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
476
+  (0.1ms) rollback transaction
477
+  (0.0ms) begin transaction
478
+ ------------------------------------------------
479
+ DummiesControllerTest: test_handle_routing_error
480
+ ------------------------------------------------
481
+  (0.0ms) rollback transaction
482
+  (0.0ms) begin transaction
483
+ --------------------------------------------------
484
+ DummiesControllerTest: test_render_multiple_errors
485
+ --------------------------------------------------
486
+ Processing by DummiesController#index as HTML
487
+ Completed 400 Bad Request in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
488
+  (0.1ms) rollback transaction
489
+  (0.0ms) begin transaction
490
+ -------------------------------------------------
491
+ DummiesControllerTest: test_handle_standard_error
492
+ -------------------------------------------------
493
+ Processing by DummiesController#create as HTML
494
+ String can't be coerced into Fixnum
495
+ Completed 500 Internal Server Error in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
496
+  (0.0ms) rollback transaction
497
+  (0.0ms) begin transaction
498
+ ------------------------------------------------------
499
+ DummiesControllerTest: test_options_request_is_handled
500
+ ------------------------------------------------------
501
+ Processing by DummiesController#options as HTML
502
+ Rendered text template (0.0ms)
503
+ Completed 200 OK in 5ms (Views: 4.4ms | ActiveRecord: 0.0ms)
504
+ Processing by DummiesController#options as HTML
505
+ Rendered text template (0.0ms)
506
+ Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
76
507
   (0.1ms) rollback transaction
77
508
   (0.0ms) begin transaction
78
509
  ------------------------------------------------------------
79
510
  RepiaTest: test_UniqueModel_gets_assigned_a_UUID_at_creation
80
511
  ------------------------------------------------------------
81
-  (0.0ms) SAVEPOINT active_record_1
82
- SQL (0.4ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-23 03:19:40.062893"], ["updated_at", "2016-04-23 03:19:40.062893"], ["uuid", "371d4fa0-0902-11e6-b019-6c4008a6fa2a"]]
83
-  (0.1ms) RELEASE SAVEPOINT active_record_1
84
-  (1.1ms) rollback transaction
512
+  (0.1ms) SAVEPOINT active_record_1
513
+ SQL (0.3ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-27 01:10:05.927864"], ["updated_at", "2016-04-27 01:10:05.927864"], ["uuid", "c70575ec-0c14-11e6-9f4f-6c4008a6fa2a"]]
514
+  (0.0ms) RELEASE SAVEPOINT active_record_1
515
+  (1.0ms) rollback transaction
85
516
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
86
517
   (0.1ms) begin transaction
87
518
  ------------------------------------------------------------
88
519
  RepiaTest: test_UniqueModel_gets_assigned_a_UUID_at_creation
89
520
  ------------------------------------------------------------
90
521
   (0.1ms) SAVEPOINT active_record_1
91
- SQL (0.4ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-23 03:20:25.902693"], ["updated_at", "2016-04-23 03:20:25.902693"], ["uuid", "526fea74-0902-11e6-9c69-6c4008a6fa2a"]]
92
-  (0.1ms) RELEASE SAVEPOINT active_record_1
93
-  (1.1ms) rollback transaction
522
+ SQL (0.4ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-27 01:10:15.805432"], ["updated_at", "2016-04-27 01:10:15.805432"], ["uuid", "cce8a60a-0c14-11e6-a738-6c4008a6fa2a"]]
523
+  (0.2ms) RELEASE SAVEPOINT active_record_1
524
+  (1.7ms) rollback transaction
94
525
   (0.1ms) begin transaction
526
+ -------------------------------------------------
527
+ DummiesControllerTest: test_handle_standard_error
528
+ -------------------------------------------------
529
+ Processing by DummiesController#create as HTML
530
+ String can't be coerced into Fixnum
531
+ Completed 500 Internal Server Error in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
532
+  (0.1ms) rollback transaction
533
+  (0.0ms) begin transaction
534
+ ------------------------------------------------
535
+ DummiesControllerTest: test_handle_routing_error
536
+ ------------------------------------------------
537
+  (0.0ms) rollback transaction
538
+  (0.1ms) begin transaction
539
+ --------------------------------------------------
540
+ DummiesControllerTest: test_render_multiple_errors
541
+ --------------------------------------------------
542
+ Processing by DummiesController#index as HTML
543
+ Completed 400 Bad Request in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
544
+  (0.0ms) rollback transaction
545
+  (0.0ms) begin transaction
95
546
  ---------------------------------------------------------------
96
547
  DummiesControllerTest: test_Predefined_errors_should_be_handled
97
548
  ---------------------------------------------------------------
98
549
  Processing by DummiesController#show as HTML
99
550
  Parameters: {"id"=>"400"}
100
551
  400 - Repia::Errors::BadRequest
101
- Completed 400 Bad Request in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
552
+ Completed 400 Bad Request in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
102
553
  Processing by DummiesController#show as HTML
103
554
  Parameters: {"id"=>"401"}
104
555
  401 - Repia::Errors::Unauthorized
@@ -115,9 +566,28 @@ Processing by DummiesController#show as HTML
115
566
  Parameters: {"id"=>"500"}
116
567
  500 - Repia::Errors::InternalServerError
117
568
  Completed 500 Internal Server Error in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
118
-  (0.1ms) rollback transaction
119
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
569
+  (0.0ms) rollback transaction
570
+  (0.0ms) begin transaction
571
+ ------------------------------------------------------
572
+ DummiesControllerTest: test_options_request_is_handled
573
+ ------------------------------------------------------
574
+ Processing by DummiesController#options as HTML
575
+ Rendered text template (0.0ms)
576
+ Completed 200 OK in 4ms (Views: 4.3ms | ActiveRecord: 0.0ms)
577
+ Processing by DummiesController#options as HTML
578
+ Rendered text template (0.0ms)
579
+ Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
580
+  (0.0ms) rollback transaction
581
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
120
582
   (0.1ms) begin transaction
583
+ ------------------------------------------------------------
584
+ RepiaTest: test_UniqueModel_gets_assigned_a_UUID_at_creation
585
+ ------------------------------------------------------------
586
+  (0.1ms) SAVEPOINT active_record_1
587
+ SQL (0.8ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-27 03:28:57.536795"], ["updated_at", "2016-04-27 03:28:57.536795"], ["uuid", "2d0c150e-0c28-11e6-a34e-6c4008a6fa2a"]]
588
+  (0.1ms) RELEASE SAVEPOINT active_record_1
589
+  (0.4ms) rollback transaction
590
+  (0.1ms) begin transaction
121
591
  ---------------------------------------------------------------
122
592
  DummiesControllerTest: test_Predefined_errors_should_be_handled
123
593
  ---------------------------------------------------------------
@@ -141,24 +611,34 @@ Processing by DummiesController#show as HTML
141
611
  Parameters: {"id"=>"500"}
142
612
  500 - Repia::Errors::InternalServerError
143
613
  Completed 500 Internal Server Error in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
144
-  (0.1ms) rollback transaction
145
-  (0.0ms) begin transaction
146
- ------------------------------------------------------------
147
- RepiaTest: test_UniqueModel_gets_assigned_a_UUID_at_creation
148
- ------------------------------------------------------------
149
-  (0.1ms) SAVEPOINT active_record_1
150
- SQL (0.3ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-23 03:21:10.167005"], ["updated_at", "2016-04-23 03:21:10.167005"], ["uuid", "6cd227ce-0902-11e6-b91d-6c4008a6fa2a"]]
151
-  (0.0ms) RELEASE SAVEPOINT active_record_1
152
-  (0.8ms) rollback transaction
153
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
154
-  (0.1ms) begin transaction
614
+  (0.1ms) rollback transaction
615
+  (0.0ms) begin transaction
616
+ -------------------------------------------------
617
+ DummiesControllerTest: test_handle_standard_error
618
+ -------------------------------------------------
619
+ Processing by DummiesController#create as HTML
620
+ String can't be coerced into Fixnum
621
+ Completed 500 Internal Server Error in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
622
+  (0.0ms) rollback transaction
623
+  (0.0ms) begin transaction
155
624
  ------------------------------------------------------
156
625
  DummiesControllerTest: test_options_request_is_handled
157
626
  ------------------------------------------------------
158
627
  Processing by DummiesController#options as HTML
159
628
  Rendered text template (0.0ms)
160
- Completed 200 OK in 5ms (Views: 4.9ms | ActiveRecord: 0.0ms)
161
-  (0.1ms) rollback transaction
629
+ Completed 200 OK in 9ms (Views: 8.3ms | ActiveRecord: 0.0ms)
630
+ Processing by DummiesController#options as HTML
631
+ Rendered text template (0.0ms)
632
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
633
+  (0.1ms) rollback transaction
634
+  (0.0ms) begin transaction
635
+ --------------------------------------------------
636
+ DummiesControllerTest: test_render_multiple_errors
637
+ --------------------------------------------------
638
+ Processing by DummiesController#index as HTML
639
+ Completed 400 Bad Request in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
640
+  (0.0ms) rollback transaction
641
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
162
642
   (0.1ms) begin transaction
163
643
  ---------------------------------------------------------------
164
644
  DummiesControllerTest: test_Predefined_errors_should_be_handled
@@ -166,7 +646,7 @@ DummiesControllerTest: test_Predefined_errors_should_be_handled
166
646
  Processing by DummiesController#show as HTML
167
647
  Parameters: {"id"=>"400"}
168
648
  400 - Repia::Errors::BadRequest
169
- Completed 400 Bad Request in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
649
+ Completed 400 Bad Request in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
170
650
  Processing by DummiesController#show as HTML
171
651
  Parameters: {"id"=>"401"}
172
652
  401 - Repia::Errors::Unauthorized
@@ -185,33 +665,87 @@ Processing by DummiesController#show as HTML
185
665
  Completed 500 Internal Server Error in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
186
666
   (0.1ms) rollback transaction
187
667
   (0.0ms) begin transaction
668
+ --------------------------------------------------
669
+ DummiesControllerTest: test_render_multiple_errors
670
+ --------------------------------------------------
671
+ Processing by DummiesController#index as HTML
672
+ Completed 400 Bad Request in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
673
+  (0.0ms) rollback transaction
674
+  (0.0ms) begin transaction
675
+ ------------------------------------------------------
676
+ DummiesControllerTest: test_options_request_is_handled
677
+ ------------------------------------------------------
678
+ Processing by DummiesController#options as HTML
679
+ Rendered text template (0.0ms)
680
+ Completed 200 OK in 4ms (Views: 4.3ms | ActiveRecord: 0.0ms)
681
+ Processing by DummiesController#options as HTML
682
+ Rendered text template (0.0ms)
683
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
684
+  (0.1ms) rollback transaction
685
+  (0.0ms) begin transaction
686
+ -------------------------------------------------
687
+ DummiesControllerTest: test_handle_standard_error
688
+ -------------------------------------------------
689
+ Processing by DummiesController#create as HTML
690
+ String can't be coerced into Fixnum
691
+ Completed 500 Internal Server Error in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
692
+  (0.0ms) rollback transaction
693
+  (0.0ms) begin transaction
188
694
  ------------------------------------------------------------
189
695
  RepiaTest: test_UniqueModel_gets_assigned_a_UUID_at_creation
190
696
  ------------------------------------------------------------
191
-  (0.2ms) SAVEPOINT active_record_1
192
- SQL (0.3ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-23 03:21:44.337469"], ["updated_at", "2016-04-23 03:21:44.337469"], ["uuid", "81301f5a-0902-11e6-94ce-6c4008a6fa2a"]]
697
+  (0.0ms) SAVEPOINT active_record_1
698
+ SQL (0.3ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-27 03:29:03.119996"], ["updated_at", "2016-04-27 03:29:03.119996"], ["uuid", "3060017a-0c28-11e6-9db0-6c4008a6fa2a"]]
193
699
   (0.1ms) RELEASE SAVEPOINT active_record_1
194
-  (1.0ms) rollback transaction
700
+  (1.1ms) rollback transaction
195
701
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
196
702
   (0.1ms) begin transaction
703
+ ------------------------------------------------------------
704
+ RepiaTest: test_UniqueModel_gets_assigned_a_UUID_at_creation
705
+ ------------------------------------------------------------
706
+  (0.1ms) SAVEPOINT active_record_1
707
+ SQL (0.3ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-27 03:29:16.233653"], ["updated_at", "2016-04-27 03:29:16.233653"], ["uuid", "3830ffb2-0c28-11e6-a0e4-6c4008a6fa2a"]]
708
+  (0.1ms) RELEASE SAVEPOINT active_record_1
709
+  (1.1ms) rollback transaction
710
+  (0.1ms) begin transaction
711
+ --------------------------------------------------
712
+ DummiesControllerTest: test_render_multiple_errors
713
+ --------------------------------------------------
714
+ Processing by DummiesController#index as HTML
715
+ Completed 400 Bad Request in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
716
+  (0.1ms) rollback transaction
717
+  (0.1ms) begin transaction
718
+ -------------------------------------------------
719
+ DummiesControllerTest: test_handle_standard_error
720
+ -------------------------------------------------
721
+ Processing by DummiesController#create as HTML
722
+ String can't be coerced into Fixnum
723
+ Completed 500 Internal Server Error in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
724
+  (0.0ms) rollback transaction
725
+  (0.1ms) begin transaction
726
+ ------------------------------------------------
727
+ DummiesControllerTest: test_handle_routing_error
728
+ ------------------------------------------------
729
+  (0.0ms) rollback transaction
730
+  (0.0ms) begin transaction
197
731
  ------------------------------------------------------
198
732
  DummiesControllerTest: test_options_request_is_handled
199
733
  ------------------------------------------------------
200
734
  Processing by DummiesController#options as HTML
201
735
  Rendered text template (0.0ms)
202
- Completed 200 OK in 5ms (Views: 4.4ms | ActiveRecord: 0.0ms)
736
+ Completed 200 OK in 5ms (Views: 4.6ms | ActiveRecord: 0.0ms)
203
737
  Processing by DummiesController#options as HTML
204
738
  Rendered text template (0.0ms)
205
739
  Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
206
-  (0.1ms) rollback transaction
207
-  (0.0ms) begin transaction
740
+  (0.1ms) rollback transaction
741
+  (0.1ms) begin transaction
208
742
  ---------------------------------------------------------------
209
743
  DummiesControllerTest: test_Predefined_errors_should_be_handled
210
744
  ---------------------------------------------------------------
211
745
  Processing by DummiesController#show as HTML
212
746
  Parameters: {"id"=>"400"}
213
747
  400 - Repia::Errors::BadRequest
214
- Completed 400 Bad Request in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
748
+ Completed 400 Bad Request in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
215
749
  Processing by DummiesController#show as HTML
216
750
  Parameters: {"id"=>"401"}
217
751
  401 - Repia::Errors::Unauthorized
@@ -228,35 +762,34 @@ Processing by DummiesController#show as HTML
228
762
  Parameters: {"id"=>"500"}
229
763
  500 - Repia::Errors::InternalServerError
230
764
  Completed 500 Internal Server Error in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
765
+  (0.0ms) rollback transaction
766
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
767
+  (0.1ms) begin transaction
768
+ --------------------------------------------------
769
+ DummiesControllerTest: test_render_multiple_errors
770
+ --------------------------------------------------
771
+ Processing by DummiesController#index as HTML
772
+ Completed 400 Bad Request in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
231
773
   (0.1ms) rollback transaction
232
774
   (0.0ms) begin transaction
233
- ------------------------------------------------------------
234
- RepiaTest: test_UniqueModel_gets_assigned_a_UUID_at_creation
235
- ------------------------------------------------------------
236
-  (0.1ms) SAVEPOINT active_record_1
237
- SQL (0.3ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-23 03:23:36.007863"], ["updated_at", "2016-04-23 03:23:36.007863"], ["uuid", "c3bfa8c2-0902-11e6-8ddf-6c4008a6fa2a"]]
238
-  (0.1ms) RELEASE SAVEPOINT active_record_1
239
-  (1.0ms) rollback transaction
240
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
241
-  (0.1ms) begin transaction
242
775
  ------------------------------------------------------
243
776
  DummiesControllerTest: test_options_request_is_handled
244
777
  ------------------------------------------------------
245
778
  Processing by DummiesController#options as HTML
246
779
  Rendered text template (0.0ms)
247
- Completed 200 OK in 6ms (Views: 5.3ms | ActiveRecord: 0.0ms)
780
+ Completed 200 OK in 8ms (Views: 7.4ms | ActiveRecord: 0.0ms)
248
781
  Processing by DummiesController#options as HTML
249
782
  Rendered text template (0.0ms)
250
- Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
783
+ Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
251
784
   (0.1ms) rollback transaction
252
-  (0.1ms) begin transaction
785
+  (0.0ms) begin transaction
253
786
  ---------------------------------------------------------------
254
787
  DummiesControllerTest: test_Predefined_errors_should_be_handled
255
788
  ---------------------------------------------------------------
256
789
  Processing by DummiesController#show as HTML
257
790
  Parameters: {"id"=>"400"}
258
791
  400 - Repia::Errors::BadRequest
259
- Completed 400 Bad Request in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
792
+ Completed 400 Bad Request in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
260
793
  Processing by DummiesController#show as HTML
261
794
  Parameters: {"id"=>"401"}
262
795
  401 - Repia::Errors::Unauthorized
@@ -273,15 +806,28 @@ Processing by DummiesController#show as HTML
273
806
  Parameters: {"id"=>"500"}
274
807
  500 - Repia::Errors::InternalServerError
275
808
  Completed 500 Internal Server Error in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
276
-  (0.1ms) rollback transaction
809
+  (0.0ms) rollback transaction
810
+  (0.0ms) begin transaction
811
+ ------------------------------------------------
812
+ DummiesControllerTest: test_handle_routing_error
813
+ ------------------------------------------------
814
+  (0.0ms) rollback transaction
815
+  (0.0ms) begin transaction
816
+ -------------------------------------------------
817
+ DummiesControllerTest: test_handle_standard_error
818
+ -------------------------------------------------
819
+ Processing by DummiesController#create as HTML
820
+ String can't be coerced into Fixnum
821
+ Completed 500 Internal Server Error in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
822
+  (0.0ms) rollback transaction
277
823
   (0.0ms) begin transaction
278
824
  ------------------------------------------------------------
279
825
  RepiaTest: test_UniqueModel_gets_assigned_a_UUID_at_creation
280
826
  ------------------------------------------------------------
281
827
   (0.1ms) SAVEPOINT active_record_1
282
- SQL (0.3ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-23 03:24:47.705307"], ["updated_at", "2016-04-23 03:24:47.705307"], ["uuid", "ee7bd248-0902-11e6-832d-6c4008a6fa2a"]]
828
+ SQL (0.8ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-29 02:31:57.648010"], ["updated_at", "2016-04-29 02:31:57.648010"], ["uuid", "8b75f962-0db2-11e6-8639-6c4008a6fa2a"]]
283
829
   (0.1ms) RELEASE SAVEPOINT active_record_1
284
-  (1.1ms) rollback transaction
830
+  (0.9ms) rollback transaction
285
831
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
286
832
   (0.1ms) begin transaction
287
833
  ---------------------------------------------------------------
@@ -290,7 +836,7 @@ DummiesControllerTest: test_Predefined_errors_should_be_handled
290
836
  Processing by DummiesController#show as HTML
291
837
  Parameters: {"id"=>"400"}
292
838
  400 - Repia::Errors::BadRequest
293
- Completed 400 Bad Request in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
839
+ Completed 400 Bad Request in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
294
840
  Processing by DummiesController#show as HTML
295
841
  Parameters: {"id"=>"401"}
296
842
  401 - Repia::Errors::Unauthorized
@@ -314,24 +860,37 @@ DummiesControllerTest: test_options_request_is_handled
314
860
  ------------------------------------------------------
315
861
  Processing by DummiesController#options as HTML
316
862
  Rendered text template (0.0ms)
317
- Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.0ms)
863
+ Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.0ms)
318
864
  Processing by DummiesController#options as HTML
319
865
  Rendered text template (0.0ms)
320
- Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
866
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
867
+  (0.1ms) rollback transaction
868
+  (0.0ms) begin transaction
869
+ ------------------------------------------------
870
+ DummiesControllerTest: test_handle_routing_error
871
+ ------------------------------------------------
872
+  (0.1ms) rollback transaction
873
+  (0.0ms) begin transaction
874
+ -------------------------------------------------
875
+ DummiesControllerTest: test_handle_standard_error
876
+ -------------------------------------------------
877
+ Processing by DummiesController#create as HTML
878
+ String can't be coerced into Fixnum
879
+ Completed 500 Internal Server Error in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
321
880
   (0.1ms) rollback transaction
322
881
   (0.0ms) begin transaction
323
882
  --------------------------------------------------
324
883
  DummiesControllerTest: test_render_multiple_errors
325
884
  --------------------------------------------------
326
885
  Processing by DummiesController#index as HTML
327
- Completed 400 Bad Request in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
886
+ Completed 400 Bad Request in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
328
887
   (0.1ms) rollback transaction
329
888
   (0.0ms) begin transaction
330
889
  ------------------------------------------------------------
331
890
  RepiaTest: test_UniqueModel_gets_assigned_a_UUID_at_creation
332
891
  ------------------------------------------------------------
333
-  (0.0ms) SAVEPOINT active_record_1
334
- SQL (1.0ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-23 03:25:29.629663"], ["updated_at", "2016-04-23 03:25:29.629663"], ["uuid", "0778f6e0-0903-11e6-9931-6c4008a6fa2a"]]
892
+  (0.1ms) SAVEPOINT active_record_1
893
+ SQL (0.4ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-29 02:33:06.477185"], ["updated_at", "2016-04-29 02:33:06.477185"], ["uuid", "b47c7796-0db2-11e6-bc93-6c4008a6fa2a"]]
335
894
   (0.1ms) RELEASE SAVEPOINT active_record_1
336
895
   (1.1ms) rollback transaction
337
896
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
@@ -361,41 +920,41 @@ Processing by DummiesController#show as HTML
361
920
  Completed 500 Internal Server Error in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
362
921
   (0.1ms) rollback transaction
363
922
   (0.0ms) begin transaction
923
+ -------------------------------------------------
924
+ DummiesControllerTest: test_handle_standard_error
925
+ -------------------------------------------------
926
+ Processing by DummiesController#create as HTML
927
+ String can't be coerced into Fixnum
928
+ Completed 500 Internal Server Error in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
929
+  (0.0ms) rollback transaction
930
+  (0.0ms) begin transaction
931
+ --------------------------------------------------
932
+ DummiesControllerTest: test_render_multiple_errors
933
+ --------------------------------------------------
934
+ Processing by DummiesController#index as HTML
935
+ Completed 400 Bad Request in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
936
+  (0.0ms) rollback transaction
937
+  (0.0ms) begin transaction
364
938
  ------------------------------------------------------
365
939
  DummiesControllerTest: test_options_request_is_handled
366
940
  ------------------------------------------------------
367
941
  Processing by DummiesController#options as HTML
368
942
  Rendered text template (0.0ms)
369
- Completed 200 OK in 4ms (Views: 4.1ms | ActiveRecord: 0.0ms)
943
+ Completed 200 OK in 5ms (Views: 5.1ms | ActiveRecord: 0.0ms)
370
944
  Processing by DummiesController#options as HTML
371
945
  Rendered text template (0.0ms)
372
946
  Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
373
-  (0.0ms) rollback transaction
374
-  (0.0ms) begin transaction
375
- --------------------------------------------------
376
- DummiesControllerTest: test_render_multiple_errors
377
- --------------------------------------------------
378
- Processing by DummiesController#index as HTML
379
- Completed 400 Bad Request in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
380
947
   (0.1ms) rollback transaction
381
948
   (0.0ms) begin transaction
382
949
  ------------------------------------------------------------
383
950
  RepiaTest: test_UniqueModel_gets_assigned_a_UUID_at_creation
384
- ------------------------------------------------------------
385
-  (0.1ms) SAVEPOINT active_record_1
386
- SQL (0.3ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-23 03:25:54.844491"], ["updated_at", "2016-04-23 03:25:54.844491"], ["uuid", "16807c58-0903-11e6-b659-6c4008a6fa2a"]]
387
-  (0.0ms) RELEASE SAVEPOINT active_record_1
388
-  (0.8ms) rollback transaction
389
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
390
-  (0.1ms) begin transaction
391
- ------------------------------------------------------------
392
- RepiaTest: test_UniqueModel_gets_assigned_a_UUID_at_creation
393
951
  ------------------------------------------------------------
394
952
   (0.0ms) SAVEPOINT active_record_1
395
- SQL (0.3ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-23 03:26:49.306901"], ["updated_at", "2016-04-23 03:26:49.306901"], ["uuid", "36f6c398-0903-11e6-b511-6c4008a6fa2a"]]
953
+ SQL (0.3ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-29 02:33:36.266428"], ["updated_at", "2016-04-29 02:33:36.266428"], ["uuid", "c63df022-0db2-11e6-846e-6c4008a6fa2a"]]
396
954
   (0.1ms) RELEASE SAVEPOINT active_record_1
397
955
   (1.2ms) rollback transaction
398
-  (0.1ms) begin transaction
956
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
957
+  (0.1ms) begin transaction
399
958
  ---------------------------------------------------------------
400
959
  DummiesControllerTest: test_Predefined_errors_should_be_handled
401
960
  ---------------------------------------------------------------
@@ -419,90 +978,40 @@ Processing by DummiesController#show as HTML
419
978
  Parameters: {"id"=>"500"}
420
979
  500 - Repia::Errors::InternalServerError
421
980
  Completed 500 Internal Server Error in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
422
-  (0.1ms) rollback transaction
423
-  (0.1ms) begin transaction
424
- ------------------------------------------------------
425
- DummiesControllerTest: test_options_request_is_handled
426
- ------------------------------------------------------
427
- Processing by DummiesController#options as HTML
428
- Rendered text template (0.0ms)
429
- Completed 200 OK in 5ms (Views: 4.5ms | ActiveRecord: 0.0ms)
430
- Processing by DummiesController#options as HTML
431
- Rendered text template (0.0ms)
432
- Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
433
-  (0.1ms) rollback transaction
434
-  (0.0ms) begin transaction
981
+  (0.1ms) rollback transaction
982
+  (0.0ms) begin transaction
435
983
  --------------------------------------------------
436
984
  DummiesControllerTest: test_render_multiple_errors
437
985
  --------------------------------------------------
438
986
  Processing by DummiesController#index as HTML
439
987
  Completed 400 Bad Request in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
440
-  (0.1ms) rollback transaction
441
-  (0.1ms) begin transaction
988
+  (0.1ms) rollback transaction
989
+  (0.0ms) begin transaction
442
990
  -------------------------------------------------
443
991
  DummiesControllerTest: test_handle_standard_error
444
992
  -------------------------------------------------
445
993
  Processing by DummiesController#create as HTML
446
994
  String can't be coerced into Fixnum
447
995
  Completed 500 Internal Server Error in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
448
-  (0.0ms) rollback transaction
449
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
450
-  (0.1ms) begin transaction
451
- -------------------------------------------------
452
- DummiesControllerTest: test_handle_standard_error
453
- -------------------------------------------------
454
- Processing by DummiesController#create as HTML
455
- String can't be coerced into Fixnum
456
- Completed 500 Internal Server Error in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
457
-  (0.1ms) rollback transaction
458
-  (0.0ms) begin transaction
459
- --------------------------------------------------
460
- DummiesControllerTest: test_render_multiple_errors
461
- --------------------------------------------------
462
- Processing by DummiesController#index as HTML
463
- Completed 400 Bad Request in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
464
996
   (0.0ms) rollback transaction
465
997
   (0.0ms) begin transaction
466
998
  ------------------------------------------------------
467
999
  DummiesControllerTest: test_options_request_is_handled
468
1000
  ------------------------------------------------------
469
1001
  Processing by DummiesController#options as HTML
470
- Rendered text template (0.0ms)
471
- Completed 200 OK in 6ms (Views: 5.4ms | ActiveRecord: 0.0ms)
1002
+ Rendered text template (0.1ms)
1003
+ Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.0ms)
472
1004
  Processing by DummiesController#options as HTML
473
1005
  Rendered text template (0.0ms)
474
- Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
1006
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
475
1007
   (0.1ms) rollback transaction
476
1008
   (0.0ms) begin transaction
477
- ---------------------------------------------------------------
478
- DummiesControllerTest: test_Predefined_errors_should_be_handled
479
- ---------------------------------------------------------------
480
- Processing by DummiesController#show as HTML
481
- Parameters: {"id"=>"400"}
482
- 400 - Repia::Errors::BadRequest
483
- Completed 400 Bad Request in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
484
- Processing by DummiesController#show as HTML
485
- Parameters: {"id"=>"401"}
486
- 401 - Repia::Errors::Unauthorized
487
- Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
488
- Processing by DummiesController#show as HTML
489
- Parameters: {"id"=>"404"}
490
- 404 - Repia::Errors::NotFound
491
- Completed 404 Not Found in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
492
- Processing by DummiesController#show as HTML
493
- Parameters: {"id"=>"409"}
494
- 409 - Repia::Errors::Conflict
495
- Completed 409 Conflict in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
496
- Processing by DummiesController#show as HTML
497
- Parameters: {"id"=>"500"}
498
- 500 - Repia::Errors::InternalServerError
499
- Completed 500 Internal Server Error in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
500
-  (0.1ms) rollback transaction
501
-  (0.1ms) begin transaction
502
1009
  ------------------------------------------------------------
503
1010
  RepiaTest: test_UniqueModel_gets_assigned_a_UUID_at_creation
504
1011
  ------------------------------------------------------------
505
1012
   (0.1ms) SAVEPOINT active_record_1
506
- SQL (0.4ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-23 03:27:07.769458"], ["updated_at", "2016-04-23 03:27:07.769458"], ["uuid", "41f7ef7e-0903-11e6-8ab3-6c4008a6fa2a"]]
507
-  (0.1ms) RELEASE SAVEPOINT active_record_1
508
-  (0.9ms) rollback transaction
1013
+ SQL (0.3ms) INSERT INTO "unique_models" ("created_at", "updated_at", "uuid") VALUES (?, ?, ?) [["created_at", "2016-04-29 03:10:26.843611"], ["updated_at", "2016-04-29 03:10:26.843611"], ["uuid", "ebd94412-0db7-11e6-a6c5-6c4008a6fa2a"]]
1014
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1015
+  (0.4ms) rollback transaction
1016
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1017
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: repia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David An
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-23 00:00:00.000000000 Z
11
+ date: 2016-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -90,6 +90,7 @@ extra_rdoc_files: []
90
90
  files:
91
91
  - lib/repia/core.rb
92
92
  - lib/repia/errors.rb
93
+ - lib/repia/middlewares.rb
93
94
  - lib/repia/version.rb
94
95
  - lib/repia.rb
95
96
  - lib/tasks/repia_tasks.rake