fastly-rails 0.1.7 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/fastly-rails.rb +1 -1
- data/lib/fastly-rails/client.rb +1 -0
- data/lib/fastly-rails/configuration.rb +1 -1
- data/lib/fastly-rails/errors.rb +1 -1
- data/lib/fastly-rails/version.rb +1 -1
- data/test/dummy/log/test.log +335 -0
- data/test/fastly-rails/configuration_test.rb +4 -5
- data/test/fastly-rails_test.rb +1 -11
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8918d904c0624fdf6caab3e74b1eb248faba565e
|
4
|
+
data.tar.gz: c6a42d20c196a1e7f4bb5ec2da05a287a5eb9a6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 040273cea894f45524934a15f6dd0efe5f04448eb938b9bf75e14a3488acf53d7dbae67eab2fb2da505a23517d021265678949d1bd6f9a9028c5102348ef091e
|
7
|
+
data.tar.gz: 9b6646a08090ed4b76f00b6f5ea78d56ac9bb561c67409556f9abe829aa5905ec307369baec76463506012416f5cec44f398bf30e7639d447d6dffe3c6e7eff2
|
data/lib/fastly-rails.rb
CHANGED
@@ -21,7 +21,7 @@ module FastlyRails
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def self.client
|
24
|
-
raise
|
24
|
+
raise NoAPIKeyProvidedError unless configuration.authenticatable?
|
25
25
|
|
26
26
|
@client ||= Client.new(
|
27
27
|
:api_key => configuration.api_key,
|
data/lib/fastly-rails/client.rb
CHANGED
data/lib/fastly-rails/errors.rb
CHANGED
data/lib/fastly-rails/version.rb
CHANGED
data/test/dummy/log/test.log
CHANGED
@@ -62921,3 +62921,338 @@ Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
|
|
62921
62921
|
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
62922
62922
|
[1m[35m (0.0ms)[0m begin transaction
|
62923
62923
|
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
62924
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
62925
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
62926
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
62927
|
+
[1m[35m (0.0ms)[0m commit transaction
|
62928
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
62929
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
62930
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
62931
|
+
[1m[35m (0.0ms)[0m commit transaction
|
62932
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
62933
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
62934
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
62935
|
+
[1m[35m (0.0ms)[0m commit transaction
|
62936
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
62937
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
62938
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
62939
|
+
-----------------------------------------------------------------------
|
62940
|
+
FastlyHeadersTest: test_/books/:id_show_page_should_have_fastly_headers
|
62941
|
+
-----------------------------------------------------------------------
|
62942
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
62943
|
+
[1m[36mSQL (1.1ms)[0m [1mINSERT INTO "books" ("created_at", "id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-10-02 08:24:31.462379"], ["id", 1], ["name", "When Cicero Met Abdiel"], ["updated_at", "2014-10-02 08:24:31.462379"]]
|
62944
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
62945
|
+
Started GET "/books/1" for 127.0.0.1 at 2014-10-02 01:24:31 -0700
|
62946
|
+
Processing by BooksController#show as HTML
|
62947
|
+
Parameters: {"id"=>"1"}
|
62948
|
+
[1m[36mBook Load (0.1ms)[0m [1mSELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1[0m [["id", 1]]
|
62949
|
+
Rendered books/show.html.erb within layouts/application (1.2ms)
|
62950
|
+
Completed 200 OK in 17ms (Views: 15.6ms | ActiveRecord: 0.1ms)
|
62951
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
62952
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
62953
|
+
--------------------------------------------------------------------
|
62954
|
+
FastlyHeadersTest: test_/books_index_page_should_have_fastly_headers
|
62955
|
+
--------------------------------------------------------------------
|
62956
|
+
Started GET "/books" for 127.0.0.1 at 2014-10-02 01:24:31 -0700
|
62957
|
+
Processing by BooksController#index as HTML
|
62958
|
+
[1m[35mBook Load (0.1ms)[0m SELECT "books".* FROM "books"
|
62959
|
+
Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.1ms)
|
62960
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
62961
|
+
[1m[35m (0.0ms)[0m begin transaction
|
62962
|
+
----------------------------------------------------------------------------------------------
|
62963
|
+
FastlyHeadersTest: test_DELETE_/books/:id_should_not_have_fastly_headers/_fastly_header_values
|
62964
|
+
----------------------------------------------------------------------------------------------
|
62965
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
62966
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "books" ("created_at", "id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-10-02 08:24:31.573782"], ["id", 1], ["name", "Planet of the Death Friday"], ["updated_at", "2014-10-02 08:24:31.573782"]]
|
62967
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
62968
|
+
Started DELETE "/books/1" for 127.0.0.1 at 2014-10-02 01:24:31 -0700
|
62969
|
+
Processing by BooksController#destroy as HTML
|
62970
|
+
Parameters: {"id"=>"1"}
|
62971
|
+
[1m[35mBook Load (0.0ms)[0m SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", 1]]
|
62972
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
62973
|
+
[1m[35mSQL (0.8ms)[0m DELETE FROM "books" WHERE "books"."id" = ? [["id", 1]]
|
62974
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
62975
|
+
Redirected to http://www.example.com/books
|
62976
|
+
Completed 302 Found in 2ms (ActiveRecord: 1.0ms)
|
62977
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "books" WHERE "books"."id" = 1
|
62978
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
62979
|
+
[1m[35m (0.0ms)[0m begin transaction
|
62980
|
+
----------------------------------------------------------------------------------------
|
62981
|
+
FastlyHeadersTest: test_POST_/books_should_not_have_fastly_headers/_fastly_header_values
|
62982
|
+
----------------------------------------------------------------------------------------
|
62983
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "books"[0m
|
62984
|
+
Started POST "/books" for 127.0.0.1 at 2014-10-02 01:24:31 -0700
|
62985
|
+
Processing by BooksController#create as HTML
|
62986
|
+
Parameters: {"book"=>{"name"=>"some new book"}}
|
62987
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
62988
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-10-02 08:24:31.586141"], ["name", "some new book"], ["updated_at", "2014-10-02 08:24:31.586141"]]
|
62989
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
62990
|
+
Redirected to http://www.example.com/books
|
62991
|
+
Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
|
62992
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "books"[0m
|
62993
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
62994
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
62995
|
+
-------------------------------------------------------------------------------------------
|
62996
|
+
FastlyHeadersTest: test_PUT_/books/:id_should_not_have_fastly_headers/_fastly_header_values
|
62997
|
+
-------------------------------------------------------------------------------------------
|
62998
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
62999
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "books" ("created_at", "id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-10-02 08:24:31.589552"], ["id", 1], ["name", "some new book"], ["updated_at", "2014-10-02 08:24:31.589552"]]
|
63000
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
63001
|
+
Started PUT "/books/1" for 127.0.0.1 at 2014-10-02 01:24:31 -0700
|
63002
|
+
Processing by BooksController#update as HTML
|
63003
|
+
Parameters: {"id"=>"1", "book"=>{"name"=>"changed book"}}
|
63004
|
+
[1m[36mBook Load (0.0ms)[0m [1mSELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1[0m [["id", 1]]
|
63005
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
63006
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "books" SET "name" = ?, "updated_at" = ? WHERE "books"."id" = 1[0m [["name", "changed book"], ["updated_at", "2014-10-02 08:24:31.592648"]]
|
63007
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
63008
|
+
Redirected to http://www.example.com/books/1
|
63009
|
+
Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
|
63010
|
+
[1m[36mBook Load (0.0ms)[0m [1mSELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1[0m [["id", 1]]
|
63011
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
63012
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
63013
|
+
[1m[35m (0.0ms)[0m commit transaction
|
63014
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
63015
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
63016
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
63017
|
+
--------------------------------
|
63018
|
+
BooksControllerTest: test_create
|
63019
|
+
--------------------------------
|
63020
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
63021
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-10-02 08:24:31.599563"], ["name", "Je Vous Presente, Lee"], ["updated_at", "2014-10-02 08:24:31.599563"]]
|
63022
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
63023
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
63024
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-10-02 08:24:31.600954"], ["name", "Dangerous Clash"], ["updated_at", "2014-10-02 08:24:31.600954"]]
|
63025
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
63026
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
63027
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-10-02 08:24:31.601898"], ["name", "I am Killer Jungle"], ["updated_at", "2014-10-02 08:24:31.601898"]]
|
63028
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
63029
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
63030
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-10-02 08:24:31.602590"], ["name", "The Hills with a Thousand Faces"], ["updated_at", "2014-10-02 08:24:31.602590"]]
|
63031
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
63032
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
63033
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-10-02 08:24:31.603398"], ["name", "Journey of the Killer Hills"], ["updated_at", "2014-10-02 08:24:31.603398"]]
|
63034
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
63035
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "books"[0m
|
63036
|
+
Processing by BooksController#create as HTML
|
63037
|
+
Parameters: {"book"=>{"name"=>"newly-created-book"}}
|
63038
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
63039
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-10-02 08:24:31.607015"], ["name", "newly-created-book"], ["updated_at", "2014-10-02 08:24:31.607015"]]
|
63040
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
63041
|
+
Redirected to http://test.host/books
|
63042
|
+
Completed 302 Found in 1ms (ActiveRecord: 0.1ms)
|
63043
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "books"[0m
|
63044
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
63045
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
63046
|
+
-------------------------------
|
63047
|
+
BooksControllerTest: test_index
|
63048
|
+
-------------------------------
|
63049
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
63050
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-10-02 08:24:31.610062"], ["name", "Rise of the Beast"], ["updated_at", "2014-10-02 08:24:31.610062"]]
|
63051
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
63052
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
63053
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-10-02 08:24:31.611062"], ["name", "The Dangerous Monster from Hell"], ["updated_at", "2014-10-02 08:24:31.611062"]]
|
63054
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
63055
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
63056
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-10-02 08:24:31.612346"], ["name", "I am Forbidden Thief"], ["updated_at", "2014-10-02 08:24:31.612346"]]
|
63057
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
63058
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
63059
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-10-02 08:24:31.613269"], ["name", "The Black Rose of Scotland"], ["updated_at", "2014-10-02 08:24:31.613269"]]
|
63060
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
63061
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
63062
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-10-02 08:24:31.614143"], ["name", "Hard Boiled Mutant"], ["updated_at", "2014-10-02 08:24:31.614143"]]
|
63063
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
63064
|
+
Processing by BooksController#index as HTML
|
63065
|
+
[1m[36mBook Load (0.1ms)[0m [1mSELECT "books".* FROM "books"[0m
|
63066
|
+
Completed 200 OK in 2ms (Views: 0.9ms | ActiveRecord: 0.1ms)
|
63067
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "books"
|
63068
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
63069
|
+
[1m[35m (0.1ms)[0m begin transaction
|
63070
|
+
----------------------------------------------------
|
63071
|
+
BooksControllerTest: test_index_with_multiple_params
|
63072
|
+
----------------------------------------------------
|
63073
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
63074
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-10-02 08:24:31.620525"], ["name", "The Wolf Who Fell to Earth"], ["updated_at", "2014-10-02 08:24:31.620525"]]
|
63075
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
63076
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
63077
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-10-02 08:24:31.621655"], ["name", "The Ninjas"], ["updated_at", "2014-10-02 08:24:31.621655"]]
|
63078
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
63079
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
63080
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-10-02 08:24:31.622591"], ["name", "Dangerous Rain"], ["updated_at", "2014-10-02 08:24:31.622591"]]
|
63081
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
63082
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
63083
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-10-02 08:24:31.623287"], ["name", "Forbidden Tentacle"], ["updated_at", "2014-10-02 08:24:31.623287"]]
|
63084
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
63085
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
63086
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-10-02 08:24:31.624000"], ["name", "Journey of the Rain"], ["updated_at", "2014-10-02 08:24:31.624000"]]
|
63087
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
63088
|
+
Processing by BooksController#index as HTML
|
63089
|
+
[1m[35mBook Load (0.1ms)[0m SELECT "books".* FROM "books"
|
63090
|
+
Completed 200 OK in 2ms (Views: 0.8ms | ActiveRecord: 0.1ms)
|
63091
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
63092
|
+
[1m[35m (0.1ms)[0m begin transaction
|
63093
|
+
------------------------------
|
63094
|
+
BooksControllerTest: test_show
|
63095
|
+
------------------------------
|
63096
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
63097
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-10-02 08:24:31.629223"], ["name", "The Fake Hills with a Thousand Faces"], ["updated_at", "2014-10-02 08:24:31.629223"]]
|
63098
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
63099
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
63100
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-10-02 08:24:31.630272"], ["name", "Legend of Beast"], ["updated_at", "2014-10-02 08:24:31.630272"]]
|
63101
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
63102
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
63103
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-10-02 08:24:31.631096"], ["name", "176 A.D."], ["updated_at", "2014-10-02 08:24:31.631096"]]
|
63104
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
63105
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
63106
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-10-02 08:24:31.631733"], ["name", "American Thief 2: Son of American Thief"], ["updated_at", "2014-10-02 08:24:31.631733"]]
|
63107
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
63108
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
63109
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "books" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-10-02 08:24:31.632362"], ["name", "The Men"], ["updated_at", "2014-10-02 08:24:31.632362"]]
|
63110
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
63111
|
+
Processing by BooksController#show as HTML
|
63112
|
+
Parameters: {"id"=>"1"}
|
63113
|
+
[1m[35mBook Load (0.0ms)[0m SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT 1 [["id", 1]]
|
63114
|
+
Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)
|
63115
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
63116
|
+
[1m[35m (0.1ms)[0m begin transaction
|
63117
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
63118
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63119
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
63120
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63121
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
63122
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63123
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
63124
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63125
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
63126
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63127
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
63128
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63129
|
+
-------------------------------------------------------------------------------------------------
|
63130
|
+
FastlyRails::CacheControlHeadersTest: test_sets_cache_control_headers_on_actioncontroller_request
|
63131
|
+
-------------------------------------------------------------------------------------------------
|
63132
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
63133
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63134
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
63135
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63136
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
63137
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63138
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
63139
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63140
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
63141
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63142
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
63143
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63144
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
63145
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63146
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
63147
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63148
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
63149
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63150
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
63151
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63152
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
63153
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63154
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
63155
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63156
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
63157
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63158
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
63159
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63160
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
63161
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63162
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
63163
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63164
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
63165
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63166
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
63167
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63168
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
63169
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63170
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
63171
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63172
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
63173
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63174
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
63175
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63176
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
63177
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63178
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
63179
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63180
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
63181
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63182
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
63183
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63184
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
63185
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63186
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
63187
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63188
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
63189
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63190
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
63191
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63192
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
63193
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "books" ("created_at", "id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-10-02 08:24:31.656276"], ["id", 1], ["name", "Dr. Women"], ["updated_at", "2014-10-02 08:24:31.656276"]]
|
63194
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
63195
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
63196
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
63197
|
+
[1m[35m (0.0ms)[0m commit transaction
|
63198
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
63199
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
63200
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "books" ("created_at", "id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-10-02 08:24:31.658759"], ["id", 1], ["name", "Invasion of the City"], ["updated_at", "2014-10-02 08:24:31.658759"]]
|
63201
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
63202
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
63203
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63204
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
63205
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63206
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
63207
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "books" ("created_at", "id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-10-02 08:24:31.661044"], ["id", 1], ["name", "Ultra Cousins"], ["updated_at", "2014-10-02 08:24:31.661044"]]
|
63208
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
63209
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
63210
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
63211
|
+
[1m[35m (0.0ms)[0m commit transaction
|
63212
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
63213
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
63214
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "books" ("created_at", "id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-10-02 08:24:31.664051"], ["id", 1], ["name", "The Blue Diaries from the Black Lagoon"], ["updated_at", "2014-10-02 08:24:31.664051"]]
|
63215
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
63216
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
63217
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63218
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
63219
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63220
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
63221
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63222
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
63223
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63224
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
63225
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "books" ("created_at", "id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-10-02 08:24:31.668010"], ["id", 1], ["name", "The Brain from Across the Ocean"], ["updated_at", "2014-10-02 08:24:31.668010"]]
|
63226
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
63227
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
63228
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
63229
|
+
[1m[35m (0.0ms)[0m commit transaction
|
63230
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
63231
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
63232
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "books" ("created_at", "id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-10-02 08:24:31.670915"], ["id", 1], ["name", "The Blue Cousins from Outer Space"], ["updated_at", "2014-10-02 08:24:31.670915"]]
|
63233
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
63234
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
63235
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63236
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
63237
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63238
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
63239
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63240
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
63241
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63242
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
63243
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63244
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
63245
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63246
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
63247
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63248
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
63249
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63250
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
63251
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63252
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
63253
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63254
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
63255
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63256
|
+
[1m[36m (0.0ms)[0m [1mcommit transaction[0m
|
63257
|
+
[1m[35m (0.0ms)[0m begin transaction
|
63258
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
@@ -42,7 +42,7 @@ describe FastlyRails::Configuration do
|
|
42
42
|
assert_respond_to configuration, :authenticatable?
|
43
43
|
end
|
44
44
|
|
45
|
-
it 'should return false if api_key
|
45
|
+
it 'should return false if api_key is nil' do
|
46
46
|
assert_equal false, configuration.authenticatable?
|
47
47
|
end
|
48
48
|
|
@@ -53,16 +53,15 @@ describe FastlyRails::Configuration do
|
|
53
53
|
end
|
54
54
|
|
55
55
|
it 'should return true if only api_key is not nil' do
|
56
|
-
configuration.api_key = '
|
57
|
-
|
56
|
+
configuration.api_key = 'test'
|
58
57
|
assert_equal true, configuration.authenticatable?
|
59
58
|
end
|
60
59
|
|
61
|
-
it 'should return
|
60
|
+
it 'should return false if only user and password are not nil' do
|
62
61
|
configuration.user = 'user'
|
63
62
|
configuration.password = 'password'
|
64
63
|
|
65
|
-
assert_equal
|
64
|
+
assert_equal false, configuration.authenticatable?
|
66
65
|
end
|
67
66
|
end
|
68
67
|
|
data/test/fastly-rails_test.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
3
|
describe FastlyRails do
|
4
|
-
|
5
4
|
let(:api_key) { 'test' }
|
6
5
|
let(:user) { nil }
|
7
6
|
let(:password) { nil }
|
@@ -15,16 +14,14 @@ describe FastlyRails do
|
|
15
14
|
end
|
16
15
|
|
17
16
|
describe 'credentials not provided' do
|
18
|
-
|
19
17
|
before do
|
20
18
|
FastlyRails.instance_variable_set('@configuration', FastlyRails::Configuration.new)
|
21
19
|
end
|
22
20
|
|
23
21
|
it 'should raise an error if configuration is not authenticatable' do
|
24
|
-
|
25
22
|
assert_equal false, configuration.authenticatable?
|
26
23
|
assert_equal true, configuration.invalid_service_id?
|
27
|
-
assert_raises FastlyRails::
|
24
|
+
assert_raises FastlyRails::NoAPIKeyProvidedError do
|
28
25
|
client
|
29
26
|
end
|
30
27
|
assert_raises FastlyRails::NoServiceIdProvidedError do
|
@@ -34,9 +31,7 @@ describe FastlyRails do
|
|
34
31
|
end
|
35
32
|
|
36
33
|
describe 'credentials provided' do
|
37
|
-
|
38
34
|
before do
|
39
|
-
|
40
35
|
FastlyRails.configure do |c|
|
41
36
|
c.api_key = api_key
|
42
37
|
c.user = user
|
@@ -44,23 +39,18 @@ describe FastlyRails do
|
|
44
39
|
c.max_age = max_age
|
45
40
|
c.service_id = service_id
|
46
41
|
end
|
47
|
-
|
48
42
|
end
|
49
43
|
|
50
|
-
|
51
44
|
it 'should have configuration options set up' do
|
52
|
-
|
53
45
|
assert_equal api_key, configuration.api_key
|
54
46
|
assert_equal user, configuration.user
|
55
47
|
assert_equal password, configuration.password
|
56
48
|
assert_equal max_age, configuration.max_age
|
57
49
|
assert_equal service_id, configuration.service_id
|
58
|
-
|
59
50
|
end
|
60
51
|
|
61
52
|
it 'should return a valid client' do
|
62
53
|
assert_instance_of FastlyRails::Client, client
|
63
54
|
end
|
64
|
-
|
65
55
|
end
|
66
56
|
end
|
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.
|
4
|
+
version: 0.2.0
|
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-10-
|
14
|
+
date: 2014-10-02 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
@@ -33,14 +33,14 @@ dependencies:
|
|
33
33
|
requirements:
|
34
34
|
- - ~>
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: 1.1.
|
36
|
+
version: 1.1.4
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: 1.1.
|
43
|
+
version: 1.1.4
|
44
44
|
- !ruby/object:Gem::Dependency
|
45
45
|
name: sqlite3
|
46
46
|
requirement: !ruby/object:Gem::Requirement
|