spec/dummy/log/test.log in bookingsync-engine-0.4.3 vs spec/dummy/log/test.log in bookingsync-engine-0.4.4
- old
+ new
@@ -1106,5 +1106,897 @@
[1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" IS NULL AND "accounts"."id" != 1) LIMIT 1[0m
[1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", nil], ["oauth_expires_at", nil], ["oauth_refresh_token", nil], ["updated_at", "2015-02-12 20:20:04.475155"]]
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
[1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/signed_out
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[35mAccount Load (0.4ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
+ [1m[36mSQL (0.9ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-02-13 11:59:22.264039"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 11:59:22.264039"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/
+Completed 302 Found in 21ms (ActiveRecord: 2.4ms)
+ [1m[36m (0.3ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.268374"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 11:59:22.268374"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 1ms (ActiveRecord: 0.3ms)
+ [1m[35m (0.3ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-02-13 11:59:22.270992"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 11:59:22.270992"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/admin
+Completed 302 Found in 1ms (ActiveRecord: 0.3ms)
+ [1m[36m (0.3ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+Processing by SessionsController#failure as HTML
+Completed 200 OK in 8ms (Views: 7.5ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+Processing by SessionsController#failure as HTML
+Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+Processing by AuthenticatedController#index as HTML
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 1ms (Views: 1.1ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+Processing by AuthenticatedController#index as HTML
+Redirected to http://test.host/auth/bookingsync/?account_id=
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+Processing by AuthenticatedController#index as JS
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+Processing by AuthenticatedController#index as JS
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-02-13 11:59:22.292671"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 11:59:22.292671"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-02-13 11:59:22.293954"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 11:59:22.293954"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-13 11:59:22.295857"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.298619"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 11:59:22.298619"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.299478"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 11:59:22.299478"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
+ [1m[36mSQL (0.0ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-13 11:59:22.300610"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 2]]
+ [1m[35m (0.5ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.302465"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 11:59:22.302465"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.303256"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 11:59:22.303256"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
+ [1m[36mSQL (0.0ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-13 11:59:22.304308"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 2]]
+ [1m[35m (0.5ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.306309"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 11:59:22.306309"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "accounts"
+ [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.309457"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 11:59:22.309457"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "accounts"
+ [1m[36m (0.5ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-02-13 11:59:22.311448"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 11:59:22.311448"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.312447"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 11:59:22.312447"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.314257"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 11:59:22.314257"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-02-13 11:59:22.315304"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 11:59:22.315304"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-02-13 11:59:22.317159"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 11:59:22.317159"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.318174"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 11:59:22.318174"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "uid", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-02-13 11:59:22.322566"], ["uid", 0], ["updated_at", "2015-02-13 11:59:22.322566"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1[0m
+ [1m[35m (0.3ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.335773"], ["oauth_access_token", "token"], ["oauth_expires_at", 1423915162], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-13 11:59:22.335773"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.338284"], ["oauth_access_token", "token"], ["oauth_expires_at", "1423742362"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-13 11:59:22.338284"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", "refreshed_token"], ["oauth_expires_at", "1424001562"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-13 11:59:22.339133"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.341119"], ["oauth_access_token", "token"], ["oauth_expires_at", "1423742362"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-13 11:59:22.341119"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", "refreshed_token"], ["oauth_expires_at", "1424001562"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-13 11:59:22.342036"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
+ [1m[36m (0.5ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" IS NULL LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2015-02-13 11:59:22.344110"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2015-02-13 11:59:22.344110"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" IS NULL AND "accounts"."id" != 1) LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["oauth_access_token", nil], ["oauth_expires_at", nil], ["oauth_refresh_token", nil], ["updated_at", "2015-02-13 11:59:22.344871"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 1]]
+ [1m[35m (0.5ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.1ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.1ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by AuthenticatedController#index as HTML
+ Rendered text template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by AuthenticatedController#index as HTML
+Redirected to http://test.host/auth/bookingsync/?account_id=
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by AuthenticatedController#index as JS
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by AuthenticatedController#index as JS
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("created_at", "uid", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-02-13 12:01:28.774397"], ["uid", 0], ["updated_at", "2015-02-13 12:01:28.774397"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1[0m
+ [1m[35m (0.4ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:01:28.786845"], ["oauth_access_token", "token"], ["oauth_expires_at", 1423915288], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-13 12:01:28.786845"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:01:28.789217"], ["oauth_access_token", "token"], ["oauth_expires_at", "1423742488"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-13 12:01:28.789217"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", "refreshed_token"], ["oauth_expires_at", "1424001688"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-13 12:01:28.790583"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:01:28.793031"], ["oauth_access_token", "token"], ["oauth_expires_at", "1423742488"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-13 12:01:28.793031"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", "refreshed_token"], ["oauth_expires_at", "1424001688"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-13 12:01:28.794056"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
+ [1m[36m (0.5ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" IS NULL LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:01:28.796286"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2015-02-13 12:01:28.796286"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" IS NULL AND "accounts"."id" != 1) LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["oauth_access_token", nil], ["oauth_expires_at", nil], ["oauth_refresh_token", nil], ["updated_at", "2015-02-13 12:01:28.797089"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 1]]
+ [1m[35m (0.5ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:01:28.799331"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:01:28.799331"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:01:28.800178"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:01:28.800178"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
+ [1m[36mSQL (0.0ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-13 12:01:28.802970"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:01:28.805072"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:01:28.805072"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:01:28.805863"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:01:28.805863"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1[0m
+ [1m[35mSQL (0.0ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-13 12:01:28.807089"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
+ [1m[36m (0.5ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:01:28.808819"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:01:28.808819"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:01:28.809568"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:01:28.809568"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1[0m
+ [1m[35mSQL (0.0ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-13 12:01:28.810660"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
+ [1m[36m (0.5ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:01:28.812450"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:01:28.812450"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:01:28.814921"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:01:28.814921"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (0.5ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:01:28.816968"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:01:28.816968"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:01:28.817994"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:01:28.817994"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:01:28.819868"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:01:28.819868"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:01:28.820945"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:01:28.820945"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:01:28.823262"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:01:28.823262"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:01:28.824310"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:01:28.824310"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:01:28.828089"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:01:28.828089"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 1ms (ActiveRecord: 0.3ms)
+ [1m[35m (0.3ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:01:28.831108"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:01:28.831108"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/admin
+Completed 302 Found in 1ms (ActiveRecord: 0.3ms)
+ [1m[36m (0.3ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:01:28.833999"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:01:28.833999"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 1ms (ActiveRecord: 0.3ms)
+ [1m[35m (0.3ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by SessionsController#failure as HTML
+Completed 200 OK in 3ms (Views: 2.7ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by SessionsController#failure as HTML
+Completed 200 OK in 0ms (Views: 0.4ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/signed_out
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/signed_out
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by SessionsController#failure as HTML
+Completed 200 OK in 5ms (Views: 4.6ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by SessionsController#failure as HTML
+Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:02:14.045860"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:14.045860"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/
+Completed 302 Found in 14ms (ActiveRecord: 1.1ms)
+ [1m[36m (0.5ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:02:14.049656"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:14.049656"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/admin
+Completed 302 Found in 1ms (ActiveRecord: 0.3ms)
+ [1m[35m (0.3ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:02:14.052702"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:14.052702"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/
+Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
+ [1m[36m (0.3ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" IS NULL LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:02:14.058887"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2015-02-13 12:02:14.058887"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" IS NULL AND "accounts"."id" != 1) LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["oauth_access_token", nil], ["oauth_expires_at", nil], ["oauth_refresh_token", nil], ["updated_at", "2015-02-13 12:02:14.060317"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 1]]
+ [1m[35m (0.4ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:14.062778"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:14.062778"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "accounts"
+ [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:02:14.065358"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:14.065358"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "accounts"
+ [1m[36m (0.5ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:02:14.067402"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:14.067402"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:02:14.068405"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:14.068405"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:14.070233"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:14.070233"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:02:14.071246"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:14.071246"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:02:14.073056"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:14.073056"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:02:14.074071"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:14.074071"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:14.075880"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:14.075880"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:14.076650"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:14.076650"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-13 12:02:14.077739"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:02:14.079500"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:14.079500"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:02:14.080291"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:14.080291"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1[0m
+ [1m[35mSQL (0.0ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-13 12:02:14.081434"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
+ [1m[36m (0.6ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:02:14.083272"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:14.083272"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:02:14.084049"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:14.084049"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1[0m
+ [1m[35mSQL (0.0ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-13 12:02:14.085230"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
+ [1m[36m (0.5ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:02:14.087480"], ["oauth_access_token", "token"], ["oauth_expires_at", "1423742534"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-13 12:02:14.087480"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["oauth_access_token", "refreshed_token"], ["oauth_expires_at", "1424001734"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-13 12:02:14.088451"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 1]]
+ [1m[35m (0.6ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:02:14.090795"], ["oauth_access_token", "token"], ["oauth_expires_at", "1423742534"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-13 12:02:14.090795"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", "refreshed_token"], ["oauth_expires_at", "1424001734"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-13 12:02:14.091595"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:02:14.093361"], ["oauth_access_token", "token"], ["oauth_expires_at", 1423915334], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-13 12:02:14.093361"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "uid", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-02-13 12:02:14.096394"], ["uid", 0], ["updated_at", "2015-02-13 12:02:14.096394"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1[0m
+ [1m[35m (0.4ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by AuthenticatedController#index as JS
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by AuthenticatedController#index as JS
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by AuthenticatedController#index as HTML
+Redirected to http://test.host/auth/bookingsync/?account_id=
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by AuthenticatedController#index as HTML
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:02:27.232195"], ["oauth_access_token", "token"], ["oauth_expires_at", 1423915347], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-13 12:02:27.232195"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:02:27.239404"], ["oauth_access_token", "token"], ["oauth_expires_at", "1423742547"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-13 12:02:27.239404"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", "refreshed_token"], ["oauth_expires_at", "1424001747"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-13 12:02:27.240802"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:02:27.243029"], ["oauth_access_token", "token"], ["oauth_expires_at", "1423742547"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-13 12:02:27.243029"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", "refreshed_token"], ["oauth_expires_at", "1424001747"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-13 12:02:27.244054"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
+ [1m[36m (0.6ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" IS NULL LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:02:27.249614"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2015-02-13 12:02:27.249614"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" IS NULL AND "accounts"."id" != 1) LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["oauth_access_token", nil], ["oauth_expires_at", nil], ["oauth_refresh_token", nil], ["updated_at", "2015-02-13 12:02:27.250423"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 1]]
+ [1m[35m (0.5ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:27.252443"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:27.252443"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:27.253255"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:27.253255"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-13 12:02:27.255950"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:02:27.258039"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:27.258039"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:02:27.258805"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:27.258805"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1[0m
+ [1m[35mSQL (0.0ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-13 12:02:27.259907"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
+ [1m[36m (0.6ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:02:27.261710"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:27.261710"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:02:27.262482"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:27.262482"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1[0m
+ [1m[35mSQL (0.0ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-13 12:02:27.263567"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
+ [1m[36m (0.5ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:02:27.265373"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:27.265373"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:02:27.267722"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:27.267722"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (0.4ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:27.269947"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:27.269947"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:02:27.270974"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:27.270974"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:02:27.272800"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:27.272800"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:02:27.273814"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:27.273814"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:27.275580"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:27.275580"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:02:27.276599"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:27.276599"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "uid", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-02-13 12:02:27.279909"], ["uid", 0], ["updated_at", "2015-02-13 12:02:27.279909"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
+ [1m[36m (0.4ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+Processing by SessionsController#failure as HTML
+ Rendered /Users/grk/code/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.1ms)
+Completed 200 OK in 5ms (Views: 4.8ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+Processing by SessionsController#failure as HTML
+Completed 200 OK in 0ms (Views: 0.4ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/signed_out
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:02:27.300142"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:27.300142"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/admin
+Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
+ [1m[35m (0.3ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-02-13 12:02:27.302981"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:27.302981"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/
+Completed 302 Found in 1ms (ActiveRecord: 0.3ms)
+ [1m[36m (0.3ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:02:27.305763"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:27.305763"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 1ms (ActiveRecord: 0.3ms)
+ [1m[35m (0.3ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by AuthenticatedController#index as HTML
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by AuthenticatedController#index as HTML
+Redirected to http://test.host/auth/bookingsync/?account_id=
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by AuthenticatedController#index as JS
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by AuthenticatedController#index as JS
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.0ms)[0m rollback transaction