fastly-rails 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fastly-rails/action_controller/cache_control_headers.rb +2 -2
- data/lib/fastly-rails/action_controller/surrogate_key_headers.rb +11 -0
- data/lib/fastly-rails/active_record/surrogate_key.rb +4 -2
- data/lib/fastly-rails/client.rb +8 -0
- data/lib/fastly-rails/engine.rb +3 -2
- data/lib/fastly-rails/mongoid/surrogate_key.rb +2 -2
- data/lib/fastly-rails/rack/remove_set_cookie_header.rb +19 -0
- data/lib/fastly-rails/version.rb +1 -1
- data/test/dummy/log/test.log +669 -0
- data/test/dummy/test/lib/remove_set_cookie_header_test.rb +43 -0
- data/test/fastly-rails/client_test.rb +27 -0
- data/test/test_helper.rb +5 -2
- metadata +13 -10
- data/lib/fastly-rails/action_controller/surrogate_control_headers.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96ad775c62ad1a9feadeca838e58be31d012e992
|
4
|
+
data.tar.gz: 28cc744738033d1f209ba9835dccb4b536e4ae33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0819bd60b2aef49acbc14892084863ffd5d1344b247762d2f61ceb040dfddd5b93fb29ab77bc379eb130bf8c565cdc932ecc2b721e8ad5c1acc2e48b11635aa5
|
7
|
+
data.tar.gz: 222df845d6aebde41f8d709568c1f653c39810a28da7172eb0028f5fed346843fb68650ea28b01da2c0e6cd5314ba21f89c9f8f4820b3daefa3645973ce43ba1
|
@@ -2,10 +2,10 @@ module FastlyRails
|
|
2
2
|
module CacheControlHeaders
|
3
3
|
extend ActiveSupport::Concern
|
4
4
|
|
5
|
-
# Sets Cache-Control and Surrogate-Control headers
|
5
|
+
# Sets Cache-Control and Surrogate-Control HTTP headers
|
6
6
|
# Surrogate-Control is stripped at the cache, Cache-Control persists (in case of other caches in front of fastly)
|
7
7
|
# Defaults are:
|
8
|
-
# Cache-Control: 'public, no-cache
|
8
|
+
# Cache-Control: 'public, no-cache'
|
9
9
|
# Surrogate-Control: 'max-age: 30 days
|
10
10
|
# custom config example:
|
11
11
|
# {cache_control: 'public, no-cache, maxage=xyz', surrogate_control: 'max-age: blah'}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module FastlyRails
|
2
|
+
module SurrogateKeyHeaders
|
3
|
+
|
4
|
+
# Sets Surrogate-Key HTTP header with one or more keys
|
5
|
+
# strips session data from the request
|
6
|
+
def set_surrogate_key_header(*surrogate_keys)
|
7
|
+
request.session_options[:skip] = true # No Set-Cookie
|
8
|
+
response.headers['Surrogate-Key'] = surrogate_keys.join(' ')
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -1,4 +1,6 @@
|
|
1
1
|
# Adds surrogate key methods to ActiveRecord models
|
2
|
+
# Purge methods use a POST over PURGE
|
3
|
+
# The choice of this HTTP method should not effect anything
|
2
4
|
module FastlyRails
|
3
5
|
module ActiveRecord
|
4
6
|
module SurrogateKey
|
@@ -7,7 +9,7 @@ module FastlyRails
|
|
7
9
|
module ClassMethods
|
8
10
|
|
9
11
|
def purge_all
|
10
|
-
FastlyRails.
|
12
|
+
FastlyRails::Client.purge_by_key(table_key)
|
11
13
|
end
|
12
14
|
|
13
15
|
def table_key
|
@@ -28,7 +30,7 @@ module FastlyRails
|
|
28
30
|
end
|
29
31
|
|
30
32
|
def purge
|
31
|
-
FastlyRails.
|
33
|
+
FastlyRails::Client.purge_by_key(record_key)
|
32
34
|
end
|
33
35
|
|
34
36
|
def purge_all
|
data/lib/fastly-rails/client.rb
CHANGED
data/lib/fastly-rails/engine.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
require 'fastly-rails/active_record/surrogate_key'
|
2
2
|
require 'fastly-rails/mongoid/surrogate_key'
|
3
3
|
require 'fastly-rails/action_controller/cache_control_headers'
|
4
|
-
require 'fastly-rails/action_controller/
|
4
|
+
require 'fastly-rails/action_controller/surrogate_key_headers'
|
5
|
+
require 'fastly-rails/rack/remove_set_cookie_header'
|
5
6
|
|
6
7
|
module FastlyRails
|
7
8
|
class Engine < ::Rails::Engine
|
@@ -14,7 +15,7 @@ module FastlyRails
|
|
14
15
|
|
15
16
|
ActiveSupport.on_load :action_controller do
|
16
17
|
ActionController::Base.send :include, FastlyRails::CacheControlHeaders
|
17
|
-
ActionController::Base.send :include, FastlyRails::
|
18
|
+
ActionController::Base.send :include, FastlyRails::SurrogateKeyHeaders
|
18
19
|
end
|
19
20
|
|
20
21
|
ActiveSupport.on_load :active_record do
|
@@ -7,7 +7,7 @@ module FastlyRails
|
|
7
7
|
module ClassMethods
|
8
8
|
|
9
9
|
def purge_all
|
10
|
-
FastlyRails.
|
10
|
+
FastlyRails::Client.purge_by_key(table_key)
|
11
11
|
end
|
12
12
|
|
13
13
|
def table_key
|
@@ -28,7 +28,7 @@ module FastlyRails
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def purge
|
31
|
-
FastlyRails.
|
31
|
+
FastlyRails::Client.purge_by_key(record_key)
|
32
32
|
end
|
33
33
|
|
34
34
|
def purge_all
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module FastlyRails
|
2
|
+
module Rack
|
3
|
+
class RemoveSetCookieHeader
|
4
|
+
def initialize(app)
|
5
|
+
@app = app
|
6
|
+
end
|
7
|
+
|
8
|
+
def call(env)
|
9
|
+
status, headers, response = @app.call(env)
|
10
|
+
|
11
|
+
if headers["Surrogate-Control"] || headers["Surrogate-Key"]
|
12
|
+
headers.delete("Set-Cookie")
|
13
|
+
end
|
14
|
+
|
15
|
+
[status, headers, response]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/fastly-rails/version.rb
CHANGED
data/test/dummy/log/test.log
CHANGED
@@ -52168,3 +52168,672 @@ FastlyRails::CacheControlHeadersTest: test_sets_cache_control_headers_on_actionc
|
|
52168
52168
|
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52169
52169
|
[1m[35m (0.0ms)[0m begin transaction
|
52170
52170
|
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
52171
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
52172
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
52173
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
52174
|
+
--------------------------------
|
52175
|
+
BooksControllerTest: test_create
|
52176
|
+
--------------------------------
|
52177
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
52178
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-09-17 18:01:43.187272"], ["name", "Journey of the Brain"], ["updated_at", "2014-09-17 18:01:43.187272"]]
|
52179
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52180
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52181
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-09-17 18:01:43.190504"], ["name", "Champagne Thief"], ["updated_at", "2014-09-17 18:01:43.190504"]]
|
52182
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52183
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52184
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-09-17 18:01:43.192351"], ["name", "Hungry Wolves"], ["updated_at", "2014-09-17 18:01:43.192351"]]
|
52185
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52186
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52187
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-09-17 18:01:43.193121"], ["name", "A Fistful of Bloody Beast"], ["updated_at", "2014-09-17 18:01:43.193121"]]
|
52188
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52189
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52190
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-09-17 18:01:43.193878"], ["name", "Death Rain"], ["updated_at", "2014-09-17 18:01:43.193878"]]
|
52191
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52192
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "books"[0m
|
52193
|
+
Processing by BooksController#create as HTML
|
52194
|
+
Parameters: {"book"=>{"name"=>"newly-created-book"}}
|
52195
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
52196
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-09-17 18:01:43.198428"], ["name", "newly-created-book"], ["updated_at", "2014-09-17 18:01:43.198428"]]
|
52197
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52198
|
+
Redirected to http://test.host/books
|
52199
|
+
Completed 302 Found in 2ms (ActiveRecord: 0.2ms)
|
52200
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "books"[0m
|
52201
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
52202
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52203
|
+
-------------------------------
|
52204
|
+
BooksControllerTest: test_index
|
52205
|
+
-------------------------------
|
52206
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52207
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-09-17 18:01:43.201734"], ["name", "The Blow from 15154 Leagues"], ["updated_at", "2014-09-17 18:01:43.201734"]]
|
52208
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52209
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52210
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-09-17 18:01:43.202852"], ["name", "The Men from the Black Lagoon"], ["updated_at", "2014-09-17 18:01:43.202852"]]
|
52211
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52212
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52213
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-09-17 18:01:43.203802"], ["name", "The Hungry Beast from Mars"], ["updated_at", "2014-09-17 18:01:43.203802"]]
|
52214
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52215
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52216
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-09-17 18:01:43.204562"], ["name", "The Tentacle from 17486 Leagues"], ["updated_at", "2014-09-17 18:01:43.204562"]]
|
52217
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52218
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52219
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-09-17 18:01:43.205277"], ["name", "Nuclear Jungle"], ["updated_at", "2014-09-17 18:01:43.205277"]]
|
52220
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52221
|
+
Processing by BooksController#index as HTML
|
52222
|
+
[1m[36mBook Load (0.1ms)[0m [1mSELECT "books".* FROM "books"[0m
|
52223
|
+
Completed 200 OK in 11ms (Views: 10.7ms | ActiveRecord: 0.1ms)
|
52224
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "books"
|
52225
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
52226
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52227
|
+
----------------------------------------------------
|
52228
|
+
BooksControllerTest: test_index_with_multiple_params
|
52229
|
+
----------------------------------------------------
|
52230
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52231
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-09-17 18:01:43.220676"], ["name", "Dr. Rain"], ["updated_at", "2014-09-17 18:01:43.220676"]]
|
52232
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52233
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52234
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-09-17 18:01:43.221842"], ["name", "Legend of Death Pickpocket"], ["updated_at", "2014-09-17 18:01:43.221842"]]
|
52235
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52236
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52237
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-09-17 18:01:43.222726"], ["name", "The Nuclear Identity Who Fell to Earth"], ["updated_at", "2014-09-17 18:01:43.222726"]]
|
52238
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52239
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52240
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-09-17 18:01:43.223407"], ["name", "Hungry Demon"], ["updated_at", "2014-09-17 18:01:43.223407"]]
|
52241
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52242
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52243
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-09-17 18:01:43.224072"], ["name", "Danger Men"], ["updated_at", "2014-09-17 18:01:43.224072"]]
|
52244
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52245
|
+
Processing by BooksController#index as HTML
|
52246
|
+
[1m[35mBook Load (0.1ms)[0m SELECT "books".* FROM "books"
|
52247
|
+
Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.1ms)
|
52248
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
52249
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52250
|
+
------------------------------
|
52251
|
+
BooksControllerTest: test_show
|
52252
|
+
------------------------------
|
52253
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52254
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-09-17 18:01:43.228833"], ["name", "Electric Gypsy"], ["updated_at", "2014-09-17 18:01:43.228833"]]
|
52255
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52256
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52257
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-09-17 18:01:43.230586"], ["name", "Christmas on Kulas Stream"], ["updated_at", "2014-09-17 18:01:43.230586"]]
|
52258
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52259
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52260
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-09-17 18:01:43.232157"], ["name", "The Hills That Came to Dinner"], ["updated_at", "2014-09-17 18:01:43.232157"]]
|
52261
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52262
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52263
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-09-17 18:01:43.232963"], ["name", "The Witch with a Thousand Faces"], ["updated_at", "2014-09-17 18:01:43.232963"]]
|
52264
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52265
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52266
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-09-17 18:01:43.233636"], ["name", "The Champagne Jungle Who Fell to Earth"], ["updated_at", "2014-09-17 18:01:43.233636"]]
|
52267
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52268
|
+
Processing by BooksController#show as HTML
|
52269
|
+
Parameters: {"id"=>"1"}
|
52270
|
+
[1m[35mBook Load (0.1ms)[0m SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", 1]]
|
52271
|
+
Completed 200 OK in 3ms (Views: 1.5ms | ActiveRecord: 0.1ms)
|
52272
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
52273
|
+
[1m[35m (0.1ms)[0m begin transaction
|
52274
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52275
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52276
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52277
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52278
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52279
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52280
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52281
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52282
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52283
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52284
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52285
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52286
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52287
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52288
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
52289
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52290
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52291
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52292
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52293
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52294
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52295
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52296
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52297
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52298
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52299
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52300
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52301
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52302
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52303
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52304
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52305
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52306
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52307
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52308
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52309
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52310
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52311
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52312
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52313
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52314
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52315
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52316
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52317
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52318
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52319
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52320
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
52321
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52322
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52323
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52324
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
52325
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52326
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52327
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52328
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52329
|
+
[1m[35m (0.1ms)[0m begin transaction
|
52330
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52331
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52332
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
52333
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "books" ("created_at", "id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 18:01:43.260913"], ["id", 1], ["name", "Case of the Missing Cat"], ["updated_at", "2014-09-17 18:01:43.260913"]]
|
52334
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52335
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
52336
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
52337
|
+
[1m[35m (0.0ms)[0m commit transaction
|
52338
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52339
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52340
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "books" ("created_at", "id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-17 18:01:43.264408"], ["id", 1], ["name", "The Mutant from Candlewood Country Club"], ["updated_at", "2014-09-17 18:01:43.264408"]]
|
52341
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52342
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
52343
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52344
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52345
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52346
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52347
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "books" ("created_at", "id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 18:01:43.266995"], ["id", 1], ["name", "Hungry Wizard 2: Son of Hungry Wizard"], ["updated_at", "2014-09-17 18:01:43.266995"]]
|
52348
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52349
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
52350
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
52351
|
+
[1m[35m (0.0ms)[0m commit transaction
|
52352
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52353
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
52354
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52355
|
+
[1m[35m (0.0ms)[0m commit transaction
|
52356
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52357
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52358
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "books" ("created_at", "id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-17 18:01:43.270523"], ["id", 1], ["name", "Red Cat"], ["updated_at", "2014-09-17 18:01:43.270523"]]
|
52359
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52360
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
52361
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52362
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52363
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52364
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52365
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52366
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52367
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52368
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52369
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52370
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52371
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52372
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52373
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52374
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52375
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52376
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52377
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52378
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52379
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52380
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52381
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52382
|
+
-----------------------------------------------------------------------
|
52383
|
+
FastlyHeadersTest: test_/books/:id_show_page_should_have_fastly_headers
|
52384
|
+
-----------------------------------------------------------------------
|
52385
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52386
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "books" ("created_at", "id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 18:01:43.276327"], ["id", 1], ["name", "Fly 2: Electric Boogaloo"], ["updated_at", "2014-09-17 18:01:43.276327"]]
|
52387
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52388
|
+
Started GET "/books/1" for 127.0.0.1 at 2014-09-17 11:01:43 -0700
|
52389
|
+
Processing by BooksController#show as HTML
|
52390
|
+
Parameters: {"id"=>"1"}
|
52391
|
+
[1m[35mBook Load (0.1ms)[0m SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", 1]]
|
52392
|
+
Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.1ms)
|
52393
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
52394
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52395
|
+
--------------------------------------------------------------------
|
52396
|
+
FastlyHeadersTest: test_/books_index_page_should_have_fastly_headers
|
52397
|
+
--------------------------------------------------------------------
|
52398
|
+
Started GET "/books" for 127.0.0.1 at 2014-09-17 11:01:43 -0700
|
52399
|
+
Processing by BooksController#index as HTML
|
52400
|
+
[1m[36mBook Load (0.1ms)[0m [1mSELECT "books".* FROM "books"[0m
|
52401
|
+
Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.1ms)
|
52402
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
52403
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52404
|
+
----------------------------------------------------------------------------------------------
|
52405
|
+
FastlyHeadersTest: test_DELETE_/books/:id_should_not_have_fastly_headers/_fastly_header_values
|
52406
|
+
----------------------------------------------------------------------------------------------
|
52407
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52408
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "books" ("created_at", "id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-17 18:01:43.290132"], ["id", 1], ["name", "Green Woman"], ["updated_at", "2014-09-17 18:01:43.290132"]]
|
52409
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52410
|
+
Started DELETE "/books/1" for 127.0.0.1 at 2014-09-17 11:01:43 -0700
|
52411
|
+
Processing by BooksController#destroy as HTML
|
52412
|
+
Parameters: {"id"=>"1"}
|
52413
|
+
[1m[36mBook Load (0.0ms)[0m [1mSELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1[0m [["id", 1]]
|
52414
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52415
|
+
[1m[36mSQL (0.3ms)[0m [1mDELETE FROM "books" WHERE "books"."id" = ?[0m [["id", 1]]
|
52416
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52417
|
+
Redirected to http://www.example.com/books
|
52418
|
+
Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
|
52419
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "books" WHERE "books"."id" = 1[0m
|
52420
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
52421
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52422
|
+
----------------------------------------------------------------------------------------
|
52423
|
+
FastlyHeadersTest: test_POST_/books_should_not_have_fastly_headers/_fastly_header_values
|
52424
|
+
----------------------------------------------------------------------------------------
|
52425
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "books"
|
52426
|
+
Started POST "/books" for 127.0.0.1 at 2014-09-17 11:01:43 -0700
|
52427
|
+
Processing by BooksController#create as HTML
|
52428
|
+
Parameters: {"book"=>{"name"=>"some new book"}}
|
52429
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
52430
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-09-17 18:01:43.300532"], ["name", "some new book"], ["updated_at", "2014-09-17 18:01:43.300532"]]
|
52431
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52432
|
+
Redirected to http://www.example.com/books
|
52433
|
+
Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
|
52434
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "books"
|
52435
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
52436
|
+
[1m[35m (0.1ms)[0m begin transaction
|
52437
|
+
-------------------------------------------------------------------------------------------
|
52438
|
+
FastlyHeadersTest: test_PUT_/books/:id_should_not_have_fastly_headers/_fastly_header_values
|
52439
|
+
-------------------------------------------------------------------------------------------
|
52440
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52441
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "books" ("created_at", "id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 18:01:43.304449"], ["id", 1], ["name", "some new book"], ["updated_at", "2014-09-17 18:01:43.304449"]]
|
52442
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52443
|
+
Started PUT "/books/1" for 127.0.0.1 at 2014-09-17 11:01:43 -0700
|
52444
|
+
Processing by BooksController#update as HTML
|
52445
|
+
Parameters: {"id"=>"1", "book"=>{"name"=>"changed book"}}
|
52446
|
+
[1m[35mBook Load (0.1ms)[0m SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", 1]]
|
52447
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52448
|
+
[1m[35mSQL (0.4ms)[0m UPDATE "books" SET "name" = ?, "updated_at" = ? WHERE "books"."id" = 1 [["name", "changed book"], ["updated_at", "2014-09-17 18:01:43.308155"]]
|
52449
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52450
|
+
Redirected to http://www.example.com/books/1
|
52451
|
+
Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
|
52452
|
+
[1m[35mBook Load (0.0ms)[0m SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", 1]]
|
52453
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
52454
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52455
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52456
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52457
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52458
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52459
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52460
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52461
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52462
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52463
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52464
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52465
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52466
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52467
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52468
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52469
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52470
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52471
|
+
-------------------------------------------------------------------------------------------------
|
52472
|
+
FastlyRails::CacheControlHeadersTest: test_sets_cache_control_headers_on_actioncontroller_request
|
52473
|
+
-------------------------------------------------------------------------------------------------
|
52474
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52475
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52476
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52477
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52478
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52479
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "books" ("created_at", "id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 18:01:43.318417"], ["id", 1], ["name", "Return of the Brains"], ["updated_at", "2014-09-17 18:01:43.318417"]]
|
52480
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52481
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
52482
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52483
|
+
[1m[35m (0.0ms)[0m commit transaction
|
52484
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52485
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52486
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "books" ("created_at", "id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-17 18:01:43.320887"], ["id", 1], ["name", "The Men from Mars"], ["updated_at", "2014-09-17 18:01:43.320887"]]
|
52487
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52488
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
52489
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52490
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52491
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52492
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52493
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52494
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52495
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52496
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
52497
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52498
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52499
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52500
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
52501
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52502
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52503
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52504
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52505
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
52506
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
52507
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
52508
|
+
[1m[35m (0.0ms)[0m commit transaction
|
52509
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52510
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
52511
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52512
|
+
[1m[35m (0.0ms)[0m commit transaction
|
52513
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52514
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
52515
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52516
|
+
[1m[35m (0.0ms)[0m commit transaction
|
52517
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52518
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
52519
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52520
|
+
-----------------------------------------------------------------------
|
52521
|
+
FastlyHeadersTest: test_/books/:id_show_page_should_have_fastly_headers
|
52522
|
+
-----------------------------------------------------------------------
|
52523
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
52524
|
+
[1m[36mSQL (0.9ms)[0m [1mINSERT INTO "books" ("created_at", "id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-23 19:32:15.036617"], ["id", 1], ["name", "The Black Rose of England"], ["updated_at", "2014-09-23 19:32:15.036617"]]
|
52525
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
52526
|
+
Started GET "/books/1" for 127.0.0.1 at 2014-09-23 12:32:15 -0700
|
52527
|
+
Processing by BooksController#show as HTML
|
52528
|
+
Parameters: {"id"=>"1"}
|
52529
|
+
[1m[36mBook Load (0.1ms)[0m [1mSELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1[0m [["id", 1]]
|
52530
|
+
Rendered books/show.html.erb within layouts/application (1.2ms)
|
52531
|
+
Completed 200 OK in 15ms (Views: 13.4ms | ActiveRecord: 0.1ms)
|
52532
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
52533
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52534
|
+
--------------------------------------------------------------------
|
52535
|
+
FastlyHeadersTest: test_/books_index_page_should_have_fastly_headers
|
52536
|
+
--------------------------------------------------------------------
|
52537
|
+
Started GET "/books" for 127.0.0.1 at 2014-09-23 12:32:15 -0700
|
52538
|
+
Processing by BooksController#index as HTML
|
52539
|
+
[1m[35mBook Load (0.1ms)[0m SELECT "books".* FROM "books"
|
52540
|
+
Completed 200 OK in 3ms (Views: 1.9ms | ActiveRecord: 0.1ms)
|
52541
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
52542
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52543
|
+
----------------------------------------------------------------------------------------------
|
52544
|
+
FastlyHeadersTest: test_DELETE_/books/:id_should_not_have_fastly_headers/_fastly_header_values
|
52545
|
+
----------------------------------------------------------------------------------------------
|
52546
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
52547
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "books" ("created_at", "id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-23 19:32:15.136051"], ["id", 1], ["name", "Planet of the Hungry Man"], ["updated_at", "2014-09-23 19:32:15.136051"]]
|
52548
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52549
|
+
Started DELETE "/books/1" for 127.0.0.1 at 2014-09-23 12:32:15 -0700
|
52550
|
+
Processing by BooksController#destroy as HTML
|
52551
|
+
Parameters: {"id"=>"1"}
|
52552
|
+
[1m[35mBook Load (0.0ms)[0m SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", 1]]
|
52553
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52554
|
+
[1m[35mSQL (0.7ms)[0m DELETE FROM "books" WHERE "books"."id" = ? [["id", 1]]
|
52555
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52556
|
+
Redirected to http://www.example.com/books
|
52557
|
+
Completed 302 Found in 2ms (ActiveRecord: 0.9ms)
|
52558
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "books" WHERE "books"."id" = 1
|
52559
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
52560
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52561
|
+
----------------------------------------------------------------------------------------
|
52562
|
+
FastlyHeadersTest: test_POST_/books_should_not_have_fastly_headers/_fastly_header_values
|
52563
|
+
----------------------------------------------------------------------------------------
|
52564
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "books"[0m
|
52565
|
+
Started POST "/books" for 127.0.0.1 at 2014-09-23 12:32:15 -0700
|
52566
|
+
Processing by BooksController#create as HTML
|
52567
|
+
Parameters: {"book"=>{"name"=>"some new book"}}
|
52568
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
52569
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-09-23 19:32:15.148477"], ["name", "some new book"], ["updated_at", "2014-09-23 19:32:15.148477"]]
|
52570
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52571
|
+
Redirected to http://www.example.com/books
|
52572
|
+
Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
|
52573
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "books"[0m
|
52574
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
52575
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52576
|
+
-------------------------------------------------------------------------------------------
|
52577
|
+
FastlyHeadersTest: test_PUT_/books/:id_should_not_have_fastly_headers/_fastly_header_values
|
52578
|
+
-------------------------------------------------------------------------------------------
|
52579
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52580
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "books" ("created_at", "id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-23 19:32:15.152152"], ["id", 1], ["name", "some new book"], ["updated_at", "2014-09-23 19:32:15.152152"]]
|
52581
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52582
|
+
Started PUT "/books/1" for 127.0.0.1 at 2014-09-23 12:32:15 -0700
|
52583
|
+
Processing by BooksController#update as HTML
|
52584
|
+
Parameters: {"id"=>"1", "book"=>{"name"=>"changed book"}}
|
52585
|
+
[1m[36mBook Load (0.1ms)[0m [1mSELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1[0m [["id", 1]]
|
52586
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52587
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "books" SET "name" = ?, "updated_at" = ? WHERE "books"."id" = 1[0m [["name", "changed book"], ["updated_at", "2014-09-23 19:32:15.155582"]]
|
52588
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52589
|
+
Redirected to http://www.example.com/books/1
|
52590
|
+
Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
|
52591
|
+
[1m[36mBook Load (0.0ms)[0m [1mSELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1[0m [["id", 1]]
|
52592
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
52593
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52594
|
+
[1m[35m (0.0ms)[0m commit transaction
|
52595
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52596
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
52597
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
52598
|
+
[1m[35m (0.0ms)[0m commit transaction
|
52599
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52600
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
52601
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52602
|
+
[1m[35m (0.0ms)[0m commit transaction
|
52603
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52604
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
52605
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52606
|
+
[1m[35m (0.0ms)[0m commit transaction
|
52607
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52608
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
52609
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52610
|
+
[1m[35m (0.0ms)[0m commit transaction
|
52611
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52612
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
52613
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
52614
|
+
[1m[35m (0.0ms)[0m commit transaction
|
52615
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52616
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
52617
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52618
|
+
[1m[35m (0.0ms)[0m commit transaction
|
52619
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52620
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
52621
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52622
|
+
[1m[35m (0.0ms)[0m commit transaction
|
52623
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52624
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
52625
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52626
|
+
[1m[35m (0.0ms)[0m commit transaction
|
52627
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52628
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
52629
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52630
|
+
[1m[35m (0.0ms)[0m commit transaction
|
52631
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52632
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
52633
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "books" ("created_at", "id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-23 19:32:15.174107"], ["id", 1], ["name", "Je Vous Presente, Adah"], ["updated_at", "2014-09-23 19:32:15.174107"]]
|
52634
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52635
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
52636
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52637
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52638
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52639
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52640
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "books" ("created_at", "id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-23 19:32:15.176619"], ["id", 1], ["name", "Hungry Tears"], ["updated_at", "2014-09-23 19:32:15.176619"]]
|
52641
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52642
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
52643
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
52644
|
+
[1m[35m (0.0ms)[0m commit transaction
|
52645
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52646
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
52647
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52648
|
+
[1m[35m (0.0ms)[0m commit transaction
|
52649
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52650
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
52651
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52652
|
+
[1m[35m (0.0ms)[0m commit transaction
|
52653
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52654
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
52655
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52656
|
+
[1m[35m (0.0ms)[0m commit transaction
|
52657
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52658
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
52659
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52660
|
+
[1m[35m (0.0ms)[0m commit transaction
|
52661
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52662
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
52663
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52664
|
+
[1m[35m (0.0ms)[0m commit transaction
|
52665
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52666
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
52667
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52668
|
+
--------------------------------
|
52669
|
+
BooksControllerTest: test_create
|
52670
|
+
--------------------------------
|
52671
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52672
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-09-23 19:32:15.217106"], ["name", "I am Brain"], ["updated_at", "2014-09-23 19:32:15.217106"]]
|
52673
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52674
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52675
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-09-23 19:32:15.218367"], ["name", "The Hills Without a Diaries"], ["updated_at", "2014-09-23 19:32:15.218367"]]
|
52676
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52677
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52678
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-09-23 19:32:15.219328"], ["name", "Return of the Action Witch"], ["updated_at", "2014-09-23 19:32:15.219328"]]
|
52679
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52680
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52681
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-09-23 19:32:15.219987"], ["name", "Dr. Cat"], ["updated_at", "2014-09-23 19:32:15.219987"]]
|
52682
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52683
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52684
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-09-23 19:32:15.220639"], ["name", "The Beast from Across the Ocean"], ["updated_at", "2014-09-23 19:32:15.220639"]]
|
52685
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52686
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "books"[0m
|
52687
|
+
Processing by BooksController#create as HTML
|
52688
|
+
Parameters: {"book"=>{"name"=>"newly-created-book"}}
|
52689
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52690
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-09-23 19:32:15.223562"], ["name", "newly-created-book"], ["updated_at", "2014-09-23 19:32:15.223562"]]
|
52691
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52692
|
+
Redirected to http://test.host/books
|
52693
|
+
Completed 302 Found in 1ms (ActiveRecord: 0.1ms)
|
52694
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "books"[0m
|
52695
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
52696
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52697
|
+
-------------------------------
|
52698
|
+
BooksControllerTest: test_index
|
52699
|
+
-------------------------------
|
52700
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52701
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-09-23 19:32:15.226354"], ["name", "I Married a Clash"], ["updated_at", "2014-09-23 19:32:15.226354"]]
|
52702
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52703
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52704
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-09-23 19:32:15.227244"], ["name", "Case of the Missing Flying Men"], ["updated_at", "2014-09-23 19:32:15.227244"]]
|
52705
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52706
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52707
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-09-23 19:32:15.228162"], ["name", "The Men from Mars"], ["updated_at", "2014-09-23 19:32:15.228162"]]
|
52708
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52709
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
52710
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-09-23 19:32:15.229656"], ["name", "Flying Witch: The Ralph Rosenbaum Story"], ["updated_at", "2014-09-23 19:32:15.229656"]]
|
52711
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52712
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52713
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-09-23 19:32:15.230761"], ["name", "Tokyo Brains"], ["updated_at", "2014-09-23 19:32:15.230761"]]
|
52714
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52715
|
+
Processing by BooksController#index as HTML
|
52716
|
+
[1m[36mBook Load (0.1ms)[0m [1mSELECT "books".* FROM "books"[0m
|
52717
|
+
Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.1ms)
|
52718
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "books"
|
52719
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
52720
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52721
|
+
----------------------------------------------------
|
52722
|
+
BooksControllerTest: test_index_with_multiple_params
|
52723
|
+
----------------------------------------------------
|
52724
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52725
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-09-23 19:32:15.235737"], ["name", "Flying Rain"], ["updated_at", "2014-09-23 19:32:15.235737"]]
|
52726
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52727
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52728
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-09-23 19:32:15.236805"], ["name", "The Forbidden Gypsy from Outer Space"], ["updated_at", "2014-09-23 19:32:15.236805"]]
|
52729
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52730
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52731
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-09-23 19:32:15.237695"], ["name", "Tokyo Women"], ["updated_at", "2014-09-23 19:32:15.237695"]]
|
52732
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52733
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52734
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-09-23 19:32:15.238374"], ["name", "Red Blow"], ["updated_at", "2014-09-23 19:32:15.238374"]]
|
52735
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52736
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52737
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-09-23 19:32:15.239030"], ["name", "The Wolf Who Fell to Earth"], ["updated_at", "2014-09-23 19:32:15.239030"]]
|
52738
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52739
|
+
Processing by BooksController#index as HTML
|
52740
|
+
[1m[35mBook Load (0.1ms)[0m SELECT "books".* FROM "books"
|
52741
|
+
Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.1ms)
|
52742
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
52743
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52744
|
+
------------------------------
|
52745
|
+
BooksControllerTest: test_show
|
52746
|
+
------------------------------
|
52747
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52748
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-09-23 19:32:15.243644"], ["name", "Invasion of the Hills"], ["updated_at", "2014-09-23 19:32:15.243644"]]
|
52749
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52750
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52751
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-09-23 19:32:15.244869"], ["name", "I am Mutant"], ["updated_at", "2014-09-23 19:32:15.244869"]]
|
52752
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52753
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52754
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-09-23 19:32:15.245820"], ["name", "Ultra Gypsy"], ["updated_at", "2014-09-23 19:32:15.245820"]]
|
52755
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52756
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52757
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-09-23 19:32:15.246507"], ["name", "Legend of Men"], ["updated_at", "2014-09-23 19:32:15.246507"]]
|
52758
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52759
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52760
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-09-23 19:32:15.247173"], ["name", "The Red Monster That Came to Dinner"], ["updated_at", "2014-09-23 19:32:15.247173"]]
|
52761
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52762
|
+
Processing by BooksController#show as HTML
|
52763
|
+
Parameters: {"id"=>"1"}
|
52764
|
+
[1m[35mBook Load (0.0ms)[0m SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", 1]]
|
52765
|
+
Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)
|
52766
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
52767
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52768
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52769
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52770
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52771
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52772
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52773
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52774
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52775
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52776
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52777
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52778
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52779
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52780
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52781
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52782
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52783
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52784
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52785
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52786
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52787
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52788
|
+
-------------------------------------------------------------------------------------------------
|
52789
|
+
FastlyRails::CacheControlHeadersTest: test_sets_cache_control_headers_on_actioncontroller_request
|
52790
|
+
-------------------------------------------------------------------------------------------------
|
52791
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52792
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52793
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52794
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52795
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52796
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "books" ("created_at", "id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-23 19:32:15.255779"], ["id", 1], ["name", "Day of the Dangerous Wizard"], ["updated_at", "2014-09-23 19:32:15.255779"]]
|
52797
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52798
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
52799
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52800
|
+
[1m[35m (0.0ms)[0m commit transaction
|
52801
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52802
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52803
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "books" ("created_at", "id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-23 19:32:15.258288"], ["id", 1], ["name", "Blue Witch"], ["updated_at", "2014-09-23 19:32:15.258288"]]
|
52804
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52805
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
52806
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52807
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52808
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52809
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52810
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52811
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52812
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52813
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
52814
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "books" ("created_at", "id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-23 19:32:15.261219"], ["id", 1], ["name", "War of the Jungle"], ["updated_at", "2014-09-23 19:32:15.261219"]]
|
52815
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
52816
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
52817
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52818
|
+
[1m[35m (0.0ms)[0m commit transaction
|
52819
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
52820
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
52821
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "books" ("created_at", "id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-23 19:32:15.263373"], ["id", 1], ["name", "The Cat from the Black Lagoon"], ["updated_at", "2014-09-23 19:32:15.263373"]]
|
52822
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
52823
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
52824
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52825
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52826
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52827
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52828
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52829
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52830
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52831
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52832
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52833
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52834
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52835
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
52836
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52837
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
52838
|
+
[1m[35m (0.0ms)[0m begin transaction
|
52839
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
@@ -0,0 +1,43 @@
|
|
1
|
+
describe FastlyRails::Rack::RemoveSetCookieHeader do
|
2
|
+
it "removes 'set-cookie' header if 'surrogate-control' header present" do
|
3
|
+
headers = { "Surrogate-Control" => "test", "Set-Cookie" => "NOOO" }
|
4
|
+
|
5
|
+
app = Rack::Builder.new do
|
6
|
+
use FastlyRails::Rack::RemoveSetCookieHeader
|
7
|
+
run lambda { |env| Rack::Response.new("", 200, headers).finish }
|
8
|
+
end
|
9
|
+
|
10
|
+
env = Rack::MockRequest.env_for('/')
|
11
|
+
response = Rack::MockResponse.new(*app.call(env))
|
12
|
+
|
13
|
+
assert_nil response.headers['Set-Cookie']
|
14
|
+
end
|
15
|
+
|
16
|
+
it "removes 'set-cookie' header if 'surrogate-key' header present" do
|
17
|
+
headers = { "Surrogate-Key" => "test", "Set-Cookie" => "NOOO" }
|
18
|
+
|
19
|
+
app = Rack::Builder.new do
|
20
|
+
use FastlyRails::Rack::RemoveSetCookieHeader
|
21
|
+
run lambda { |env| Rack::Response.new("", 200, headers).finish }
|
22
|
+
end
|
23
|
+
|
24
|
+
env = Rack::MockRequest.env_for('/')
|
25
|
+
response = Rack::MockResponse.new(*app.call(env))
|
26
|
+
|
27
|
+
assert_nil response.headers['Set-Cookie']
|
28
|
+
end
|
29
|
+
|
30
|
+
it "keeps 'set-cookie' if no 'surrogate-control' or 'surrogate-key'" do
|
31
|
+
headers = { "Set-Cookie" => "yes!!" }
|
32
|
+
|
33
|
+
app = Rack::Builder.new do
|
34
|
+
use FastlyRails::Rack::RemoveSetCookieHeader
|
35
|
+
run lambda { |env| Rack::Response.new("", 200, headers).finish }
|
36
|
+
end
|
37
|
+
|
38
|
+
env = Rack::MockRequest.env_for('/')
|
39
|
+
response = Rack::MockResponse.new(*app.call(env))
|
40
|
+
|
41
|
+
assert_equal response.headers['Set-Cookie'], "yes!!"
|
42
|
+
end
|
43
|
+
end
|
@@ -33,4 +33,31 @@ describe FastlyRails::Client do
|
|
33
33
|
|
34
34
|
end
|
35
35
|
|
36
|
+
describe 'purge_by_key' do
|
37
|
+
it 'raises if purge called and no service id configured' do
|
38
|
+
FastlyRails.configuration.service_id = nil
|
39
|
+
|
40
|
+
assert_raises FastlyRails::NoServiceIdProvidedError do
|
41
|
+
client.purge_by_key('test')
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'should call Fastly::Client.post method with the purge url' do
|
46
|
+
FastlyRails.configuration.service_id = 'testly'
|
47
|
+
assert_equal "/service/#{FastlyRails.service_id}/purge/test", client.purge_url('test')
|
48
|
+
|
49
|
+
resp = client.purge_by_key('test')
|
50
|
+
assert_equal "ok", resp['status']
|
51
|
+
end
|
52
|
+
|
53
|
+
it 'should be authed' do
|
54
|
+
assert_equal true, client.fully_authed?
|
55
|
+
|
56
|
+
client.client.user = nil
|
57
|
+
client.client.password = nil
|
58
|
+
assert_equal false, client.fully_authed?
|
59
|
+
assert_equal true, client.authed?
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
36
63
|
end
|
data/test/test_helper.rb
CHANGED
@@ -28,12 +28,16 @@ class Minitest::Spec
|
|
28
28
|
include FactoryGirl::Syntax::Methods
|
29
29
|
|
30
30
|
before :each do
|
31
|
-
stub_request(:any,
|
31
|
+
stub_request(:any, "https://api.fastly.com/login").
|
32
32
|
to_return(
|
33
33
|
:status => 200,
|
34
34
|
:body => "{}",
|
35
35
|
:message => "{}"
|
36
36
|
)
|
37
|
+
stub_request(:post, /https:\/\/api.fastly.com\/service\/.*\/purge\/.*/)
|
38
|
+
.to_return(
|
39
|
+
body: "{\"status\":\"ok\"}"
|
40
|
+
)
|
37
41
|
|
38
42
|
DatabaseCleaner.start
|
39
43
|
end
|
@@ -63,5 +67,4 @@ class ActionDispatch::IntegrationTest
|
|
63
67
|
|
64
68
|
end
|
65
69
|
|
66
|
-
# Stub any request to api.fastly.com
|
67
70
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastly-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael May
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2014-09-
|
14
|
+
date: 2014-09-23 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
@@ -150,20 +150,19 @@ executables: []
|
|
150
150
|
extensions: []
|
151
151
|
extra_rdoc_files: []
|
152
152
|
files:
|
153
|
-
- MIT-LICENSE
|
154
|
-
- Rakefile
|
155
|
-
- lib/fastly-rails.rb
|
156
153
|
- lib/fastly-rails/action_controller/cache_control_headers.rb
|
157
|
-
- lib/fastly-rails/action_controller/
|
154
|
+
- lib/fastly-rails/action_controller/surrogate_key_headers.rb
|
158
155
|
- lib/fastly-rails/active_record/surrogate_key.rb
|
159
156
|
- lib/fastly-rails/client.rb
|
160
157
|
- lib/fastly-rails/configuration.rb
|
161
158
|
- lib/fastly-rails/engine.rb
|
162
159
|
- lib/fastly-rails/errors.rb
|
163
160
|
- lib/fastly-rails/mongoid/surrogate_key.rb
|
161
|
+
- lib/fastly-rails/rack/remove_set_cookie_header.rb
|
164
162
|
- lib/fastly-rails/version.rb
|
165
|
-
-
|
166
|
-
-
|
163
|
+
- lib/fastly-rails.rb
|
164
|
+
- MIT-LICENSE
|
165
|
+
- Rakefile
|
167
166
|
- test/dummy/app/assets/javascripts/application.js
|
168
167
|
- test/dummy/app/assets/stylesheets/application.css
|
169
168
|
- test/dummy/app/controllers/application_controller.rb
|
@@ -176,7 +175,6 @@ files:
|
|
176
175
|
- test/dummy/bin/bundle
|
177
176
|
- test/dummy/bin/rails
|
178
177
|
- test/dummy/bin/rake
|
179
|
-
- test/dummy/config.ru
|
180
178
|
- test/dummy/config/application.rb
|
181
179
|
- test/dummy/config/boot.rb
|
182
180
|
- test/dummy/config/database.yml
|
@@ -194,6 +192,7 @@ files:
|
|
194
192
|
- test/dummy/config/initializers/wrap_parameters.rb
|
195
193
|
- test/dummy/config/locales/en.yml
|
196
194
|
- test/dummy/config/routes.rb
|
195
|
+
- test/dummy/config.ru
|
197
196
|
- test/dummy/db/migrate/20140407202136_create_books.rb
|
198
197
|
- test/dummy/db/schema.rb
|
199
198
|
- test/dummy/db/test.sqlite3
|
@@ -203,10 +202,13 @@ files:
|
|
203
202
|
- test/dummy/public/422.html
|
204
203
|
- test/dummy/public/500.html
|
205
204
|
- test/dummy/public/favicon.ico
|
205
|
+
- test/dummy/Rakefile
|
206
|
+
- test/dummy/README.rdoc
|
206
207
|
- test/dummy/test/controllers/books_controller_test.rb
|
207
208
|
- test/dummy/test/factories/books.rb
|
208
209
|
- test/dummy/test/fixtures/books.yml
|
209
210
|
- test/dummy/test/integration/fastly_headers_test.rb
|
211
|
+
- test/dummy/test/lib/remove_set_cookie_header_test.rb
|
210
212
|
- test/dummy/test/models/book_test.rb
|
211
213
|
- test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705
|
212
214
|
- test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af
|
@@ -238,7 +240,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
238
240
|
version: '0'
|
239
241
|
requirements: []
|
240
242
|
rubyforge_project:
|
241
|
-
rubygems_version: 2.
|
243
|
+
rubygems_version: 2.0.14
|
242
244
|
signing_key:
|
243
245
|
specification_version: 4
|
244
246
|
summary: Fastly instant purging integration for Rails
|
@@ -288,6 +290,7 @@ test_files:
|
|
288
290
|
- test/dummy/test/factories/books.rb
|
289
291
|
- test/dummy/test/fixtures/books.yml
|
290
292
|
- test/dummy/test/integration/fastly_headers_test.rb
|
293
|
+
- test/dummy/test/lib/remove_set_cookie_header_test.rb
|
291
294
|
- test/dummy/test/models/book_test.rb
|
292
295
|
- test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705
|
293
296
|
- test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af
|
@@ -1,14 +0,0 @@
|
|
1
|
-
module FastlyRails
|
2
|
-
module SurrogateControlHeaders
|
3
|
-
# Sets Surrogate-Control header
|
4
|
-
# Defaults are:
|
5
|
-
# Cache-Control: 'public, no-cache, s-maxage: 30 days'
|
6
|
-
# Surrogate-Control: 'max-age: 30 days
|
7
|
-
# custom config example:
|
8
|
-
# {cache_control: 'blah, blah, blah', surrogate_control: 'max-age: blah'}
|
9
|
-
def set_surrogate_key_header(*surrogate_keys)
|
10
|
-
request.session_options[:skip] = true # no cookies
|
11
|
-
response.headers['Surrogate-Key'] = surrogate_keys.join(' ')
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|