spec/dummy/log/test.log in bookingsync-engine-3.0.0 vs spec/dummy/log/test.log in bookingsync-engine-3.0.1
- old
+ new
@@ -1,12923 +1,6972 @@
- [1m[36m (1.1ms)[0m [1mCREATE TABLE "accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "provider" varchar(255), "uid" integer, "name" varchar(255), "oauth_access_token" varchar(255), "oauth_refresh_token" varchar(255), "oauth_expires_at" varchar(255)) [0m
- [1m[35m (0.8ms)[0m CREATE INDEX "index_accounts_on_uid" ON "accounts" ("uid")
- [1m[36m (0.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
- [1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
- [1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
- [1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140312093436')
- [1m[36m (0.2ms)[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"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (2.0ms)[0m INSERT INTO "accounts" ("name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid") VALUES (?, ?, ?, ?, ?, ?) [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 16ms (ActiveRecord: 3.2ms)
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.1ms)[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"."provider" = 'bookingsync' AND "accounts"."uid" = 123 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" ("name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid") VALUES (?, ?, ?, ?, ?, ?) [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.1ms)[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"."provider" = 'bookingsync' AND "accounts"."uid" = 123 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" ("name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid") VALUES (?, ?, ?, ?, ?, ?) [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123]]
- [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.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[36m (0.4ms)[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
+ [1m[35m (0.1ms)[0m rollback transaction
+ [1m[36m (0.1ms)[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
+ [1m[35m (0.1ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
Processing by SessionsController#failure as HTML
-Completed 200 OK in 5ms (Views: 4.6ms | ActiveRecord: 0.0ms)
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
+Completed 200 OK in 10ms (Views: 10.1ms | ActiveRecord: 0.0ms)
[1m[35m (0.1ms)[0m rollback transaction
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
Processing by SessionsController#failure as HTML
-Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
+Completed 200 OK in 1ms (Views: 1.0ms | ActiveRecord: 0.0ms)
[1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("provider", "uid") VALUES (?, ?)[0m [["provider", "bookingsync"], ["uid", 123]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.7ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = 1[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("provider", "uid") VALUES (?, ?) [["provider", "bookingsync"], ["uid", 123]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "uid") VALUES (?, ?) [["provider", "bookingsync"], ["uid", 123]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("oauth_access_token", "oauth_expires_at", "oauth_refresh_token") VALUES (?, ?, ?) [["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = 1[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil]]
- [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 (2.0ms)[0m [1mCREATE TABLE "accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "provider" varchar(255), "uid" integer, "name" varchar(255), "oauth_access_token" varchar(255), "oauth_refresh_token" varchar(255), "oauth_expires_at" varchar(255)) [0m
- [1m[35m (1.0ms)[0m CREATE INDEX "index_accounts_on_uid" ON "accounts" ("uid")
- [1m[36m (0.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
- [1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
- [1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
- [1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140312093436')
- [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[36m (0.1ms)[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"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (1.4ms)[0m INSERT INTO "accounts" ("name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid") VALUES (?, ?, ?, ?, ?, ?) [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 11ms (ActiveRecord: 2.2ms)
- [1m[35m (1.2ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-10-28 14:55:56.630977"], ["updated_at", "2015-10-28 14:55:56.630977"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/admin
+Completed 302 Found in 51ms (ActiveRecord: 2.6ms)
+ [1m[36m (0.9ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid") VALUES (?, ?, ?, ?, ?, ?) [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123]]
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-10-28 14:55:56.640757"], ["updated_at", "2015-10-28 14:55:56.640757"]]
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.6ms)
+Completed 302 Found in 4ms (ActiveRecord: 0.6ms)
[1m[35m (0.5ms)[0m rollback transaction
[1m[36m (0.1ms)[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"."provider" = 'bookingsync' AND "accounts"."uid" = 123 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" ("name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid") VALUES (?, ?, ?, ?, ?, ?) [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.3ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#destroy as HTML
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-10-28 14:55:56.648162"], ["updated_at", "2015-10-28 14:55:56.648162"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
Redirected to http://test.host/
-Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36m (0.1ms)[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.1ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
-Completed 200 OK in 5ms (Views: 5.1ms | 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 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "uid") VALUES (?, ?)[0m [["provider", "bookingsync"], ["uid", 123]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.9ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = 1[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 302 Found in 4ms (ActiveRecord: 0.6ms)
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("provider", "uid") VALUES (?, ?) [["provider", "bookingsync"], ["uid", 123]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [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.4ms)[0m [1mrollback transaction[0m
+Processing by AuthenticatedController#index as JS
+ Rendered text template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 2ms (Views: 1.9ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+Processing by AuthenticatedController#index as JS
+ Rendered text template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+Processing by AuthenticatedController#index as HTML
+ Rendered text template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[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.1ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "uid") VALUES (?, ?) [["provider", "bookingsync"], ["uid", 123]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [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.4ms)[0m [1mrollback transaction[0m
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
[1m[35m (0.0ms)[0m begin transaction
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["created_at", "2015-10-28 14:55:56.687548"], ["updated_at", "2015-10-28 14:55:56.687548"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("oauth_access_token", "oauth_expires_at", "oauth_refresh_token") VALUES (?, ?, ?) [["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = 1[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil]]
- [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.4ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#destroy as HTML
-Redirected to http://test.host/
-Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m rollback transaction
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" IS NULL AND "accounts"."id" != 1) LIMIT 1
+ [1m[36mSQL (1.6ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2015-10-28 14:55:56.690615"], ["id", 1]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 1]]
+ [1m[35m (0.7ms)[0m rollback transaction
[1m[36m (0.1ms)[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.1ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.6ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (3.9ms)[0m INSERT INTO "accounts" ("name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid") VALUES (?, ?, ?, ?, ?, ?) [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 21ms (ActiveRecord: 6.4ms)
- [1m[35m (0.4ms)[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"."provider" = 'bookingsync' AND "accounts"."uid" = 123 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" ("name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid") VALUES (?, ?, ?, ?, ?, ?) [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123]]
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "created_at", "updated_at") VALUES (?, ?, ?) [["synced_id", 0], ["created_at", "2015-10-28 14:55:56.703275"], ["updated_at", "2015-10-28 14:55:56.703275"]]
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.4ms)[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"."provider" = 'bookingsync' AND "accounts"."uid" = 123 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" ("name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid") VALUES (?, ?, ?, ?, ?, ?) [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123]]
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1
+ [1m[36m (0.4ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.3ms)[0m begin transaction
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-10-28 14:55:56.730513"], ["updated_at", "2015-10-28 14:55:56.730513"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2015-10-28 14:55:56.733493"], ["updated_at", "2015-10-28 14:55:56.733493"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2015-10-28 14:55:56.736712"], ["id", 2]]
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.4ms)[0m rollback transaction
+ [1m[35m (0.9ms)[0m rollback transaction
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
-Completed 200 OK in 6ms (Views: 6.3ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
-Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("provider", "uid") VALUES (?, ?)[0m [["provider", "bookingsync"], ["uid", 123]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.7ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = 1[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [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", 1]]
- [1m[35m (0.5ms)[0m rollback transaction
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-10-28 14:55:56.741554"], ["updated_at", "2015-10-28 14:55:56.741554"]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2015-10-28 14:55:56.745431"], ["updated_at", "2015-10-28 14:55:56.745431"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2015-10-28 14:55:56.749020"], ["id", 2]]
+ [1m[35m (0.1ms)[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 (1.0ms)[0m rollback transaction
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-10-28 14:55:56.755346"], ["updated_at", "2015-10-28 14:55:56.755346"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "uid") VALUES (?, ?)[0m [["provider", "bookingsync"], ["uid", 123]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = 1[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [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[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2015-10-28 14:55:56.758101"], ["updated_at", "2015-10-28 14:55:56.758101"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("provider", "uid") VALUES (?, ?) [["provider", "bookingsync"], ["uid", 123]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("oauth_access_token", "oauth_expires_at", "oauth_refresh_token") VALUES (?, ?, ?) [["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = 1[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil]]
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2015-10-28 14:55:56.761269"], ["id", 2]]
[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.2ms)[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"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (3.9ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 13 Jun 2014 11:40:10 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Fri, 13 Jun 2014 11:40:10 UTC +00:00]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 16ms (ActiveRecord: 4.8ms)
+ [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 2]]
[1m[35m (0.7ms)[0m rollback transaction
[1m[36m (0.1ms)[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"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 13 Jun 2014 11:40:10 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Fri, 13 Jun 2014 11:40:10 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.5ms)
- [1m[35m (0.5ms)[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"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 13 Jun 2014 11:40:10 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Fri, 13 Jun 2014 11:40:10 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.5ms)
- [1m[35m (0.4ms)[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.1ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
-Completed 200 OK in 8ms (Views: 7.9ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
-Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Fri, 13 Jun 2014 11:40:10 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Fri, 13 Jun 2014 11:40:10 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-10-28 14:55:56.766035"], ["updated_at", "2015-10-28 14:55:56.766035"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "accounts"
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.8ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Fri, 13 Jun 2014 11:40:10 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.4ms)[0m [1mrollback transaction[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-10-28 14:55:56.773556"], ["updated_at", "2015-10-28 14:55:56.773556"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "accounts"
+ [1m[36m (0.7ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[0m begin transaction
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 13 Jun 2014 11:40:10 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Fri, 13 Jun 2014 11:40:10 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Fri, 13 Jun 2014 11:40:10 UTC +00:00]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Fri, 13 Jun 2014 11:40:10 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Fri, 13 Jun 2014 11:40:10 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Fri, 13 Jun 2014 11:40:10 UTC +00:00]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Fri, 13 Jun 2014 11:40:10 UTC +00:00], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", Fri, 13 Jun 2014 11:40:10 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", Fri, 13 Jun 2014 11:40:10 UTC +00:00]]
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-10-28 14:55:56.778572"], ["updated_at", "2015-10-28 14:55:56.778572"]]
[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.1ms)[0m [1mbegin transaction[0m
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.2ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (4.5ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", Wed, 17 Sep 2014 09:22:23 UTC +00:00], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", Wed, 17 Sep 2014 09:22:23 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.6ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", Wed, 17 Sep 2014 09:22:23 UTC +00:00]]
+ [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-10-28 14:55:56.781730"], ["updated_at", "2015-10-28 14:55:56.781730"]]
[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.4ms)[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[35mSQL (1.0ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 09:22:23 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 09:22:23 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.4ms)[0m rollback transaction
+ [1m[35m (0.7ms)[0m rollback transaction
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Wed, 17 Sep 2014 09:22:23 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 09:22:23 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 09:22:23 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 09:22:23 UTC +00:00]]
- [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 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
- [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.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
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (2.8ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Wed, 17 Sep 2014 09:27:40 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 09:27:40 UTC +00:00]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-10-28 14:55:56.786643"], ["updated_at", "2015-10-28 14:55:56.786643"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 09:27:40 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 09:27:40 UTC +00:00]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Wed, 17 Sep 2014 09:27:40 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 09:27:40 UTC +00:00]]
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-10-28 14:55:56.789526"], ["updated_at", "2015-10-28 14:55:56.789526"]]
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [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.6ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 09:27:40 UTC +00:00], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", Wed, 17 Sep 2014 09:27:40 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.8ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", Wed, 17 Sep 2014 09:27:40 UTC +00:00]]
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-10-28 14:55:56.793733"], ["updated_at", "2015-10-28 14:55:56.793733"]]
[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", 1]]
- [1m[35m (0.5ms)[0m rollback transaction
- [1m[36m (0.2ms)[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"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1
-Completed 500 Internal Server Error in 10ms
- [1m[36m (0.1ms)[0m [1mrollback transaction[0m
- [1m[36m (0.2ms)[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"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1
-Completed 500 Internal Server Error in 8ms
- [1m[36m (0.0ms)[0m [1mrollback transaction[0m
- [1m[36m (0.2ms)[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"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1
-Completed 500 Internal Server Error in 8ms
- [1m[36m (0.0ms)[0m [1mrollback transaction[0m
- [1m[36m (0.3ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
-Completed 500 Internal Server Error in 0ms
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.2ms)[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"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (4.2ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 09:33:43 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 09:33:43 UTC +00:00]]
+ [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-10-28 14:55:56.796367"], ["updated_at", "2015-10-28 14:55:56.796367"]]
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 12696ms (ActiveRecord: 5.3ms)
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.3ms)[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"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (2.8ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 09:34:16 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 09:34:16 UTC +00:00]]
- [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.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/
-Completed 302 Found in 50027ms (ActiveRecord: 4.0ms)
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[36m (0.2ms)[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"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (2.5ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 09:34:38 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 09:34:38 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Completed 500 Internal Server Error in 7292ms
- [1m[35m (0.2ms)[0m rollback transaction
- [1m[36m (0.3ms)[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"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (2.7ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 09:34:48 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 09:34:48 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 18ms (ActiveRecord: 4.0ms)
[1m[35m (0.8ms)[0m rollback transaction
- [1m[36m (0.2ms)[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"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (2.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 09:34:53 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 09:34:53 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 13ms (ActiveRecord: 3.2ms)
- [1m[35m (1.2ms)[0m rollback transaction
- [1m[36m (0.2ms)[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"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (2.2ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 09:34:56 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 09:34:56 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 13ms (ActiveRecord: 3.1ms)
- [1m[35m (1.1ms)[0m rollback transaction
[1m[36m (0.1ms)[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"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 09:34:56 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 09:34:56 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.5ms)
- [1m[35m (0.4ms)[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"."provider" = 'bookingsync' AND "accounts"."uid" = 123 ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 09:34:56 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 09:34:56 UTC +00:00]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1446130556"], ["created_at", "2015-10-28 14:55:56.802585"], ["updated_at", "2015-10-28 14:55:56.802585"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.5ms)
[1m[35m (0.4ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1445957756"], ["created_at", "2015-10-28 14:55:56.806984"], ["updated_at", "2015-10-28 14:55:56.806984"]]
+ [1m[35m (1.0ms)[0m commit transaction
+ [1m[36m (0.3ms)[0m [1mbegin transaction[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 1) LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1446216956"], ["updated_at", "2015-10-28 14:55:56.812946"], ["id", 1]]
+ [1m[35m (0.8ms)[0m commit transaction
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 1]]
+ [1m[35m (0.8ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1445957756"], ["created_at", "2015-10-28 14:55:56.819852"], ["updated_at", "2015-10-28 14:55:56.819852"]]
+ [1m[35m (0.9ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1446216956"], ["updated_at", "2015-10-28 14:55:56.825186"], ["id", 2]]
+ [1m[36m (0.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m rollback transaction
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 2]]
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts"
[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.0ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
-Completed 200 OK in 5ms (Views: 5.3ms | ActiveRecord: 0.0ms)
- [1m[35m (0.0ms)[0m rollback transaction
+ [1m[35mSQL (0.2ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = ? [["id", 2]]
+ [1m[36m (0.8ms)[0m [1mcommit transaction[0m
+ [1m[36m (0.3ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.1ms)[0m rollback transaction
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
-Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36m (0.4ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
-Completed 200 OK in 9ms (Views: 8.4ms | ActiveRecord: 0.0ms)
[1m[35m (0.1ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [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 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
[1m[35m (0.0ms)[0m rollback transaction
[1m[36m (0.1ms)[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"}
-Completed 500 Internal Server Error in 2ms
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
-Completed 500 Internal Server Error in 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"}
-Completed 500 Internal Server Error in 0ms
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36m (0.3ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
-Completed 500 Internal Server Error in 1ms
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36m (0.2ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (1.5ms)[0m SELECT "accounts".* FROM "accounts"
-Completed 500 Internal Server Error in 82418ms
- [1m[36m (0.1ms)[0m [1mrollback transaction[0m
- [1m[36m (0.4ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 09:42:37.843203"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 09:42:37.843203"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 12ms (ActiveRecord: 1.4ms)
- [1m[35m (1.1ms)[0m rollback transaction
- [1m[36m (0.2ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 09:42:47.613579"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 09:42:47.613579"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 32ms (ActiveRecord: 1.4ms)
- [1m[35m (0.4ms)[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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 09:42:47.640114"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 09:42:47.640114"]]
- [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.5ms)[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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 09:42:47.644195"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 09:42:47.644195"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
Processing by SessionsController#failure as HTML
-Completed 200 OK in 5ms (Views: 5.3ms | ActiveRecord: 0.0ms)
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
+Completed 200 OK in 6ms (Views: 6.2ms | ActiveRecord: 0.0ms)
[1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
Processing by SessionsController#failure as HTML
-Completed 200 OK in 1ms (Views: 0.5ms | 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.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-17 09:42:47.660284"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 09:42:47.660284"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [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.8ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 09:42:47.661683"]]
- [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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 09:42:47.664809"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 09:42:47.664809"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 09:42:47.666062"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 09:42:47.668227"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 09:42:47.668227"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 09:42:47.669264"]]
- [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.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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-17 09:42:47.677095"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-17 09:42:47.677095"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-09-17 09:42:47.678154"]]
- [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.2ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (4.9ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", Wed, 17 Sep 2014 10:01:22 UTC +00:00], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", Wed, 17 Sep 2014 10:01:22 UTC +00:00]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (1.0ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", Wed, 17 Sep 2014 10:01:22 UTC +00:00]]
- [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.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.5ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 10:01:22 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 10:01:22 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.5ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Wed, 17 Sep 2014 10:01:22 UTC +00:00]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 10:01:22 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 10:01:22 UTC +00:00]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Wed, 17 Sep 2014 10:01:22 UTC +00:00]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 10:01:22 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 10:01:22 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Wed, 17 Sep 2014 10:01:22 UTC +00:00]]
- [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 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
- [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 SAVEPOINT active_record_1
- [1m[36mSQL (2.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Wed, 17 Sep 2014 10:02:18 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 10:02:18 UTC +00:00]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [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.9ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Wed, 17 Sep 2014 10:02:18 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (1.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 10:02:18 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 10:02:18 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Wed, 17 Sep 2014 10:02:18 UTC +00:00]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 10:02:18 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 10:02:18 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Wed, 17 Sep 2014 10:02:18 UTC +00:00]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 10:02:18 UTC +00:00], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", Wed, 17 Sep 2014 10:02:18 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", Wed, 17 Sep 2014 10:02:18 UTC +00:00]]
- [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", 1]]
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
+Completed 200 OK in 1ms (Views: 0.8ms | 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[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.1ms)[0m [1mbegin transaction[0m
- [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.3ms)[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
+ [1m[36m (0.1ms)[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#failure as HTML
-Completed 200 OK in 8ms (Views: 7.4ms | ActiveRecord: 0.0ms)
[1m[35m (0.1ms)[0m rollback transaction
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
-Completed 200 OK 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 SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 10:03:15.329802"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:03:15.329802"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-10-28 14:57:46.624521"], ["updated_at", "2015-10-28 14:57:46.624521"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
Redirected to http://test.host/
-Completed 302 Found in 14ms (ActiveRecord: 1.8ms)
- [1m[35m (0.5ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Completed 302 Found in 46ms (ActiveRecord: 2.1ms)
+ [1m[36m (1.9ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 10:03:15.338626"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:03:15.338626"]]
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-10-28 14:57:46.633729"], ["updated_at", "2015-10-28 14:57:46.633729"]]
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.6ms)[0m rollback transaction
+Completed 302 Found in 4ms (ActiveRecord: 0.6ms)
+ [1m[35m (0.4ms)[0m rollback transaction
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 10:03:15.345470"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:03:15.345470"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 10:03:15.348097"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-17 10:03:15.348097"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.7ms)[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", "2014-09-17 10:03:15.348867"]]
- [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.3ms)[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[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 10:03:15.357450"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:03:15.357450"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:03:15.358913"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 10:03:15.361368"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:03:15.361368"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:03:15.362621"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 10:03:15.364730"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:03:15.364730"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:03:15.365810"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.3ms)[0m rollback transaction
- [1m[36m (0.2ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
-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 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#destroy as HTML
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-10-28 14:57:46.641101"], ["updated_at", "2015-10-28 14:57:46.641101"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
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.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.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 10:03:29.152384"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:03:29.152384"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 11ms (ActiveRecord: 1.4ms)
- [1m[35m (1.1ms)[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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 10:03:29.159222"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:03:29.159222"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.4ms)[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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 10:03:29.162989"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:03:29.162989"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
- [1m[35m (0.5ms)[0m rollback transaction
- [1m[36m (0.5ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 10:03:29.172109"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-17 10:03:29.172109"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.8ms)[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", "2014-09-17 10:03:29.173281"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 10:03:29.177310"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:03:29.177310"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:03:29.178903"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 10:03:29.181403"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:03:29.181403"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:03:29.182454"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 10:03:29.184319"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:03:29.184319"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:03:29.185333"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.3ms)[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
- [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 SAVEPOINT active_record_1
- [1m[36mSQL (2.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", Wed, 17 Sep 2014 10:03:42 UTC +00:00], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", Wed, 17 Sep 2014 10:03:42 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.8ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", Wed, 17 Sep 2014 10:03:42 UTC +00:00]]
- [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 (1.0ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+Completed 302 Found in 4ms (ActiveRecord: 0.6ms)
+ [1m[36m (0.5ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[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 1ms (ActiveRecord: 0.0ms)
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 10:03:42 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 10:03:42 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Wed, 17 Sep 2014 10:03:42 UTC +00:00]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 10:03:42 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 10:03:42 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Wed, 17 Sep 2014 10:03:42 UTC +00:00]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 10:03:42 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 10:03:42 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Wed, 17 Sep 2014 10:03:42 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.4ms)[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.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.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 SAVEPOINT active_record_1
- [1m[36mSQL (2.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Wed, 17 Sep 2014 10:05:01 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 10:05:01 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [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.8ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Wed, 17 Sep 2014 10:05:01 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (1.1ms)[0m [1mrollback 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 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 10:05:01 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 10:05:01 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Wed, 17 Sep 2014 10:05:01 UTC +00:00]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 10:05:01 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 10:05:01 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Wed, 17 Sep 2014 10:05:01 UTC +00:00]]
- [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
+Processing by AuthenticatedController#index as JS
+ Rendered text template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
[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[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 10:05:01 UTC +00:00], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", Wed, 17 Sep 2014 10:05:01 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", Wed, 17 Sep 2014 10:05:01 UTC +00:00]]
- [1m[35m (0.1ms)[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.2ms)[0m [1mbegin transaction[0m
- [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[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 SAVEPOINT active_record_1
- [1m[36mSQL (2.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Wed, 17 Sep 2014 10:06:52 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 10:06:52 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [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.8ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Wed, 17 Sep 2014 10:06:52 UTC +00:00]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (1.1ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 10:06:52 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 10:06:52 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Wed, 17 Sep 2014 10:06:52 UTC +00:00]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 10:06:52 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 10:06:52 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Wed, 17 Sep 2014 10:06:52 UTC +00:00]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+Processing by AuthenticatedController#index as JS
+ Rendered text template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.6ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 10:06:52 UTC +00:00], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", Wed, 17 Sep 2014 10:06:52 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.4ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", Wed, 17 Sep 2014 10:06:52 UTC +00:00]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-10-28 14:57:46.664531"], ["updated_at", "2015-10-28 14:57:46.664531"]]
[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.2ms)[0m [1mbegin transaction[0m
+ [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (1.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-10-28 14:57:46.672302"], ["updated_at", "2015-10-28 14:57:46.672302"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (0.8ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 10:07:23.816910"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-17 10:07:23.816910"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.8ms)[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", "2014-09-17 10:07:23.819417"]]
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-10-28 14:57:46.679017"], ["updated_at", "2015-10-28 14:57:46.679017"]]
[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 (1.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 10:07:23.825943"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:07:23.825943"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:07:23.827449"]]
- [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.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 10:07:23.829781"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:07:23.829781"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:07:23.830923"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-17 10:07:23.832545"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:07:23.832545"]]
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-10-28 14:57:46.693056"], ["updated_at", "2015-10-28 14:57:46.693056"]]
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [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.3ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:07:23.833555"]]
- [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.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[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
- [1m[36m (0.2ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 10:08:31.901359"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-17 10:08:31.901359"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.8ms)[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", "2014-09-17 10:08:31.903871"]]
- [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 (1.1ms)[0m [1mrollback transaction[0m
+ [1m[36m (0.9ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 10:08:31.910407"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:08:31.910407"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:08:31.912423"]]
- [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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 10:08:31.915236"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:08:31.915236"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:08:31.916590"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-17 10:08:31.918396"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:08:31.918396"]]
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-10-28 14:57:46.697565"], ["updated_at", "2015-10-28 14:57:46.697565"]]
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1[0m
+ [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:08:31.919490"]]
- [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.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[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
- [1m[36m (0.2ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [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.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 10:10:04.997280"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:10:04.997280"]]
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-10-28 14:57:46.700146"], ["updated_at", "2015-10-28 14:57:46.700146"]]
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 11ms (ActiveRecord: 1.5ms)
- [1m[35m (1.1ms)[0m rollback transaction
+ [1m[35m (0.9ms)[0m rollback transaction
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 10:10:05.004429"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:10:05.004429"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
- [1m[35m (0.4ms)[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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 10:10:05.008187"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:10:05.008187"]]
- [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#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#failure as HTML
-Completed 200 OK in 5ms (Views: 4.5ms | 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 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-17 10:10:05.023647"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:10:05.023647"]]
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-10-28 14:57:46.704766"], ["updated_at", "2015-10-28 14:57:46.704766"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-10-28 14:57:46.708263"], ["updated_at", "2015-10-28 14:57:46.708263"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [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.6ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:10:05.024983"]]
+ [1m[36m (0.7ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-10-28 14:57:46.713202"], ["updated_at", "2015-10-28 14:57:46.713202"]]
[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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 10:10:05.027823"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:10:05.027823"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:10:05.028977"]]
- [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.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 10:10:05.030849"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:10:05.030849"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:10:05.031842"]]
- [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.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-17 10:10:05.033863"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-17 10:10:05.033863"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-09-17 10:10:05.034600"]]
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2015-10-28 14:57:46.715195"], ["updated_at", "2015-10-28 14:57:46.715195"]]
[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 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
- [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[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-17 10:11:17.645429"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:11:17.645429"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2015-10-28 14:57:46.719187"], ["id", 2]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.8ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:11:17.650342"]]
- [1m[35m (0.4ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (1.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 10:11:17.655102"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:11:17.655102"]]
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-10-28 14:57:46.726007"], ["updated_at", "2015-10-28 14:57:46.726007"]]
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:11:17.656784"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 10:11:17.658859"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:11:17.658859"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:11:17.659923"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-17 10:11:17.662037"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-17 10:11:17.662037"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-09-17 10:11:17.662751"]]
- [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.1ms)[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
- [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 SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 10:11:23.478295"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-17 10:11:23.478295"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.9ms)[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", "2014-09-17 10:11:23.480731"]]
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2015-10-28 14:57:46.727914"], ["updated_at", "2015-10-28 14:57:46.727914"]]
[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 (1.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+ [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 10:11:23.486562"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:11:23.486562"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:11:23.488129"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 10:11:23.490607"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:11:23.490607"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:11:23.491666"]]
- [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[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-17 10:11:23.493377"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:11:23.493377"]]
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2015-10-28 14:57:46.730429"], ["id", 2]]
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [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.2ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:11:23.494357"]]
- [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.1ms)[0m rollback transaction
- [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#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 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[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" ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 10:15:21.629533"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:15:21.629533"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 11ms (ActiveRecord: 1.3ms)
- [1m[35m (1.1ms)[0m rollback transaction
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 2]]
+ [1m[35m (0.7ms)[0m rollback transaction
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 10:15:21.637440"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:15:21.637440"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.4ms)[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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 10:15:21.641343"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:15:21.641343"]]
- [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
[1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-09-17 10:15:21.643528"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-17 10:15:21.643528"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.7ms)[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", "2014-09-17 10:15:21.644279"]]
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-10-28 14:57:46.734981"], ["updated_at", "2015-10-28 14:57:46.734981"]]
[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.4ms)[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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 10:15:21.651695"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:15:21.651695"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:15:21.652981"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 10:15:21.655383"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:15:21.655383"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.3ms)[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:15:21.658409"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 10:15:21.660785"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:15:21.660785"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:15:21.661909"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.2ms)[0m [1mbegin transaction[0m
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (2.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Wed, 17 Sep 2014 10:15:50 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 10:15:50 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [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.9ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Wed, 17 Sep 2014 10:15:50 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (1.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 10:15:50 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 10:15:50 UTC +00:00]]
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2015-10-28 14:57:46.736981"], ["updated_at", "2015-10-28 14:57:46.736981"]]
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
+ [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Wed, 17 Sep 2014 10:15:50 UTC +00:00]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 10:15:50 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 10:15:50 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Wed, 17 Sep 2014 10:15:50 UTC +00:00]]
- [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[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2015-10-28 14:57:46.739829"], ["id", 2]]
+ [1m[35m (0.1ms)[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 (1.0ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 10:15:50 UTC +00:00], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", Wed, 17 Sep 2014 10:15:50 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.4ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", Wed, 17 Sep 2014 10:15:50 UTC +00:00]]
- [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.1ms)[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" ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.5ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 10:15:50 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 10:15:50 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.7ms)
- [1m[35m (0.4ms)[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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 10:15:50 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 10:15:50 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.4ms)[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" ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Wed, 17 Sep 2014 10:15:50 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Wed, 17 Sep 2014 10:15:50 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.4ms)[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.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
-Completed 200 OK in 7ms (Views: 7.3ms | 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 1ms (Views: 0.4ms | 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[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 10:15:54.822376"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-17 10:15:54.822376"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.8ms)[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", "2014-09-17 10:15:54.824744"]]
- [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 (1.1ms)[0m [1mrollback transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("synced_id", "created_at", "updated_at") VALUES (?, ?, ?) [["synced_id", 0], ["created_at", "2015-10-28 14:57:46.752725"], ["updated_at", "2015-10-28 14:57:46.752725"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1
+ [1m[36m (0.7ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 10:15:54.830668"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:15:54.830668"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:15:54.832261"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 10:15:54.834721"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:15:54.834721"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:15:54.836159"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.4ms)[0m rollback transaction
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.7ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1445957866"], ["created_at", "2015-10-28 14:57:46.770624"], ["updated_at", "2015-10-28 14:57:46.770624"]]
+ [1m[36m (1.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.3ms)[0m begin transaction
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 1) LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1446217066"], ["updated_at", "2015-10-28 14:57:46.778538"], ["id", 1]]
+ [1m[36m (0.9ms)[0m [1mcommit transaction[0m
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts"
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-17 10:15:54.837896"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:15:54.837896"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [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.2ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:15:54.838904"]]
- [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.1ms)[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.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" ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 10:15:54.857324"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:15:54.857324"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.4ms)[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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 10:15:54.860875"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:15:54.860875"]]
- [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.4ms)[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" ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 10:15:54.864211"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:15:54.864211"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
-Completed 200 OK in 5ms (Views: 4.8ms | 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 1ms (Views: 0.5ms | 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[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-17 10:15:59.235070"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-17 10:15:59.235070"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.7ms)[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", "2014-09-17 10:15:59.238071"]]
- [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 (1.1ms)[0m [1mrollback transaction[0m
+ [1m[35mSQL (0.2ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = ? [["id", 1]]
+ [1m[36m (0.8ms)[0m [1mcommit transaction[0m
[1m[35m (0.1ms)[0m begin transaction
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1445957866"], ["created_at", "2015-10-28 14:57:46.785176"], ["updated_at", "2015-10-28 14:57:46.785176"]]
+ [1m[36m (0.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1446217066"], ["updated_at", "2015-10-28 14:57:46.789700"], ["id", 2]]
+ [1m[35m (0.7ms)[0m commit transaction
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts"[0m
[1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 10:15:59.260162"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:15:59.260162"]]
+ [1m[36mSQL (0.2ms)[0m [1mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 2]]
+ [1m[35m (0.9ms)[0m commit transaction
+ [1m[36m (0.1ms)[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"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1446130666"], ["created_at", "2015-10-28 14:57:46.797375"], ["updated_at", "2015-10-28 14:57:46.797375"]]
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:15:59.263351"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 10:15:59.266049"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:15:59.266049"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:15:59.267657"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-17 10:15:59.269781"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:15:59.269781"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-17 10:15:59.271277"]]
- [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
-Processing by SessionsController#destroy as HTML
-Redirected to http://test.host/signed_out
-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#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#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
-Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
-Completed 200 OK in 1ms (Views: 0.6ms | 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" ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 10:15:59.292861"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:15:59.292861"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.4ms)
- [1m[35m (0.5ms)[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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 10:15:59.297668"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:15:59.297668"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 3ms (ActiveRecord: 0.4ms)
[1m[35m (0.6ms)[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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-17 10:15:59.303349"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-17 10:15:59.303349"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.4ms)
- [1m[35m (0.3ms)[0m rollback transaction
- [1m[36m (0.3ms)[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.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.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 11:55:53.832904"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 11:55:53.832904"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 11ms (ActiveRecord: 1.3ms)
- [1m[35m (0.4ms)[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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 11:55:53.838639"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 11:55:53.838639"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 11:55:53.841831"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 11:55:53.841831"]]
- [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#failure as HTML
-Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
[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 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "accounts" ("oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["created_at", "2015-10-28 14:57:46.810451"], ["updated_at", "2015-10-28 14:57:46.810451"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-09-18 11:55:53.854903"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 11:55:53.854903"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.8ms)[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", "2014-09-18 11:55:53.855835"]]
- [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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 11:55:53.859372"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 11:55:53.859372"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-18 11:55:53.860496"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 11:55:53.862443"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 11:55:53.862443"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-18 11:55:53.863438"]]
- [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[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" IS NULL AND "accounts"."id" != 3) LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2015-10-28 14:57:46.813570"], ["id", 3]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 3]]
+ [1m[36m (0.7ms)[0m [1mrollback transaction[0m
+ [1m[36m (0.3ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "accounts" ("oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["created_at", "2016-08-22 14:36:50.661939"], ["updated_at", "2016-08-22 14:36:50.661939"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 11:55:53.864979"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 11:55:53.864979"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [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.2ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-18 11:55:53.866254"]]
- [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.1ms)[0m rollback transaction
- [1m[36m (0.2ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
-Completed 200 OK in 5ms (Views: 4.8ms | 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 1ms (Views: 0.6ms | 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#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"}
-Completed 500 Internal Server Error in 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"}
-Completed 500 Internal Server Error in 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"}
-Completed 500 Internal Server Error in 0ms
- [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
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 11:56:05.018595"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 11:56:05.018595"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.8ms)[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", "2014-09-18 11:56:05.021116"]]
- [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 (1.2ms)[0m [1mrollback transaction[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" IS NULL AND "accounts"."id" != 1) LIMIT 1[0m
+ [1m[35mSQL (0.8ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2016-08-22 14:36:50.666433"], ["id", 1]]
+ [1m[36m (0.1ms)[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 (1.0ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 11:56:05.027187"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 11:56:05.027187"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 11:56:05.029027"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 11:56:05.029027"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 14:36:50.683667"], ["updated_at", "2016-08-22 14:36:50.683667"]]
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 11:56:05.030563"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 11:56:05.030563"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.3ms)[0m rollback transaction
- [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2016-08-22 14:36:50.685618"], ["updated_at", "2016-08-22 14:36:50.685618"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 11:56:26.630996"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 11:56:26.630996"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.6ms)[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", "2014-09-18 11:56:26.633468"]]
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2016-08-22 14:36:50.688897"], ["id", 2]]
[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 (1.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 11:56:26.674931"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 11:56:26.674931"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts"
- [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.3ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-18 11:57:00.819953"]]
- [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.2ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 11:57:00.822634"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 11:57:00.822634"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [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.3ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-18 11:57:09.267982"]]
- [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.2ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 11:57:09.270292"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 11:57:09.270292"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [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.2ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-18 11:57:11.217546"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[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#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#failure as HTML
-Completed 200 OK in 5ms (Views: 4.9ms | 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.5ms | 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.2ms)[0m [1mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1[0m
+ [1m[35m (1.9ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_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", "2014-09-18 11:57:12.827769"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 11:57:12.827769"]]
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 14:36:50.699771"], ["updated_at", "2016-08-22 14:36:50.699771"]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2016-08-22 14:36:50.703880"], ["updated_at", "2016-08-22 14:36:50.703880"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2016-08-22 14:36:50.706853"], ["id", 2]]
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/
-Completed 302 Found in 1593ms (ActiveRecord: 0.5ms)
- [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" ORDER BY "accounts"."id" ASC LIMIT 1[0m
+ [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 2]]
+ [1m[35m (0.8ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 14:36:50.712557"], ["updated_at", "2016-08-22 14:36:50.712557"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-09-18 11:57:17.522978"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 11:57:17.522978"]]
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2016-08-22 14:36:50.714995"], ["updated_at", "2016-08-22 14:36:50.714995"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2016-08-22 14:36:50.719861"], ["id", 2]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/admin
-Completed 302 Found in 4692ms (ActiveRecord: 0.5ms)
- [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.2ms)[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.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", "2014-09-18 11:57:19.404379"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 11:57:19.404379"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/
-Completed 302 Found in 1879ms (ActiveRecord: 0.5ms)
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[36m (0.2ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
-Completed 200 OK in 5ms (Views: 4.9ms | 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 1ms (Views: 0.6ms | 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" ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 11:59:29.972459"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 11:59:29.972459"]]
+ [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 2]]
+ [1m[35m (1.2ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 14:36:50.727397"], ["updated_at", "2016-08-22 14:36:50.727397"]]
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 45477ms (ActiveRecord: 1.6ms)
- [1m[35m (0.5ms)[0m rollback transaction
- [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "accounts"
+ [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:00:18.171982"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 12:00:18.171982"]]
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 14:36:50.733995"], ["updated_at", "2016-08-22 14:36:50.733995"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "accounts"
+ [1m[36m (0.8ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 14:36:50.739081"], ["updated_at", "2016-08-22 14:36:50.739081"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 14:36:50.743166"], ["updated_at", "2016-08-22 14:36:50.743166"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 14:36:50.749417"], ["updated_at", "2016-08-22 14:36:50.749417"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.7ms)[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", "2014-09-18 12:00:18.174859"]]
- [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.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:00:18.213989"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:00:18.213989"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Unpermitted parameters: uid, info, credentials
-Unpermitted parameters: uid, info, credentials
- [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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-18 12:05:00.509568"]]
- [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.2ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:05:00.512073"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:05:00.512073"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-18 12:05:01.974893"]]
- [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 (1.2ms)[0m [1mrollback transaction[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 14:36:50.752619"], ["updated_at", "2016-08-22 14:36:50.752619"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.7ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[0m begin transaction
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:05:01.978322"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:05:01.978322"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.8ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-18 12:05:02.775592"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.2ms)[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.1ms)[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[35mAccount Exists (2.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 14:36:50.760088"], ["updated_at", "2016-08-22 14:36:50.760088"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 14:36:50.766622"], ["updated_at", "2016-08-22 14:36:50.766622"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m rollback transaction
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
-Completed 200 OK in 5ms (Views: 5.3ms | 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 1ms (Views: 0.5ms | 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.2ms)[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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:05:03.766732"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:05:03.766732"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 970ms (ActiveRecord: 0.6ms)
- [1m[35m (0.5ms)[0m rollback transaction
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471790210"], ["created_at", "2016-08-22 14:36:50.774447"], ["updated_at", "2016-08-22 14:36:50.774447"]]
+ [1m[35m (1.3ms)[0m commit transaction
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.2ms)[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.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:05:04.487964"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:05:04.487964"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 718ms (ActiveRecord: 0.5ms)
- [1m[35m (1.1ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.3ms)[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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:05:05.304601"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:05:05.304601"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 813ms (ActiveRecord: 0.6ms)
- [1m[35m (1.2ms)[0m rollback transaction
- [1m[36m (0.2ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:06:00.646206"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:06:00.646206"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [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.7ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-18 12:06:05.704296"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts"[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[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.2ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:09:53.609810"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:09:53.609810"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-18 12:09:53.611090"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:09:53.613129"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:09:53.613129"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-18 12:09:53.614195"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:09:53.616273"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 12:09:53.616273"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-09-18 12:09:53.617001"]]
- [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.3ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.3ms)[0m begin transaction
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 1) LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472049410"], ["updated_at", "2016-08-22 14:36:50.800885"], ["id", 1]]
+ [1m[36m (0.9ms)[0m [1mcommit transaction[0m
[1m[35m (0.1ms)[0m rollback transaction
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 1]]
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts"
[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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:09:53.633516"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:09:53.633516"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.5ms)[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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:09:53.637633"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:09:53.637633"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:09:53.641580"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:09:53.641580"]]
- [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#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.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
-Completed 200 OK in 5ms (Views: 5.0ms | 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 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36m (0.2ms)[0m [1mbegin transaction[0m
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:10:05.789433"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 12:10:05.789433"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.7ms)[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", "2014-09-18 12:10:05.811470"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:10:05.816529"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:10:05.816529"]]
- [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[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-18 12:10:05.819781"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:10:05.822617"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:10:05.822617"]]
- [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[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-18 12:10:05.824255"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:10:05.826842"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:10:05.826842"]]
- [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[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-18 12:10:05.828365"]]
- [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
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
-Completed 200 OK in 5ms (Views: 5.0ms | 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 1ms (Views: 0.5ms | 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#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#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[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", "2014-09-18 12:10:05.847994"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:10:05.847994"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.4ms)[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[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", "2014-09-18 12:10:05.851639"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:10:05.851639"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
- [1m[35m (0.4ms)[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[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", "2014-09-18 12:10:05.855387"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:10:05.855387"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
- [1m[35m (0.3ms)[0m rollback transaction
- [1m[36m (0.3ms)[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#failure as HTML
-Completed 200 OK in 5ms (Views: 4.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 1ms (Views: 0.5ms | 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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:10:38.496864"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:10:38.496864"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 34ms (ActiveRecord: 1.4ms)
- [1m[35m (1.2ms)[0m rollback transaction
+ [1m[35mSQL (0.3ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = ? [["id", 1]]
+ [1m[36m (1.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471790210"], ["created_at", "2016-08-22 14:36:50.809857"], ["updated_at", "2016-08-22 14:36:50.809857"]]
+ [1m[36m (1.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472049410"], ["updated_at", "2016-08-22 14:36:50.815715"], ["id", 2]]
+ [1m[36m (0.9ms)[0m [1mcommit transaction[0m
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts"
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
+ [1m[35mSQL (0.2ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = ? [["id", 2]]
+ [1m[36m (0.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:10:38.504932"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:10:38.504932"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
- [1m[35m (0.7ms)[0m rollback transaction
- [1m[36m (0.1ms)[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[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", "2014-09-18 12:10:38.510316"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:10:38.510316"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:10:38.513105"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 12:10:38.513105"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (1.0ms)[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", "2014-09-18 12:10:38.514087"]]
- [1m[36m (0.4ms)[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.4ms)[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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:10:38.523183"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:10:38.523183"]]
- [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[35mSQL (0.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-18 12:10:38.524612"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:10:38.526613"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:10:38.526613"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.5ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-18 12:10:38.528521"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:10:38.530933"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:10:38.530933"]]
- [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[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-18 12:10:38.532097"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.3ms)[0m rollback transaction
- [1m[36m (0.3ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (4.6ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 18 Sep 2014 12:10:58 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 18 Sep 2014 12:10:58 UTC +00:00]]
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471963010"], ["created_at", "2016-08-22 14:36:50.822266"], ["updated_at", "2016-08-22 14:36:50.822266"]]
[1m[35m (0.1ms)[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[36mSQL (0.9ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Thu, 18 Sep 2014 12:10:58 UTC +00:00]]
- [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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 18 Sep 2014 12:10:58 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 18 Sep 2014 12:10:58 UTC +00:00]]
- [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[35mSQL (0.5ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Thu, 18 Sep 2014 12:10:58 UTC +00:00]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 18 Sep 2014 12:10:58 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 18 Sep 2014 12:10:58 UTC +00:00]]
- [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[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Thu, 18 Sep 2014 12:10:58 UTC +00:00]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Thu, 18 Sep 2014 12:10:58 UTC +00:00], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", Thu, 18 Sep 2014 12:10:58 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", Thu, 18 Sep 2014 12:10:58 UTC +00:00]]
- [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[35m (0.1ms)[0m begin transaction
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.9ms)[0m [1mINSERT INTO "accounts" ("synced_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["synced_id", 0], ["created_at", "2016-08-22 14:36:50.841678"], ["updated_at", "2016-08-22 14:36:50.841678"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1[0m
+ [1m[35m (0.5ms)[0m rollback transaction
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
- [1m[35m (0.1ms)[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[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", Thu, 18 Sep 2014 12:10:58 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 18 Sep 2014 12:10:58 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.6ms)
- [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[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", Thu, 18 Sep 2014 12:10:58 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 18 Sep 2014 12:10:58 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Thu, 18 Sep 2014 12:10:58 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 18 Sep 2014 12:10:58 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.5ms)
- [1m[35m (0.4ms)[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.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
Processing by SessionsController#failure as HTML
-Completed 200 OK in 7ms (Views: 6.9ms | ActiveRecord: 0.0ms)
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.8ms)
+Completed 200 OK in 19ms (Views: 19.1ms | 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 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.3ms)[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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:11:03.150164"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:11:03.150164"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 13ms (ActiveRecord: 1.3ms)
- [1m[35m (1.0ms)[0m rollback transaction
[1m[36m (0.1ms)[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[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", "2014-09-18 12:11:03.157414"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:11:03.157414"]]
- [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.4ms)[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[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", "2014-09-18 12:11:03.160819"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:11:03.160819"]]
- [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.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
Processing by SessionsController#failure as HTML
-Completed 200 OK in 5ms (Views: 4.8ms | ActiveRecord: 0.0ms)
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
+Completed 200 OK in 2ms (Views: 1.8ms | 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 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[36m (0.1ms)[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
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:11:03.175599"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:11:03.175599"]]
- [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[36mSQL (0.8ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-18 12:11:03.176931"]]
- [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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:11:03.179907"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:11:03.179907"]]
- [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[35mSQL (0.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-18 12:11:03.180999"]]
- [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.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:11:03.182987"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:11:03.182987"]]
- [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[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-18 12:11:03.183982"]]
- [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.3ms)[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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:11:03.190300"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 12:11:03.190300"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-09-18 12:11:03.191209"]]
- [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.2ms)[0m [1mbegin transaction[0m
[1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:11:08.030330"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 12:11:08.030330"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.6ms)[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", "2014-09-18 12:11:08.034188"]]
- [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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:11:08.044177"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:11:08.044177"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-18 12:11:08.047735"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:11:08.050620"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:11:08.050620"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-18 12:11:08.052288"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:11:08.054380"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:11:08.054380"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-18 12:11:08.056099"]]
- [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
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
-Completed 200 OK in 10ms (Views: 9.9ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.1ms)
-Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[36m (0.1ms)[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.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" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:11:08.083230"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:11:08.083230"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 3ms (ActiveRecord: 0.4ms)
- [1m[35m (0.4ms)[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" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_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", "2014-09-18 12:11:08.087687"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:11:08.087687"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
- [1m[35m (0.4ms)[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" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_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", "2014-09-18 12:11:08.091898"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:11:08.091898"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
- [1m[35m (0.3ms)[0m rollback transaction
- [1m[36m (0.2ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:18:25.770047"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 12:18:25.770047"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.7ms)[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", "2014-09-18 12:18:25.772416"]]
- [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.4ms)[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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:18:25.786219"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:18:25.786219"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:18:25.787222"], ["provider", "other_provider"], ["uid", 123], ["updated_at", "2014-09-18 12:18:25.787222"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.0ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:18:25.787954"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:18:25.787954"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "uid" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["uid", 123], ["updated_at", "2014-09-18 12:18:25.789029"]]
- [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", 3]]
- [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[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:18:25.791311"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:18:25.791311"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:18:25.792035"], ["provider", "other_provider"], ["uid", 123], ["updated_at", "2014-09-18 12:18:25.792035"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:18:25.792797"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:18:25.792797"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.0ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "uid" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["uid", 123], ["updated_at", "2014-09-18 12:18:25.793714"]]
- [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", 3]]
- [1m[36m (0.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:18:25.795497"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:18:25.795497"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:18:25.796213"], ["provider", "other_provider"], ["uid", 123], ["updated_at", "2014-09-18 12:18:25.796213"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:18:25.796986"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:18:25.796986"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.0ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "uid" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["uid", 123], ["updated_at", "2014-09-18 12:18:25.797970"]]
- [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
-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.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
-Completed 200 OK in 5ms (Views: 4.9ms | 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 1ms (Views: 0.5ms | 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" ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:18:25.817357"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:18:25.817357"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.5ms)
- [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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:18:25.821211"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:18:25.821211"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:18:25.824991"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:18:25.824991"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.2ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
-Completed 200 OK in 5ms (Views: 4.8ms | 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 1ms (Views: 0.5ms | 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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:19:00.593695"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:19:00.593695"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 15ms (ActiveRecord: 1.8ms)
- [1m[35m (1.1ms)[0m rollback transaction
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:19:00.601306"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:19:00.601306"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 14:36:50.918712"], ["updated_at", "2016-08-22 14:36:50.918712"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
- [1m[35m (0.5ms)[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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:19:00.605434"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:19:00.605434"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.9ms)[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.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:19:00.617955"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:19:00.617955"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.7ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:19:00.618920"], ["provider", "other_provider"], ["uid", 123], ["updated_at", "2014-09-18 12:19:00.618920"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:19:00.620212"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:19:00.620212"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [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 [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "uid" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["uid", 123], ["updated_at", "2014-09-18 12:19:00.621225"]]
- [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", 3]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:19:00.624236"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:19:00.624236"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:19:00.625044"], ["provider", "other_provider"], ["uid", 123], ["updated_at", "2014-09-18 12:19:00.625044"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:19:00.625859"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:19:00.625859"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [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.0ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "uid" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["uid", 123], ["updated_at", "2014-09-18 12:19:00.626762"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 302 Found in 4ms (ActiveRecord: 0.8ms)
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:19:00.628931"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:19:00.628931"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:19:00.629654"], ["provider", "other_provider"], ["uid", 123], ["updated_at", "2014-09-18 12:19:00.629654"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:19:00.630456"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:19:00.630456"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.0ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "uid" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["uid", 123], ["updated_at", "2014-09-18 12:19:00.631380"]]
- [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", 3]]
- [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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:19:00.633221"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 12:19:00.633221"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-09-18 12:19:00.633911"]]
- [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.3ms)[0m rollback transaction
- [1m[36m (0.2ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:22:44.962774"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 12:22:44.962774"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.8ms)[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", "2014-09-18 12:22:44.965207"]]
- [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 (1.1ms)[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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:22:44.979724"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:22:44.979724"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "uid" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["uid", 123], ["updated_at", "2014-09-18 12:22:44.981179"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:22:44.983825"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:22:44.983825"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "uid" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["uid", 123], ["updated_at", "2014-09-18 12:22:44.985183"]]
- [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.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:22:44.987310"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:22:44.987310"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.4ms)[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#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#failure as HTML
-Completed 200 OK in 5ms (Views: 4.6ms | 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.5ms | 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" ORDER BY "accounts"."id" ASC LIMIT 1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-09-18 12:22:45.006531"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:22:45.006531"]]
- [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.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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:22:45.010073"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:22:45.010073"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 14:36:50.928620"], ["updated_at", "2016-08-22 14:36:50.928620"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/admin
-Completed 302 Found in 1ms (ActiveRecord: 0.3ms)
- [1m[36m (0.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
+Completed 302 Found in 7ms (ActiveRecord: 1.0ms)
+ [1m[35m (0.5ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:22:45.013453"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:22:45.013453"]]
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 14:36:50.936808"], ["updated_at", "2016-08-22 14:36:50.936808"]]
[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.4ms)[0m [1mrollback transaction[0m
- [1m[36m (0.2ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:23:16.357295"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 12:23:16.357295"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.9ms)[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", "2014-09-18 12:23:16.360092"]]
- [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.9ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:23:16.365853"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:23:16.365853"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "uid" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["uid", 123], ["updated_at", "2014-09-18 12:23:16.367430"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:23:16.370142"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:23:16.370142"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:23:16.372209"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:23:16.372209"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "uid" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["uid", 123], ["updated_at", "2014-09-18 12:23:16.373439"]]
- [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.4ms)[0m [1mrollback transaction[0m
+Completed 302 Found in 4ms (ActiveRecord: 0.5ms)
+ [1m[36m (0.5ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[0m begin transaction
+Processing by AuthenticatedController#index as JS
+ Rendered text template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 4ms (Views: 3.8ms | ActiveRecord: 0.0ms)
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[0m begin transaction
-Processing by SessionsController#destroy as HTML
-Redirected to http://test.host/signed_out
-Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+Processing by AuthenticatedController#index as JS
+ Rendered text template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
[1m[36m (0.1ms)[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#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [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.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", "2014-09-18 12:23:16.397631"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:23:16.397631"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.5ms)
- [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.2ms)[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.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", "2014-09-18 12:23:16.402095"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:23:16.402095"]]
- [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.4ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[0m begin transaction
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [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.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", "2014-09-18 12:23:16.406722"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:23:16.406722"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[36m (0.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
-Processing by SessionsController#failure as HTML
-Completed 200 OK in 6ms (Views: 5.6ms | ActiveRecord: 0.0ms)
+Processing by AuthenticatedController#index as HTML
+ Rendered text template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 0ms (Views: 0.3ms | 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 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[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 1ms (ActiveRecord: 0.0ms)
[1m[36m (0.1ms)[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#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 1ms (Views: 0.5ms | 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" ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:23:44.539049"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:23:44.539049"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 11ms (ActiveRecord: 1.3ms)
- [1m[35m (1.1ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:23:44.545876"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:23:44.545876"]]
- [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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:23:44.549402"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:23:44.549402"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:23:44.551816"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 12:23:44.551816"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.8ms)[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", "2014-09-18 12:23:44.552844"]]
- [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 [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:23:44.560899"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:23:44.560899"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "uid" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["uid", 123], ["updated_at", "2014-09-18 12:23:44.562283"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:23:44.564583"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:23:44.564583"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "uid" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["uid", 123], ["updated_at", "2014-09-18 12:23:44.565848"]]
- [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.4ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:23:44.567975"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:23:44.567975"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.4ms)[0m [1mrollback transaction[0m
- [1m[36m (0.2ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:24:09.312325"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 12:24:09.312325"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.7ms)[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", "2014-09-18 12:24:09.314780"]]
- [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 (1.1ms)[0m [1mrollback transaction[0m
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:24:09.330470"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:24:09.330470"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "uid" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["uid", 123], ["updated_at", "2014-09-18 12:24:09.332039"]]
- [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[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:24:09.334660"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:24:09.334660"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "uid" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["uid", 123], ["updated_at", "2014-09-18 12:24:09.335745"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:24:09.337638"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:24:09.337638"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.3ms)[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.1ms)[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[35m (0.1ms)[0m begin transaction
[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 5ms (Views: 4.8ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m begin transaction
[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.5ms | ActiveRecord: 0.0ms)
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+ [1m[36m (0.5ms)[0m [1mbegin transaction[0m
+Processing by AuthenticatedController#index as JS
+ Rendered text template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 11ms (Views: 10.4ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m rollback transaction
+ [1m[36m (0.1ms)[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.9ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m rollback transaction
+ [1m[36m (0.1ms)[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 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m rollback transaction
+ [1m[36m (0.4ms)[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.2ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [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.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", "2014-09-18 12:24:09.356499"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:24:09.356499"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2016-08-22 17:45:37.336100"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 17:45:37.336100"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
+Completed 302 Found in 37ms (ActiveRecord: 2.5ms)
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+ [1m[35m (0.1ms)[0m begin transaction
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
[1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-09-18 12:24:09.360317"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:24:09.360317"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 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", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2016-08-22 17:45:37.344106"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 17:45:37.344106"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 3ms (ActiveRecord: 0.6ms)
+ [1m[35m (0.5ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [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.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", "2014-09-18 12:24:09.363876"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:24:09.363876"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
- [1m[36m (0.4ms)[0m [1mrollback transaction[0m
- [1m[36m (0.3ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:24:42.322665"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 12:24:42.322665"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.8ms)[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", "2014-09-18 12:24:42.325146"]]
- [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 (1.0ms)[0m [1mrollback transaction[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2016-08-22 17:45:37.350812"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 17:45:37.350812"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/admin
+Completed 302 Found in 4ms (ActiveRecord: 0.6ms)
+ [1m[36m (0.6ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:24:42.331071"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:24:42.331071"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "uid" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["uid", 123], ["updated_at", "2014-09-18 12:24:42.332689"]]
- [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.4ms)[0m [1mrollback transaction[0m
+Processing by SessionsController#failure as HTML
+Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:24:42.335241"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:24:42.335241"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 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[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:24:42.337830"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:24:42.337830"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "uid" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["uid", 123], ["updated_at", "2014-09-18 12:24:42.338816"]]
- [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.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+Processing by SessionsController#failure as HTML
+Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+ [1m[35m (0.1ms)[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#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#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [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.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", "2014-09-18 12:24:42.357897"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:24:42.357897"]]
- [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
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:24:42.361274"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:24:42.361274"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [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.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", "2014-09-18 12:24:42.364696"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:24:42.364696"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[36m (0.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
-Processing by SessionsController#failure as HTML
-Completed 200 OK in 5ms (Views: 5.1ms | 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 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
- [1m[36m (0.0ms)[0m [1mrollback transaction[0m
- [1m[36m (0.2ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:25:06.320132"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 12:25:06.320132"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.8ms)[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", "2014-09-18 12:25:06.322533"]]
- [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 (1.0ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:25:06.337731"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:25:06.337731"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "uid" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["uid", 123], ["updated_at", "2014-09-18 12:25:06.339821"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:25:06.342831"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:25:06.342831"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "uid" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["uid", 123], ["updated_at", "2014-09-18 12:25:06.344105"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:25:06.346168"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:25:06.346168"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "ok"], ["oauth_access_token", "as"], ["updated_at", "2014-09-18 12:25:06.348098"]]
- [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
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.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
-Completed 200 OK in 5ms (Views: 4.7ms | 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 1ms (Views: 0.7ms | 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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:25:06.368070"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:25:06.368070"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.4ms)[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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:25:06.371451"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:25:06.371451"]]
- [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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:25:06.374644"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:25:06.374644"]]
- [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.2ms)[0m [1mbegin transaction[0m
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:25:12.441427"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 12:25:12.441427"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.6ms)[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", "2014-09-18 12:25:12.444142"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "accounts" ("created_at", "synced_id", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2016-08-22 17:45:37.392037"], ["synced_id", 0], ["updated_at", "2016-08-22 17:45:37.392037"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1[0m
+ [1m[35m (0.5ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2016-08-22 17:45:37.406414"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2016-08-22 17:45:37.406414"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" IS NULL AND "accounts"."id" != 1) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[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", "2016-08-22 17:45:37.411970"]]
+ [1m[36m (0.1ms)[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 (1.2ms)[0m [1mrollback transaction[0m
+ [1m[36m (1.0ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:25:12.450248"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:25:12.450248"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "uid" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["uid", 123], ["updated_at", "2014-09-18 12:25:12.451887"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:25:12.455060"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:25:12.455060"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2016-08-22 17:45:37.418847"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2016-08-22 17:45:37.418847"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "uid" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["uid", 123], ["updated_at", "2014-09-18 12:25:12.456475"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:25:12.458724"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:25:12.458724"]]
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2016-08-22 17:45:37.420912"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 17:45:37.420912"]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[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", "2016-08-22 17:45:37.425841"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "ok"], ["oauth_access_token", "as"], ["updated_at", "2014-09-18 12:25:12.459909"]]
- [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
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
-Completed 200 OK in 5ms (Views: 4.8ms | 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 1ms (Views: 0.5ms | 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#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#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:25:12.479072"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:25:12.479072"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:25:12.483040"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:25:12.483040"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
- [1m[35m (0.4ms)[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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:25:12.486938"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:25:12.486938"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.2ms)[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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:26:02.622407"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:26:02.622407"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 13ms (ActiveRecord: 1.3ms)
- [1m[35m (1.2ms)[0m rollback transaction
+ [1m[35m (0.8ms)[0m rollback transaction
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_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", "2014-09-18 12:26:02.630495"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:26:02.630495"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
- [1m[35m (0.4ms)[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[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", "2014-09-18 12:26:02.635152"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:26:02.635152"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
-Completed 200 OK in 5ms (Views: 4.8ms | 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 1ms (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.0ms)[0m [1mbegin transaction[0m
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:26:02.650140"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:26:02.650140"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 456 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.7ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["name", "ok"], ["oauth_access_token", "as"], ["updated_at", "2014-09-18 12:26:02.651607"]]
- [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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:26:02.654384"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:26:02.654384"]]
- [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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:26:02.655550"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:26:02.655550"]]
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2016-08-22 17:45:37.430533"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2016-08-22 17:45:37.430533"]]
[1m[36m (0.1ms)[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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:26:02.657737"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:26:02.657737"]]
- [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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:26:02.658986"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:26:02.658986"]]
- [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.3ms)[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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:26:02.665588"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 12:26:02.665588"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.4ms)[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", "2014-09-18 12:26:02.666449"]]
- [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.2ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [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.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:26:34.790021"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:26:34.790021"]]
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2016-08-22 17:45:37.432343"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 17:45:37.432343"]]
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 13ms (ActiveRecord: 1.4ms)
- [1m[35m (1.1ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_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", "2014-09-18 12:26:34.798783"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:26:34.798783"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
- [1m[35m (0.4ms)[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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:26:34.803174"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:26:34.803174"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
-Completed 200 OK in 5ms (Views: 5.0ms | 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 1ms (Views: 0.6ms | 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.1ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:26:34.818774"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:26:34.818774"]]
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 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", "2016-08-22 17:45:37.435103"]]
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [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.7ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["name", "ok"], ["oauth_access_token", "as"], ["updated_at", "2014-09-18 12:26:34.820161"]]
- [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[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:26:34.822928"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:26:34.822928"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "uid" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["uid", 123], ["updated_at", "2014-09-18 12:26:34.824007"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:26:34.825979"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:26:34.825979"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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 UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "uid" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["uid", 123], ["updated_at", "2014-09-18 12:26:34.826942"]]
- [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.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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:26:34.833539"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 12:26:34.833539"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-09-18 12:26:34.834434"]]
- [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.2ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
-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 1ms (Views: 0.5ms | 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" ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:28:00.562904"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:28:00.562904"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 11ms (ActiveRecord: 1.3ms)
- [1m[35m (1.1ms)[0m rollback transaction
+ [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 2]]
+ [1m[35m (1.4ms)[0m rollback transaction
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_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", "2014-09-18 12:28:00.570605"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:28:00.570605"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.4ms)[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" 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", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:28:00.574688"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:28:00.574688"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-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#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
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2016-08-22 17:45:37.440067"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2016-08-22 17:45:37.440067"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:28:00.586354"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:28:00.586354"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.8ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:28:00.587344"], ["provider", "other_provider"], ["uid", 123], ["updated_at", "2014-09-18 12:28:00.587344"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:28:00.588655"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:28:00.588655"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [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 [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "uid" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["uid", 123], ["updated_at", "2014-09-18 12:28:00.589613"]]
- [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", 3]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:28:00.592396"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:28:00.592396"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:28:00.593196"], ["provider", "other_provider"], ["uid", 123], ["updated_at", "2014-09-18 12:28:00.593196"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:28:00.594016"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:28:00.594016"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [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.0ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "uid" = ?, "updated_at" = ? WHERE "accounts"."id" = 1[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["uid", 123], ["updated_at", "2014-09-18 12:28:00.594954"]]
- [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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:28:00.597132"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:28:00.597132"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:28:00.597838"], ["provider", "other_provider"], ["uid", 123], ["updated_at", "2014-09-18 12:28:00.597838"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.0ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:28:00.598618"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:28:00.598618"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[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.0ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "uid" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["uid", 123], ["updated_at", "2014-09-18 12:28:00.599517"]]
- [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", 3]]
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-18 12:28:00.601312"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 12:28:00.601312"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-09-18 12:28:00.602068"]]
- [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.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 SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:28:10.505394"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 12:28:10.505394"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.8ms)[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", "2014-09-18 12:28:10.507741"]]
- [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[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2016-08-22 17:45:37.442228"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 17:45:37.442228"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 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", "2016-08-22 17:45:37.445784"]]
+ [1m[35m (0.1ms)[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 (1.4ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2016-08-22 17:45:37.452172"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2016-08-22 17:45:37.452172"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "accounts"
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 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", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2016-08-22 17:45:37.464514"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 17:45:37.464514"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "accounts"
[1m[36m (1.1ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:28:10.513641"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:28:10.513641"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:28:10.514646"], ["provider", "other_provider"], ["uid", 123], ["updated_at", "2014-09-18 12:28:10.514646"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.0ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:28:10.515383"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:28:10.515383"]]
- [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[35mSQL (0.1ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 3 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-18 12:28:10.518425"]]
- [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", 3]]
- [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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:28:10.520656"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:28:10.520656"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:28:10.521391"], ["provider", "other_provider"], ["uid", 123], ["updated_at", "2014-09-18 12:28:10.521391"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.0ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:28:10.522168"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:28:10.522168"]]
- [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[35mSQL (0.0ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 3 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-18 12:28:10.523009"]]
- [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", 3]]
- [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[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:28:10.524560"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 12:28:10.524560"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 12:28:10.525207"], ["provider", "other_provider"], ["uid", 123], ["updated_at", "2014-09-18 12:28:10.525207"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.0ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 12:28:10.525999"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:28:10.525999"]]
- [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[35mSQL (0.0ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 3 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2014-09-18 12:28:10.526790"]]
- [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
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
-Completed 200 OK in 5ms (Views: 4.6ms | 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 1ms (Views: 0.5ms | 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#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#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[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", "2014-09-18 12:28:10.545145"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:28:10.545145"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_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", "2014-09-18 12:28:10.550322"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:28:10.550322"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
- [1m[35m (0.4ms)[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[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", "2014-09-18 12:28:10.554908"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 12:28:10.554908"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.2ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:09:35.208737"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 13:09:35.208737"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.7ms)[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", "2014-09-18 13:09:35.214072"]]
- [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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:09:35.222163"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:09:35.222163"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "accounts"
- [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[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", "2014-09-18 13:09:35.236224"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:09:35.236224"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.1ms)[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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:09:35.238966"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:09:35.238966"]]
+ [1m[35mAccount Exists (0.6ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2016-08-22 17:45:37.472142"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2016-08-22 17:45:37.472142"]]
[1m[35m (0.1ms)[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[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.7ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2016-08-22 17:45:37.477417"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 17:45:37.477417"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (1.6ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
[1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-09-18 13:09:35.240810"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:09:35.240810"]]
- [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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:09:35.244793"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:09:35.244793"]]
- [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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 13:09:35.246442"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:09:35.246442"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:09:35.248539"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:09:35.248539"]]
- [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[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", "2014-09-18 13:09:35.250133"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:09:35.250133"]]
- [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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:09:35.254827"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:09:35.254827"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:09:35.255948"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:09:35.255948"]]
- [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[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", "2014-09-18 13:09:35.257142"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:09:35.258811"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:09:35.258811"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:09:35.259548"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:09:35.259548"]]
- [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[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", "2014-09-18 13:09:35.260645"]]
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2016-08-22 17:45:37.484772"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2016-08-22 17:45:37.484772"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (1.0ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2016-08-22 17:45:37.488036"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 17:45:37.488036"]]
[1m[35m (0.1ms)[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.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:09:35.262656"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:09:35.262656"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:09:35.263456"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:09:35.263456"]]
- [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[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", "2014-09-18 13:09:35.264618"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:09:35.266404"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:09:35.266404"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:09:35.267144"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:09:35.267144"]]
- [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[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", "2014-09-18 13:09:35.268426"]]
- [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.4ms)[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 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.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[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", "2014-09-18 13:09:35.308832"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:09:35.308832"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.5ms)
- [1m[35m (0.4ms)[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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 13:09:35.313961"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:09:35.313961"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.5ms)
- [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[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", "2014-09-18 13:09:35.318047"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:09:35.318047"]]
- [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#failure as HTML
-Completed 200 OK in 14ms (Views: 14.2ms | 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 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36m (0.2ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
-Completed 200 OK in 6ms (Views: 6.1ms | 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 1ms (Views: 0.6ms | 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 (1.3ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_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", "2014-09-18 13:10:07.442969"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:10:07.442969"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 20ms (ActiveRecord: 1.6ms)
- [1m[35m (0.8ms)[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[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", "2014-09-18 13:10:07.451033"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:10:07.451033"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-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[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", "2014-09-18 13:10:07.454681"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:10:07.454681"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
- [1m[35m (0.4ms)[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.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:10:07.466179"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:10:07.466179"]]
+ [1m[35mAccount Exists (0.4ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2016-08-22 17:45:37.496422"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2016-08-22 17:45:37.496422"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.8ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:10:07.467653"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:10:07.467653"]]
- [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[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", "2014-09-18 13:10:07.469727"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:10:07.472410"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:10:07.472410"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:10:07.473180"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:10:07.473180"]]
- [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[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", "2014-09-18 13:10:07.474289"]]
- [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", 2]]
- [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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:10:07.476394"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:10:07.476394"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:10:07.477458"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:10:07.477458"]]
- [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[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", "2014-09-18 13:10:07.479016"]]
- [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.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:10:07.481284"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:10:07.481284"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:10:07.482464"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:10:07.482464"]]
- [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[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", "2014-09-18 13:10:07.484056"]]
- [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.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:10:07.486165"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:10:07.486165"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "accounts"
- [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[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", "2014-09-18 13:10:07.489193"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:10:07.489193"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:10:07.491658"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:10:07.491658"]]
- [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[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", "2014-09-18 13:10:07.492988"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:10:07.492988"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:10:07.494679"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:10:07.494679"]]
- [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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 13:10:07.495816"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:10:07.495816"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:10:07.497604"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:10:07.497604"]]
- [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[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", "2014-09-18 13:10:07.499248"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:10:07.499248"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.4ms)[0m [1mrollback transaction[0m
+ [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (1.6ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2016-08-22 17:45:37.503037"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 17:45:37.503037"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.9ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", "2016-08-22 17:45:37.515613"], ["oauth_access_token", "token"], ["oauth_expires_at", "1471801537"], ["oauth_refresh_token", "refresh_token"], ["synced_id", 123], ["updated_at", "2016-08-22 17:45:37.515613"]]
+ [1m[35m (2.1ms)[0m commit transaction
+ [1m[36m (0.4ms)[0m [1mbegin transaction[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 1) LIMIT 1
+ [1m[36mSQL (0.5ms)[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", "1472060737"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2016-08-22 17:45:37.526148"]]
+ [1m[35m (1.1ms)[0m commit transaction
+ [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts"[0m
[1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-09-18 13:10:07.501944"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 13:10:07.501944"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-09-18 13:10:07.502817"]]
- [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.3ms)[0m rollback transaction
+ [1m[36mSQL (0.3ms)[0m [1mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 1]]
+ [1m[35m (0.8ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", "2016-08-22 17:45:37.536018"], ["oauth_access_token", "token"], ["oauth_expires_at", "1471801537"], ["oauth_refresh_token", "refresh_token"], ["synced_id", 123], ["updated_at", "2016-08-22 17:45:37.536018"]]
+ [1m[35m (1.0ms)[0m commit transaction
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:10:46.234948"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 13:10:46.234948"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.6ms)[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", "2014-09-18 13:10:46.237845"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:10:46.242884"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:10:46.242884"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "accounts"
- [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[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", "2014-09-18 13:10:46.248287"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:10:46.248287"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:10:46.250848"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:10:46.250848"]]
- [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[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", "2014-09-18 13:10:46.252311"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:10:46.252311"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:10:46.254725"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:10:46.254725"]]
- [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[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", "2014-09-18 13:10:46.255958"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:10:46.255958"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:10:46.257617"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:10:46.257617"]]
- [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[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", "2014-09-18 13:10:46.258779"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:10:46.258779"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:10:46.260888"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:10:46.260888"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:10:46.261677"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:10:46.261677"]]
- [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[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", "2014-09-18 13:10:46.262763"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:10:46.264306"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:10:46.264306"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:10:46.265026"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:10:46.265026"]]
- [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[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", "2014-09-18 13:10:46.266119"]]
- [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.3ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:10:46.268045"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:10:46.268045"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:10:46.269422"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:10:46.269422"]]
- [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[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", "2014-09-18 13:10:46.270966"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:10:46.273624"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:10:46.273624"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:10:46.274513"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:10:46.274513"]]
- [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[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", "2014-09-18 13:10:46.275733"]]
- [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.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
-Processing by SessionsController#destroy as HTML
-Redirected to http://test.host/signed_out
-Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["oauth_access_token", "refreshed_token"], ["oauth_expires_at", "1472060737"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2016-08-22 17:45:37.541077"]]
+ [1m[36m (0.8ms)[0m [1mcommit transaction[0m
[1m[35m (0.1ms)[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#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[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", "2014-09-18 13:10:46.295191"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:10:46.295191"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.4ms)[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[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", "2014-09-18 13:10:46.299136"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:10:46.299136"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-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[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", "2014-09-18 13:10:46.302567"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:10:46.302567"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [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 5ms (Views: 5.1ms | 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 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36m (0.3ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:15:40.087881"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 13:15:40.087881"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.7ms)[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", "2014-09-18 13:15:40.090859"]]
- [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.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:15:40.105583"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:15:40.105583"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "accounts"
- [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[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", "2014-09-18 13:15:40.111088"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:15:40.111088"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:15:40.113537"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:15:40.113537"]]
- [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[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", "2014-09-18 13:15:40.114717"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:15:40.114717"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:15:40.116320"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:15:40.116320"]]
- [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[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", "2014-09-18 13:15:40.117475"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:15:40.117475"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:15:40.119483"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:15:40.119483"]]
- [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[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", "2014-09-18 13:15:40.120718"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:15:40.120718"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:15:40.122607"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:15:40.122607"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:15:40.123453"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:15:40.123453"]]
+ [1m[36mAccount Load (0.4ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 2]]
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts"
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = ? [["id", 2]]
+ [1m[36m (0.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", "2016-08-22 17:45:37.549790"], ["oauth_access_token", "token"], ["oauth_expires_at", 1471974337], ["oauth_refresh_token", "refresh_token"], ["synced_id", 123], ["updated_at", "2016-08-22 17:45:37.549790"]]
[1m[35m (0.1ms)[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[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", "2014-09-18 13:15:40.124734"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:15:40.126582"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:15:40.126582"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:15:40.127525"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:15:40.127525"]]
- [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[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", "2014-09-18 13:15:40.128848"]]
- [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.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:15:40.131047"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:15:40.131047"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:15:40.131922"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:15:40.131922"]]
- [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[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", "2014-09-18 13:15:40.133079"]]
- [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.3ms)[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.7ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
[1m[36m (0.1ms)[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[35m (0.1ms)[0m begin transaction
[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 5ms (Views: 5.3ms | 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.8ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m begin transaction
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[36mAccount Load (0.2ms)[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[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", "2014-09-18 13:15:40.155309"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:15:40.155309"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.5ms)
- [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[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", "2014-09-18 13:15:40.159694"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:15:40.159694"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.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[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", "2014-09-18 13:15:40.163525"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:15:40.163525"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[36m (0.4ms)[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[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", "2014-09-18 13:15:48.607446"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:15:48.607446"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 14ms (ActiveRecord: 1.4ms)
- [1m[35m (1.0ms)[0m rollback transaction
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36m (0.2ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[36m (0.6ms)[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 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m rollback transaction
[1m[36m (0.1ms)[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[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", "2014-09-18 13:15:48.614924"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:15:48.614924"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.4ms)[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[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", "2014-09-18 13:15:48.618581"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:15:48.618581"]]
- [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.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Processing by AuthenticatedController#index as HTML
+ Rendered text template (0.1ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 17ms (Views: 16.0ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+Processing by AuthenticatedController#index as JS
+ Rendered text template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+Processing by AuthenticatedController#index as JS
+ Rendered text template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m rollback transaction
+ [1m[36m (0.1ms)[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[35m (0.1ms)[0m rollback transaction
[1m[36m (0.1ms)[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
+ [1m[35m (0.1ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
Processing by SessionsController#failure as HTML
-Completed 200 OK in 5ms (Views: 5.2ms | ActiveRecord: 0.0ms)
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.5ms)
+Completed 200 OK in 10ms (Views: 9.5ms | ActiveRecord: 0.0ms)
[1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
Processing by SessionsController#failure as HTML
-Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
- [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[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:15:48.633923"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:15:48.633923"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.7ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:15:48.634933"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:15:48.634933"]]
- [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[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", "2014-09-18 13:15:48.636640"]]
- [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[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:15:48.639015"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:15:48.639015"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:15:48.639724"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:15:48.639724"]]
- [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[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", "2014-09-18 13:15:48.640795"]]
- [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", 2]]
- [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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:15:48.643407"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:15:48.643407"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:15:48.644204"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:15:48.644204"]]
- [1m[35m (0.1ms)[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[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", "2014-09-18 13:15:48.645640"]]
- [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.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:15:48.647784"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:15:48.647784"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "accounts"[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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 13:15:48.650893"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:15:48.650893"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "accounts"
- [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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:15:48.653089"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:15:48.653089"]]
- [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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 13:15:48.654339"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:15:48.654339"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:15:48.656267"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:15:48.656267"]]
- [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[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:15:48.657566"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:15:48.657566"]]
- [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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:15:48.659761"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:15:48.659761"]]
- [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[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", "2014-09-18 13:15:48.660999"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:15:48.660999"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:15:48.662921"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 13:15:48.662921"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[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", "2014-09-18 13:15:48.663771"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[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 1ms (ActiveRecord: 0.0ms)
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
+Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms)
[1m[35m (0.1ms)[0m rollback transaction
[1m[36m (0.1ms)[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.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[35mSQL (0.6ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 13:40:36.795185"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:40:36.795185"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 17:45:46.027308"], ["updated_at", "2016-08-22 17:45:46.027308"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
Redirected to http://test.host/
-Completed 302 Found in 21ms (ActiveRecord: 1.9ms)
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Completed 302 Found in 34ms (ActiveRecord: 2.5ms)
+ [1m[36m (1.7ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.2ms)[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[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", "2014-09-18 13:40:36.803678"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:40:36.803678"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.4ms)[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[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", "2014-09-18 13:40:36.807631"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:40:36.807631"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 17:45:46.039346"], ["updated_at", "2016-08-22 17:45:46.039346"]]
+ [1m[36m (0.1ms)[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.1ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
-Completed 200 OK in 9ms (Views: 9.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 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)
- [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[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:40:36.824957"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 13:40:36.824957"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.8ms)[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", "2014-09-18 13:40:36.826084"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:40:36.829651"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:40:36.829651"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:40:36.830460"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:40:36.830460"]]
- [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[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", "2014-09-18 13:40:36.831616"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:40:36.833430"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:40:36.833430"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:40:36.834561"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:40:36.834561"]]
- [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[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", "2014-09-18 13:40:36.835752"]]
- [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.3ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:40:36.838799"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:40:36.838799"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:40:36.839716"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:40:36.839716"]]
- [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.1ms)[0m [1mSAVEPOINT active_record_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", "2014-09-18 13:40:36.840970"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:40:36.843233"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:40:36.843233"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "accounts"
- [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[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:40:36.847769"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:40:36.847769"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:40:36.850712"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:40:36.850712"]]
- [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[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", "2014-09-18 13:40:36.852112"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:40:36.852112"]]
- [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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:40:36.854234"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:40:36.854234"]]
- [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[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", "2014-09-18 13:40:36.855460"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:40:36.855460"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Completed 302 Found in 5ms (ActiveRecord: 0.6ms)
[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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:40:36.857258"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:40:36.857258"]]
- [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[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", "2014-09-18 13:40:36.858558"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:40:36.858558"]]
- [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.1ms)[0m [1mrollback transaction[0m
- [1m[36m (0.3ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:41:00.326289"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:41:00.326289"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "accounts"[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[35mSQL (0.9ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 13:41:00.336087"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:00.336087"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "accounts"
- [1m[36m (1.0ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:41:00.340053"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:41:00.340053"]]
- [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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 13:41:00.341924"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:00.341924"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:41:00.345129"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:41:00.345129"]]
- [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[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", "2014-09-18 13:41:00.346445"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:00.346445"]]
- [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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:41:00.348797"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:41:00.348797"]]
- [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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 13:41:00.349938"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:00.349938"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:41:00.351780"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:41:00.351780"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:41:00.352585"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:00.352585"]]
- [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[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", "2014-09-18 13:41:00.353831"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:41:00.356388"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:41:00.356388"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:41:00.357287"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:00.357287"]]
- [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[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", "2014-09-18 13:41:00.358492"]]
- [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", 2]]
- [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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:41:00.360534"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:41:00.360534"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:41:00.361329"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:00.361329"]]
- [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[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", "2014-09-18 13:41:00.362512"]]
- [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.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-09-18 13:41:00.364342"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 13:41:00.364342"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[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", "2014-09-18 13:41:00.365108"]]
- [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.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.1ms)[0m [1mbegin transaction[0m
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[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", "2014-09-18 13:41:00.384104"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:00.384104"]]
- [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.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[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", "2014-09-18 13:41:00.388192"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:00.388192"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/
-Completed 302 Found in 2ms (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[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", "2014-09-18 13:41:00.392514"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:00.392514"]]
- [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#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#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#failure as HTML
-Completed 200 OK in 6ms (Views: 5.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 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
- [1m[36m (0.0ms)[0m [1mrollback transaction[0m
- [1m[36m (0.3ms)[0m [1mbegin transaction[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (5.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.9ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00]]
- [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[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 17:45:46.052511"], ["updated_at", "2016-08-22 17:45:46.052511"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/
+Completed 302 Found in 6ms (ActiveRecord: 0.7ms)
+ [1m[36m (0.5ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[0m begin transaction
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["created_at", "2016-08-22 17:45:46.058489"], ["updated_at", "2016-08-22 17:45:46.058489"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.5ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00]]
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" IS NULL AND "accounts"."id" != 1) LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2016-08-22 17:45:46.062200"], ["id", 1]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 1]]
+ [1m[35m (0.7ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 17:45:46.072508"], ["updated_at", "2016-08-22 17:45:46.072508"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "accounts"
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00]]
- [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[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00]]
- [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[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.5ms)[0m [1mrollback transaction[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.9ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 17:45:46.080157"], ["updated_at", "2016-08-22 17:45:46.080157"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "accounts"
+ [1m[36m (0.6ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[0m begin transaction
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.5ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00]]
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 17:45:46.087679"], ["updated_at", "2016-08-22 17:45:46.087679"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 17:45:46.092132"], ["updated_at", "2016-08-22 17:45:46.092132"]]
[1m[36m (0.1ms)[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.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.6ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.4ms)[0m rollback transaction
+ [1m[35m (0.7ms)[0m rollback transaction
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00]]
- [1m[35m (0.1ms)[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[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", Thu, 18 Sep 2014 13:41:12 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 17:45:46.097436"], ["updated_at", "2016-08-22 17:45:46.097436"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00]]
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 17:45:46.100561"], ["updated_at", "2016-08-22 17:45:46.100561"]]
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[36m (0.9ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 17:45:46.106001"], ["updated_at", "2016-08-22 17:45:46.106001"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.1ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 2[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00]]
- [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[36mSQL (0.1ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 2[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00]]
- [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.3ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00]]
- [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[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00]]
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 17:45:46.109108"], ["updated_at", "2016-08-22 17:45:46.109108"]]
[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.4ms)[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
-Processing by SessionsController#destroy as HTML
-Redirected to http://test.host/signed_out
-Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
- [1m[36m (0.1ms)[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#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[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.6ms)
- [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[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", Thu, 18 Sep 2014 13:41:12 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.5ms)
- [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[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", Thu, 18 Sep 2014 13:41:12 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 18 Sep 2014 13:41:12 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [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 7ms (Views: 6.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.5ms | ActiveRecord: 0.0ms)
- [1m[36m (0.0ms)[0m [1mrollback transaction[0m
- [1m[36m (0.2ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
-Completed 200 OK in 5ms (Views: 5.1ms | 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 1ms (Views: 0.6ms | 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[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", "2014-09-18 13:41:14.900733"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:14.900733"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 15ms (ActiveRecord: 1.6ms)
- [1m[35m (1.0ms)[0m rollback transaction
+ [1m[35m (0.8ms)[0m rollback transaction
[1m[36m (0.1ms)[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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 13:41:14.908878"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:14.908878"]]
- [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.6ms)
- [1m[35m (0.4ms)[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[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", "2014-09-18 13:41:14.914370"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:14.914370"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.4ms)[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.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[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:41:14.925297"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:41:14.925297"]]
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 17:45:46.114105"], ["updated_at", "2016-08-22 17:45:46.114105"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2016-08-22 17:45:46.118195"], ["updated_at", "2016-08-22 17:45:46.118195"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2016-08-22 17:45:46.121965"], ["id", 2]]
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.8ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:41:14.926508"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:14.926508"]]
- [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[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", "2014-09-18 13:41:14.928551"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:41:14.931055"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:41:14.931055"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:41:14.931852"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:14.931852"]]
- [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[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", "2014-09-18 13:41:14.932981"]]
- [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", 2]]
- [1m[36m (0.4ms)[0m [1mrollback transaction[0m
+ [1m[36m (0.8ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[0m begin transaction
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:41:14.935179"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:41:14.935179"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:41:14.936502"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:14.936502"]]
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 17:45:46.126284"], ["updated_at", "2016-08-22 17:45:46.126284"]]
[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[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", "2014-09-18 13:41:14.937709"]]
- [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.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:41:14.939680"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:41:14.939680"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "accounts"[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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 13:41:14.943454"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:14.943454"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "accounts"
- [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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:41:14.946119"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:41:14.946119"]]
- [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[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", "2014-09-18 13:41:14.947476"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:14.947476"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:41:14.949678"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:41:14.949678"]]
- [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[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", "2014-09-18 13:41:14.950855"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:14.950855"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:41:14.952578"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:41:14.952578"]]
- [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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 13:41:14.953752"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:14.953752"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:41:14.955772"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 13:41:14.955772"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[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", "2014-09-18 13:41:14.956635"]]
- [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", 1]]
- [1m[36m (0.4ms)[0m [1mrollback transaction[0m
- [1m[36m (0.3ms)[0m [1mbegin transaction[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2016-08-22 17:45:46.128610"], ["updated_at", "2016-08-22 17:45:46.128610"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:41:18.038450"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-09-18 13:41:18.038450"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.8ms)[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", "2014-09-18 13:41:18.042387"]]
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2016-08-22 17:45:46.133576"], ["id", 2]]
[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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
+ [1m[36m (0.8ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[0m begin transaction
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:41:18.065567"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:41:18.065567"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "accounts"
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["uid", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:41:18.071622"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:18.071622"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:41:18.074591"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:41:18.074591"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["uid", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-09-18 13:41:18.076393"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:18.076393"]]
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 17:45:46.138118"], ["updated_at", "2016-08-22 17:45:46.138118"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:41:18.079072"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:41:18.079072"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-09-18 13:41:18.080821"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:18.080821"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:41:18.083452"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:41:18.083452"]]
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2016-08-22 17:45:46.140245"], ["updated_at", "2016-08-22 17:45:46.140245"]]
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["uid", 123], ["provider", "bookingsync"]]
+ [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:41:18.085182"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:18.085182"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:41:18.088021"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:41:18.088021"]]
+ [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1[0m
+ [1m[35mSQL (0.1ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2016-08-22 17:45:46.143528"], ["id", 2]]
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:41:18.089370"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:18.089370"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["uid", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-09-18 13:41:18.091456"]]
- [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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:41:18.093893"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:41:18.093893"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:41:18.096158"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:18.096158"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["uid", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-09-18 13:41:18.099011"]]
- [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.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-09-18 13:41:18.101350"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-09-18 13:41:18.101350"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-09-18 13:41:18.102580"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:18.102580"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_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", "2014-09-18 13:41:18.104210"]]
- [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.3ms)[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.1ms)[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#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
-Completed 200 OK in 11ms (Views: 10.5ms | ActiveRecord: 0.0ms)
- [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[36m (0.8ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471974346"], ["created_at", "2016-08-22 17:45:46.150280"], ["updated_at", "2016-08-22 17:45:46.150280"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[0m begin transaction
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
-Completed 200 OK in 1ms (Views: 1.1ms | ActiveRecord: 0.0ms)
- [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471801546"], ["created_at", "2016-08-22 17:45:46.158650"], ["updated_at", "2016-08-22 17:45:46.158650"]]
+ [1m[36m (1.1ms)[0m [1mcommit transaction[0m
[1m[35m (0.1ms)[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" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["uid", 123], ["provider", "bookingsync"]]
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_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", "2014-09-18 13:41:18.136194"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:18.136194"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
- [1m[36m (0.4ms)[0m [1mrollback transaction[0m
+ [1m[36m (0.6ms)[0m [1mbegin transaction[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 1) LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472060746"], ["updated_at", "2016-08-22 17:45:46.170011"], ["id", 1]]
+ [1m[35m (0.9ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts"[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" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["uid", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-09-18 13:41:18.141528"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:18.141528"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/admin
-Completed 302 Found in 3ms (ActiveRecord: 0.4ms)
- [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" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["uid", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-09-18 13:41:18.146794"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-09-18 13:41:18.146794"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.4ms)
- [1m[36m (0.4ms)[0m [1mrollback transaction[0m
- [1m[36m (0.2ms)[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 7ms (Views: 6.6ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[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.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:10:43.553587"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:10:43.553587"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.7ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:10:43.556977"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:10:43.556977"]]
- [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[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", "2014-11-13 12:10:43.564840"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:10:43.568381"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:10:43.568381"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:10:43.569238"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:10:43.569238"]]
- [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[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", "2014-11-13 12:10:43.570385"]]
- [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", 2]]
- [1m[36m (0.4ms)[0m [1mrollback transaction[0m
+ [1m[36mSQL (0.3ms)[0m [1mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 1]]
+ [1m[35m (0.9ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471801546"], ["created_at", "2016-08-22 17:45:46.178203"], ["updated_at", "2016-08-22 17:45:46.178203"]]
+ [1m[35m (1.0ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472060746"], ["updated_at", "2016-08-22 17:45:46.185666"], ["id", 2]]
+ [1m[35m (0.9ms)[0m commit transaction
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts"[0m
[1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:10:43.572306"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:10:43.572306"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:10:43.573033"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:10:43.573033"]]
- [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[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", "2014-11-13 12:10:43.574456"]]
- [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.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:10:43.576499"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:10:43.576499"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "accounts"[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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-13 12:10:43.580522"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:10:43.580522"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "accounts"
- [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[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:10:43.582972"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:10:43.582972"]]
- [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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-13 12:10:43.584984"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:10:43.584984"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:10:43.586873"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:10:43.586873"]]
- [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[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", "2014-11-13 12:10:43.588004"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:10:43.588004"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:10:43.589860"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:10:43.589860"]]
- [1m[36m (0.1ms)[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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-13 12:10:43.591245"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:10:43.591245"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.3ms)[0m rollback transaction
+ [1m[36mSQL (0.2ms)[0m [1mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 2]]
+ [1m[35m (0.8ms)[0m commit transaction
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
[1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:10:43.611943"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-11-13 12:10:43.611943"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[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", "2014-11-13 12:10:43.613223"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "created_at", "updated_at") VALUES (?, ?, ?) [["synced_id", 0], ["created_at", "2016-08-22 17:45:46.206240"], ["updated_at", "2016-08-22 17:45:46.206240"]]
[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.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[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", "2014-11-13 12:10:43.619569"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:10:43.619569"]]
- [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.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[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", "2014-11-13 12:10:43.623654"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:10:43.623654"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (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[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", "2014-11-13 12:10:43.626906"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:10:43.626906"]]
- [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#failure as HTML
-Completed 200 OK in 2ms (Views: 2.1ms | 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.6ms | 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[36m (0.2ms)[0m [1mbegin transaction[0m
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (4.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 13 Nov 2014 12:10:56 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:10:56 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.7ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:10:56 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:10:56 UTC +00:00]]
- [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[35mSQL (0.1ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Thu, 13 Nov 2014 12:10:56 UTC +00:00]]
- [1m[36m (0.1ms)[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[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 13 Nov 2014 12:10:56 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:10:56 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:10:56 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:10:56 UTC +00:00]]
- [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[35mSQL (0.1ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Thu, 13 Nov 2014 12:10:57 UTC +00:00]]
- [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", 2]]
- [1m[36m (3.2ms)[0m [1mrollback transaction[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1
+ [1m[36m (0.6ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:10:57 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:10:57 UTC +00:00]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 13 Nov 2014 12:10:57 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:10:57 UTC +00:00]]
- [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[36mSQL (0.1ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 2[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Thu, 13 Nov 2014 12:10:57 UTC +00:00]]
- [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.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 13 Nov 2014 12:10:57 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:10:57 UTC +00:00]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "accounts"[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[35mSQL (0.5ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:10:57 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:10:57 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "accounts"
- [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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:10:57 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:10:57 UTC +00:00]]
- [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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:10:57 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:10:57 UTC +00:00]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 13 Nov 2014 12:10:57 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:10:57 UTC +00:00]]
- [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[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", Thu, 13 Nov 2014 12:10:57 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:10:57 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:10:57 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:10:57 UTC +00:00]]
- [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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:10:57 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:10:57 UTC +00:00]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", Thu, 13 Nov 2014 12:10:57 UTC +00:00], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", Thu, 13 Nov 2014 12:10:57 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", Thu, 13 Nov 2014 12:10:57 UTC +00:00]]
- [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", 1]]
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
-Processing by AuthenticatedController#index as HTML
- Rendered text template (0.0ms)
-Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 6ms (Views: 6.1ms | ActiveRecord: 0.0ms)
[1m[36m (0.1ms)[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
-Processing by SessionsController#failure as HTML
-Completed 200 OK in 2ms (Views: 1.8ms | 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.5ms | 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[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", Thu, 13 Nov 2014 12:10:57 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:10:57 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.5ms)
- [1m[36m (0.5ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[0m begin transaction
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_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", Thu, 13 Nov 2014 12:10:57 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:10:57 UTC +00:00]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.6ms)
- [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[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", Thu, 13 Nov 2014 12:10:57 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:10:57 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.5ms)
- [1m[36m (0.4ms)[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[36m (0.2ms)[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.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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-13 12:11:16.068860"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:11:16.068860"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 13ms (ActiveRecord: 1.3ms)
- [1m[35m (1.0ms)[0m rollback transaction
- [1m[36m (0.1ms)[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[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", "2014-11-13 12:11:16.076348"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:11:16.076348"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.4ms)[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[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", "2014-11-13 12:11:16.080792"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:11:16.080792"]]
- [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#failure as HTML
-Completed 200 OK in 10ms (Views: 9.8ms | 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 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.3ms)[0m [1m[36mbegin transaction[0m
Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 401 Unauthorized in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Completed 401 Unauthorized in 7ms (Views: 6.7ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
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
+Completed 401 Unauthorized in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin 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
+Completed 302 Found in 11ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by AuthenticatedController#index as HTML
+ Rendering text template
+ Rendered text template (0.0ms)
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.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-11-13 12:11:16.108796"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-11-13 12:11:16.108796"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.7ms)[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", "2014-11-13 12:11:16.109794"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:11:16.113083"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:11:16.113083"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "accounts"
- [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[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", "2014-11-13 12:11:16.115959"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:11:16.115959"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "accounts"[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[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:11:16.117970"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:11:16.117970"]]
- [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[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", "2014-11-13 12:11:16.118984"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:11:16.118984"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.6ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:11:16.121209"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:11:16.121209"]]
- [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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-13 12:11:16.122743"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:11:16.122743"]]
- [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[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:11:16.124777"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:11:16.124777"]]
- [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[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", "2014-11-13 12:11:16.125770"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:11:16.125770"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:11:16.127470"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:11:16.127470"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:11:16.128140"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:11:16.128140"]]
- [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[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", "2014-11-13 12:11:16.129162"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:11:16.130977"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:11:16.130977"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:11:16.131720"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:11:16.131720"]]
- [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[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", "2014-11-13 12:11:16.132804"]]
- [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.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:11:16.134496"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:11:16.134496"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:11:16.135280"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:11:16.135280"]]
- [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[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", "2014-11-13 12:11:16.136418"]]
- [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.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mrollback transaction[0m
- [1m[36m (0.3ms)[0m [1mbegin transaction[0m
+Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin 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
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.3ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.2ms)[0m [1m[36mbegin 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
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
+Completed 200 OK in 17ms (Views: 10.3ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.0ms)
+Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin 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[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", "2014-11-13 12:11:37.331813"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:11:37.331813"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 13ms (ActiveRecord: 1.3ms)
- [1m[35m (1.1ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:45:55 UTC], ["updated_at", 2016-08-22 17:45:55 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/admin
+Completed 302 Found in 68ms (ActiveRecord: 3.9ms)
+ [1m[35m (0.7ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin 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[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", "2014-11-13 12:11:37.338863"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:11:37.338863"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:45:55 UTC], ["updated_at", 2016-08-22 17:45:55 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+Completed 302 Found in 6ms (ActiveRecord: 0.9ms)
+ [1m[35m (0.4ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin 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[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", "2014-11-13 12:11:37.343491"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:11:37.343491"]]
- [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#failure as HTML
-Completed 200 OK in 10ms (Views: 9.6ms | 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 1ms (Views: 0.5ms | 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 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.2ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:45:55 UTC], ["updated_at", 2016-08-22 17:45:55 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 4ms (ActiveRecord: 0.6ms)
+ [1m[35m (0.5ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (1.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:45:55 UTC], ["updated_at", 2016-08-22 17:45:55 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471974355"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.2ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:45:55 UTC], ["updated_at", 2016-08-22 17:45:55 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471801555"]]
+ [1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 1], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 17:45:55 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472060755"], ["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.9ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:45:55 UTC], ["updated_at", 2016-08-22 17:45:55 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471801555"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 1], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 17:45:55 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472060755"], ["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT ?[0m [["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:45:55 UTC], ["updated_at", 2016-08-22 17:45:55 UTC], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != ?) LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[35mSQL (0.8ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 17:45:55 UTC], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[35m (0.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:45:55 UTC], ["updated_at", 2016-08-22 17:45:55 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:45:55 UTC], ["updated_at", 2016-08-22 17:45:55 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (0.7ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:45:55 UTC], ["updated_at", 2016-08-22 17:45:55 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:45:55 UTC], ["updated_at", 2016-08-22 17:45:55 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:45:55 UTC], ["updated_at", 2016-08-22 17:45:55 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.0ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:45:55 UTC], ["updated_at", 2016-08-22 17:45:55 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:45:55 UTC], ["updated_at", 2016-08-22 17:45:55 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.0ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:45:55 UTC], ["updated_at", 2016-08-22 17:45:55 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.9ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:45:55 UTC], ["updated_at", 2016-08-22 17:45:55 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:45:55 UTC], ["updated_at", 2016-08-22 17:45:55 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (0.1ms)[0m [1m[33mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 17:45:55 UTC], ["id", 2]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.2ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:45:55 UTC], ["updated_at", 2016-08-22 17:45:55 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (1.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:45:55 UTC], ["updated_at", 2016-08-22 17:45:55 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[33mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 17:45:55 UTC], ["id", 2]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT ?[0m [["id", 2], ["LIMIT", 1]]
+ [1m[35m (0.9ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:45:55 UTC], ["updated_at", 2016-08-22 17:45:55 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:45:55 UTC], ["updated_at", 2016-08-22 17:45:55 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (0.1ms)[0m [1m[33mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 17:45:55 UTC], ["id", 2]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT ?[0m [["id", 2], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.3ms)[0m [1m[36mbegin 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
+Completed 302 Found in 4ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by AuthenticatedController#index as HTML
-Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
- [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[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:11:37.369133"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-11-13 12:11:37.369133"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.9ms)[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", "2014-11-13 12:11:37.370220"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:11:37.373776"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:11:37.373776"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "accounts"
- [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[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", "2014-11-13 12:11:37.376725"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:11:37.376725"]]
- [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[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:11:37.378794"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:11:37.378794"]]
- [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[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", "2014-11-13 12:11:37.379842"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:11:37.379842"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:11:37.381493"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:11:37.381493"]]
- [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[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", "2014-11-13 12:11:37.382612"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:11:37.382612"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:11:37.384409"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:11:37.384409"]]
- [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[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", "2014-11-13 12:11:37.385618"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:11:37.385618"]]
- [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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:11:37.387530"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:11:37.387530"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:11:37.388288"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:11:37.388288"]]
- [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[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", "2014-11-13 12:11:37.389466"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:11:37.391124"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:11:37.391124"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:11:37.391892"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:11:37.391892"]]
- [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[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", "2014-11-13 12:11:37.392950"]]
- [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.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:11:37.394627"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:11:37.394627"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:11:37.395385"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:11:37.395385"]]
- [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[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", "2014-11-13 12:11:37.396425"]]
- [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.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mrollback transaction[0m
- [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 SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:12:13.356415"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:12:13.356415"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.9ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:12:13.358935"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:12:13.358935"]]
- [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[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", "2014-11-13 12:12:13.364818"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.9ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:12:13.368339"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:12:13.368339"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:12:13.369300"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:12:13.369300"]]
- [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[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", "2014-11-13 12:12:13.370569"]]
- [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", 2]]
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:12:13.372462"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:12:13.372462"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:12:13.373483"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:12:13.373483"]]
- [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[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", "2014-11-13 12:12:13.374562"]]
- [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[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:12:13.376434"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:12:13.376434"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "accounts"[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[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", "2014-11-13 12:12:13.379235"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:12:13.379235"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "accounts"
- [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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:12:13.381427"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:12:13.381427"]]
- [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[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", "2014-11-13 12:12:13.382504"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:12:13.382504"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:12:13.384312"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:12:13.384312"]]
- [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[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", "2014-11-13 12:12:13.385481"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:12:13.385481"]]
- [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[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:12:13.387168"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:12:13.387168"]]
- [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[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", "2014-11-13 12:12:13.388146"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:12:13.388146"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.2ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-11-13 12:12:13.389878"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-11-13 12:12:13.389878"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_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", "2014-11-13 12:12:13.390642"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
-Processing by AuthenticatedController#index as HTML
+ Rendering text template
Rendered text template (0.0ms)
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 4ms (Views: 4.2ms | ActiveRecord: 0.0ms)
- [1m[36m (0.1ms)[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
+Completed 200 OK in 6ms (Views: 5.4ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
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
+Completed 401 Unauthorized in 2ms (Views: 1.0ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
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
+Completed 401 Unauthorized in 3ms (Views: 2.1ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin 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.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin 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 [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by SessionsController#failure as HTML
-Completed 200 OK in 2ms (Views: 1.9ms | ActiveRecord: 0.0ms)
- [1m[36m (0.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+ Rendering /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.6ms)
+Completed 200 OK in 24ms (Views: 15.0ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by SessionsController#failure as HTML
-Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
- [1m[36m (0.0ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+ Rendering /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.0ms)
+Completed 200 OK in 3ms (Views: 1.1ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (1.5ms)[0m [1m[36mbegin transaction[0m
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[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", "2014-11-13 12:12:13.419910"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:12:13.419910"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.6ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:48:55 UTC], ["updated_at", 2016-08-22 17:48:55 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+Completed 302 Found in 57ms (ActiveRecord: 4.3ms)
+ [1m[35m (1.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
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[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", "2014-11-13 12:12:13.423932"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:12:13.423932"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:48:55 UTC], ["updated_at", 2016-08-22 17:48:55 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
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
+Completed 302 Found in 6ms (ActiveRecord: 0.9ms)
+ [1m[35m (0.4ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
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[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", "2014-11-13 12:12:13.427908"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:12:13.427908"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:48:55 UTC], ["updated_at", 2016-08-22 17:48:55 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
- [1m[36m (0.7ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
+Completed 302 Found in 6ms (ActiveRecord: 1.0ms)
+ [1m[35m (0.5ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT ?[0m [["LIMIT", 1]]
+ [1m[35mSQL (0.7ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:48:55 UTC], ["updated_at", 2016-08-22 17:48:55 UTC], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != ?) LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[35mSQL (0.7ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 17:48:55 UTC], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[35m (1.4ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:48:55 UTC], ["updated_at", 2016-08-22 17:48:55 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:48:55 UTC], ["updated_at", 2016-08-22 17:48:55 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (0.9ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:48:55 UTC], ["updated_at", 2016-08-22 17:48:55 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.0ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:48:55 UTC], ["updated_at", 2016-08-22 17:48:55 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.2ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:48:55 UTC], ["updated_at", 2016-08-22 17:48:55 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:48:55 UTC], ["updated_at", 2016-08-22 17:48:55 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:48:55 UTC], ["updated_at", 2016-08-22 17:48:55 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:48:55 UTC], ["updated_at", 2016-08-22 17:48:55 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:48:55 UTC], ["updated_at", 2016-08-22 17:48:55 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:48:55 UTC], ["updated_at", 2016-08-22 17:48:55 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 17:48:55 UTC], ["id", 2]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.9ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:48:55 UTC], ["updated_at", 2016-08-22 17:48:55 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:48:55 UTC], ["updated_at", 2016-08-22 17:48:55 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (0.1ms)[0m [1m[33mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 17:48:55 UTC], ["id", 2]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT ?[0m [["id", 2], ["LIMIT", 1]]
+ [1m[35m (1.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:48:55 UTC], ["updated_at", 2016-08-22 17:48:55 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:48:55 UTC], ["updated_at", 2016-08-22 17:48:55 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 17:48:55 UTC], ["id", 2]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT ?[0m [["id", 2], ["LIMIT", 1]]
+ [1m[35m (0.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:48:55 UTC], ["updated_at", 2016-08-22 17:48:55 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471801735"]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 1], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 17:48:55 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472060935"], ["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.0ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 1]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:48:55 UTC], ["updated_at", 2016-08-22 17:48:55 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471801735"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 1], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 17:48:55 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472060935"], ["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.3ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:48:55 UTC], ["updated_at", 2016-08-22 17:48:55 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471974535"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.8ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT ?[0m [["LIMIT", 1]]
+ [1m[35mSQL (0.7ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:51:14 UTC], ["updated_at", 2016-08-22 17:51:14 UTC], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != ?) LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 17:51:14 UTC], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.7ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:51:14 UTC], ["updated_at", 2016-08-22 17:51:14 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:51:14 UTC], ["updated_at", 2016-08-22 17:51:14 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (0.9ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:51:14 UTC], ["updated_at", 2016-08-22 17:51:14 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:51:14 UTC], ["updated_at", 2016-08-22 17:51:14 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:51:14 UTC], ["updated_at", 2016-08-22 17:51:14 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:51:14 UTC], ["updated_at", 2016-08-22 17:51:14 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:51:14 UTC], ["updated_at", 2016-08-22 17:51:14 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:51:14 UTC], ["updated_at", 2016-08-22 17:51:14 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:51:14 UTC], ["updated_at", 2016-08-22 17:51:14 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:51:14 UTC], ["updated_at", 2016-08-22 17:51:14 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[33mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 17:51:14 UTC], ["id", 2]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.9ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:51:14 UTC], ["updated_at", 2016-08-22 17:51:14 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:51:14 UTC], ["updated_at", 2016-08-22 17:51:14 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (0.1ms)[0m [1m[33mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 17:51:14 UTC], ["id", 2]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT ?[0m [["id", 2], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:51:14 UTC], ["updated_at", 2016-08-22 17:51:14 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:51:14 UTC], ["updated_at", 2016-08-22 17:51:14 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (0.1ms)[0m [1m[33mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 17:51:14 UTC], ["id", 2]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.0ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT ?[0m [["id", 2], ["LIMIT", 1]]
+ [1m[35m (0.9ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:51:14 UTC], ["updated_at", 2016-08-22 17:51:14 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471974674"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.2ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:51:14 UTC], ["updated_at", 2016-08-22 17:51:14 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471801874"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 1], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 17:51:14 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472061074"], ["id", 1]]
+ [1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 1]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:51:14 UTC], ["updated_at", 2016-08-22 17:51:14 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471801874"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 1], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 17:51:14 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472061074"], ["id", 1]]
+ [1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
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
+Completed 302 Found in 6ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
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[36m (0.3ms)[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: 4.0ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.1ms)[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.1ms)[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.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (2.5ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.7ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00]]
- [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[35mSQL (0.1ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (1.1ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00]]
- [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[35mSQL (0.1ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
- [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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00]]
- [1m[35m (0.1ms)[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[36mSQL (0.1ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 2[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00]]
- [1m[35m (0.1ms)[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.4ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "accounts"[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[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", Thu, 13 Nov 2014 12:13:16 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "accounts"
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00]]
- [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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00]]
- [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[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", Thu, 13 Nov 2014 12:13:16 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00]]
- [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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00]]
- [1m[36m (0.1ms)[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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00]]
- [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 rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00]]
- [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.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[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", Thu, 13 Nov 2014 12:13:16 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00]]
- [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
-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[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", Thu, 13 Nov 2014 12:13:16 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.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[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", Thu, 13 Nov 2014 12:13:16 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:13:16 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by SessionsController#failure as HTML
-Completed 200 OK in 2ms (Views: 2.1ms | ActiveRecord: 0.0ms)
- [1m[36m (0.0ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+ Rendering /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.5ms)
+Completed 200 OK in 20ms (Views: 15.6ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by SessionsController#failure as HTML
+ Rendering /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.0ms)
Completed 200 OK in 1ms (Views: 0.6ms | 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[36m (0.2ms)[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.1ms)[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.1ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin 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[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", "2014-11-13 12:13:21.423392"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:21.423392"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:51:14 UTC], ["updated_at", 2016-08-22 17:51:14 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/
-Completed 302 Found in 17ms (ActiveRecord: 1.5ms)
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+Completed 302 Found in 4ms (ActiveRecord: 0.8ms)
+ [1m[35m (0.5ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin 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[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", "2014-11-13 12:13:21.431216"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:21.431216"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:51:14 UTC], ["updated_at", 2016-08-22 17:51:14 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.3ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Completed 302 Found in 5ms (ActiveRecord: 0.7ms)
+ [1m[35m (0.5ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin 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[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", "2014-11-13 12:13:21.435212"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:21.435212"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:51:14 UTC], ["updated_at", 2016-08-22 17:51:14 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE 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#failure as HTML
-Completed 200 OK in 7ms (Views: 6.5ms | 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 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Completed 302 Found in 4ms (ActiveRecord: 0.7ms)
+ [1m[35m (0.5ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 401 Unauthorized in 1ms (Views: 1.2ms | ActiveRecord: 0.0ms)
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Completed 401 Unauthorized in 8ms (Views: 7.7ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
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
+Completed 401 Unauthorized in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin 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
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by AuthenticatedController#index as HTML
-Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
- [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[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:13:21.459885"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-11-13 12:13:21.459885"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.8ms)[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", "2014-11-13 12:13:21.461224"]]
- [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.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:13:21.466210"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:13:21.466210"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "accounts"
- [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[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", "2014-11-13 12:13:21.470562"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:21.470562"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "accounts"[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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:13:21.472730"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:13:21.472730"]]
- [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[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", "2014-11-13 12:13:21.473967"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:21.473967"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:13:21.475649"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:13:21.475649"]]
- [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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-13 12:13:21.476818"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:21.476818"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.6ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:13:21.479334"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:13:21.479334"]]
- [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[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", "2014-11-13 12:13:21.480443"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:21.480443"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:13:21.482382"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:13:21.482382"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:13:21.483601"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:21.483601"]]
- [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[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", "2014-11-13 12:13:21.485327"]]
- [1m[35m (0.1ms)[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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:13:21.487455"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:13:21.487455"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:13:21.488288"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:21.488288"]]
- [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[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", "2014-11-13 12:13:21.489481"]]
- [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.3ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:13:21.491149"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:13:21.491149"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:13:21.491913"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:21.491913"]]
- [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[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", "2014-11-13 12:13:21.492962"]]
- [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.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.1ms)[0m [1mrollback transaction[0m
- [1m[36m (0.2ms)[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.1ms)[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#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_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", "2014-11-13 12:13:26.704325"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:26.704325"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 22ms (ActiveRecord: 1.6ms)
- [1m[35m (0.4ms)[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" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_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", "2014-11-13 12:13:26.710802"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:26.710802"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.3ms)
- [1m[35m (0.4ms)[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" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_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", "2014-11-13 12:13:26.715367"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:26.715367"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 3ms (ActiveRecord: 0.3ms)
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/Gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
-Completed 200 OK in 10ms (Views: 9.8ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/Gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
-Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
-Processing by AuthenticatedController#index as JS
+ Rendering text template
Rendered text template (0.0ms)
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 401 Unauthorized in 3ms (Views: 2.7ms | ActiveRecord: 0.0ms)
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
-Processing by AuthenticatedController#index as JS
- Rendered text template (0.0ms)
-Filter chain halted as :authenticate_account! rendered or redirected
-Completed 401 Unauthorized in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.3ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:53:49 UTC], ["updated_at", 2016-08-22 17:53:49 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:53:49 UTC], ["updated_at", 2016-08-22 17:53:49 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (0.9ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:53:49 UTC], ["updated_at", 2016-08-22 17:53:49 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:53:49 UTC], ["updated_at", 2016-08-22 17:53:49 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (1.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:53:49 UTC], ["updated_at", 2016-08-22 17:53:49 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.0ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:53:49 UTC], ["updated_at", 2016-08-22 17:53:49 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (1.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:53:49 UTC], ["updated_at", 2016-08-22 17:53:49 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.0ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:53:49 UTC], ["updated_at", 2016-08-22 17:53:49 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.9ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.2ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:53:49 UTC], ["updated_at", 2016-08-22 17:53:49 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:53:49 UTC], ["updated_at", 2016-08-22 17:53:49 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (0.1ms)[0m [1m[33mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 17:53:49 UTC], ["id", 2]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:53:49 UTC], ["updated_at", 2016-08-22 17:53:49 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:53:49 UTC], ["updated_at", 2016-08-22 17:53:49 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (0.1ms)[0m [1m[33mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 17:53:49 UTC], ["id", 2]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT ?[0m [["id", 2], ["LIMIT", 1]]
+ [1m[35m (0.9ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:53:49 UTC], ["updated_at", 2016-08-22 17:53:49 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:53:49 UTC], ["updated_at", 2016-08-22 17:53:49 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (0.1ms)[0m [1m[33mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 17:53:49 UTC], ["id", 2]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.0ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT ?[0m [["id", 2], ["LIMIT", 1]]
+ [1m[35m (0.9ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT ?[0m [["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:53:49 UTC], ["updated_at", 2016-08-22 17:53:49 UTC], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != ?) LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 17:53:49 UTC], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[35m (0.7ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:53:49 UTC], ["updated_at", 2016-08-22 17:53:49 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471974829"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:53:49 UTC], ["updated_at", 2016-08-22 17:53:49 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471802029"]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 1], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 17:53:49 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472061229"], ["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 1]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:53:49 UTC], ["updated_at", 2016-08-22 17:53:49 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471802029"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 1], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 17:53:49 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472061229"], ["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", 2016-08-22 17:53:49 UTC], ["updated_at", 2016-08-22 17:53:49 UTC]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "synced_id" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 17:53:49 UTC], ["synced_id", 0], ["id", 1]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 0], ["LIMIT", 1]]
+ [1m[35m (1.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.3ms)[0m [1m[36mbegin 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
+Completed 302 Found in 4ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by AuthenticatedController#index as HTML
+ Rendering text template
Rendered text template (0.0ms)
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
- [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[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:13:26.746147"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-11-13 12:13:26.746147"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.9ms)[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", "2014-11-13 12:13:26.747864"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:13:26.753018"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:13:26.753018"]]
- [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" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["uid", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-11-13 12:13:26.756289"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:26.756289"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:13:26.758868"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:13:26.758868"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["uid", 123], ["provider", "bookingsync"]]
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_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", "2014-11-13 12:13:26.761453"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:26.761453"]]
- [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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:13:26.764758"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:13:26.764758"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_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", "2014-11-13 12:13:26.766303"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:26.766303"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:13:26.768423"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:13:26.768423"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["uid", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-11-13 12:13:26.770086"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:26.770086"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:13:26.772317"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:13:26.772317"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:13:26.773514"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:26.773514"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["uid", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-11-13 12:13:26.775195"]]
- [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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:13:26.777391"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:13:26.777391"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:13:26.778895"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:26.778895"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["uid", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-11-13 12:13:26.781124"]]
- [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.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:13:26.783373"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:13:26.783373"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:13:26.784525"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:26.784525"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_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", "2014-11-13 12:13:26.786281"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.1ms)[0m [1mrollback transaction[0m
- [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by AuthenticatedController#index as JS
+ Rendering text template
Rendered text template (0.0ms)
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 401 Unauthorized in 4ms (Views: 3.9ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Completed 401 Unauthorized in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin 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.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[35mSQL (2.6ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 13ms (ActiveRecord: 3.5ms)
- [1m[35m (1.2ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.2ms)[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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.6ms)
- [1m[35m (0.5ms)[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[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", Thu, 13 Nov 2014 12:13:46 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.6ms)
- [1m[35m (0.4ms)[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.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
-Completed 200 OK in 2ms (Views: 2.0ms | 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 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
- [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[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "accounts"[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[35mSQL (0.7ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "accounts"
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00]]
- [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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00]]
- [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[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", Thu, 13 Nov 2014 12:13:46 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.7ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.7ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00]]
- [1m[36m (0.1ms)[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[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", Thu, 13 Nov 2014 12:13:46 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00]]
- [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[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00]]
- [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[35mSQL (0.1ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00]]
- [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[35mSQL (0.1ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00]]
- [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", 2]]
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00]]
- [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[36mSQL (0.1ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 2[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00]]
- [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.3ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_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", Thu, 13 Nov 2014 12:13:46 UTC +00:00], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", Thu, 13 Nov 2014 12:13:46 UTC +00:00]]
- [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.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mrollback transaction[0m
- [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 SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:13:50.199989"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:13:50.199989"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.8ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:13:50.202578"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:50.202578"]]
- [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.1ms)[0m [1mSAVEPOINT active_record_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", "2014-11-13 12:13:50.207900"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (1.1ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:13:50.211444"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:13:50.211444"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:13:50.212464"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:50.212464"]]
- [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[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", "2014-11-13 12:13:50.213670"]]
- [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", 2]]
- [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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:13:50.215474"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:13:50.215474"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:13:50.216382"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:50.216382"]]
- [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[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", "2014-11-13 12:13:50.217469"]]
- [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.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:13:50.219250"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:13:50.219250"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "accounts"[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[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", "2014-11-13 12:13:50.221922"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:50.221922"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "accounts"
- [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[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:13:50.223971"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:13:50.223971"]]
- [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[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", "2014-11-13 12:13:50.224972"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:50.224972"]]
- [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[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:13:50.226687"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:13:50.226687"]]
- [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[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", "2014-11-13 12:13:50.227879"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:50.227879"]]
- [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[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:13:50.229592"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:13:50.229592"]]
- [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[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", "2014-11-13 12:13:50.230634"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:50.230634"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:13:50.232564"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-11-13 12:13:50.232564"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_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", "2014-11-13 12:13:50.233392"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
-Processing by AuthenticatedController#index as HTML
+ Rendering text template
Rendered text template (0.0ms)
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 4ms (Views: 3.7ms | ActiveRecord: 0.0ms)
- [1m[36m (0.1ms)[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
+Completed 401 Unauthorized in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by SessionsController#failure as HTML
-Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms)
- [1m[36m (0.0ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+ Rendering /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
+Completed 200 OK in 12ms (Views: 7.0ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by SessionsController#failure as HTML
-Completed 200 OK in 1ms (Views: 0.5ms | 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[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", "2014-11-13 12:13:50.258035"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:50.258035"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.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[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", "2014-11-13 12:13:50.261472"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:50.261472"]]
- [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.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[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", "2014-11-13 12:13:50.264729"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:13:50.264729"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+ Rendering /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.1ms)
+Completed 200 OK in 3ms (Views: 2.9ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
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[36m (0.2ms)[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.9ms | 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.1ms)[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 SAVEPOINT active_record_1
- [1m[36mSQL (2.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.6ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00]]
- [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[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (1.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00]]
- [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[35mSQL (0.1ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00]]
- [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", 2]]
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00]]
- [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[36mSQL (0.1ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 2[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00]]
- [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.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "accounts"[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[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", Thu, 13 Nov 2014 12:14:13 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "accounts"
- [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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00]]
- [1m[36m (0.1ms)[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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00]]
- [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.1ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00]]
- [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[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", Thu, 13 Nov 2014 12:14:13 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00], ["provider", "bookingsync"], ["uid", 456], ["updated_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00]]
- [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[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", Thu, 13 Nov 2014 12:14:13 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00]]
- [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 rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
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[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", Thu, 13 Nov 2014 12:14:13 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:53:49 UTC], ["updated_at", 2016-08-22 17:53:49 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.5ms)
- [1m[36m (0.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+Completed 302 Found in 6ms (ActiveRecord: 0.9ms)
+ [1m[35m (0.5ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
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[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", Thu, 13 Nov 2014 12:14:13 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:53:49 UTC], ["updated_at", 2016-08-22 17:53:49 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.5ms)
- [1m[36m (0.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+Completed 302 Found in 5ms (ActiveRecord: 0.9ms)
+ [1m[35m (0.6ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
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[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", Thu, 13 Nov 2014 12:14:13 UTC +00:00], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", Thu, 13 Nov 2014 12:14:13 UTC +00:00]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:53:49 UTC], ["updated_at", 2016-08-22 17:53:49 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.5ms)
- [1m[36m (0.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
-Processing by SessionsController#failure as HTML
-Completed 200 OK in 2ms (Views: 2.0ms | 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 1ms (Views: 0.5ms | 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[36m (0.3ms)[0m [1mbegin transaction[0m
+Completed 302 Found in 5ms (ActiveRecord: 0.9ms)
+ [1m[35m (0.5ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.2ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.5ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:54:50 UTC], ["updated_at", 2016-08-22 17:54:50 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (1.0ms)[0m [1m[36mcommit transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:54:50 UTC], ["updated_at", 2016-08-22 17:54:50 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.9ms)[0m [1m[36mcommit transaction[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (0.7ms)[0m [1m[33mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 17:54:50 UTC], ["id", 2]]
+ [1m[35m (1.1ms)[0m [1m[36mcommit transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 1]]
+ [1m[35m (1.0ms)[0m [1m[36mcommit transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 2]]
+ [1m[35m (0.8ms)[0m [1m[36mcommit transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:54:50 UTC], ["updated_at", 2016-08-22 17:54:50 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471802090"]]
+ [1m[35m (1.2ms)[0m [1m[36mcommit transaction[0m
+ [1m[35m (0.3ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 3], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 17:54:50 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472061290"], ["id", 3]]
+ [1m[35m (0.8ms)[0m [1m[36mcommit transaction[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 3]]
+ [1m[35m (0.9ms)[0m [1m[36mcommit transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:54:50 UTC], ["updated_at", 2016-08-22 17:54:50 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471974890"]]
+ [1m[35m (1.0ms)[0m [1m[36mcommit transaction[0m
+ [1m[35m (0.2ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT ?[0m [["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:54:50 UTC], ["updated_at", 2016-08-22 17:54:50 UTC], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (1.2ms)[0m [1m[36mcommit transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != ?) LIMIT ?[0m [["id", 5], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 17:54:50 UTC], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 5]]
+ [1m[35m (0.9ms)[0m [1m[36mcommit transaction[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT ?[0m [["id", 5], ["LIMIT", 1]]
Processing by AuthenticatedController#index as JS
+ Rendering text template
Rendered text template (0.0ms)
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 401 Unauthorized in 4ms (Views: 4.0ms | ActiveRecord: 0.0ms)
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Completed 401 Unauthorized in 12ms (Views: 10.1ms | ActiveRecord: 0.0ms)
Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
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
+Completed 401 Unauthorized in 2ms (Views: 0.7ms | ActiveRecord: 0.0ms)
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
+Completed 302 Found in 7ms (ActiveRecord: 0.0ms)
Processing by AuthenticatedController#index as HTML
+ Rendering text template
+ Rendered text template (0.0ms)
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.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.1ms)[0m [1mSAVEPOINT active_record_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", "2014-11-13 12:14:42.683602"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:14:42.683602"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 17ms (ActiveRecord: 1.5ms)
- [1m[35m (1.2ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.2ms)[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[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", "2014-11-13 12:14:42.692241"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:14:42.692241"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
- [1m[35m (0.5ms)[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[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", "2014-11-13 12:14:42.697040"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:14:42.697040"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.5ms)[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.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
Processing by SessionsController#failure as HTML
-Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms)
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ Rendering /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.7ms)
+Completed 200 OK in 26ms (Views: 14.5ms | ActiveRecord: 0.0ms)
Processing by SessionsController#failure as HTML
-Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
- [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[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:14:42.709212"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:14:42.709212"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "accounts"[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[35mSQL (0.8ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-13 12:14:42.713824"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:14:42.713824"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "accounts"
- [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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:14:42.716799"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:14:42.716799"]]
- [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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-13 12:14:42.718047"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:14:42.718047"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:14:42.719923"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:14:42.719923"]]
- [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[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", "2014-11-13 12:14:42.720983"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:14:42.720983"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:14:42.722655"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:14:42.722655"]]
- [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[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", "2014-11-13 12:14:42.723713"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:14:42.723713"]]
- [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[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:14:42.725353"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:14:42.725353"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:14:42.726051"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:14:42.726051"]]
- [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[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", "2014-11-13 12:14:42.727160"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:14:42.729990"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:14:42.729990"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:14:42.730894"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:14:42.730894"]]
- [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[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", "2014-11-13 12:14:42.731998"]]
- [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", 2]]
- [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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:14:42.733942"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:14:42.733942"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:14:42.734723"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:14:42.734723"]]
- [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[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", "2014-11-13 12:14:42.735822"]]
- [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.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_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", "2014-11-13 12:14:42.737786"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-11-13 12:14:42.737786"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_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", "2014-11-13 12:14:42.738565"]]
- [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.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.1ms)[0m [1mrollback transaction[0m
- [1m[36m (1.5ms)[0m [1mCREATE TABLE "accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime, "provider" varchar(255), "uid" integer, "name" varchar(255), "oauth_access_token" varchar(255), "oauth_refresh_token" varchar(255), "oauth_expires_at" varchar(255)) [0m
- [1m[35m (0.1ms)[0m select sqlite_version(*)
- [1m[36m (0.9ms)[0m [1mCREATE INDEX "index_accounts_on_uid" ON "accounts" ("uid")[0m
- [1m[35m (0.7ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
- [1m[36m (0.7ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
- [1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
- [1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140522110454')[0m
- [1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140522110326')
- [1m[36m (0.2ms)[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.6ms | 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.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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-13 12:16:38.342182"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:16:38.342182"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 16ms (ActiveRecord: 1.3ms)
- [1m[35m (1.1ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.2ms)[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[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", "2014-11-13 12:16:38.350643"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:16:38.350643"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_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", "2014-11-13 12:16:38.355533"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:16:38.355533"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.5ms)
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ Rendering /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.1ms)
+Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms)
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
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
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#failure as HTML
-Completed 200 OK in 2ms (Views: 2.0ms | 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 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
- [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[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:16:38.367965"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:16:38.367965"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.6ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:16:38.368956"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:16:38.368956"]]
- [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[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", "2014-11-13 12:16:38.370547"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:16:38.372750"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:16:38.372750"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:16:38.373557"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:16:38.373557"]]
- [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[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", "2014-11-13 12:16:38.374705"]]
- [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", 2]]
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:16:38.376789"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:16:38.376789"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:16:38.377651"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:16:38.377651"]]
- [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[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", "2014-11-13 12:16:38.378804"]]
- [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.3ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:16:38.380663"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:16:38.380663"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "accounts"[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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-13 12:16:38.383488"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:16:38.383488"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "accounts"
- [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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:16:38.385677"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:16:38.385677"]]
- [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[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", "2014-11-13 12:16:38.386747"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:16:38.386747"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:16:38.388646"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:16:38.388646"]]
- [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[36mSQL (0.7ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:16:38.389955"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:16:38.389955"]]
- [1m[35m (0.1ms)[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[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-13 12:16:38.392841"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-13 12:16:38.392841"]]
- [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[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2014-11-13 12:16:38.394152"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-13 12:16:38.394152"]]
- [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[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", "2014-11-13 12:16:38.396043"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-11-13 12:16:38.396043"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_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", "2014-11-13 12:16:38.396738"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mrollback transaction[0m
- [1m[36m (0.2ms)[0m [1mbegin transaction[0m
-Processing by AuthenticatedController#index as JS
- Rendered text template (0.0ms)
-Filter chain halted as :authenticate_account! rendered or redirected
-Completed 401 Unauthorized in 6ms (Views: 6.2ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[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 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.0ms)[0m [1mbegin transaction[0m
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
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.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
- [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-11-21 22:27:09.307624"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-21 22:27:09.307624"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/
-Completed 302 Found in 25ms (ActiveRecord: 1.5ms)
- [1m[36m (0.6ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+Completed 422 Unprocessable Entity in 8ms (ActiveRecord: 0.8ms)
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", "2014-11-21 22:27:09.313166"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-21 22:27:09.313166"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
- [1m[35m (0.3ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+Completed 422 Unprocessable Entity in 6ms (ActiveRecord: 0.7ms)
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", "2014-11-21 22:27:09.316699"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-21 22:27:09.316699"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
- [1m[36m (0.2ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+Completed 422 Unprocessable Entity in 5ms (ActiveRecord: 0.6ms)
+ [1m[35m (0.3ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
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
+Completed 302 Found in 6ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
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
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by SessionsController#failure as HTML
-Completed 200 OK in 2ms (Views: 2.3ms | ActiveRecord: 0.0ms)
- [1m[36m (0.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
+ Rendering /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
+Completed 200 OK in 25ms (Views: 15.5ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by SessionsController#failure as HTML
+ Rendering /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.0ms)
Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)
- [1m[36m (0.0ms)[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[36mAccount Load (0.2ms)[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.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "uid", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2014-11-21 22:27:09.336665"], ["uid", 0], ["updated_at", "2014-11-21 22:27:09.336665"]]
- [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.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
- [1m[36m (0.4ms)[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" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-21 22:27:09.346455"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-21 22:27:09.346455"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "accounts"[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 LIMIT 1
- [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2014-11-21 22:27:09.350630"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-21 22:27:09.350630"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.1ms)[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.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-21 22:27:09.354448"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-21 22:27:09.354448"]]
- [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 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", "2014-11-21 22:27:09.355947"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-21 22:27:09.355947"]]
- [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", "2014-11-21 22:27:09.358004"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-21 22:27:09.358004"]]
- [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", "2014-11-21 22:27:09.359284"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-21 22:27:09.359284"]]
- [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" = 456 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-21 22:27:09.361258"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-21 22:27:09.361258"]]
- [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 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", "2014-11-21 22:27:09.362894"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-21 22:27:09.362894"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[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", "2014-11-21 22:27:09.365187"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-21 22:27:09.365187"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_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.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2014-11-21 22:27:09.366286"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-21 22:27:09.366286"]]
- [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", "2014-11-21 22:27:09.368479"]]
- [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" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-21 22:27:09.370973"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-21 22:27:09.370973"]]
- [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 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-21 22:27:09.372306"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-21 22:27:09.372306"]]
- [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", "2014-11-21 22:27:09.373815"]]
- [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.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", "2014-11-21 22:27:09.376125"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2014-11-21 22:27:09.376125"]]
- [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", "2014-11-21 22:27:09.377146"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2014-11-21 22:27:09.377146"]]
- [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", "2014-11-21 22:27:09.378512"]]
- [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.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" IS NULL LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-11-21 22:27:09.380596"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2014-11-21 22:27:09.380596"]]
- [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" IS NULL AND "accounts"."id" != 1) LIMIT 1[0m
- [1m[35mSQL (0.3ms)[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", "2014-11-21 22:27:09.381541"]]
- [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.4ms)[0m [1mrollback transaction[0m
- [1m[36m (0.2ms)[0m [1mbegin transaction[0m
- [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[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.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1438455335"], ["created_at", "2015-07-31 18:55:35.328787"], ["updated_at", "2015-07-31 18:55:35.328787"]]
- [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[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1438282535"], ["created_at", "2015-07-31 18:55:35.334460"], ["updated_at", "2015-07-31 18:55:35.334460"]]
- [1m[35m (0.6ms)[0m commit transaction
- [1m[36m (0.3ms)[0m [1mbegin transaction[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 1) LIMIT 1
- [1m[36mSQL (0.4ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1438541735"], ["updated_at", "2015-07-31 18:55:35.350623"], ["id", 1]]
- [1m[35m (0.6ms)[0m commit transaction
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts"[0m
- [1m[35m (0.1ms)[0m begin transaction
- [1m[36mSQL (0.3ms)[0m [1mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 1]]
- [1m[35m (0.5ms)[0m commit transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1438282535"], ["created_at", "2015-07-31 18:55:35.362905"], ["updated_at", "2015-07-31 18:55:35.362905"]]
- [1m[35m (0.4ms)[0m commit transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1438541735"], ["updated_at", "2015-07-31 18:55:35.365598"], ["id", 2]]
- [1m[36m (0.6ms)[0m [1mcommit transaction[0m
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 2]]
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts"
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35mSQL (0.2ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = ? [["id", 2]]
- [1m[36m (0.5ms)[0m [1mcommit 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.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["synced_id", 0], ["created_at", "2015-07-31 18:55:35.373246"], ["updated_at", "2015-07-31 18:55:35.373246"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 18:55:35.382389"], ["updated_at", "2015-07-31 18:55:35.382389"]]
- [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"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2015-07-31 18:55:35.383778"], ["updated_at", "2015-07-31 18:55:35.383778"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 4) LIMIT 1
- [1m[36mSQL (0.1ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2015-07-31 18:55:35.385555"], ["id", 4]]
- [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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 18:55:35.389153"], ["updated_at", "2015-07-31 18:55:35.389153"]]
- [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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2015-07-31 18:55:35.390422"], ["updated_at", "2015-07-31 18:55:35.390422"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 4) LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2015-07-31 18:55:35.392520"], ["id", 4]]
- [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", 4]]
- [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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 18:55:35.395803"], ["updated_at", "2015-07-31 18:55:35.395803"]]
- [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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2015-07-31 18:55:35.397063"], ["updated_at", "2015-07-31 18:55:35.397063"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 4) LIMIT 1[0m
- [1m[35mSQL (0.0ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2015-07-31 18:55:35.398686"], ["id", 4]]
- [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", 4]]
- [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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 18:55:35.401232"], ["updated_at", "2015-07-31 18:55:35.401232"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "accounts"[0m
- [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 18:55:35.405572"], ["updated_at", "2015-07-31 18:55:35.405572"]]
- [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"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 18:55:35.408455"], ["updated_at", "2015-07-31 18:55:35.408455"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 18:55:35.410310"], ["updated_at", "2015-07-31 18:55:35.410310"]]
- [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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 18:55:35.413291"], ["updated_at", "2015-07-31 18:55:35.413291"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 18:55:35.415024"], ["updated_at", "2015-07-31 18:55:35.415024"]]
- [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"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 18:55:35.418043"], ["updated_at", "2015-07-31 18:55:35.418043"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 18:55:35.419880"], ["updated_at", "2015-07-31 18:55:35.419880"]]
- [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"."synced_id" IS NULL LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["created_at", "2015-07-31 18:55:35.422828"], ["updated_at", "2015-07-31 18:55:35.422828"]]
- [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"."synced_id" IS NULL AND "accounts"."id" != 3) LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2015-07-31 18:55:35.424202"], ["id", 3]]
- [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", 3]]
- [1m[35m (0.4ms)[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 AuthenticatedController#index as JS
- Rendered text template (0.0ms)
-Filter chain halted as :authenticate_account! rendered or redirected
-Completed 401 Unauthorized in 6ms (Views: 5.7ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
-Processing by AuthenticatedController#index as JS
- Rendered text template (0.0ms)
-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 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
- Rendered text template (0.0ms)
-Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 18:55:35.449744"], ["updated_at", "2015-07-31 18:55:35.449744"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:56:08 UTC], ["updated_at", 2016-08-22 17:56:08 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/admin
-Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
- [1m[36m (0.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+Completed 302 Found in 50ms (ActiveRecord: 3.4ms)
+ [1m[35m (2.5ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.3ms)[0m [1m[36mbegin transaction[0m
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 18:55:35.455293"], ["updated_at", "2015-07-31 18:55:35.455293"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:56:08 UTC], ["updated_at", 2016-08-22 17:56:08 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Completed 302 Found in 5ms (ActiveRecord: 0.8ms)
+ [1m[35m (0.5ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 18:55:35.461756"], ["updated_at", "2015-07-31 18:55:35.461756"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:56:08 UTC], ["updated_at", 2016-08-22 17:56:08 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
-Completed 200 OK in 6ms (Views: 5.4ms | ActiveRecord: 0.0ms)
- [1m[36m (0.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.1ms)
-Completed 200 OK in 1ms (Views: 0.5ms | 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.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[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[36m (0.2ms)[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"."synced_id" = 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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-07-31 18:57:06.794870"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 18:57:06.794870"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/
-Completed 302 Found in 24ms (ActiveRecord: 1.6ms)
- [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"."synced_id" = 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"."synced_id" = 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", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-07-31 18:57:06.800448"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 18:57:06.800448"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.5ms)
- [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"."synced_id" = 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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-07-31 18:57:06.804416"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 18:57:06.804416"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[36m (0.3ms)[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.1ms)[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#failure as HTML
-Completed 200 OK in 8ms (Views: 8.0ms | 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.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+Completed 302 Found in 5ms (ActiveRecord: 0.8ms)
+ [1m[35m (0.6ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT ?[0m [["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:56:08 UTC], ["updated_at", 2016-08-22 17:56:08 UTC], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != ?) LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 17:56:08 UTC], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[35m (0.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:56:08 UTC], ["updated_at", 2016-08-22 17:56:08 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:56:08 UTC], ["updated_at", 2016-08-22 17:56:08 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (0.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:56:08 UTC], ["updated_at", 2016-08-22 17:56:08 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.0ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:56:08 UTC], ["updated_at", 2016-08-22 17:56:08 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:56:08 UTC], ["updated_at", 2016-08-22 17:56:08 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:56:08 UTC], ["updated_at", 2016-08-22 17:56:08 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.9ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.2ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:56:08 UTC], ["updated_at", 2016-08-22 17:56:08 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.7ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:56:08 UTC], ["updated_at", 2016-08-22 17:56:08 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (1.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:56:08 UTC], ["updated_at", 2016-08-22 17:56:08 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:56:08 UTC], ["updated_at", 2016-08-22 17:56:08 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[33mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 17:56:08 UTC], ["id", 2]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.9ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:56:08 UTC], ["updated_at", 2016-08-22 17:56:08 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:56:08 UTC], ["updated_at", 2016-08-22 17:56:08 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (0.1ms)[0m [1m[33mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 17:56:08 UTC], ["id", 2]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT ?[0m [["id", 2], ["LIMIT", 1]]
+ [1m[35m (1.2ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:56:08 UTC], ["updated_at", 2016-08-22 17:56:08 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:56:08 UTC], ["updated_at", 2016-08-22 17:56:08 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (0.1ms)[0m [1m[33mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 17:56:08 UTC], ["id", 2]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT ?[0m [["id", 2], ["LIMIT", 1]]
+ [1m[35m (0.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", 2016-08-22 17:56:08 UTC], ["updated_at", 2016-08-22 17:56:08 UTC]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "synced_id" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 17:56:08 UTC], ["synced_id", 0], ["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 0], ["LIMIT", 1]]
+ [1m[35m (1.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:56:08 UTC], ["updated_at", 2016-08-22 17:56:08 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471974968"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:56:08 UTC], ["updated_at", 2016-08-22 17:56:08 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471802168"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 1], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 17:56:08 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472061368"], ["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 17:56:08 UTC], ["updated_at", 2016-08-22 17:56:08 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471802168"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 1], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 17:56:08 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472061368"], ["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.9ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by AuthenticatedController#index as HTML
+ Rendering text template
+ Rendered text template (0.0ms)
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 1ms (Views: 1.2ms | ActiveRecord: 0.0ms)
- [1m[36m (0.0ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+Completed 200 OK in 2ms (Views: 2.0ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin 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[36m (0.0ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin 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[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
- [1m[36m (0.0ms)[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 [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 [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.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "synced_id", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-07-31 18:57:06.852098"], ["synced_id", 0], ["updated_at", "2015-07-31 18:57:06.852098"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1[0m
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.1ms)[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"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-07-31 18:57:06.863333"], ["oauth_access_token", "token"], ["oauth_expires_at", 1438455426], ["oauth_refresh_token", "refresh_token"], ["synced_id", 123], ["updated_at", "2015-07-31 18:57:06.863333"]]
- [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 Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-07-31 18:57:06.866602"], ["oauth_access_token", "token"], ["oauth_expires_at", "1438282626"], ["oauth_refresh_token", "refresh_token"], ["synced_id", 123], ["updated_at", "2015-07-31 18:57:06.866602"]]
- [1m[35m (0.6ms)[0m commit transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.2ms)[0m begin transaction
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 1) LIMIT 1[0m
- [1m[35mSQL (0.3ms)[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", "1438541826"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-07-31 18:57:06.870763"]]
- [1m[36m (0.6ms)[0m [1mcommit transaction[0m
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 1]]
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts"
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35mSQL (0.2ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = ? [["id", 1]]
- [1m[36m (0.7ms)[0m [1mcommit transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-07-31 18:57:06.876673"], ["oauth_access_token", "token"], ["oauth_expires_at", "1438282626"], ["oauth_refresh_token", "refresh_token"], ["synced_id", 123], ["updated_at", "2015-07-31 18:57:06.876673"]]
- [1m[36m (0.4ms)[0m [1mcommit transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["oauth_access_token", "refreshed_token"], ["oauth_expires_at", "1438541826"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-07-31 18:57:06.879226"]]
- [1m[36m (0.5ms)[0m [1mcommit transaction[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts"
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35mSQL (0.1ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = ? [["id", 2]]
- [1m[36m (0.6ms)[0m [1mcommit 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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-07-31 18:57:06.883072"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 18:57:06.883072"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "accounts"[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-07-31 18:57:06.886587"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 18:57:06.886587"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "accounts"[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"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-07-31 18:57:06.889843"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 18:57:06.889843"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-07-31 18:57:06.891703"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 18:57:06.891703"]]
- [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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-07-31 18:57:06.894307"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 18:57:06.894307"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-07-31 18:57:06.895833"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 18:57:06.895833"]]
- [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"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-07-31 18:57:06.898224"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 18:57:06.898224"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-07-31 18:57:06.899660"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 18:57:06.899660"]]
- [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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-07-31 18:57:06.902401"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 18:57:06.902401"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-07-31 18:57:06.903685"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 18:57:06.903685"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 123 AND "accounts"."id" != 4) 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" = 4 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-07-31 18:57:06.905419"]]
- [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.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-07-31 18:57:06.907847"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 18:57:06.907847"]]
- [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"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-07-31 18:57:06.908919"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 18:57:06.908919"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 123 AND "accounts"."id" != 4) 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" = 4[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-07-31 18:57:06.910714"]]
- [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", 4]]
- [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"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-07-31 18:57:06.913355"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 18:57:06.913355"]]
- [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"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-07-31 18:57:06.914554"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 18:57:06.914554"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 123 AND "accounts"."id" != 4) 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" = 4[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-07-31 18:57:06.916095"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 4]]
- [1m[35m (0.4ms)[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"."synced_id" IS NULL LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2015-07-31 18:57:06.922334"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2015-07-31 18:57:06.922334"]]
- [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"."synced_id" IS NULL AND "accounts"."id" != 3) 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" = 3 [["oauth_access_token", nil], ["oauth_expires_at", nil], ["oauth_refresh_token", nil], ["updated_at", "2015-07-31 18:57:06.923533"]]
- [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", 3]]
- [1m[36m (0.5ms)[0m [1mrollback transaction[0m
- [1m[36m (0.2ms)[0m [1mbegin transaction[0m
- [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[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 AuthenticatedController#index as JS
+ Rendering text template
Rendered text template (0.0ms)
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 401 Unauthorized in 8ms (Views: 7.4ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Completed 401 Unauthorized in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.4ms)[0m [1m[36mbegin transaction[0m
Processing by AuthenticatedController#index as JS
+ Rendering text template
Rendered text template (0.0ms)
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 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
- Rendered text template (0.0ms)
-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.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT 1[0m
- [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["created_at", "2015-07-31 18:57:11.409240"], ["updated_at", "2015-07-31 18:57:11.409240"]]
- [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"."synced_id" IS NULL AND "accounts"."id" != 1) LIMIT 1[0m
- [1m[35mSQL (0.4ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2015-07-31 18:57:11.411537"], ["id", 1]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.2ms)[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[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["synced_id", 0], ["created_at", "2015-07-31 18:57:11.421886"], ["updated_at", "2015-07-31 18:57:11.421886"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1[0m
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Completed 401 Unauthorized in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[36m (0.4ms)[0m [1mbegin transaction[0m
+Processing by SessionsController#failure as HTML
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.4ms)
+Completed 200 OK in 42ms (Views: 42.1ms | ActiveRecord: 0.0ms)
[1m[35m (0.1ms)[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"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1438455431"], ["created_at", "2015-07-31 18:57:11.443650"], ["updated_at", "2015-07-31 18:57:11.443650"]]
- [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[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1438282631"], ["created_at", "2015-07-31 18:57:11.446538"], ["updated_at", "2015-07-31 18:57:11.446538"]]
- [1m[35m (0.6ms)[0m commit transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.2ms)[0m begin transaction
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 1) LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1438541831"], ["updated_at", "2015-07-31 18:57:11.450827"], ["id", 1]]
- [1m[36m (0.5ms)[0m [1mcommit transaction[0m
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 1]]
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts"
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
- [1m[35mSQL (0.2ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = ? [["id", 1]]
- [1m[36m (0.5ms)[0m [1mcommit transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1438282631"], ["created_at", "2015-07-31 18:57:11.456238"], ["updated_at", "2015-07-31 18:57:11.456238"]]
- [1m[36m (0.7ms)[0m [1mcommit transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1438541831"], ["updated_at", "2015-07-31 18:57:11.460315"], ["id", 2]]
- [1m[36m (0.6ms)[0m [1mcommit transaction[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts"
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35mSQL (0.2ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = ? [["id", 2]]
- [1m[36m (0.5ms)[0m [1mcommit 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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 18:57:11.465417"], ["updated_at", "2015-07-31 18:57:11.465417"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2015-07-31 18:57:11.466972"], ["updated_at", "2015-07-31 18:57:11.466972"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 4) LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2015-07-31 18:57:11.469311"], ["id", 4]]
- [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"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 18:57:11.472185"], ["updated_at", "2015-07-31 18:57:11.472185"]]
- [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"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2015-07-31 18:57:11.473505"], ["updated_at", "2015-07-31 18:57:11.473505"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 4) LIMIT 1
- [1m[36mSQL (0.1ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2015-07-31 18:57:11.475326"], ["id", 4]]
- [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", 4]]
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 18:57:11.477684"], ["updated_at", "2015-07-31 18:57:11.477684"]]
- [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"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2015-07-31 18:57:11.479081"], ["updated_at", "2015-07-31 18:57:11.479081"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 4) LIMIT 1
- [1m[36mSQL (0.0ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2015-07-31 18:57:11.480859"], ["id", 4]]
- [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", 4]]
- [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"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 18:57:11.483634"], ["updated_at", "2015-07-31 18:57:11.483634"]]
- [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"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 18:57:11.487182"], ["updated_at", "2015-07-31 18:57:11.487182"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "accounts"
- [1m[36m (0.4ms)[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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 18:57:11.490151"], ["updated_at", "2015-07-31 18:57:11.490151"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 18:57:11.491892"], ["updated_at", "2015-07-31 18:57:11.491892"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.4ms)[0m rollback transaction
+Processing by SessionsController#failure as HTML
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.1ms)
+Completed 200 OK in 1ms (Views: 1.0ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m rollback transaction
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 18:57:11.495307"], ["updated_at", "2015-07-31 18:57:11.495307"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 18:57:11.497134"], ["updated_at", "2015-07-31 18:57:11.497134"]]
- [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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 18:57:11.499534"], ["updated_at", "2015-07-31 18:57:11.499534"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 18:57:11.501198"], ["updated_at", "2015-07-31 18:57:11.501198"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.1ms)[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"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 18:57:11.507079"], ["updated_at", "2015-07-31 18:57:11.507079"]]
- [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[35mAccount Load (0.4ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 18:00:42.412868"], ["updated_at", "2016-08-22 18:00:42.412868"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/admin
+Completed 302 Found in 56ms (ActiveRecord: 3.4ms)
+ [1m[36m (0.5ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
[1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
[1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 18:57:11.512875"], ["updated_at", "2015-07-31 18:57:11.512875"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
- [1m[35m (0.3ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (1.0ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 18:00:42.426461"], ["updated_at", "2016-08-22 18:00:42.426461"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 6ms (ActiveRecord: 1.4ms)
+ [1m[35m (0.5ms)[0m rollback transaction
+ [1m[36m (0.1ms)[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"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
[1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 18:57:11.519192"], ["updated_at", "2015-07-31 18:57:11.519192"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 18:00:42.441174"], ["updated_at", "2016-08-22 18:00:42.441174"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.4ms)
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+Completed 302 Found in 5ms (ActiveRecord: 0.7ms)
+ [1m[36m (0.5ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[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#destroy as HTML
Redirected to http://test.host/
-Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
- [1m[36m (0.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
-Completed 200 OK in 6ms (Views: 6.0ms | ActiveRecord: 0.0ms)
- [1m[36m (0.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.1ms)
-Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
- [1m[36m (0.0ms)[0m [1mrollback transaction[0m
- [1m[36m (0.3ms)[0m [1mbegin transaction[0m
- [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[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
- [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"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:18:24.711269"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:18:24.711269"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/
-Completed 302 Found in 30ms (ActiveRecord: 1.9ms)
+Completed 302 Found in 2ms (ActiveRecord: 0.0ms)
[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"."synced_id" = 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"."synced_id" = 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", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-07-31 19:18:24.716186"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:18:24.716186"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.4ms)[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"."synced_id" = 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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:18:24.720280"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:18:24.720280"]]
- [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
-Processing by SessionsController#failure as HTML
-Completed 200 OK in 9ms (Views: 8.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 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
- [1m[36m (0.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+ [1m[35m (0.1ms)[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#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
- [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.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "synced_id", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-07-31 19:18:24.744800"], ["synced_id", 0], ["updated_at", "2015-07-31 19:18:24.744800"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 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"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-07-31 19:18:24.753880"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 19:18:24.753880"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "accounts"
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.5ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-07-31 19:18:24.758276"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:18:24.758276"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "accounts"
- [1m[36m (0.4ms)[0m [1mrollback transaction[0m
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+ [1m[36m (0.2ms)[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.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:18:24.761657"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 19:18:24.761657"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-07-31 19:18:24.763320"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:18:24.763320"]]
- [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"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-07-31 19:18:24.767067"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 19:18:24.767067"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:18:24.768582"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:18:24.768582"]]
- [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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:18:24.771372"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 19:18:24.771372"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.5ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-07-31 19:18:24.773040"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:18:24.773040"]]
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", "2016-08-22 18:00:42.473711"], ["updated_at", "2016-08-22 18:00:42.473711"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m UPDATE "accounts" SET "synced_id" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["synced_id", 0], ["updated_at", "2016-08-22 18:00:42.475788"], ["id", 1]]
[1m[36m (0.1ms)[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"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-07-31 19:18:24.776369"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 19:18:24.776369"]]
- [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"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-07-31 19:18:24.777698"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:18:24.777698"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 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-07-31 19:18:24.779983"]]
- [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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:18:24.782617"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 19:18:24.782617"]]
- [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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:18:24.783764"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:18:24.783764"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 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-07-31 19:18:24.785364"]]
- [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", 2]]
- [1m[36m (0.5ms)[0m [1mrollback transaction[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1
+ [1m[36m (0.7ms)[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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:18:24.788174"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 19:18:24.788174"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:18:24.789414"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:18:24.789414"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 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-07-31 19:18:24.791048"]]
- [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[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-07-31 19:18:24.794178"], ["oauth_access_token", "token"], ["oauth_expires_at", "1438283904"], ["oauth_refresh_token", "refresh_token"], ["synced_id", 123], ["updated_at", "2015-07-31 19:18:24.794178"]]
- [1m[36m (0.5ms)[0m [1mcommit transaction[0m
- [1m[35m (0.2ms)[0m begin transaction
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 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", "1438543104"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-07-31 19:18:24.796887"]]
- [1m[36m (0.5ms)[0m [1mcommit transaction[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts"
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35mSQL (0.2ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = ? [["id", 1]]
- [1m[36m (0.5ms)[0m [1mcommit transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-07-31 19:18:24.801082"], ["oauth_access_token", "token"], ["oauth_expires_at", "1438283904"], ["oauth_refresh_token", "refresh_token"], ["synced_id", 123], ["updated_at", "2015-07-31 19:18:24.801082"]]
- [1m[36m (0.5ms)[0m [1mcommit transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 18:00:42.497065"], ["updated_at", "2016-08-22 18:00:42.497065"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 18:00:42.505145"], ["updated_at", "2016-08-22 18:00:42.505145"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (1.1ms)[0m rollback transaction
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2[0m [["oauth_access_token", "refreshed_token"], ["oauth_expires_at", "1438543104"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-07-31 19:18:24.804229"]]
- [1m[35m (0.6ms)[0m commit transaction
- [1m[36m (0.1ms)[0m [1mrollback transaction[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts"[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36mSQL (0.2ms)[0m [1mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 2]]
- [1m[35m (0.3ms)[0m commit transaction
- [1m[36m (0.1ms)[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"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-07-31 19:18:24.809311"], ["oauth_access_token", "token"], ["oauth_expires_at", 1438456704], ["oauth_refresh_token", "refresh_token"], ["synced_id", 123], ["updated_at", "2015-07-31 19:18:24.809311"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.2ms)[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"."synced_id" IS NULL LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2015-07-31 19:18:24.812498"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2015-07-31 19:18:24.812498"]]
- [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"."synced_id" IS NULL AND "accounts"."id" != 3) LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 3 [["oauth_access_token", nil], ["oauth_expires_at", nil], ["oauth_refresh_token", nil], ["updated_at", "2015-07-31 19:18:24.813815"]]
- [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", 3]]
- [1m[36m (0.4ms)[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
-Processing by AuthenticatedController#index as JS
-Filter chain halted as :authenticate_account! rendered or redirected
-Completed 401 Unauthorized in 2ms (Views: 1.3ms | 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.1ms)[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 HTML
-Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
- [1m[36m (0.0ms)[0m [1mrollback transaction[0m
- [1m[36m (0.4ms)[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.1ms)[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#create as HTML
- Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 18:00:42.511236"], ["updated_at", "2016-08-22 18:00:42.511236"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
[1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
[1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 19:18:29.669739"], ["updated_at", "2015-07-31 19:18:29.669739"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/
-Completed 302 Found in 29ms (ActiveRecord: 1.8ms)
- [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[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 18:00:42.518187"], ["updated_at", "2016-08-22 18:00:42.518187"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.7ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 18:00:42.523557"], ["updated_at", "2016-08-22 18:00:42.523557"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
[1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
[1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 19:18:29.677032"], ["updated_at", "2015-07-31 19:18:29.677032"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.4ms)
- [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[35mSQL (0.5ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 18:00:42.528681"], ["updated_at", "2016-08-22 18:00:42.528681"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 18:00:42.535412"], ["updated_at", "2016-08-22 18:00:42.535412"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
[1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
[1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 19:18:29.682924"], ["updated_at", "2015-07-31 19:18:29.682924"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/admin
-Completed 302 Found in 3ms (ActiveRecord: 0.4ms)
- [1m[36m (0.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
-Completed 200 OK in 10ms (Views: 9.6ms | ActiveRecord: 0.0ms)
- [1m[36m (0.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.1ms)
-Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
- [1m[36m (0.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
-Processing by AuthenticatedController#index as HTML
- Rendered text template (0.0ms)
-Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.0ms)
- [1m[36m (0.0ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[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.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
-Processing by AuthenticatedController#index as JS
- Rendered text template (0.0ms)
-Filter chain halted as :authenticate_account! rendered or redirected
-Completed 401 Unauthorized in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
- [1m[36m (0.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
-Processing by AuthenticatedController#index as JS
- Rendered text template (0.0ms)
-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
- [1m[36m (0.0ms)[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 [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 [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"."synced_id" IS NULL LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["created_at", "2015-07-31 19:18:29.722694"], ["updated_at", "2015-07-31 19:18:29.722694"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_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"."synced_id" IS NULL AND "accounts"."id" != 1) LIMIT 1
- [1m[36mSQL (0.5ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2015-07-31 19:18:29.725465"], ["id", 1]]
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 18:00:42.538943"], ["updated_at", "2016-08-22 18:00:42.538943"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 1]]
- [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" ("synced_id", "created_at", "updated_at") VALUES (?, ?, ?) [["synced_id", 0], ["created_at", "2015-07-31 19:18:29.732112"], ["updated_at", "2015-07-31 19:18:29.732112"]]
- [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"."synced_id" = 0 LIMIT 1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
+ [1m[36m (0.7ms)[0m [1mrollback transaction[0m
[1m[35m (0.1ms)[0m begin transaction
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1438283909"], ["created_at", "2015-07-31 19:18:29.742740"], ["updated_at", "2015-07-31 19:18:29.742740"]]
- [1m[36m (0.5ms)[0m [1mcommit transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 18:00:42.544616"], ["updated_at", "2016-08-22 18:00:42.544616"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2016-08-22 18:00:42.548093"], ["updated_at", "2016-08-22 18:00:42.548093"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2016-08-22 18:00:42.556467"], ["id", 2]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (1.1ms)[0m rollback transaction
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 1) LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1438543109"], ["updated_at", "2015-07-31 19:18:29.746811"], ["id", 1]]
- [1m[35m (0.5ms)[0m commit transaction
- [1m[36m (0.1ms)[0m [1mrollback transaction[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts"[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36mSQL (0.2ms)[0m [1mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 1]]
- [1m[35m (0.6ms)[0m commit transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1438283909"], ["created_at", "2015-07-31 19:18:29.752350"], ["updated_at", "2015-07-31 19:18:29.752350"]]
- [1m[35m (0.5ms)[0m commit transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1
- [1m[36mSQL (0.1ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1438543109"], ["updated_at", "2015-07-31 19:18:29.755040"], ["id", 2]]
- [1m[35m (0.4ms)[0m commit transaction
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts"[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36mSQL (0.2ms)[0m [1mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 2]]
- [1m[35m (0.3ms)[0m commit transaction
+ [1m[35m (0.9ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 18:00:42.572923"], ["updated_at", "2016-08-22 18:00:42.572923"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2016-08-22 18:00:42.576656"], ["updated_at", "2016-08-22 18:00:42.576656"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2016-08-22 18:00:42.581876"], ["id", 2]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 2]]
+ [1m[35m (0.7ms)[0m rollback transaction
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 18:00:42.591245"], ["updated_at", "2016-08-22 18:00:42.591245"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
[1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1438456709"], ["created_at", "2015-07-31 19:18:29.758977"], ["updated_at", "2015-07-31 19:18:29.758977"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.3ms)[0m rollback transaction
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2016-08-22 18:00:42.595914"], ["updated_at", "2016-08-22 18:00:42.595914"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (19.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1
+ [1m[36mSQL (0.1ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2016-08-22 18:00:42.651142"], ["id", 2]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 2]]
+ [1m[35m (1.0ms)[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 SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 19:18:29.765813"], ["updated_at", "2015-07-31 19:18:29.765813"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2015-07-31 19:18:29.767291"], ["updated_at", "2015-07-31 19:18:29.767291"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 4) LIMIT 1
- [1m[36mSQL (0.1ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2015-07-31 19:18:29.769225"], ["id", 4]]
- [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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 19:18:29.772434"], ["updated_at", "2015-07-31 19:18:29.772434"]]
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (8.6ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471975242"], ["created_at", "2016-08-22 18:00:42.663116"], ["updated_at", "2016-08-22 18:00:42.663116"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (2.5ms)[0m rollback transaction
+ [1m[36m (0.3ms)[0m [1mbegin transaction[0m
+ [1m[35mAccount Exists (1.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471802442"], ["created_at", "2016-08-22 18:00:42.691381"], ["updated_at", "2016-08-22 18:00:42.691381"]]
+ [1m[35m (1.3ms)[0m commit transaction
+ [1m[36m (0.5ms)[0m [1mbegin transaction[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 1) LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472061642"], ["updated_at", "2016-08-22 18:00:42.703750"], ["id", 1]]
+ [1m[35m (1.0ms)[0m commit transaction
+ [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.6ms)[0m [1mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 1]]
+ [1m[35m (1.1ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471802442"], ["created_at", "2016-08-22 18:00:42.715799"], ["updated_at", "2016-08-22 18:00:42.715799"]]
+ [1m[35m (1.0ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472061642"], ["updated_at", "2016-08-22 18:00:42.723418"], ["id", 2]]
+ [1m[36m (1.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m rollback transaction
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 2]]
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts"
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = ? [["id", 2]]
+ [1m[36m (0.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT 1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "accounts" ("oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["created_at", "2016-08-22 18:00:42.734407"], ["updated_at", "2016-08-22 18:00:42.734407"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2015-07-31 19:18:29.774432"], ["updated_at", "2015-07-31 19:18:29.774432"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 4) LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2015-07-31 19:18:29.776645"], ["id", 4]]
- [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", 4]]
- [1m[36m (0.7ms)[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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 19:18:29.780284"], ["updated_at", "2015-07-31 19:18:29.780284"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" IS NULL AND "accounts"."id" != 3) LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2016-08-22 18:00:42.739500"], ["id", 3]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2015-07-31 19:18:29.782052"], ["updated_at", "2015-07-31 19:18:29.782052"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 4) LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2015-07-31 19:18:29.784698"], ["id", 4]]
- [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", 4]]
- [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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 19:18:29.788105"], ["updated_at", "2015-07-31 19:18:29.788105"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "accounts"[0m
- [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 19:18:29.792645"], ["updated_at", "2015-07-31 19:18:29.792645"]]
- [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"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 19:18:29.795784"], ["updated_at", "2015-07-31 19:18:29.795784"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 19:18:29.797646"], ["updated_at", "2015-07-31 19:18:29.797646"]]
- [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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 19:18:29.800735"], ["updated_at", "2015-07-31 19:18:29.800735"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 19:18:29.803016"], ["updated_at", "2015-07-31 19:18:29.803016"]]
- [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"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 19:18:29.805867"], ["updated_at", "2015-07-31 19:18:29.805867"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 19:18:29.808331"], ["updated_at", "2015-07-31 19:18:29.808331"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.5ms)[0m [1mrollback transaction[0m
- [1m[36m (0.3ms)[0m [1mbegin transaction[0m
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 3]]
+ [1m[35m (1.1ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.1ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.1ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.1ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.1ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.1ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.1ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
Processing by AuthenticatedController#index as HTML
- Rendered text template (0.0ms)
+Redirected to http://test.host/auth/bookingsync/?account_id=
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 4ms (Views: 3.6ms | ActiveRecord: 0.0ms)
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
Processing by AuthenticatedController#index as HTML
-Redirected to http://test.host/auth/bookingsync/?account_id=
+ Rendered text template (0.1ms)
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
+Completed 200 OK in 7ms (Views: 7.0ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
Processing by AuthenticatedController#index as JS
+ Rendered text template (0.0ms)
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
+Completed 401 Unauthorized in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
Processing by AuthenticatedController#index as JS
+ Rendered text template (0.0ms)
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
- [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"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-07-31 19:23:00.238631"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 19:23:00.238631"]]
- [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"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-07-31 19:23:00.245910"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:23:00.245910"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 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-07-31 19:23:00.251225"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (2.2ms)[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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:23:00.257257"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 19:23:00.257257"]]
- [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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:23:00.258568"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:23:00.258568"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 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-07-31 19:23:00.260331"]]
- [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", 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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:23:00.262872"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 19:23:00.262872"]]
- [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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:23:00.263951"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:23:00.263951"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 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-07-31 19:23:00.265365"]]
- [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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:23:00.267953"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 19:23:00.267953"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "accounts"[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:23:00.271265"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:23:00.271265"]]
- [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"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-07-31 19:23:00.273965"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 19:23:00.273965"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:23:00.275348"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:23:00.275348"]]
- [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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:23:00.278060"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 19:23:00.278060"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 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", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-07-31 19:23:00.279452"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:23:00.279452"]]
- [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"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-07-31 19:23:00.281586"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 19:23:00.281586"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:23:00.283000"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:23:00.283000"]]
- [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"."synced_id" 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-07-31 19:23:00.285295"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2015-07-31 19:23:00.285295"]]
- [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"."synced_id" 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-07-31 19:23:00.286320"]]
- [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[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:23:00.289494"], ["oauth_access_token", "token"], ["oauth_expires_at", "1438284180"], ["oauth_refresh_token", "refresh_token"], ["synced_id", 123], ["updated_at", "2015-07-31 19:23:00.289494"]]
- [1m[35m (0.4ms)[0m commit transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.2ms)[0m begin transaction
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 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", "1438543380"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-07-31 19:23:00.298189"]]
- [1m[36m (0.5ms)[0m [1mcommit transaction[0m
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 1]]
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts"
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35mSQL (0.2ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = ? [["id", 1]]
- [1m[36m (0.5ms)[0m [1mcommit transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-07-31 19:23:00.303740"], ["oauth_access_token", "token"], ["oauth_expires_at", "1438284180"], ["oauth_refresh_token", "refresh_token"], ["synced_id", 123], ["updated_at", "2015-07-31 19:23:00.303740"]]
- [1m[36m (0.5ms)[0m [1mcommit transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) 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" = 2 [["oauth_access_token", "refreshed_token"], ["oauth_expires_at", "1438543380"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-07-31 19:23:00.306396"]]
- [1m[36m (0.4ms)[0m [1mcommit transaction[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts"
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35mSQL (0.2ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = ? [["id", 2]]
- [1m[36m (0.4ms)[0m [1mcommit 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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:23:00.310253"], ["oauth_access_token", "token"], ["oauth_expires_at", 1438456980], ["oauth_refresh_token", "refresh_token"], ["synced_id", 123], ["updated_at", "2015-07-31 19:23:00.310253"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[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.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "synced_id", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-07-31 19:23:00.315102"], ["synced_id", 0], ["updated_at", "2015-07-31 19:23:00.315102"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1[0m
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+Completed 401 Unauthorized in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
[1m[35m (0.1ms)[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"."synced_id" = 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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:23:00.332513"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:23:00.332513"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.5ms)
- [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"."synced_id" = 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"."synced_id" = 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", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-07-31 19:23:00.336595"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:23:00.336595"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.3ms)[0m rollback transaction
- [1m[36m (0.1ms)[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"."synced_id" = 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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:23:00.340215"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:23:00.340215"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/admin
-Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+ [1m[35m (0.4ms)[0m [1m[36mbegin transaction[0m
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
+Completed 302 Found in 10ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
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
+Completed 302 Found in 5ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by SessionsController#failure as HTML
-Completed 200 OK in 4ms (Views: 3.8ms | ActiveRecord: 0.0ms)
- [1m[36m (0.0ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+ Rendering /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
+Completed 200 OK in 22ms (Views: 15.3ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by SessionsController#failure as HTML
+ Rendering /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.0ms)
Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
- [1m[36m (0.0ms)[0m [1mrollback transaction[0m
- [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.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 SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT 1[0m
- [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["created_at", "2015-07-31 19:23:04.473710"], ["updated_at", "2015-07-31 19:23:04.473710"]]
- [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"."synced_id" IS NULL AND "accounts"."id" != 1) LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2015-07-31 19:23:04.476007"], ["id", 1]]
- [1m[36m (0.1ms)[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.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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 19:23:04.482695"], ["updated_at", "2015-07-31 19:23:04.482695"]]
- [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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2015-07-31 19:23:04.484129"], ["updated_at", "2015-07-31 19:23:04.484129"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2015-07-31 19:23:04.487471"], ["id", 2]]
- [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"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 19:23:04.491277"], ["updated_at", "2015-07-31 19:23:04.491277"]]
- [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"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2015-07-31 19:23:04.492634"], ["updated_at", "2015-07-31 19:23:04.492634"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1
- [1m[36mSQL (0.0ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2015-07-31 19:23:04.494395"], ["id", 2]]
- [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.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"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 19:23:04.497133"], ["updated_at", "2015-07-31 19:23:04.497133"]]
- [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"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2015-07-31 19:23:04.498406"], ["updated_at", "2015-07-31 19:23:04.498406"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1
- [1m[36mSQL (0.0ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2015-07-31 19:23:04.500250"], ["id", 2]]
- [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.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"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 19:23:04.502800"], ["updated_at", "2015-07-31 19:23:04.502800"]]
- [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"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 19:23:04.506247"], ["updated_at", "2015-07-31 19:23:04.506247"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "accounts"
- [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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 19:23:04.508973"], ["updated_at", "2015-07-31 19:23:04.508973"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 19:23:04.510626"], ["updated_at", "2015-07-31 19:23:04.510626"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.3ms)[0m rollback transaction
- [1m[36m (0.1ms)[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"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 19:23:04.513385"], ["updated_at", "2015-07-31 19:23:04.513385"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 19:23:04.515729"], ["updated_at", "2015-07-31 19:23:04.515729"]]
- [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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 19:23:04.518746"], ["updated_at", "2015-07-31 19:23:04.518746"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 19:23:04.520825"], ["updated_at", "2015-07-31 19:23:04.520825"]]
- [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[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1438284184"], ["created_at", "2015-07-31 19:23:04.523727"], ["updated_at", "2015-07-31 19:23:04.523727"]]
- [1m[35m (0.6ms)[0m commit transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.2ms)[0m begin transaction
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 1) LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1438543384"], ["updated_at", "2015-07-31 19:23:04.532409"], ["id", 1]]
- [1m[36m (0.7ms)[0m [1mcommit transaction[0m
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 1]]
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts"
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35mSQL (0.2ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = ? [["id", 1]]
- [1m[36m (0.6ms)[0m [1mcommit transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1438284184"], ["created_at", "2015-07-31 19:23:04.538399"], ["updated_at", "2015-07-31 19:23:04.538399"]]
- [1m[36m (0.5ms)[0m [1mcommit transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1438543384"], ["updated_at", "2015-07-31 19:23:04.541374"], ["id", 2]]
- [1m[36m (0.5ms)[0m [1mcommit transaction[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts"
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35mSQL (0.2ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = ? [["id", 2]]
- [1m[36m (0.4ms)[0m [1mcommit 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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1438456984"], ["created_at", "2015-07-31 19:23:04.545388"], ["updated_at", "2015-07-31 19:23:04.545388"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[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.1ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["synced_id", 0], ["created_at", "2015-07-31 19:23:04.553766"], ["updated_at", "2015-07-31 19:23:04.553766"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1[0m
- [1m[35m (0.4ms)[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
-Processing by SessionsController#destroy as HTML
-Redirected to http://test.host/signed_out
-Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[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#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
-Completed 200 OK in 9ms (Views: 8.7ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
-Completed 200 OK in 1ms (Views: 1.2ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 19:23:04.597009"], ["updated_at", "2015-07-31 19:23:04.597009"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:00:56 UTC], ["updated_at", 2016-08-22 18:00:56 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/admin
-Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+Completed 302 Found in 66ms (ActiveRecord: 3.5ms)
+ [1m[35m (2.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 19:23:04.602339"], ["updated_at", "2015-07-31 19:23:04.602339"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.7ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:00:56 UTC], ["updated_at", 2016-08-22 18:00:56 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/
-Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
- [1m[35m (0.2ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Completed 302 Found in 19ms (ActiveRecord: 1.7ms)
+ [1m[35m (0.5ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 19:23:04.607598"], ["updated_at", "2015-07-31 19:23:04.607598"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.9ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:00:56 UTC], ["updated_at", 2016-08-22 18:00:56 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.4ms)
- [1m[36m (0.2ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
+Completed 302 Found in 8ms (ActiveRecord: 1.3ms)
+ [1m[35m (0.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin 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[36m (0.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by AuthenticatedController#index as HTML
+ Rendering text template
Rendered text template (0.0ms)
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 2ms (Views: 2.3ms | ActiveRecord: 0.0ms)
- [1m[36m (0.0ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+Completed 200 OK in 4ms (Views: 3.6ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by AuthenticatedController#index as JS
+ Rendering text template
Rendered text template (0.0ms)
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
- [1m[36m (0.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
+Completed 401 Unauthorized in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.2ms)[0m [1m[36mbegin transaction[0m
Processing by AuthenticatedController#index as JS
+ Rendering text template
Rendered text template (0.0ms)
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[36m (0.3ms)[0m [1mbegin transaction[0m
- [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[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
+Completed 401 Unauthorized in 2ms (Views: 1.0ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT ?[0m [["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:00:56 UTC], ["updated_at", 2016-08-22 18:00:56 UTC], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != ?) LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 18:00:56 UTC], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[35m (1.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.3ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", 2016-08-22 18:00:56 UTC], ["updated_at", 2016-08-22 18:00:56 UTC]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (1.7ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "synced_id" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 18:00:56 UTC], ["synced_id", 0], ["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 0], ["LIMIT", 1]]
+ [1m[35m (1.2ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.2ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:00:56 UTC], ["updated_at", 2016-08-22 18:00:56 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471802456"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 1], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 18:00:56 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472061656"], ["id", 1]]
+ [1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.7ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:00:56 UTC], ["updated_at", 2016-08-22 18:00:56 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471802456"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 1], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 18:00:56 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472061656"], ["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 1]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.9ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:00:56 UTC], ["updated_at", 2016-08-22 18:00:56 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471975256"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:00:56 UTC], ["updated_at", 2016-08-22 18:00:56 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:00:56 UTC], ["updated_at", 2016-08-22 18:00:56 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[33mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 18:00:56 UTC], ["id", 2]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (1.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:00:56 UTC], ["updated_at", 2016-08-22 18:00:56 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:00:56 UTC], ["updated_at", 2016-08-22 18:00:56 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (0.1ms)[0m [1m[33mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 18:00:56 UTC], ["id", 2]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.0ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT ?[0m [["id", 2], ["LIMIT", 1]]
+ [1m[35m (0.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.2ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:00:56 UTC], ["updated_at", 2016-08-22 18:00:56 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:00:56 UTC], ["updated_at", 2016-08-22 18:00:56 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 18:00:56 UTC], ["id", 2]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT ?[0m [["id", 2], ["LIMIT", 1]]
+ [1m[35m (0.9ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:00:56 UTC], ["updated_at", 2016-08-22 18:00:56 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:00:56 UTC], ["updated_at", 2016-08-22 18:00:56 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (0.7ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.2ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.7ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:00:56 UTC], ["updated_at", 2016-08-22 18:00:56 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:00:56 UTC], ["updated_at", 2016-08-22 18:00:56 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (1.3ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:00:56 UTC], ["updated_at", 2016-08-22 18:00:56 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (1.8ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:00:56 UTC], ["updated_at", 2016-08-22 18:00:56 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.9ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:00:56 UTC], ["updated_at", 2016-08-22 18:00:56 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.0ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:00:56 UTC], ["updated_at", 2016-08-22 18:00:56 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (1.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.6ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.2ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.3ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (3.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:13 UTC], ["updated_at", 2016-08-22 18:02:13 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (0.6ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.7ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:13 UTC], ["updated_at", 2016-08-22 18:02:13 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (2.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.2ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:13 UTC], ["updated_at", 2016-08-22 18:02:13 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:13 UTC], ["updated_at", 2016-08-22 18:02:13 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:13 UTC], ["updated_at", 2016-08-22 18:02:13 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.9ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:13 UTC], ["updated_at", 2016-08-22 18:02:13 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (1.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.4ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:13 UTC], ["updated_at", 2016-08-22 18:02:13 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.0ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (1.9ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:13 UTC], ["updated_at", 2016-08-22 18:02:13 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.9ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:13 UTC], ["updated_at", 2016-08-22 18:02:13 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:13 UTC], ["updated_at", 2016-08-22 18:02:13 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (0.1ms)[0m [1m[33mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 18:02:13 UTC], ["id", 2]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:13 UTC], ["updated_at", 2016-08-22 18:02:13 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:13 UTC], ["updated_at", 2016-08-22 18:02:13 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (0.1ms)[0m [1m[33mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 18:02:13 UTC], ["id", 2]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT ?[0m [["id", 2], ["LIMIT", 1]]
+ [1m[35m (1.4ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:13 UTC], ["updated_at", 2016-08-22 18:02:13 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.7ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:13 UTC], ["updated_at", 2016-08-22 18:02:13 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[33mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 18:02:13 UTC], ["id", 2]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT ?[0m [["id", 2], ["LIMIT", 1]]
+ [1m[35m (0.9ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.2ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:13 UTC], ["updated_at", 2016-08-22 18:02:13 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471975333"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:13 UTC], ["updated_at", 2016-08-22 18:02:13 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471802533"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 1], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 18:02:13 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472061733"], ["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.7ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:13 UTC], ["updated_at", 2016-08-22 18:02:13 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471802533"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 1], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 18:02:13 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472061733"], ["id", 1]]
+ [1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.6ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", 2016-08-22 18:02:13 UTC], ["updated_at", 2016-08-22 18:02:13 UTC]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (1.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "synced_id" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 18:02:13 UTC], ["synced_id", 0], ["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 0], ["LIMIT", 1]]
+ [1m[35m (0.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT ?[0m [["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:13 UTC], ["updated_at", 2016-08-22 18:02:13 UTC], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != ?) LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 18:02:13 UTC], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[35m (1.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by AuthenticatedController#index as JS
+ Rendering text template
Rendered text template (0.0ms)
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 401 Unauthorized in 4ms (Views: 3.6ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+Completed 401 Unauthorized in 9ms (Views: 7.9ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Completed 401 Unauthorized in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by AuthenticatedController#index as HTML
+ Rendering text template
+ Rendered text template (0.0ms)
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.0ms)[0m [1mbegin transaction[0m
+Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin 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 SessionsController#destroy as HTML
-Redirected to http://test.host/signed_out
-Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.1ms)[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 6ms (Views: 5.7ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
-Processing by SessionsController#failure as HTML
-Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+Completed 302 Found in 8ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:36:35.235212"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:36:35.235212"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/
-Completed 302 Found in 26ms (ActiveRecord: 1.9ms)
- [1m[36m (2.0ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:13 UTC], ["updated_at", 2016-08-22 18:02:13 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/admin
+Completed 302 Found in 8ms (ActiveRecord: 0.9ms)
+ [1m[35m (0.6ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 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", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-07-31 19:36:35.243647"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:36:35.243647"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:13 UTC], ["updated_at", 2016-08-22 18:02:13 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.4ms)
- [1m[35m (0.3ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Completed 302 Found in 5ms (ActiveRecord: 0.8ms)
+ [1m[35m (0.5ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.2ms)[0m [1m[36mbegin transaction[0m
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:36:35.249080"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:36:35.249080"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/admin
-Completed 302 Found in 4ms (ActiveRecord: 0.8ms)
- [1m[36m (0.3ms)[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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:36:35.253763"], ["oauth_access_token", "token"], ["oauth_expires_at", 1438457795], ["oauth_refresh_token", "refresh_token"], ["synced_id", 123], ["updated_at", "2015-07-31 19:36:35.253763"]]
- [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[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-07-31 19:36:35.257535"], ["oauth_access_token", "token"], ["oauth_expires_at", "1438284995"], ["oauth_refresh_token", "refresh_token"], ["synced_id", 123], ["updated_at", "2015-07-31 19:36:35.257535"]]
- [1m[36m (0.6ms)[0m [1mcommit transaction[0m
- [1m[35m (0.3ms)[0m begin transaction
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 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", "1438544195"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-07-31 19:36:35.262108"]]
- [1m[36m (0.5ms)[0m [1mcommit transaction[0m
- [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts"
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
- [1m[35mSQL (0.4ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = ? [["id", 1]]
- [1m[36m (0.6ms)[0m [1mcommit transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-07-31 19:36:35.267981"], ["oauth_access_token", "token"], ["oauth_expires_at", "1438284995"], ["oauth_refresh_token", "refresh_token"], ["synced_id", 123], ["updated_at", "2015-07-31 19:36:35.267981"]]
- [1m[36m (0.4ms)[0m [1mcommit transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2[0m [["oauth_access_token", "refreshed_token"], ["oauth_expires_at", "1438544195"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-07-31 19:36:35.270298"]]
- [1m[35m (0.4ms)[0m commit transaction
- [1m[36m (0.0ms)[0m [1mrollback transaction[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts"[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36mSQL (0.2ms)[0m [1mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 2]]
- [1m[35m (0.5ms)[0m commit 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 SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2015-07-31 19:36:35.279903"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2015-07-31 19:36:35.279903"]]
- [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"."synced_id" IS NULL AND "accounts"."id" != 3) LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 3 [["oauth_access_token", nil], ["oauth_expires_at", nil], ["oauth_refresh_token", nil], ["updated_at", "2015-07-31 19:36:35.281215"]]
- [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", 3]]
- [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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:36:35.284394"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 19:36:35.284394"]]
- [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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:36:35.285703"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:36:35.285703"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 4) 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" = 4 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-07-31 19:36:35.288341"]]
- [1m[36m (0.1ms)[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"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-07-31 19:36:35.291887"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 19:36:35.291887"]]
- [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"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-07-31 19:36:35.293010"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:36:35.293010"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 123 AND "accounts"."id" != 4) 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" = 4[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-07-31 19:36:35.294366"]]
- [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", 4]]
- [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"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-07-31 19:36:35.296465"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 19:36:35.296465"]]
- [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"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-07-31 19:36:35.297466"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:36:35.297466"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 123 AND "accounts"."id" != 4) 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" = 4[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-07-31 19:36:35.299240"]]
- [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", 4]]
- [1m[35m (0.5ms)[0m rollback transaction
- [1m[36m (0.1ms)[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"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-07-31 19:36:35.302187"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 19:36:35.302187"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "accounts"
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.7ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-07-31 19:36:35.306901"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:36:35.306901"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:36:35.311262"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 19:36:35.311262"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-07-31 19:36:35.312846"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:36:35.312846"]]
- [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"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-07-31 19:36:35.315082"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 19:36:35.315082"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:36:35.316485"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:36:35.316485"]]
- [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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-07-31 19:36:35.318880"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2015-07-31 19:36:35.318880"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 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"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-07-31 19:36:35.320341"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2015-07-31 19:36:35.320341"]]
- [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[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", "synced_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-07-31 19:36:35.324945"], ["synced_id", 0], ["updated_at", "2015-07-31 19:36:35.324945"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1
- [1m[36m (0.4ms)[0m [1mrollback transaction[0m
- [1m[36m (0.3ms)[0m [1mbegin transaction[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.5ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1438457800"], ["created_at", "2015-07-31 19:36:40.069756"], ["updated_at", "2015-07-31 19:36:40.069756"]]
- [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 Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1438285000"], ["created_at", "2015-07-31 19:36:40.075088"], ["updated_at", "2015-07-31 19:36:40.075088"]]
- [1m[35m (0.5ms)[0m commit transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35m (0.2ms)[0m begin transaction
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 1) LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1438544200"], ["updated_at", "2015-07-31 19:36:40.086253"], ["id", 1]]
- [1m[36m (0.6ms)[0m [1mcommit transaction[0m
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 1]]
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts"
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35mSQL (0.2ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = ? [["id", 1]]
- [1m[36m (0.4ms)[0m [1mcommit transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1438285000"], ["created_at", "2015-07-31 19:36:40.096620"], ["updated_at", "2015-07-31 19:36:40.096620"]]
- [1m[36m (0.5ms)[0m [1mcommit transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1438544200"], ["updated_at", "2015-07-31 19:36:40.100522"], ["id", 2]]
- [1m[36m (0.6ms)[0m [1mcommit transaction[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts"
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
- [1m[35mSQL (0.2ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = ? [["id", 2]]
- [1m[36m (0.4ms)[0m [1mcommit 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"."synced_id" IS NULL LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)[0m [["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["created_at", "2015-07-31 19:36:40.104867"], ["updated_at", "2015-07-31 19:36:40.104867"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_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"."synced_id" IS NULL AND "accounts"."id" != 3) LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2015-07-31 19:36:40.106580"], ["id", 3]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1[0m [["id", 3]]
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.1ms)[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"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 19:36:40.110006"], ["updated_at", "2015-07-31 19:36:40.110006"]]
- [1m[36m (0.1ms)[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"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2015-07-31 19:36:40.111863"], ["updated_at", "2015-07-31 19:36:40.111863"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 4) LIMIT 1
- [1m[36mSQL (0.1ms)[0m [1mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2015-07-31 19:36:40.115122"], ["id", 4]]
- [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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 19:36:40.118157"], ["updated_at", "2015-07-31 19:36:40.118157"]]
- [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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2015-07-31 19:36:40.119544"], ["updated_at", "2015-07-31 19:36:40.119544"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 4) LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2015-07-31 19:36:40.121405"], ["id", 4]]
- [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", 4]]
- [1m[36m (0.4ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 19:36:40.124325"], ["updated_at", "2015-07-31 19:36:40.124325"]]
- [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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2015-07-31 19:36:40.125737"], ["updated_at", "2015-07-31 19:36:40.125737"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 4) LIMIT 1[0m
- [1m[35mSQL (0.0ms)[0m UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ? [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2015-07-31 19:36:40.127969"], ["id", 4]]
- [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", 4]]
- [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"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 19:36:40.130940"], ["updated_at", "2015-07-31 19:36:40.130940"]]
- [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"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 19:36:40.134489"], ["updated_at", "2015-07-31 19:36:40.134489"]]
- [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"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 19:36:40.137550"], ["updated_at", "2015-07-31 19:36:40.137550"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 19:36:40.139441"], ["updated_at", "2015-07-31 19:36:40.139441"]]
- [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.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 19:36:40.142971"], ["updated_at", "2015-07-31 19:36:40.142971"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 19:36:40.145658"], ["updated_at", "2015-07-31 19:36:40.145658"]]
- [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"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2015-07-31 19:36:40.148838"], ["updated_at", "2015-07-31 19:36:40.148838"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.0ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 19:36:40.150614"], ["updated_at", "2015-07-31 19:36:40.150614"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
- [1m[36m (0.0ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["synced_id", 0], ["created_at", "2015-07-31 19:36:40.161046"], ["updated_at", "2015-07-31 19:36:40.161046"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1[0m
- [1m[35m (0.4ms)[0m rollback transaction
- [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:13 UTC], ["updated_at", 2016-08-22 18:02:13 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 7ms (ActiveRecord: 1.0ms)
+ [1m[35m (0.5ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by SessionsController#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
-Completed 200 OK in 9ms (Views: 8.5ms | ActiveRecord: 0.0ms)
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ Rendering /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.4ms)
+Completed 200 OK in 23ms (Views: 16.6ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by SessionsController#failure as HTML
- Rendered /Users/seb/Work/WebSites/BookingSync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.1ms)
-Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
- [1m[35m (0.0ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ Rendering /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.0ms)
+Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/signed_out
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.5ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/signed_out
+Completed 302 Found in 4ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/
+Completed 302 Found in 3ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
+Completed 200 OK in 19ms (Views: 14.0ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.0ms)
+Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 19:36:40.192490"], ["updated_at", "2015-07-31 19:36:40.192490"]]
- [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:47 UTC], ["updated_at", 2016-08-22 18:02:47 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
- [1m[36m (0.3ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
+Completed 302 Found in 56ms (ActiveRecord: 3.4ms)
+ [1m[35m (1.7ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 19:36:40.200454"], ["updated_at", "2015-07-31 19:36:40.200454"]]
- [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:47 UTC], ["updated_at", 2016-08-22 18:02:47 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/admin
-Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
- [1m[35m (0.3ms)[0m rollback transaction
- [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+Completed 302 Found in 8ms (ActiveRecord: 1.8ms)
+ [1m[35m (0.5ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-07-31 19:36:40.207660"], ["updated_at", "2015-07-31 19:36:40.207660"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:47 UTC], ["updated_at", 2016-08-22 18:02:47 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
- [1m[36m (0.3ms)[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.1ms)[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.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
-Processing by AuthenticatedController#index as JS
+Completed 302 Found in 11ms (ActiveRecord: 1.4ms)
+ [1m[35m (0.7ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+Processing by AuthenticatedController#index as HTML
+ Rendering text template
Rendered text template (0.0ms)
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 401 Unauthorized in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms)
- [1m[36m (0.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
-Processing by AuthenticatedController#index as JS
- Rendered text template (0.0ms)
-Filter chain halted as :authenticate_account! rendered or redirected
-Completed 401 Unauthorized in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
- [1m[36m (0.0ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
+Completed 200 OK in 5ms (Views: 3.9ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin 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[36m (0.0ms)[0m [1mrollback transaction[0m
- [1m[35m (0.0ms)[0m begin transaction
-Processing by AuthenticatedController#index as HTML
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+Processing by AuthenticatedController#index as JS
+ Rendering text template
Rendered text template (0.0ms)
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
- [1m[36m (0.1ms)[0m [1mrollback transaction[0m
- [1m[35m (0.1ms)[0m begin transaction
- [1m[36m (0.0ms)[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 [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 [1mrollback transaction[0m
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.0ms)[0m [1mBEGIN[0m
- [1m[35m (0.0ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.0ms)[0m [1mBEGIN[0m
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[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
- [1m[36m (0.0ms)[0m [1mBEGIN[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.1ms)[0m ROLLBACK
- [1m[36m (0.0ms)[0m [1mBEGIN[0m
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
-Completed 200 OK in 8ms (Views: 7.5ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.1ms)
-Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Completed 401 Unauthorized in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT ?[0m [["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:47 UTC], ["updated_at", 2016-08-22 18:02:47 UTC], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != ?) LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[35mSQL (0.7ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 18:02:47 UTC], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT ?[0m [["id", 1], ["LIMIT", 1]]
+ [1m[35m (1.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.4ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:47 UTC], ["updated_at", 2016-08-22 18:02:47 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:47 UTC], ["updated_at", 2016-08-22 18:02:47 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (0.1ms)[0m [1m[33mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 18:02:47 UTC], ["id", 2]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:47 UTC], ["updated_at", 2016-08-22 18:02:47 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:47 UTC], ["updated_at", 2016-08-22 18:02:47 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (0.1ms)[0m [1m[33mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 18:02:47 UTC], ["id", 2]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.0ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT ?[0m [["id", 2], ["LIMIT", 1]]
+ [1m[35m (0.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (1.1ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:47 UTC], ["updated_at", 2016-08-22 18:02:47 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:47 UTC], ["updated_at", 2016-08-22 18:02:47 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (0.1ms)[0m [1m[33mUPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ?, "updated_at" = ? WHERE "accounts"."id" = ?[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 18:02:47 UTC], ["id", 2]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT ?[0m [["id", 2], ["LIMIT", 1]]
+ [1m[35m (0.9ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:47 UTC], ["updated_at", 2016-08-22 18:02:47 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:47 UTC], ["updated_at", 2016-08-22 18:02:47 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (0.9ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:47 UTC], ["updated_at", 2016-08-22 18:02:47 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:47 UTC], ["updated_at", 2016-08-22 18:02:47 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.9ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.2ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:47 UTC], ["updated_at", 2016-08-22 18:02:47 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:47 UTC], ["updated_at", 2016-08-22 18:02:47 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES (?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:47 UTC], ["updated_at", 2016-08-22 18:02:47 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = ? AND "accounts"."provider" = ? LIMIT ?[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:47 UTC], ["updated_at", 2016-08-22 18:02:47 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.9ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:47 UTC], ["updated_at", 2016-08-22 18:02:47 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471802567"]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 1], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 18:02:47 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472061767"], ["id", 1]]
+ [1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 1]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:47 UTC], ["updated_at", 2016-08-22 18:02:47 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471802567"]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? AND ("accounts"."id" != ?) LIMIT ?[0m [["synced_id", 123], ["id", 1], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "oauth_access_token" = ?, "oauth_refresh_token" = ?, "oauth_expires_at" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 18:02:47 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472061767"], ["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = ?[0m [["id", 1]]
+ [1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.9ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", 2016-08-22 18:02:47 UTC], ["updated_at", 2016-08-22 18:02:47 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471975367"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.2ms)[0m [1m[36mbegin transaction[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT ?[0m [["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", 2016-08-22 18:02:47 UTC], ["updated_at", 2016-08-22 18:02:47 UTC]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = ?, "synced_id" = ? WHERE "accounts"."id" = ?[0m [["updated_at", 2016-08-22 18:02:47 UTC], ["synced_id", 0], ["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = ? LIMIT ?[0m [["synced_id", 0], ["LIMIT", 1]]
+ [1m[35m (0.8ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.5ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.4ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-14 21:16:46.131435"], ["updated_at", "2017-06-14 21:16:46.131435"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (1.8ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.8ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (19.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (2.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 18:16:11 UTC], ["updated_at", 2016-08-22 18:16:11 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/
-Completed 302 Found in 30ms (ActiveRecord: 6.9ms)
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
+Completed 302 Found in 220ms (ActiveRecord: 67.1ms)
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-14 21:16:46.137214"], ["updated_at", "2017-06-14 21:16:46.137214"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 3ms (ActiveRecord: 0.8ms)
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 18:16:11 UTC], ["updated_at", 2016-08-22 18:16:11 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 10ms (ActiveRecord: 1.9ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-14 21:16:46.142149"], ["updated_at", "2017-06-14 21:16:46.142149"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 18:16:11 UTC], ["updated_at", 2016-08-22 18:16:11 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/admin
+Completed 302 Found in 15ms (ActiveRecord: 2.1ms)
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.6ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.4ms)
+Completed 200 OK in 39ms (Views: 26.5ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.0ms)
+Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#destroy as HTML
Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.7ms)
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
+Completed 302 Found in 2ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.8ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/signed_out
+Completed 302 Found in 4ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
Processing by AuthenticatedController#index as HTML
- Rendered text template (0.0ms)
+Redirected to http://test.host/auth/bookingsync/?account_id=
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms)
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
Processing by AuthenticatedController#index as HTML
-Redirected to http://test.host/auth/bookingsync/?account_id=
+ Rendering text template
+ Rendered text template (0.4ms)
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.0ms)[0m BEGIN
+Completed 200 OK in 61ms (Views: 59.1ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
Processing by AuthenticatedController#index as JS
- Rendered text template (0.0ms)
+ Rendering text template
+ Rendered text template (0.1ms)
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.0ms)[0m BEGIN
+Completed 401 Unauthorized in 6ms (Views: 4.9ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
Processing by AuthenticatedController#index as JS
+ Rendering text template
Rendered text template (0.0ms)
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[0m
- [1m[35m (0.0ms)[0m BEGIN
- [1m[36mAccount Load (0.4ms)[0m [1mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", "2017-06-14 21:16:46.159745"], ["updated_at", "2017-06-14 21:16:46.159745"]]
+Completed 401 Unauthorized in 2ms (Views: 1.1ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.5ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (4.9ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 18:16:12 UTC], ["updated_at", 2016-08-22 18:16:12 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 18:16:12 UTC], ["updated_at", 2016-08-22 18:16:12 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (7.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 5], ["LIMIT", 1]]
+ [1m[35mSQL (12.2ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 18:16:12 UTC], ["id", 5]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.7ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 18:16:12 UTC], ["updated_at", 2016-08-22 18:16:12 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.4ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 18:16:12 UTC], ["updated_at", 2016-08-22 18:16:12 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.6ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 7], ["LIMIT", 1]]
+ [1m[35mSQL (0.9ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 18:16:12 UTC], ["id", 7]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 7], ["LIMIT", 1]]
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 18:16:12 UTC], ["updated_at", 2016-08-22 18:16:12 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 18:16:12 UTC], ["updated_at", 2016-08-22 18:16:12 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 9], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 18:16:12 UTC], ["id", 9]]
+ [1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 9], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 18:16:12 UTC], ["updated_at", 2016-08-22 18:16:12 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.5ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 18:16:12 UTC], ["updated_at", 2016-08-22 18:16:12 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 18:16:12 UTC], ["updated_at", 2016-08-22 18:16:12 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.5ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.4ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 18:16:12 UTC], ["updated_at", 2016-08-22 18:16:12 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 18:16:12 UTC], ["updated_at", 2016-08-22 18:16:12 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (2.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 18:16:12 UTC], ["updated_at", 2016-08-22 18:16:12 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.4ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 18:16:12 UTC], ["updated_at", 2016-08-22 18:16:12 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 18:16:12 UTC], ["updated_at", 2016-08-22 18:16:12 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (0.4ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.9ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", 2016-08-22 18:16:12 UTC], ["updated_at", 2016-08-22 18:16:12 UTC]]
+ [1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", 2016-08-22 18:16:12 UTC], ["synced_id", 0], ["id", 18]]
+ [1m[35m (0.5ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35mSQL (0.9ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", 2016-08-22 18:16:12 UTC], ["updated_at", 2016-08-22 18:16:12 UTC], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != $1) LIMIT $2[0m [["id", 19], ["LIMIT", 1]]
+ [1m[35mSQL (1.1ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 18:16:12 UTC], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 19]]
+ [1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.7ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 19], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.4ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 18:16:12 UTC], ["updated_at", 2016-08-22 18:16:12 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471803372"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (1.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 20], ["LIMIT", 1]]
+ [1m[35mSQL (0.7ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 18:16:12 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472062572"], ["id", 20]]
+ [1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.4ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.5ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 20], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.5ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (5.8ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (7.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 20]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (1.0ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 18:16:12 UTC], ["updated_at", 2016-08-22 18:16:12 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471803372"]]
+ [1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 21], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 18:16:12 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472062572"], ["id", 21]]
+ [1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
+ [1m[36mAccount Load (0.6ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 21]]
+ [1m[35m (0.7ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 18:16:12 UTC], ["updated_at", 2016-08-22 18:16:12 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471976172"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (1.8ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.7ms)[0m [1mBEGIN[0m
+ [1m[35m (0.6ms)[0m ROLLBACK
+ [1m[36m (0.5ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35mAccount Exists (1.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (2.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471803872"], ["created_at", "2016-08-22 18:24:32.438572"], ["updated_at", "2016-08-22 18:24:32.438572"]]
+ [1m[35m (2.3ms)[0m COMMIT
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35mAccount Exists (1.0ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 1) LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5[0m [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472063072"], ["updated_at", "2016-08-22 18:24:32.486945"], ["id", 1]]
+ [1m[35m (0.4ms)[0m COMMIT
+ [1m[36mAccount Load (0.5ms)[0m [1mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36mSQL (0.5ms)[0m [1mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 1]]
+ [1m[35m (0.4ms)[0m COMMIT
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35mAccount Exists (2.8ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (1.1ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471803872"], ["created_at", "2016-08-22 18:24:32.513087"], ["updated_at", "2016-08-22 18:24:32.513087"]]
+ [1m[35m (0.8ms)[0m COMMIT
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36mAccount Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5 [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472063072"], ["updated_at", "2016-08-22 18:24:32.521329"], ["id", 2]]
+ [1m[36m (0.3ms)[0m [1mCOMMIT[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36mAccount Load (0.4ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 2]]
+ [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts"
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35mSQL (0.6ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = $1 [["id", 2]]
+ [1m[36m (0.4ms)[0m [1mCOMMIT[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.4ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471976672"], ["created_at", "2016-08-22 18:24:32.534748"], ["updated_at", "2016-08-22 18:24:32.534748"]]
+ [1m[35m (0.4ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.5ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36mAccount Load (1.3ms)[0m [1mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", "2016-08-22 18:24:32.558967"], ["updated_at", "2016-08-22 18:24:32.558967"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "synced_id" = $1, "updated_at" = $2 WHERE "accounts"."id" = $3 [["synced_id", 0], ["updated_at", "2017-06-14 21:16:46.161300"], ["id", 4]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35mSQL (0.8ms)[0m UPDATE "accounts" SET "synced_id" = $1, "updated_at" = $2 WHERE "accounts"."id" = $3 [["synced_id", 0], ["updated_at", "2016-08-22 18:24:32.561894"], ["id", 4]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.4ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1
+ [1m[36m (1.3ms)[0m [1mROLLBACK[0m
[1m[35m (0.1ms)[0m BEGIN
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["created_at", "2017-06-14 21:16:46.169386"], ["updated_at", "2017-06-14 21:16:46.169386"]]
+ [1m[35mAccount Exists (0.6ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["created_at", "2016-08-22 18:24:32.580727"], ["updated_at", "2016-08-22 18:24:32.580727"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" IS NULL AND "accounts"."id" != 5) LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2017-06-14 21:16:46.171757"], ["id", 5]]
+ [1m[35mAccount Exists (0.5ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" IS NULL AND "accounts"."id" != 5) LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2016-08-22 18:24:32.584375"], ["id", 5]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
[1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 5]]
[1m[35m (0.1ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497388606"], ["created_at", "2017-06-14 21:16:46.202748"], ["updated_at", "2017-06-14 21:16:46.202748"]]
- [1m[35m (0.3ms)[0m COMMIT
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35mAccount Exists (0.4ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 6) LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5[0m [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1497647806"], ["updated_at", "2017-06-14 21:16:46.219899"], ["id", 6]]
- [1m[35m (0.3ms)[0m COMMIT
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts"[0m
- [1m[35m (0.1ms)[0m BEGIN
- [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 6]]
- [1m[35m (0.2ms)[0m COMMIT
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497388606"], ["created_at", "2017-06-14 21:16:46.224725"], ["updated_at", "2017-06-14 21:16:46.224725"]]
- [1m[35m (0.3ms)[0m COMMIT
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35m (0.0ms)[0m BEGIN
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 7) LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5 [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1497647806"], ["updated_at", "2017-06-14 21:16:46.227584"], ["id", 7]]
- [1m[36m (0.2ms)[0m [1mCOMMIT[0m
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 7]]
- [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts"
- [1m[36m (0.0ms)[0m [1mBEGIN[0m
- [1m[35mSQL (0.1ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = $1 [["id", 7]]
- [1m[36m (0.2ms)[0m [1mCOMMIT[0m
- [1m[35m (0.1ms)[0m BEGIN
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497561406"], ["created_at", "2017-06-14 21:16:46.232285"], ["updated_at", "2017-06-14 21:16:46.232285"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.0ms)[0m BEGIN
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-14 21:16:46.234966"], ["updated_at", "2017-06-14 21:16:46.234966"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "accounts"[0m
- [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-14 21:16:46.240314"], ["updated_at", "2017-06-14 21:16:46.240314"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "accounts"[0m
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.0ms)[0m [1mBEGIN[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-14 21:16:46.243492"], ["updated_at", "2017-06-14 21:16:46.243492"]]
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 18:24:32.590050"], ["updated_at", "2016-08-22 18:24:32.590050"]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "accounts"
+ [1m[36mAccount Load (1.0ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.4ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 18:24:32.602087"], ["updated_at", "2016-08-22 18:24:32.602087"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.1ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-14 21:16:46.245934"], ["updated_at", "2017-06-14 21:16:46.245934"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-14 21:16:46.248696"], ["updated_at", "2017-06-14 21:16:46.248696"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "accounts"
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (1.0ms)[0m BEGIN
+ [1m[36m (0.5ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (1.4ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.8ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 18:24:32.614370"], ["updated_at", "2016-08-22 18:24:32.614370"]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
[1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
[1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-14 21:16:46.250884"], ["updated_at", "2017-06-14 21:16:46.250884"]]
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 18:24:32.620885"], ["updated_at", "2016-08-22 18:24:32.620885"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-14 21:16:46.253275"], ["updated_at", "2017-06-14 21:16:46.253275"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-14 21:16:46.255413"], ["updated_at", "2017-06-14 21:16:46.255413"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 18:24:32.625970"], ["updated_at", "2016-08-22 18:24:32.625970"]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.4ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.6ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 18:24:32.631796"], ["updated_at", "2016-08-22 18:24:32.631796"]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
[1m[35m (0.1ms)[0m BEGIN
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-14 21:16:46.257910"], ["updated_at", "2017-06-14 21:16:46.257910"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-14 21:16:46.259330"], ["updated_at", "2017-06-14 21:16:46.259330"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 18) LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-14 21:16:46.261422"], ["id", 18]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-14 21:16:46.264115"], ["updated_at", "2017-06-14 21:16:46.264115"]]
- [1m[36m (0.1ms)[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"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-14 21:16:46.265485"], ["updated_at", "2017-06-14 21:16:46.265485"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (1.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 20) LIMIT 1
- [1m[36mSQL (0.5ms)[0m [1mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-14 21:16:46.268945"], ["id", 20]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 20]]
- [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 18:24:32.637146"], ["updated_at", "2016-08-22 18:24:32.637146"]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.6ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.5ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 18:24:32.645615"], ["updated_at", "2016-08-22 18:24:32.645615"]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-14 21:16:46.273688"], ["updated_at", "2017-06-14 21:16:46.273688"]]
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 18:24:32.652084"], ["updated_at", "2016-08-22 18:24:32.652084"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
[1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-14 21:16:46.275894"], ["updated_at", "2017-06-14 21:16:46.275894"]]
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2016-08-22 18:24:32.654523"], ["updated_at", "2016-08-22 18:24:32.654523"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
[1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.4ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 15) LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2016-08-22 18:24:32.658910"], ["id", 15]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 22) LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-14 21:16:46.278376"], ["id", 22]]
+ [1m[35mAccount Exists (0.6ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 18:24:32.666121"], ["updated_at", "2016-08-22 18:24:32.666121"]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.4ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2016-08-22 18:24:32.669796"], ["updated_at", "2016-08-22 18:24:32.669796"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 22]]
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
-Processing by SessionsController#destroy as HTML
-Redirected to http://test.host/
-Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[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.1ms)[0m ROLLBACK
- [1m[36m (0.0ms)[0m [1mBEGIN[0m
+ [1m[36mAccount Load (0.5ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (1.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 17) LIMIT 1[0m
+ [1m[35mSQL (0.7ms)[0m UPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2016-08-22 18:24:32.676803"], ["id", 17]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 17]]
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 18:24:32.686359"], ["updated_at", "2016-08-22 18:24:32.686359"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2016-08-22 18:24:32.689195"], ["updated_at", "2016-08-22 18:24:32.689195"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.6ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 19) LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m UPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2016-08-22 18:24:32.694499"], ["id", 19]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 19]]
+ [1m[36m (0.6ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
Processing by SessionsController#failure as HTML
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
-Completed 200 OK in 7ms (Views: 7.2ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
+Completed 200 OK in 21ms (Views: 20.0ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
Processing by SessionsController#failure as HTML
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.1ms)
-Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m ROLLBACK
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
+Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.7ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 18:24:32.764320"], ["updated_at", "2016-08-22 18:24:32.764320"]]
+ [1m[36m (0.4ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 10ms (ActiveRecord: 2.4ms)
+ [1m[35m (0.2ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.4ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-14 21:18:42.884460"], ["updated_at", "2017-06-14 21:18:42.884460"]]
+ [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.4ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 18:24:32.781729"], ["updated_at", "2016-08-22 18:24:32.781729"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
Redirected to http://test.host/
-Completed 302 Found in 27ms (ActiveRecord: 6.4ms)
+Completed 302 Found in 6ms (ActiveRecord: 1.2ms)
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
[1m[35m (0.1ms)[0m BEGIN
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-14 21:18:42.890246"], ["updated_at", "2017-06-14 21:18:42.890246"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.5ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 18:24:32.793799"], ["updated_at", "2016-08-22 18:24:32.793799"]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/admin
-Completed 302 Found in 3ms (ActiveRecord: 0.9ms)
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-14 21:18:42.895715"], ["updated_at", "2017-06-14 21:18:42.895715"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 302 Found in 6ms (ActiveRecord: 1.6ms)
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[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.3ms)[0m ROLLBACK
+ [1m[36m (1.7ms)[0m [1mBEGIN[0m
+Processing by SessionsController#destroy as HTML
Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.7ms)
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-14 21:18:42.898728"], ["updated_at", "2017-06-14 21:18:42.898728"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_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"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-14 21:18:42.900222"], ["updated_at", "2017-06-14 21:18:42.900222"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 5) LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-14 21:18:42.902696"], ["id", 5]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.0ms)[0m [1mBEGIN[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-14 21:18:42.905710"], ["updated_at", "2017-06-14 21:18:42.905710"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-14 21:18:42.907663"], ["updated_at", "2017-06-14 21:18:42.907663"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 7) LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-14 21:18:42.909730"], ["id", 7]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 7]]
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.0ms)[0m [1mBEGIN[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-14 21:18:42.912556"], ["updated_at", "2017-06-14 21:18:42.912556"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-14 21:18:42.914033"], ["updated_at", "2017-06-14 21:18:42.914033"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 9) LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-14 21:18:42.915958"], ["id", 9]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 9]]
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.0ms)[0m [1mBEGIN[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-14 21:18:42.919473"], ["updated_at", "2017-06-14 21:18:42.919473"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "accounts"
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-14 21:18:42.923440"], ["updated_at", "2017-06-14 21:18:42.923440"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "accounts"
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-14 21:18:42.926179"], ["updated_at", "2017-06-14 21:18:42.926179"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-14 21:18:42.927976"], ["updated_at", "2017-06-14 21:18:42.927976"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m ROLLBACK
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-14 21:18:42.930208"], ["updated_at", "2017-06-14 21:18:42.930208"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-14 21:18:42.932102"], ["updated_at", "2017-06-14 21:18:42.932102"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-14 21:18:42.934306"], ["updated_at", "2017-06-14 21:18:42.934306"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.1ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-14 21:18:42.936210"], ["updated_at", "2017-06-14 21:18:42.936210"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.0ms)[0m [1mBEGIN[0m
- [1m[35mAccount Load (0.4ms)[0m SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2017-06-14 21:18:42.942636"], ["updated_at", "2017-06-14 21:18:42.942636"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "synced_id" = $1, "updated_at" = $2 WHERE "accounts"."id" = $3[0m [["synced_id", 0], ["updated_at", "2017-06-14 21:18:42.943963"], ["id", 18]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1[0m
- [1m[35m (0.1ms)[0m ROLLBACK
+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.2ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497561522"], ["created_at", "2017-06-14 21:18:42.975380"], ["updated_at", "2017-06-14 21:18:42.975380"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497388722"], ["created_at", "2017-06-14 21:18:42.978140"], ["updated_at", "2017-06-14 21:18:42.978140"]]
- [1m[35m (0.3ms)[0m COMMIT
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35mAccount Exists (0.5ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 20) LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5[0m [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1497647922"], ["updated_at", "2017-06-14 21:18:42.996799"], ["id", 20]]
- [1m[35m (0.3ms)[0m COMMIT
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts"[0m
- [1m[35m (0.0ms)[0m BEGIN
- [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 20]]
- [1m[35m (0.2ms)[0m COMMIT
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497388723"], ["created_at", "2017-06-14 21:18:43.001190"], ["updated_at", "2017-06-14 21:18:43.001190"]]
- [1m[35m (0.2ms)[0m COMMIT
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35m (0.1ms)[0m BEGIN
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 21) LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5 [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1497647923"], ["updated_at", "2017-06-14 21:18:43.003991"], ["id", 21]]
- [1m[36m (0.2ms)[0m [1mCOMMIT[0m
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 21]]
- [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts"
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35mSQL (0.2ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = $1 [["id", 21]]
- [1m[36m (0.3ms)[0m [1mCOMMIT[0m
- [1m[35m (0.0ms)[0m BEGIN
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["created_at", "2017-06-14 21:18:43.009146"], ["updated_at", "2017-06-14 21:18:43.009146"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" IS NULL AND "accounts"."id" != 22) LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2017-06-14 21:18:43.010837"], ["id", 22]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 22]]
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
-Processing by AuthenticatedController#index as JS
+Processing by AuthenticatedController#index as HTML
Rendered text template (0.0ms)
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 401 Unauthorized in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m ROLLBACK
+Completed 200 OK in 7ms (Views: 6.8ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
Processing by AuthenticatedController#index as JS
Rendered text template (0.0ms)
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[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.1ms)[0m ROLLBACK
- [1m[36m (0.0ms)[0m [1mBEGIN[0m
-Processing by AuthenticatedController#index as HTML
+Completed 401 Unauthorized in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (1.2ms)[0m [1mBEGIN[0m
+Processing by AuthenticatedController#index as JS
Rendered text template (0.0ms)
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.0ms)[0m [1mBEGIN[0m
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.0ms)[0m [1mBEGIN[0m
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.0ms)[0m [1mBEGIN[0m
- [1m[35m (0.0ms)[0m ROLLBACK
- [1m[36m (0.0ms)[0m [1mBEGIN[0m
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.0ms)[0m [1mBEGIN[0m
- [1m[35m (0.0ms)[0m ROLLBACK
+Completed 401 Unauthorized in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35mAccount Exists (7.6ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471804545"], ["created_at", "2016-08-22 18:35:45.810846"], ["updated_at", "2016-08-22 18:35:45.810846"]]
+ [1m[35m (12.6ms)[0m COMMIT
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36mAccount Exists (0.8ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 23) LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5 [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472063745"], ["updated_at", "2016-08-22 18:35:45.881232"], ["id", 23]]
+ [1m[36m (6.3ms)[0m [1mCOMMIT[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 23]]
+ [1m[35mAccount Load (0.4ms)[0m SELECT "accounts".* FROM "accounts"
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35mSQL (0.2ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = $1 [["id", 23]]
+ [1m[36m (5.6ms)[0m [1mCOMMIT[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (6.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (6.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 18:36:13 UTC], ["updated_at", 2016-08-22 18:36:13 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471804573"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 24], ["LIMIT", 1]]
+ [1m[35mSQL (2.0ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 18:36:13 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472063773"], ["id", 24]]
+ [1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 24], ["LIMIT", 1]]
+ [1m[36mAccount Load (6.7ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 24]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 18:36:44 UTC], ["updated_at", 2016-08-22 18:36:44 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471804604"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 25], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 18:36:44 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472063804"], ["id", 25]]
+ [1m[35m (0.1ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 25], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 25]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 18:37:53 UTC], ["updated_at", 2016-08-22 18:37:53 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471804673"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by AuthenticatedController#index as HTML
-Completed 500 Internal Server Error in 92ms (ActiveRecord: 0.0ms)
+ [1m[36mAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 26], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 18:37:53 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472063873"], ["id", 26]]
+ [1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.9ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 26], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 26]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[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 1ms (ActiveRecord: 0.0ms)
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 18:38:50 UTC], ["updated_at", 2016-08-22 18:38:50 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471804729"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 27], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 18:38:50 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472063930"], ["id", 27]]
+ [1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.5ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (2.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 27], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 27]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#failure as HTML
- Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Completed 200 OK in 20ms (Views: 15.1ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 18:39:22 UTC], ["updated_at", 2016-08-22 18:39:22 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471804762"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (1.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 28], ["LIMIT", 1]]
+ [1m[35mSQL (2.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 18:39:22 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472063962"], ["id", 28]]
+ [1m[35m (0.7ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 28], ["LIMIT", 1]]
+ [1m[35m (0.4ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mAccount Load (0.5ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 28]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.7ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 18:40:20 UTC], ["updated_at", 2016-08-22 18:40:20 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471804819"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 29], ["LIMIT", 1]]
+ [1m[35mSQL (0.7ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 18:40:27 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472064027"], ["id", 29]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 29], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 29]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 18:41:25 UTC], ["updated_at", 2016-08-22 18:41:25 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471804885"]]
+ [1m[35m (0.6ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (1.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 30], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 18:41:27 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472064086"], ["id", 30]]
+ [1m[35m (0.6ms)[0m [1m[35mCOMMIT[0m
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.5ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 30], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#failure as HTML
- Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.1ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 30]]
+ [1m[35m (1.6ms)[0m [1m[35mCOMMIT[0m
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 18:46:59 UTC], ["updated_at", 2016-08-22 18:46:59 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471805219"]]
+ [1m[35m (6.2ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 31], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 18:46:59 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472064419"], ["id", 31]]
+ [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 31], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 31]]
+ [1m[35m (5.9ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 18:55:49 UTC], ["updated_at", 2016-08-22 18:55:49 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471805749"]]
+ [1m[35m (6.5ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 32], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 18:55:49 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472064949"], ["id", 32]]
+ [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 32], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.6ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 32]]
+ [1m[35m (6.0ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (1.1ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 18:56:11 UTC], ["updated_at", 2016-08-22 18:56:11 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471805771"]]
+ [1m[35m (0.9ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 33], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 18:56:11 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472064971"], ["id", 33]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.5ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.5ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 33], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 33]]
+ [1m[35m (1.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 18:56:28 UTC], ["updated_at", 2016-08-22 18:56:28 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471805788"]]
+ [1m[35m (1.0ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 34], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 18:56:28 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472064988"], ["id", 34]]
+ [1m[35m (0.7ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.7ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 34], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.5ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35mSQL (0.4ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 34]]
+ [1m[35m (5.8ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 18:56:59 UTC], ["updated_at", 2016-08-22 18:56:59 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471805819"]]
+ [1m[35m (6.1ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.4ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 35], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 18:56:59 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472065019"], ["id", 35]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 35], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 35]]
+ [1m[35m (6.2ms)[0m [1m[35mCOMMIT[0m
+ [1m[36mAccount Load (0.7ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35mSQL (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", 2016-08-22 18:57:07 UTC], ["updated_at", 2016-08-22 18:57:07 UTC]]
+ [1m[35m (0.6ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35mSQL (1.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", 2016-08-22 18:57:07 UTC], ["synced_id", 0], ["id", 36]]
+ [1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (6.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 18:57:07 UTC], ["updated_at", 2016-08-22 18:57:07 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 18:57:07 UTC], ["updated_at", 2016-08-22 18:57:07 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 38], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 18:57:07 UTC], ["id", 38]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#destroy as HTML
-Redirected to http://test.host/
-Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#destroy as HTML
-Redirected to http://test.host/signed_out
-Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.643626"], ["updated_at", "2017-06-21 02:19:36.643626"]]
- [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", "2017-06-21 02:19:36.645811"], ["synced_id", 0], ["id", 1]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.661896"], ["updated_at", "2017-06-21 02:19:36.661896"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925176"]]
- [1m[35m (0.7ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (1.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
- [1m[35mSQL (1.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:19:36.687108"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498184376"], ["id", 2]]
- [1m[35m (0.6ms)[0m [1m[35mCOMMIT[0m
- [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 2]]
- [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (1.0ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.696527"], ["updated_at", "2017-06-21 02:19:36.696527"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925176"]]
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 36]]
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35mSQL (0.2ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 37]]
+ [1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 3], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:19:36.703522"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498184376"], ["id", 3]]
+ [1m[35mSQL (0.2ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 38]]
+ [1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 18:57:07 UTC], ["updated_at", 2016-08-22 18:57:07 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471805827"]]
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 3], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 39], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 18:57:07 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472065027"], ["id", 39]]
+ [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
[1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35mSQL (0.4ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 3]]
+ [1m[35mSQL (0.2ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 39]]
+ [1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.7ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 18:57:07 UTC], ["updated_at", 2016-08-22 18:57:07 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471978627"]]
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (6.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35mSQL (6.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", 2016-08-22 18:57:07 UTC], ["updated_at", 2016-08-22 18:57:07 UTC], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (6.6ms)[0m [1m[35mCOMMIT[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != $1) LIMIT $2[0m [["id", 41], ["LIMIT", 1]]
+ [1m[35mSQL (0.9ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 18:57:07 UTC], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 41]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 41], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Load (0.8ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
[1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.713228"], ["updated_at", "2017-06-21 02:19:36.713228"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1498097976"]]
- [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.721320"], ["updated_at", "2017-06-21 02:19:36.721320"], ["provider", "bookingsync"], ["synced_id", 456]]
- [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.724365"], ["updated_at", "2017-06-21 02:19:36.724365"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 18:57:32 UTC], ["updated_at", 2016-08-22 18:57:32 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
[1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 6], ["LIMIT", 1]]
- [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:19:36.728056"], ["id", 6]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 18:57:32 UTC], ["updated_at", 2016-08-22 18:57:32 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.733089"], ["updated_at", "2017-06-21 02:19:36.733089"], ["provider", "bookingsync"], ["synced_id", 456]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.735187"], ["updated_at", "2017-06-21 02:19:36.735187"], ["provider", "bookingsync"], ["synced_id", 123]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 18:57:32 UTC], ["updated_at", 2016-08-22 18:57:32 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 8], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:19:36.738542"], ["id", 8]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 8], ["LIMIT", 1]]
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.742836"], ["updated_at", "2017-06-21 02:19:36.742836"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 18:57:32 UTC], ["updated_at", 2016-08-22 18:57:32 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.744833"], ["updated_at", "2017-06-21 02:19:36.744833"], ["provider", "bookingsync"], ["synced_id", 123]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 10], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:19:36.747646"], ["id", 10]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 10], ["LIMIT", 1]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.752218"], ["updated_at", "2017-06-21 02:19:36.752218"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 18:57:32 UTC], ["updated_at", 2016-08-22 18:57:32 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.4ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.758660"], ["updated_at", "2017-06-21 02:19:36.758660"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.762787"], ["updated_at", "2017-06-21 02:19:36.762787"], ["provider", "bookingsync"], ["synced_id", 456]]
- [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.766658"], ["updated_at", "2017-06-21 02:19:36.766658"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 18:57:32 UTC], ["updated_at", 2016-08-22 18:57:32 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.770223"], ["updated_at", "2017-06-21 02:19:36.770223"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 18:57:32 UTC], ["updated_at", 2016-08-22 18:57:32 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.773505"], ["updated_at", "2017-06-21 02:19:36.773505"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.776872"], ["updated_at", "2017-06-21 02:19:36.776872"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 40]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.780411"], ["updated_at", "2017-06-21 02:19:36.780411"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35mSQL (0.2ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 41]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.826505"], ["updated_at", "2017-06-21 02:19:36.826505"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 40]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != $1) LIMIT $2[0m [["id", 19], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:19:36.828250"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 19]]
+ [1m[35mSQL (0.2ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 41]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 19], ["LIMIT", 1]]
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Load (0.5ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by AuthenticatedController#index as HTML
-Completed 500 Internal Server Error in 84ms (ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[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.2ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:07.987617"], ["updated_at", "2017-06-21 02:20:07.987617"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 18:58:10 UTC], ["updated_at", 2016-08-22 18:58:10 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:07.991205"], ["updated_at", "2017-06-21 02:20:07.991205"], ["provider", "bookingsync"], ["synced_id", 123]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
- [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:20:07.996172"], ["id", 2]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.001666"], ["updated_at", "2017-06-21 02:20:08.001666"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 18:58:10 UTC], ["updated_at", 2016-08-22 18:58:10 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.003376"], ["updated_at", "2017-06-21 02:20:08.003376"], ["provider", "bookingsync"], ["synced_id", 123]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 4], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:20:08.005526"], ["id", 4]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 4], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.008883"], ["updated_at", "2017-06-21 02:20:08.008883"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[36mAccount Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 18:58:10 UTC], ["updated_at", 2016-08-22 18:58:10 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.010531"], ["updated_at", "2017-06-21 02:20:08.010531"], ["provider", "bookingsync"], ["synced_id", 123]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 6], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:20:08.012851"], ["id", 6]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 6], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.016168"], ["updated_at", "2017-06-21 02:20:08.016168"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 18:58:10 UTC], ["updated_at", 2016-08-22 18:58:10 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.4ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
[1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.022469"], ["updated_at", "2017-06-21 02:20:08.022469"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.3ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.026536"], ["updated_at", "2017-06-21 02:20:08.026536"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 18:58:11 UTC], ["updated_at", 2016-08-22 18:58:11 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.028893"], ["updated_at", "2017-06-21 02:20:08.028893"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.031963"], ["updated_at", "2017-06-21 02:20:08.031963"], ["provider", "bookingsync"], ["synced_id", 456]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35mSQL (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 18:58:11 UTC], ["updated_at", 2016-08-22 18:58:11 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.035752"], ["updated_at", "2017-06-21 02:20:08.035752"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.038410"], ["updated_at", "2017-06-21 02:20:08.038410"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 18:58:11 UTC], ["updated_at", 2016-08-22 18:58:11 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.040573"], ["updated_at", "2017-06-21 02:20:08.040573"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.6ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 40]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.043378"], ["updated_at", "2017-06-21 02:20:08.043378"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 41]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != $1) LIMIT $2[0m [["id", 15], ["LIMIT", 1]]
- [1m[35mSQL (0.9ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:20:08.045009"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 15]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.6ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 15], ["LIMIT", 1]]
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.055253"], ["updated_at", "2017-06-21 02:20:08.055253"]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 40]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", "2017-06-21 02:20:08.056896"], ["synced_id", 0], ["id", 16]]
+ [1m[35mSQL (0.2ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 41]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.067165"], ["updated_at", "2017-06-21 02:20:08.067165"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1498098008"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.070477"], ["updated_at", "2017-06-21 02:20:08.070477"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925208"]]
- [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 18], ["LIMIT", 1]]
- [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:20:08.089827"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498184408"], ["id", 18]]
- [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 18], ["LIMIT", 1]]
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 18]]
- [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.097619"], ["updated_at", "2017-06-21 02:20:08.097619"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925208"]]
- [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 19], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:20:08.101740"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498184408"], ["id", 19]]
- [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35mSQL (0.2ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 19]]
- [1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[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 [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[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.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.5ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.122228"], ["updated_at", "2017-06-21 02:20:08.122228"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 4ms (ActiveRecord: 1.0ms)
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#failure as HTML
- Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Completed 200 OK in 12ms (Views: 7.8ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#failure as HTML
- Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.0ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
-Processing by AuthenticatedController#index as HTML
-Completed 500 Internal Server Error in 82ms (ActiveRecord: 0.0ms)
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[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[36mAccount Load (0.9ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#failure as HTML
- Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Completed 200 OK in 13ms (Views: 7.7ms | ActiveRecord: 0.0ms)
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (2.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#failure as HTML
- Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.1ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[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.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[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 [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (6.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (19.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (6.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:00:17 UTC], ["updated_at", 2016-08-22 19:00:17 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (6.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.868263"], ["updated_at", "2017-06-21 02:20:19.868263"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:00:17 UTC], ["updated_at", 2016-08-22 19:00:17 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (6.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (5.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (6.0ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (6.0ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 19:00:17 UTC], ["id", 2]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:00:17 UTC], ["updated_at", 2016-08-22 19:00:17 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:00:17 UTC], ["updated_at", 2016-08-22 19:00:17 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 4], ["LIMIT", 1]]
+ [1m[35mSQL (2.1ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 19:00:17 UTC], ["id", 4]]
+ [1m[35m (0.6ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 4], ["LIMIT", 1]]
+ [1m[35m (0.5ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:00:17 UTC], ["updated_at", 2016-08-22 19:00:17 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 27ms (ActiveRecord: 7.7ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.874300"], ["updated_at", "2017-06-21 02:20:19.874300"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:00:17 UTC], ["updated_at", 2016-08-22 19:00:17 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 4ms (ActiveRecord: 1.0ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.879831"], ["updated_at", "2017-06-21 02:20:19.879831"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[36mAccount Load (0.7ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.6ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 6], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 19:00:17 UTC], ["id", 6]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.9ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 6], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:00:17 UTC], ["updated_at", 2016-08-22 19:00:17 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (5.8ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.920066"], ["updated_at", "2017-06-21 02:20:19.920066"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925219"]]
- [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35mSQL (6.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:00:17 UTC], ["updated_at", 2016-08-22 19:00:17 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 4], ["LIMIT", 1]]
- [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:20:19.935190"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498184419"], ["id", 4]]
- [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 4], ["LIMIT", 1]]
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35mSQL (0.2ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 4]]
- [1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.942817"], ["updated_at", "2017-06-21 02:20:19.942817"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925219"]]
- [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 5], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:20:19.946162"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498184419"], ["id", 5]]
- [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35mSQL (0.2ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 5]]
- [1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.951076"], ["updated_at", "2017-06-21 02:20:19.951076"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1498098019"]]
+ [1m[36mAccount Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:00:17 UTC], ["updated_at", 2016-08-22 19:00:17 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:00:17 UTC], ["updated_at", 2016-08-22 19:00:17 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.953761"], ["updated_at", "2017-06-21 02:20:19.953761"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:00:18 UTC], ["updated_at", 2016-08-22 19:00:18 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.3ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
[1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.959987"], ["updated_at", "2017-06-21 02:20:19.959987"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:00:18 UTC], ["updated_at", 2016-08-22 19:00:18 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.963742"], ["updated_at", "2017-06-21 02:20:19.963742"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:00:18 UTC], ["updated_at", 2016-08-22 19:00:18 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.966656"], ["updated_at", "2017-06-21 02:20:19.966656"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:00:18 UTC], ["updated_at", 2016-08-22 19:00:18 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.970140"], ["updated_at", "2017-06-21 02:20:19.970140"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", 2016-08-22 19:00:18 UTC], ["updated_at", 2016-08-22 19:00:18 UTC]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.972942"], ["updated_at", "2017-06-21 02:20:19.972942"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35mSQL (0.7ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", 2016-08-22 19:00:18 UTC], ["synced_id", 0], ["id", 15]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (6.0ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:00:18 UTC], ["updated_at", 2016-08-22 19:00:18 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471806018"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 16], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:00:18 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472065218"], ["id", 16]]
+ [1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.977403"], ["updated_at", "2017-06-21 02:20:19.977403"], ["provider", "bookingsync"], ["synced_id", 456]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 16]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:00:18 UTC], ["updated_at", 2016-08-22 19:00:18 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471806018"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.980414"], ["updated_at", "2017-06-21 02:20:19.980414"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 17], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:00:18 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472065218"], ["id", 17]]
+ [1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 17], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 17]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:00:18 UTC], ["updated_at", 2016-08-22 19:00:18 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471978818"]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (8.9ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35mSQL (1.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", 2016-08-22 19:00:18 UTC], ["updated_at", 2016-08-22 19:00:18 UTC], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != $1) LIMIT $2[0m [["id", 19], ["LIMIT", 1]]
+ [1m[35mSQL (0.7ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:00:18 UTC], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 19]]
+ [1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 19], ["LIMIT", 1]]
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:26 UTC], ["updated_at", 2016-08-22 19:05:26 UTC], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.983784"], ["updated_at", "2017-06-21 02:20:19.983784"], ["provider", "bookingsync"], ["synced_id", 456]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.985761"], ["updated_at", "2017-06-21 02:20:19.985761"], ["provider", "bookingsync"], ["synced_id", 123]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 16], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:20:19.988682"], ["id", 16]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != $1) LIMIT $2[0m [["id", 20], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:05:26 UTC], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 20]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 20], ["LIMIT", 1]]
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:26 UTC], ["updated_at", 2016-08-22 19:05:26 UTC]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.992397"], ["updated_at", "2017-06-21 02:20:19.992397"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", 2016-08-22 19:05:26 UTC], ["synced_id", 0], ["id", 21]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.994359"], ["updated_at", "2017-06-21 02:20:19.994359"], ["provider", "bookingsync"], ["synced_id", 123]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 18], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:20:19.997001"], ["id", 18]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 18], ["LIMIT", 1]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:20.001261"], ["updated_at", "2017-06-21 02:20:20.001261"], ["provider", "bookingsync"], ["synced_id", 456]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:20.003740"], ["updated_at", "2017-06-21 02:20:20.003740"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:26 UTC], ["updated_at", 2016-08-22 19:05:26 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471806326"]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 20], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:20:20.006730"], ["id", 20]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 20], ["LIMIT", 1]]
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (1.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 22], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:05:26 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472065526"], ["id", 22]]
+ [1m[35m (0.1ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 22], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.5ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:20.011868"], ["updated_at", "2017-06-21 02:20:20.011868"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 22]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != $1) LIMIT $2[0m [["id", 21], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:20:20.014037"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 21]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 21], ["LIMIT", 1]]
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:26 UTC], ["updated_at", 2016-08-22 19:05:26 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471806326"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 23], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:05:26 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472065526"], ["id", 23]]
+ [1m[35m (0.1ms)[0m [1m[35mCOMMIT[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:20.022629"], ["updated_at", "2017-06-21 02:20:20.022629"]]
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 23]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", "2017-06-21 02:20:20.024564"], ["synced_id", 0], ["id", 22]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#destroy as HTML
-Redirected to http://test.host/signed_out
-Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#destroy as HTML
-Redirected to http://test.host/
-Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#failure as HTML
- Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Completed 200 OK in 15ms (Views: 10.3ms | ActiveRecord: 0.0ms)
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#failure as HTML
- Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.1ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:26 UTC], ["updated_at", 2016-08-22 19:05:26 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471979126"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[36mAccount Load (0.5ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.480247"], ["updated_at", "2017-06-21 02:23:17.480247"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:26 UTC], ["updated_at", 2016-08-22 19:05:26 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 31ms (ActiveRecord: 8.1ms)
+ [1m[35m (0.4ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (6.0ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.4ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:26 UTC], ["updated_at", 2016-08-22 19:05:26 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:26 UTC], ["updated_at", 2016-08-22 19:05:26 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.485976"], ["updated_at", "2017-06-21 02:23:17.485976"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:26 UTC], ["updated_at", 2016-08-22 19:05:26 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.8ms)
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:26 UTC], ["updated_at", 2016-08-22 19:05:26 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.493393"], ["updated_at", "2017-06-21 02:23:17.493393"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[36mAccount Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:26 UTC], ["updated_at", 2016-08-22 19:05:26 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 5ms (ActiveRecord: 1.3ms)
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.504762"], ["updated_at", "2017-06-21 02:23:17.504762"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925397"]]
- [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (1.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 4], ["LIMIT", 1]]
- [1m[35mSQL (0.7ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:23:17.523270"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498184597"], ["id", 4]]
- [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 4], ["LIMIT", 1]]
- [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 4]]
- [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.534598"], ["updated_at", "2017-06-21 02:23:17.534598"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925397"]]
- [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 5], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:23:17.538920"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498184597"], ["id", 5]]
- [1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
- [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
- [1m[35mSQL (0.7ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 5]]
- [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.546895"], ["updated_at", "2017-06-21 02:23:17.546895"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1498098197"]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:26 UTC], ["updated_at", 2016-08-22 19:05:26 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:26 UTC], ["updated_at", 2016-08-22 19:05:26 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:26 UTC], ["updated_at", 2016-08-22 19:05:26 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:26 UTC], ["updated_at", 2016-08-22 19:05:26 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 34], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 19:05:26 UTC], ["id", 34]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.597283"], ["updated_at", "2017-06-21 02:23:17.597283"]]
+ [1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:26 UTC], ["updated_at", 2016-08-22 19:05:26 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", "2017-06-21 02:23:17.598737"], ["synced_id", 0], ["id", 7]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:27 UTC], ["updated_at", 2016-08-22 19:05:27 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
- [1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 36], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 19:05:27 UTC], ["id", 36]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 36], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.609767"], ["updated_at", "2017-06-21 02:23:17.609767"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:27 UTC], ["updated_at", 2016-08-22 19:05:27 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != $1) LIMIT $2[0m [["id", 8], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:23:17.612116"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 8]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:27 UTC], ["updated_at", 2016-08-22 19:05:27 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 8], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.616356"], ["updated_at", "2017-06-21 02:23:17.616356"], ["provider", "bookingsync"], ["synced_id", 456]]
- [1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 38], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 19:05:27 UTC], ["id", 38]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 38], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.5ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:34 UTC], ["updated_at", 2016-08-22 19:05:34 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.4ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
- [1m[36mAccount Load (0.5ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.625181"], ["updated_at", "2017-06-21 02:23:17.625181"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:34 UTC], ["updated_at", 2016-08-22 19:05:34 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.628790"], ["updated_at", "2017-06-21 02:23:17.628790"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:34 UTC], ["updated_at", 2016-08-22 19:05:34 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.631432"], ["updated_at", "2017-06-21 02:23:17.631432"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:34 UTC], ["updated_at", 2016-08-22 19:05:34 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.634151"], ["updated_at", "2017-06-21 02:23:17.634151"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:34 UTC], ["updated_at", 2016-08-22 19:05:34 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.636293"], ["updated_at", "2017-06-21 02:23:17.636293"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:34 UTC], ["updated_at", 2016-08-22 19:05:34 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.638760"], ["updated_at", "2017-06-21 02:23:17.638760"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:34 UTC], ["updated_at", 2016-08-22 19:05:34 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.641427"], ["updated_at", "2017-06-21 02:23:17.641427"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:34 UTC], ["updated_at", 2016-08-22 19:05:34 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.644994"], ["updated_at", "2017-06-21 02:23:17.644994"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:34 UTC], ["updated_at", 2016-08-22 19:05:34 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.646646"], ["updated_at", "2017-06-21 02:23:17.646646"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:34 UTC], ["updated_at", 2016-08-22 19:05:34 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 18], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:23:17.648990"], ["id", 18]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 48], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 19:05:34 UTC], ["id", 48]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.651870"], ["updated_at", "2017-06-21 02:23:17.651870"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:34 UTC], ["updated_at", 2016-08-22 19:05:34 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.653549"], ["updated_at", "2017-06-21 02:23:17.653549"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.7ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:34 UTC], ["updated_at", 2016-08-22 19:05:34 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 20], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:23:17.656079"], ["id", 20]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 50], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 19:05:34 UTC], ["id", 50]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 20], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 50], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.659770"], ["updated_at", "2017-06-21 02:23:17.659770"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:34 UTC], ["updated_at", 2016-08-22 19:05:34 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.661461"], ["updated_at", "2017-06-21 02:23:17.661461"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:34 UTC], ["updated_at", 2016-08-22 19:05:34 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 22], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:23:17.663542"], ["id", 22]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 52], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 19:05:34 UTC], ["id", 52]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 22], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 52], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by AuthenticatedController#index as HTML
-Completed 500 Internal Server Error in 73ms (ActiveRecord: 0.0ms)
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:34 UTC], ["updated_at", 2016-08-22 19:05:34 UTC]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", 2016-08-22 19:05:34 UTC], ["synced_id", 0], ["id", 53]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[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.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:34 UTC], ["updated_at", 2016-08-22 19:05:34 UTC], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != $1) LIMIT $2[0m [["id", 54], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:05:34 UTC], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 54]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 54], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by AuthenticatedController#index as JS
-Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:34 UTC], ["updated_at", 2016-08-22 19:05:34 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471806334"]]
+ [1m[35m (3.3ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 55], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:05:34 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472065534"], ["id", 55]]
+ [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by AuthenticatedController#index as JS
-Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35mSQL (0.2ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 55]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by AuthenticatedController#index as HTML
-Completed 500 Internal Server Error in 94ms (ActiveRecord: 0.0ms)
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.7ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:34 UTC], ["updated_at", 2016-08-22 19:05:34 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471806334"]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by AuthenticatedController#index as HTML
-Completed 500 Internal Server Error in 88ms (ActiveRecord: 0.0ms)
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by AuthenticatedController#index as HTML
-Completed 500 Internal Server Error in 93ms (ActiveRecord: 0.0ms)
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 56], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:05:34 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472065534"], ["id", 56]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 56], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by AuthenticatedController#index as HTML
-Completed 500 Internal Server Error in 93ms (ActiveRecord: 0.0ms)
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 56]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by AuthenticatedController#index as HTML
-Completed 500 Internal Server Error in 97ms (ActiveRecord: 0.0ms)
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by AuthenticatedController#index as HTML
- Rendering text template
- Rendered text template (0.0ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 5ms (Views: 4.9ms | ActiveRecord: 0.0ms)
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:05:34 UTC], ["updated_at", 2016-08-22 19:05:34 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471979134"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.7ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:07:26 UTC], ["updated_at", 2016-08-22 19:07:26 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471806446"]]
+ [1m[35m (6.4ms)[0m [1m[35mCOMMIT[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 58], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:07:26 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472065646"], ["id", 58]]
+ [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 58], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 58]]
+ [1m[35m (6.2ms)[0m [1m[35mCOMMIT[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:07:31 UTC], ["updated_at", 2016-08-22 19:07:31 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471806451"]]
+ [1m[35m (1.8ms)[0m [1m[35mCOMMIT[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by AuthenticatedController#index as JS
-Completed 500 Internal Server Error in 87ms (ActiveRecord: 0.0ms)
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 59], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:07:31 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472065651"], ["id", 59]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by AuthenticatedController#index as JS
-Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35mSQL (0.4ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 59]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[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.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:07:37 UTC], ["updated_at", 2016-08-22 19:07:37 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471979257"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by AuthenticatedController#index as HTML
- Rendering text template
- Rendered text template (0.0ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (1.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", 2016-08-22 19:07:40 UTC], ["updated_at", 2016-08-22 19:07:40 UTC]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", 2016-08-22 19:07:40 UTC], ["synced_id", 0], ["id", 61]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[36mAccount Load (0.6ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.136115"], ["updated_at", "2017-06-21 02:27:23.136115"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[36mAccount Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35mSQL (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", 2016-08-22 19:08:14 UTC], ["updated_at", 2016-08-22 19:08:14 UTC], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != $1) LIMIT $2[0m [["id", 62], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:08:14 UTC], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 62]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 34ms (ActiveRecord: 9.8ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.5ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 62], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.142909"], ["updated_at", "2017-06-21 02:27:23.142909"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35mSQL (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", 2016-08-22 19:08:23 UTC], ["updated_at", 2016-08-22 19:08:23 UTC], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != $1) LIMIT $2[0m [["id", 63], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:08:23 UTC], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 63]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 4ms (ActiveRecord: 1.0ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 63], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.151387"], ["updated_at", "2017-06-21 02:27:23.151387"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:08:23 UTC], ["updated_at", 2016-08-22 19:08:23 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471979303"]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 4ms (ActiveRecord: 1.3ms)
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#failure as HTML
- Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Completed 200 OK in 12ms (Views: 7.6ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:08:23 UTC], ["updated_at", 2016-08-22 19:08:23 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471806503"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 65], ["LIMIT", 1]]
+ [1m[35mSQL (0.8ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:08:23 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472065703"], ["id", 65]]
+ [1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.5ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 65], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.5ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 65]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#failure as HTML
- Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.1ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:08:23 UTC], ["updated_at", 2016-08-22 19:08:23 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471806503"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#destroy as HTML
-Redirected to http://test.host/
-Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 66], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:08:23 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472065703"], ["id", 66]]
+ [1m[35m (0.1ms)[0m [1m[35mCOMMIT[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 66]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[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.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", 2016-08-22 19:08:23 UTC], ["updated_at", 2016-08-22 19:08:23 UTC]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", 2016-08-22 19:08:23 UTC], ["synced_id", 0], ["id", 67]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.215194"], ["updated_at", "2017-06-21 02:27:23.215194"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:08:23 UTC], ["updated_at", 2016-08-22 19:08:23 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.3ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (0.6ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
[1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.220939"], ["updated_at", "2017-06-21 02:27:23.220939"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:08:23 UTC], ["updated_at", 2016-08-22 19:08:23 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.224850"], ["updated_at", "2017-06-21 02:27:23.224850"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:08:23 UTC], ["updated_at", 2016-08-22 19:08:23 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.228385"], ["updated_at", "2017-06-21 02:27:23.228385"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:08:23 UTC], ["updated_at", 2016-08-22 19:08:23 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.232602"], ["updated_at", "2017-06-21 02:27:23.232602"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:08:23 UTC], ["updated_at", 2016-08-22 19:08:23 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.235476"], ["updated_at", "2017-06-21 02:27:23.235476"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:08:23 UTC], ["updated_at", 2016-08-22 19:08:23 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.238420"], ["updated_at", "2017-06-21 02:27:23.238420"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:08:23 UTC], ["updated_at", 2016-08-22 19:08:23 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.242101"], ["updated_at", "2017-06-21 02:27:23.242101"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:08:23 UTC], ["updated_at", 2016-08-22 19:08:23 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.247086"], ["updated_at", "2017-06-21 02:27:23.247086"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:08:23 UTC], ["updated_at", 2016-08-22 19:08:23 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.249768"], ["updated_at", "2017-06-21 02:27:23.249768"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:08:23 UTC], ["updated_at", 2016-08-22 19:08:23 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 13], ["LIMIT", 1]]
- [1m[35mSQL (0.6ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:27:23.254162"], ["id", 13]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 77], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 19:08:23 UTC], ["id", 77]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.259224"], ["updated_at", "2017-06-21 02:27:23.259224"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:08:23 UTC], ["updated_at", 2016-08-22 19:08:23 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.261347"], ["updated_at", "2017-06-21 02:27:23.261347"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:08:23 UTC], ["updated_at", 2016-08-22 19:08:23 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 15], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:27:23.265178"], ["id", 15]]
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 79], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 19:08:23 UTC], ["id", 79]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 15], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 79], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.270501"], ["updated_at", "2017-06-21 02:27:23.270501"], ["provider", "bookingsync"], ["synced_id", 456]]
- [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:08:23 UTC], ["updated_at", 2016-08-22 19:08:23 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.273461"], ["updated_at", "2017-06-21 02:27:23.273461"], ["provider", "bookingsync"], ["synced_id", 123]]
- [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:08:23 UTC], ["updated_at", 2016-08-22 19:08:23 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 17], ["LIMIT", 1]]
- [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:27:23.277738"], ["id", 17]]
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 81], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 19:08:23 UTC], ["id", 81]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.5ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 17], ["LIMIT", 1]]
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 81], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.5ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:16:14 UTC], ["updated_at", 2016-08-22 19:16:14 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471806974"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 82], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:16:14 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472066174"], ["id", 82]]
+ [1m[35m (0.1ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 82], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.284523"], ["updated_at", "2017-06-21 02:27:23.284523"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 82]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != $1) LIMIT $2[0m [["id", 18], ["LIMIT", 1]]
- [1m[35mSQL (0.8ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:27:23.287230"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 18]]
- [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 18], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.5ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.293523"], ["updated_at", "2017-06-21 02:27:23.293523"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925643"]]
- [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:16:35 UTC], ["updated_at", 2016-08-22 19:16:35 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471806995"]]
+ [1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (1.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 19], ["LIMIT", 1]]
- [1m[35mSQL (0.7ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:27:23.312796"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498184843"], ["id", 19]]
+ [1m[36mAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 83], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:16:35 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472066195"], ["id", 83]]
+ [1m[35m (0.1ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 83], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 83]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:17:01 UTC], ["updated_at", 2016-08-22 19:17:01 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471807021"]]
+ [1m[35m (12.7ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 84], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:17:01 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472066221"], ["id", 84]]
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 19], ["LIMIT", 1]]
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 84], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35mSQL (0.2ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 19]]
- [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 84]]
+ [1m[35m (6.4ms)[0m [1m[35mCOMMIT[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.321254"], ["updated_at", "2017-06-21 02:27:23.321254"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925643"]]
- [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:17:36 UTC], ["updated_at", 2016-08-22 19:17:36 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471807056"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 20], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:27:23.325176"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498184843"], ["id", 20]]
- [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
- [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
- [1m[35m (0.5ms)[0m [1m[35mBEGIN[0m
- [1m[35mSQL (0.6ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 20]]
- [1m[35m (0.6ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 85], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:17:36 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472066256"], ["id", 85]]
+ [1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 85], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.334141"], ["updated_at", "2017-06-21 02:27:23.334141"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1498098443"]]
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 85]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.5ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.341877"], ["updated_at", "2017-06-21 02:27:23.341877"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", "2017-06-21 02:27:23.343585"], ["synced_id", 0], ["id", 22]]
+ [1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:17:58 UTC], ["updated_at", 2016-08-22 19:17:58 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471807078"]]
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[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 1ms (ActiveRecord: 0.0ms)
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by AuthenticatedController#index as HTML
- Rendering text template
- Rendered text template (0.0ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 3ms (Views: 2.8ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by AuthenticatedController#index as JS
- Rendering text template
- Rendered text template (0.0ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Filter chain halted as :authenticate_account! rendered or redirected
-Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by AuthenticatedController#index as JS
- Rendering text template
- Rendered text template (0.0ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Filter chain halted as :authenticate_account! rendered or redirected
-Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 86], ["LIMIT", 1]]
+ [1m[35mSQL (0.8ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:17:58 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472066278"], ["id", 86]]
+ [1m[35m (0.2ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 86], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 86]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[36mAccount Load (1.0ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[36mAccount Load (1.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", 2016-08-22 19:25:40 UTC], ["updated_at", 2016-08-22 19:25:40 UTC]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", 2016-08-22 19:25:40 UTC], ["synced_id", 0], ["id", 87]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", 2016-08-22 19:25:40 UTC], ["updated_at", 2016-08-22 19:25:40 UTC], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != $1) LIMIT $2[0m [["id", 88], ["LIMIT", 1]]
+ [1m[35mSQL (0.7ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:25:41 UTC], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 88]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.5ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 88], ["LIMIT", 1]]
+ [1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (1.0ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.802913"], ["updated_at", "2017-06-21 02:27:30.802913"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 44ms (ActiveRecord: 12.6ms)
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:25:41 UTC], ["updated_at", 2016-08-22 19:25:41 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471980341"]]
+ [1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:25:41 UTC], ["updated_at", 2016-08-22 19:25:41 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471807541"]]
+ [1m[35m (17.5ms)[0m [1m[35mCOMMIT[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (1.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 90], ["LIMIT", 1]]
+ [1m[35mSQL (0.7ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:25:41 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472066741"], ["id", 90]]
+ [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35mSQL (0.4ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 90]]
+ [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
[1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.813367"], ["updated_at", "2017-06-21 02:27:30.813367"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 6ms (ActiveRecord: 1.5ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35mSQL (0.7ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:25:41 UTC], ["updated_at", 2016-08-22 19:25:41 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471807541"]]
+ [1m[35m (1.2ms)[0m [1m[35mCOMMIT[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.821852"], ["updated_at", "2017-06-21 02:27:30.821852"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 5ms (ActiveRecord: 1.3ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[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.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#destroy as HTML
-Redirected to http://test.host/
-Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 91], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:25:41 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472066741"], ["id", 91]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 91], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#failure as HTML
- Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Completed 200 OK in 13ms (Views: 7.8ms | ActiveRecord: 0.0ms)
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 91]]
+ [1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#failure as HTML
- Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.0ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.871541"], ["updated_at", "2017-06-21 02:27:30.871541"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:25:41 UTC], ["updated_at", 2016-08-22 19:25:41 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", "2017-06-21 02:27:30.873898"], ["synced_id", 0], ["id", 4]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:25:41 UTC], ["updated_at", 2016-08-22 19:25:41 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 93], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 19:25:41 UTC], ["id", 93]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.884216"], ["updated_at", "2017-06-21 02:27:30.884216"], ["provider", "bookingsync"], ["synced_id", 456]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.3ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:25:41 UTC], ["updated_at", 2016-08-22 19:25:41 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.889831"], ["updated_at", "2017-06-21 02:27:30.889831"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:25:41 UTC], ["updated_at", 2016-08-22 19:25:41 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.3ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.895920"], ["updated_at", "2017-06-21 02:27:30.895920"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 95], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 19:25:41 UTC], ["id", 95]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.900309"], ["updated_at", "2017-06-21 02:27:30.900309"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 95], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.904510"], ["updated_at", "2017-06-21 02:27:30.904510"], ["provider", "bookingsync"], ["synced_id", 456]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:25:41 UTC], ["updated_at", 2016-08-22 19:25:41 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.907593"], ["updated_at", "2017-06-21 02:27:30.907593"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:25:41 UTC], ["updated_at", 2016-08-22 19:25:41 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 97], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 19:25:41 UTC], ["id", 97]]
+ [1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 97], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.911178"], ["updated_at", "2017-06-21 02:27:30.911178"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:25:41 UTC], ["updated_at", 2016-08-22 19:25:41 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.6ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (0.9ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.915170"], ["updated_at", "2017-06-21 02:27:30.915170"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:25:41 UTC], ["updated_at", 2016-08-22 19:25:41 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.919617"], ["updated_at", "2017-06-21 02:27:30.919617"], ["provider", "bookingsync"], ["synced_id", 456]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.921835"], ["updated_at", "2017-06-21 02:27:30.921835"], ["provider", "bookingsync"], ["synced_id", 123]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 14], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:27:30.926543"], ["id", 14]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.930548"], ["updated_at", "2017-06-21 02:27:30.930548"], ["provider", "bookingsync"], ["synced_id", 456]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.932686"], ["updated_at", "2017-06-21 02:27:30.932686"], ["provider", "bookingsync"], ["synced_id", 123]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 16], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:27:30.935256"], ["id", 16]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 16], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.939083"], ["updated_at", "2017-06-21 02:27:30.939083"], ["provider", "bookingsync"], ["synced_id", 456]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:25:41 UTC], ["updated_at", 2016-08-22 19:25:41 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.941232"], ["updated_at", "2017-06-21 02:27:30.941232"], ["provider", "bookingsync"], ["synced_id", 123]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 18], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:27:30.944333"], ["id", 18]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 18], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:25:41 UTC], ["updated_at", 2016-08-22 19:25:41 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.5ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.950436"], ["updated_at", "2017-06-21 02:27:30.950436"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1498098450"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:25:41 UTC], ["updated_at", 2016-08-22 19:25:41 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.5ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:25:41 UTC], ["updated_at", 2016-08-22 19:25:41 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.954547"], ["updated_at", "2017-06-21 02:27:30.954547"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925650"]]
- [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 20], ["LIMIT", 1]]
- [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:27:30.971996"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498184850"], ["id", 20]]
- [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 20]]
- [1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.978118"], ["updated_at", "2017-06-21 02:27:30.978118"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925650"]]
- [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 21], ["LIMIT", 1]]
- [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:27:30.982773"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498184850"], ["id", 21]]
- [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 21], ["LIMIT", 1]]
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35mSQL (0.2ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 21]]
- [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:31.024658"], ["updated_at", "2017-06-21 02:27:31.024658"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != $1) LIMIT $2[0m [["id", 22], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:27:31.027159"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 22]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 22], ["LIMIT", 1]]
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (1.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:25:41 UTC], ["updated_at", 2016-08-22 19:25:41 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:25:41 UTC], ["updated_at", 2016-08-22 19:25:41 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
+ [1m[36m (1.2ms)[0m [1mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
+Completed 200 OK in 22ms (Views: 21.5ms | ActiveRecord: 0.0ms)
+ [1m[35m (5.9ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by SessionsController#failure as HTML
+Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
[1m[35m (0.2ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.5ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1498098649"], ["created_at", "2017-06-21 02:30:49.616800"], ["updated_at", "2017-06-21 02:30:49.616800"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m ROLLBACK
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925849"], ["created_at", "2017-06-21 02:30:49.620388"], ["updated_at", "2017-06-21 02:30:49.620388"]]
- [1m[35m (0.3ms)[0m COMMIT
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/signed_out
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[35mAccount Load (6.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (6.4ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (6.9ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2016-08-22 19:26:57.158300"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 19:26:57.158300"]]
+ [1m[35m (12.3ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/
+Completed 302 Found in 119ms (ActiveRecord: 63.8ms)
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
[1m[35m (0.1ms)[0m BEGIN
- [1m[36mAccount Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1[0m
- [1m[35mSQL (0.4ms)[0m UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5 [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498185049"], ["updated_at", "2017-06-21 02:30:49.636497"], ["id", 2]]
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.4ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["created_at", "2016-08-22 19:26:57.196095"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 19:26:57.196095"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 6ms (ActiveRecord: 1.4ms)
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[35mAccount Load (0.5ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.5ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (1.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2016-08-22 19:26:57.209023"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 19:26:57.209023"]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/admin
+Completed 302 Found in 7ms (ActiveRecord: 2.4ms)
+ [1m[36m (0.6ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+Processing by AuthenticatedController#index as JS
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 4ms (Views: 3.1ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+Processing by AuthenticatedController#index as JS
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+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.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+Processing by AuthenticatedController#index as HTML
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36mAccount Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "synced_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2016-08-22 19:26:57.259691"], ["oauth_access_token", "token"], ["oauth_expires_at", "1471807617"], ["oauth_refresh_token", "refresh_token"], ["synced_id", 123], ["updated_at", "2016-08-22 19:26:57.259691"]]
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 2]]
- [1m[35mAccount Load (0.4ms)[0m SELECT "accounts".* FROM "accounts"
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36mAccount Exists (1.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 4) LIMIT 1[0m
+ [1m[35mSQL (0.7ms)[0m UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_expires_at" = $2, "oauth_refresh_token" = $3, "updated_at" = $4 WHERE "accounts"."id" = 4 [["oauth_access_token", "refreshed_token"], ["oauth_expires_at", "1472066817"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2016-08-22 19:26:57.295200"]]
+ [1m[36m (0.5ms)[0m [1mCOMMIT[0m
+ [1m[35mAccount Load (0.7ms)[0m SELECT "accounts".* FROM "accounts"
[1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35mSQL (0.2ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = $1 [["id", 2]]
+ [1m[35mSQL (0.3ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = $1 [["id", 4]]
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
[1m[35m (0.1ms)[0m BEGIN
- [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925849"], ["created_at", "2017-06-21 02:30:49.652613"], ["updated_at", "2017-06-21 02:30:49.652613"]]
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "synced_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2016-08-22 19:26:57.308334"], ["oauth_access_token", "token"], ["oauth_expires_at", "1471807617"], ["oauth_refresh_token", "refresh_token"], ["synced_id", 123], ["updated_at", "2016-08-22 19:26:57.308334"]]
[1m[36m (0.5ms)[0m [1mCOMMIT[0m
[1m[35m (0.1ms)[0m BEGIN
- [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 3) LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5 [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498185049"], ["updated_at", "2017-06-21 02:30:49.656423"], ["id", 3]]
- [1m[36m (0.4ms)[0m [1mCOMMIT[0m
- [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts"
[1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35mSQL (0.2ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = $1 [["id", 3]]
- [1m[36m (0.3ms)[0m [1mCOMMIT[0m
+ [1m[35mAccount Exists (0.5ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 5) LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = $1, "oauth_expires_at" = $2, "oauth_refresh_token" = $3, "updated_at" = $4 WHERE "accounts"."id" = 5[0m [["oauth_access_token", "refreshed_token"], ["oauth_expires_at", "1472066817"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2016-08-22 19:26:57.313207"]]
+ [1m[35m (0.3ms)[0m COMMIT
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 5]]
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts"[0m
[1m[35m (0.1ms)[0m BEGIN
- [1m[36mAccount Load (0.5ms)[0m [1mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1[0m
+ [1m[36mSQL (0.2ms)[0m [1mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 5]]
+ [1m[35m (0.3ms)[0m COMMIT
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", "2017-06-21 02:30:49.665148"], ["updated_at", "2017-06-21 02:30:49.665148"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "synced_id" = $1, "updated_at" = $2 WHERE "accounts"."id" = $3 [["synced_id", 0], ["updated_at", "2017-06-21 02:30:49.666807"], ["id", 4]]
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "synced_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2016-08-22 19:26:57.321398"], ["oauth_access_token", "token"], ["oauth_expires_at", 1471980417], ["oauth_refresh_token", "refresh_token"], ["synced_id", 123], ["updated_at", "2016-08-22 19:26:57.321398"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (6.0ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT 1[0m
+ [1m[35mSQL (6.5ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2016-08-22 19:26:57.332340"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2016-08-22 19:26:57.332340"]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (6.4ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" IS NULL AND "accounts"."id" != 7) LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_expires_at" = $2, "oauth_refresh_token" = $3, "updated_at" = $4 WHERE "accounts"."id" = 7 [["oauth_access_token", nil], ["oauth_expires_at", nil], ["oauth_refresh_token", nil], ["updated_at", "2016-08-22 19:26:57.349129"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 7]]
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
[1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36mAccount Load (6.6ms)[0m [1mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (11.1ms)[0m [1mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", "2016-08-22 19:26:57.371951"], ["updated_at", "2016-08-22 19:26:57.371951"]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.4ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:30:49.677833"], ["updated_at", "2017-06-21 02:30:49.677833"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "synced_id" = $1, "updated_at" = $2 WHERE "accounts"."id" = 8 [["synced_id", 0], ["updated_at", "2016-08-22 19:26:57.384907"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.4ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1
+ [1m[36m (0.5ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-21 02:30:49.680142"], ["updated_at", "2017-06-21 02:30:49.680142"]]
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (6.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2016-08-22 19:26:57.401395"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2016-08-22 19:26:57.401395"]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2016-08-22 19:26:57.410403"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 19:26:57.410403"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 6) LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:30:49.683451"], ["id", 6]]
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 10) LIMIT 1[0m
+ [1m[35mSQL (1.0ms)[0m UPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3, "oauth_refresh_token" = $4, "updated_at" = $5 WHERE "accounts"."id" = 10 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2016-08-22 19:26:57.413568"]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2016-08-22 19:26:57.425591"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2016-08-22 19:26:57.425591"]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2016-08-22 19:26:57.428526"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 19:26:57.428526"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.6ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 12) LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3, "oauth_refresh_token" = $4, "updated_at" = $5 WHERE "accounts"."id" = 12[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2016-08-22 19:26:57.432221"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.4ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 12]]
[1m[35m (0.1ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:30:49.688104"], ["updated_at", "2017-06-21 02:30:49.688104"]]
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2016-08-22 19:26:57.437464"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2016-08-22 19:26:57.437464"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-21 02:30:49.690535"], ["updated_at", "2017-06-21 02:30:49.690535"]]
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2016-08-22 19:26:57.439771"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 19:26:57.439771"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 8) LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:30:49.694351"], ["id", 8]]
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 14) LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3, "oauth_refresh_token" = $4, "updated_at" = $5 WHERE "accounts"."id" = 14[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2016-08-22 19:26:57.442995"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 8]]
+ [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 14]]
+ [1m[35m (1.2ms)[0m ROLLBACK
+ [1m[36m (0.5ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2016-08-22 19:26:57.453171"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2016-08-22 19:26:57.453171"]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "accounts"
+ [1m[36mAccount Load (26.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["created_at", "2016-08-22 19:26:57.488616"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 19:26:57.488616"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "accounts"
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2016-08-22 19:26:57.493835"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2016-08-22 19:26:57.493835"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["created_at", "2016-08-22 19:26:57.497423"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 19:26:57.497423"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:30:49.698832"], ["updated_at", "2017-06-21 02:30:49.698832"]]
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2016-08-22 19:26:57.501278"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2016-08-22 19:26:57.501278"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-21 02:30:49.700773"], ["updated_at", "2017-06-21 02:30:49.700773"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 10) LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:30:49.703871"], ["id", 10]]
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2016-08-22 19:26:57.504247"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 19:26:57.504247"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 10]]
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2016-08-22 19:26:57.507929"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2016-08-22 19:26:57.507929"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["created_at", "2016-08-22 19:26:57.511160"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 19:26:57.511160"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+Processing by AuthenticatedController#index as JS
+ Rendered text template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 14ms (Views: 14.0ms | ActiveRecord: 0.0ms)
+ [1m[35m (6.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+Processing by AuthenticatedController#index as JS
+ Rendered text template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[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.1ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[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 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35mAccount Load (1.0ms)[0m SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
+ [1m[36m (6.5ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (12.4ms)[0m INSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2016-08-22 19:27:06.574152"], ["updated_at", "2016-08-22 19:27:06.574152"]]
+ [1m[36m (6.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (12.1ms)[0m [1mUPDATE "accounts" SET "synced_id" = $1, "updated_at" = $2 WHERE "accounts"."id" = $3[0m [["synced_id", 0], ["updated_at", "2016-08-22 19:27:06.605044"], ["id", 1]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Exists (6.9ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:30:49.707776"], ["updated_at", "2017-06-21 02:30:49.707776"]]
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (6.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 19:27:06.664349"], ["updated_at", "2016-08-22 19:27:06.664349"]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2016-08-22 19:27:06.673330"], ["updated_at", "2016-08-22 19:27:06.673330"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "accounts"
+ [1m[35mAccount Load (0.4ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (9.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 3) LIMIT 1
+ [1m[36mSQL (6.3ms)[0m [1mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2016-08-22 19:27:06.689457"], ["id", 3]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 19:27:06.701976"], ["updated_at", "2016-08-22 19:27:06.701976"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2016-08-22 19:27:06.704417"], ["updated_at", "2016-08-22 19:27:06.704417"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
[1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:30:49.714113"], ["updated_at", "2017-06-21 02:30:49.714113"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "accounts"
+ [1m[36mAccount Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 5) LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m UPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2016-08-22 19:27:06.708419"], ["id", 5]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.4ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 5]]
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
[1m[35m (0.1ms)[0m BEGIN
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:30:49.717888"], ["updated_at", "2017-06-21 02:30:49.717888"]]
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 19:27:06.721724"], ["updated_at", "2016-08-22 19:27:06.721724"]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.4ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2016-08-22 19:27:06.724813"], ["updated_at", "2016-08-22 19:27:06.724813"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.4ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 7) LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2016-08-22 19:27:06.730011"], ["id", 7]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 7]]
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.5ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 19:27:06.737955"], ["updated_at", "2016-08-22 19:27:06.737955"]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35mAccount Load (6.6ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.5ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (6.0ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 19:27:06.757032"], ["updated_at", "2016-08-22 19:27:06.757032"]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 19:27:06.768710"], ["updated_at", "2016-08-22 19:27:06.768710"]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 19:27:06.773128"], ["updated_at", "2016-08-22 19:27:06.773128"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.6ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 19:27:06.779270"], ["updated_at", "2016-08-22 19:27:06.779270"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
[1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
[1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:30:49.720711"], ["updated_at", "2017-06-21 02:30:49.720711"]]
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 19:27:06.782931"], ["updated_at", "2016-08-22 19:27:06.782931"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
[1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:30:49.724310"], ["updated_at", "2017-06-21 02:30:49.724310"]]
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 19:27:06.786813"], ["updated_at", "2016-08-22 19:27:06.786813"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
[1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:30:49.726817"], ["updated_at", "2017-06-21 02:30:49.726817"]]
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 19:27:06.790304"], ["updated_at", "2016-08-22 19:27:06.790304"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
[1m[35m (0.1ms)[0m BEGIN
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:30:49.730113"], ["updated_at", "2017-06-21 02:30:49.730113"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (5.9ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471807626"], ["created_at", "2016-08-22 19:27:06.816365"], ["updated_at", "2016-08-22 19:27:06.816365"]]
+ [1m[36m (11.6ms)[0m [1mCOMMIT[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36mAccount Exists (0.7ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 16) LIMIT 1[0m
+ [1m[35mSQL (1.0ms)[0m UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5 [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472066826"], ["updated_at", "2016-08-22 19:27:06.858577"], ["id", 16]]
+ [1m[36m (0.6ms)[0m [1mCOMMIT[0m
+ [1m[35mAccount Load (0.4ms)[0m SELECT "accounts".* FROM "accounts"
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35mSQL (0.3ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = $1 [["id", 16]]
+ [1m[36m (0.3ms)[0m [1mCOMMIT[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36mAccount Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471807626"], ["created_at", "2016-08-22 19:27:06.868108"], ["updated_at", "2016-08-22 19:27:06.868108"]]
+ [1m[36m (0.4ms)[0m [1mCOMMIT[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 17) LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5[0m [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472066826"], ["updated_at", "2016-08-22 19:27:06.873294"], ["id", 17]]
+ [1m[35m (0.4ms)[0m COMMIT
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 17]]
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36mSQL (0.2ms)[0m [1mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 17]]
+ [1m[35m (0.4ms)[0m COMMIT
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:30:49.732838"], ["updated_at", "2017-06-21 02:30:49.732838"]]
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471980426"], ["created_at", "2016-08-22 19:27:06.881821"], ["updated_at", "2016-08-22 19:27:06.881821"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["created_at", "2017-06-21 02:30:49.735719"], ["updated_at", "2017-06-21 02:30:49.735719"]]
+ [1m[36mAccount Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["created_at", "2016-08-22 19:27:06.886273"], ["updated_at", "2016-08-22 19:27:06.886273"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" IS NULL AND "accounts"."id" != 19) LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5 [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2017-06-21 02:30:49.737730"], ["id", 19]]
+ [1m[36mAccount Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" IS NULL AND "accounts"."id" != 19) LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5 [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2016-08-22 19:27:06.889179"], ["id", 19]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
[1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 19]]
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
[1m[35m (0.1ms)[0m BEGIN
+Processing by SessionsController#failure as HTML
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.4ms)
+Completed 200 OK in 15ms (Views: 15.0ms | ActiveRecord: 0.0ms)
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
[1m[35m (0.1ms)[0m BEGIN
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+Processing by SessionsController#failure as HTML
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.1ms)
+Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
[1m[35m (0.1ms)[0m BEGIN
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/signed_out
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
Processing by SessionsController#create as HTML
- Parameters: {"params"=>{"provider"=>"bookingsync"}}
- [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:30:49.762670"], ["updated_at", "2017-06-21 02:30:49.762670"]]
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 19:27:06.944353"], ["updated_at", "2016-08-22 19:27:06.944353"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 4ms (ActiveRecord: 0.9ms)
+Redirected to http://test.host/
+Completed 302 Found in 5ms (ActiveRecord: 1.0ms)
[1m[35m (0.1ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
Processing by SessionsController#create as HTML
- Parameters: {"params"=>{"provider"=>"bookingsync"}}
+ Parameters: {"provider"=>"bookingsync"}
[1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:30:49.771075"], ["updated_at", "2017-06-21 02:30:49.771075"]]
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 19:27:06.955497"], ["updated_at", "2016-08-22 19:27:06.955497"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/
-Completed 302 Found in 4ms (ActiveRecord: 1.0ms)
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
+Redirected to http://test.host/admin
+Completed 302 Found in 6ms (ActiveRecord: 1.0ms)
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
Processing by SessionsController#create as HTML
- Parameters: {"params"=>{"provider"=>"bookingsync"}}
- [1m[36mAccount Load (0.4ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
[1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:30:49.780302"], ["updated_at", "2017-06-21 02:30:49.780302"]]
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 19:27:06.968462"], ["updated_at", "2016-08-22 19:27:06.968462"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/
-Completed 302 Found in 4ms (ActiveRecord: 1.1ms)
+Completed 302 Found in 4ms (ActiveRecord: 0.9ms)
[1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
-Completed 200 OK in 19ms (Views: 18.5ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[35m (0.7ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.0ms)
-Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
[1m[35m (0.1ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36mActiveRecord::SchemaMigration Load (1.0ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[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
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Completed 302 Found in 6ms (ActiveRecord: 0.0ms)
+ [1m[35m (6.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[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.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
-Processing by AuthenticatedController#index as HTML
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.6ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.5ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (6.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (6.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:18 UTC], ["updated_at", 2016-08-22 19:44:18 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (5.9ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 98ms (ActiveRecord: 36.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:18 UTC], ["updated_at", 2016-08-22 19:44:18 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 5ms (ActiveRecord: 1.2ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:18 UTC], ["updated_at", 2016-08-22 19:44:18 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/admin
+Completed 302 Found in 5ms (ActiveRecord: 1.1ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.4ms)
+Completed 200 OK in 19ms (Views: 14.2ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.1ms)
+Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as JS
+ Rendering text template
Rendered text template (0.0ms)
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 4ms (Views: 3.7ms | ActiveRecord: 0.0ms)
- [1m[35m (0.2ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Completed 401 Unauthorized in 3ms (Views: 2.2ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[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.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
Processing by AuthenticatedController#index as HTML
- Parameters: {"xhr"=>true}
+ Rendering text template
Rendered text template (0.0ms)
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m ROLLBACK
+Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (5.9ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (4.7ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:18 UTC], ["updated_at", 2016-08-22 19:44:18 UTC]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", 2016-08-22 19:44:18 UTC], ["synced_id", 0], ["id", 4]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (6.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:18 UTC], ["updated_at", 2016-08-22 19:44:18 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (5.8ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:18 UTC], ["updated_at", 2016-08-22 19:44:18 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:18 UTC], ["updated_at", 2016-08-22 19:44:18 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.7ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:18 UTC], ["updated_at", 2016-08-22 19:44:18 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:18 UTC], ["updated_at", 2016-08-22 19:44:18 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:18 UTC], ["updated_at", 2016-08-22 19:44:18 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:18 UTC], ["updated_at", 2016-08-22 19:44:18 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:18 UTC], ["updated_at", 2016-08-22 19:44:18 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:18 UTC], ["updated_at", 2016-08-22 19:44:18 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:18 UTC], ["updated_at", 2016-08-22 19:44:18 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 14], ["LIMIT", 1]]
+ [1m[35mSQL (0.8ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 19:44:18 UTC], ["id", 14]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:18 UTC], ["updated_at", 2016-08-22 19:44:18 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:18 UTC], ["updated_at", 2016-08-22 19:44:18 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (1.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 16], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 19:44:18 UTC], ["id", 16]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 16], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:18 UTC], ["updated_at", 2016-08-22 19:44:18 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:18 UTC], ["updated_at", 2016-08-22 19:44:18 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 18], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 19:44:18 UTC], ["id", 18]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 18], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (5.7ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:18 UTC], ["updated_at", 2016-08-22 19:44:18 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471981458"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:18 UTC], ["updated_at", 2016-08-22 19:44:18 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471808658"]]
+ [1m[35m (6.0ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (1.1ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 20], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:44:18 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472067858"], ["id", 20]]
+ [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35mSQL (0.4ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 20]]
+ [1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:18 UTC], ["updated_at", 2016-08-22 19:44:18 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471808658"]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 21], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:44:18 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472067858"], ["id", 21]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 21], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.5ms)[0m [1m[35mBEGIN[0m
+ [1m[35mSQL (0.4ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 21]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:18 UTC], ["updated_at", 2016-08-22 19:44:18 UTC], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != $1) LIMIT $2[0m [["id", 22], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:44:18 UTC], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 22]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 22], ["LIMIT", 1]]
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/signed_out
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (6.1ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
-Processing by AuthenticatedController#index as HTML
- Parameters: {"xhr"=>true}
-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.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
Processing by SessionsController#destroy as HTML
Redirected to http://test.host/
Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
[1m[35m (0.2ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[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.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
Processing by SessionsController#failure as HTML
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Completed 200 OK in 15ms (Views: 15.1ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m ROLLBACK
+Completed 200 OK in 20ms (Views: 19.7ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
Processing by SessionsController#failure as HTML
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.1ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
+Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
[1m[35m (0.1ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
Processing by SessionsController#create as HTML
- Parameters: {"params"=>{"provider"=>"bookingsync"}}
- [1m[35mAccount Load (0.4ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:02.315518"], ["updated_at", "2017-06-21 02:32:02.315518"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[35mAccount Load (7.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
+ [1m[36m (6.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (6.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (6.9ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2016-08-22 19:44:34.221921"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 19:44:34.221921"]]
+ [1m[35m (5.7ms)[0m RELEASE SAVEPOINT active_record_1
Redirected to http://test.host/admin
-Completed 302 Found in 31ms (ActiveRecord: 5.6ms)
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+Completed 302 Found in 95ms (ActiveRecord: 54.9ms)
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
[1m[35m (0.1ms)[0m BEGIN
Processing by SessionsController#create as HTML
- Parameters: {"params"=>{"provider"=>"bookingsync"}}
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:02.323393"], ["updated_at", "2017-06-21 02:32:02.323393"]]
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.4ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["created_at", "2016-08-22 19:44:34.248888"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 19:44:34.248888"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.7ms)
+Completed 302 Found in 4ms (ActiveRecord: 1.2ms)
[1m[35m (0.1ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
Processing by SessionsController#create as HTML
- Parameters: {"params"=>{"provider"=>"bookingsync"}}
- [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[35mAccount Load (0.4ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:02.329835"], ["updated_at", "2017-06-21 02:32:02.329835"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2016-08-22 19:44:34.256270"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 19:44:34.256270"]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.7ms)
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+Completed 302 Found in 4ms (ActiveRecord: 1.2ms)
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
[1m[35m (0.1ms)[0m BEGIN
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
-Processing by AuthenticatedController#index as HTML
- Rendered text template (0.0ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 4ms (Views: 4.0ms | ActiveRecord: 0.0ms)
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
-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.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
-Processing by AuthenticatedController#index as HTML
- Parameters: {"xhr"=>true}
- Rendered text template (0.0ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
-Processing by AuthenticatedController#index as HTML
- Parameters: {"xhr"=>true}
-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.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1498098722"], ["created_at", "2017-06-21 02:32:02.376181"], ["updated_at", "2017-06-21 02:32:02.376181"]]
+ [1m[35mAccount Exists (0.5ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2016-08-22 19:44:34.263016"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2016-08-22 19:44:34.263016"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925922"], ["created_at", "2017-06-21 02:32:02.379449"], ["updated_at", "2017-06-21 02:32:02.379449"]]
- [1m[36m (0.4ms)[0m [1mCOMMIT[0m
- [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2016-08-22 19:44:34.265502"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 19:44:34.265502"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 5) LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3, "oauth_refresh_token" = $4, "updated_at" = $5 WHERE "accounts"."id" = 5 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2016-08-22 19:44:34.269499"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35mAccount Exists (0.5ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 5) LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5[0m [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498185122"], ["updated_at", "2017-06-21 02:32:02.398678"], ["id", 5]]
- [1m[35m (0.5ms)[0m COMMIT
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 5]]
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts"[0m
- [1m[35m (0.1ms)[0m BEGIN
- [1m[36mSQL (0.2ms)[0m [1mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 5]]
- [1m[35m (0.3ms)[0m COMMIT
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925922"], ["created_at", "2017-06-21 02:32:02.407189"], ["updated_at", "2017-06-21 02:32:02.407189"]]
- [1m[35m (0.4ms)[0m COMMIT
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 6) LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5[0m [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498185122"], ["updated_at", "2017-06-21 02:32:02.410322"], ["id", 6]]
- [1m[35m (0.3ms)[0m COMMIT
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts"[0m
- [1m[35m (0.1ms)[0m BEGIN
- [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 6]]
- [1m[35m (0.3ms)[0m COMMIT
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:02.414628"], ["updated_at", "2017-06-21 02:32:02.414628"]]
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2016-08-22 19:44:34.274480"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2016-08-22 19:44:34.274480"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "accounts"
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:02.419700"], ["updated_at", "2017-06-21 02:32:02.419700"]]
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2016-08-22 19:44:34.276844"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 19:44:34.276844"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "accounts"
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
+ [1m[35mAccount Load (0.5ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:02.422450"], ["updated_at", "2017-06-21 02:32:02.422450"]]
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 7) LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3, "oauth_refresh_token" = $4, "updated_at" = $5 WHERE "accounts"."id" = 7[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2016-08-22 19:44:34.280465"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:02.425301"], ["updated_at", "2017-06-21 02:32:02.425301"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 7]]
[1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.0ms)[0m [1mBEGIN[0m
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:02.428000"], ["updated_at", "2017-06-21 02:32:02.428000"]]
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2016-08-22 19:44:34.285702"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2016-08-22 19:44:34.285702"]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2016-08-22 19:44:34.290251"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 19:44:34.290251"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:02.430483"], ["updated_at", "2017-06-21 02:32:02.430483"]]
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 9) LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_expires_at" = $3, "oauth_refresh_token" = $4, "updated_at" = $5 WHERE "accounts"."id" = 9[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2016-08-22 19:44:34.293361"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 9]]
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2016-08-22 19:44:34.299124"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2016-08-22 19:44:34.299124"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "accounts"
+ [1m[36mAccount Load (6.4ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 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", "synced_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["created_at", "2016-08-22 19:44:34.312610"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 19:44:34.312610"]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "accounts"
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
[1m[35m (0.1ms)[0m BEGIN
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:02.432921"], ["updated_at", "2017-06-21 02:32:02.432921"]]
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2016-08-22 19:44:34.318348"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2016-08-22 19:44:34.318348"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:02.435233"], ["updated_at", "2017-06-21 02:32:02.435233"]]
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 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", "synced_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["created_at", "2016-08-22 19:44:34.321983"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 19:44:34.321983"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:02.438632"], ["updated_at", "2017-06-21 02:32:02.438632"]]
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2016-08-22 19:44:34.325648"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2016-08-22 19:44:34.325648"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-21 02:32:02.440733"], ["updated_at", "2017-06-21 02:32:02.440733"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 16) LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:32:02.443208"], ["id", 16]]
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2016-08-22 19:44:34.328670"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 19:44:34.328670"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
[1m[35m (0.1ms)[0m BEGIN
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:02.446185"], ["updated_at", "2017-06-21 02:32:02.446185"]]
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2016-08-22 19:44:34.332301"], ["provider", "bookingsync"], ["synced_id", 456], ["updated_at", "2016-08-22 19:44:34.332301"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-21 02:32:02.447845"], ["updated_at", "2017-06-21 02:32:02.447845"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "synced_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["created_at", "2016-08-22 19:44:34.336126"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["synced_id", 123], ["updated_at", "2016-08-22 19:44:34.336126"]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 18) LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:32:02.449960"], ["id", 18]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 18]]
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.0ms)[0m BEGIN
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:02.452997"], ["updated_at", "2017-06-21 02:32:02.452997"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-21 02:32:02.455244"], ["updated_at", "2017-06-21 02:32:02.455244"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36mAccount Exists (6.5ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT 1[0m
+ [1m[35mSQL (12.0ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", "2016-08-22 19:44:34.356281"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2016-08-22 19:44:34.356281"]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 20) LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:32:02.457814"], ["id", 20]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 20]]
- [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[36mAccount Exists (0.9ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" IS NULL AND "accounts"."id" != 18) LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_expires_at" = $2, "oauth_refresh_token" = $3, "updated_at" = $4 WHERE "accounts"."id" = 18 [["oauth_access_token", nil], ["oauth_expires_at", nil], ["oauth_refresh_token", nil], ["updated_at", "2016-08-22 19:44:34.372428"]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 18]]
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
[1m[35m (0.1ms)[0m BEGIN
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "synced_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2016-08-22 19:44:34.377675"], ["oauth_access_token", "token"], ["oauth_expires_at", "1471808674"], ["oauth_refresh_token", "refresh_token"], ["synced_id", 123], ["updated_at", "2016-08-22 19:44:34.377675"]]
+ [1m[36m (0.5ms)[0m [1mCOMMIT[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35mAccount Exists (0.9ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 19) LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = $1, "oauth_expires_at" = $2, "oauth_refresh_token" = $3, "updated_at" = $4 WHERE "accounts"."id" = 19[0m [["oauth_access_token", "refreshed_token"], ["oauth_expires_at", "1472067874"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2016-08-22 19:44:34.397350"]]
+ [1m[35m (0.4ms)[0m COMMIT
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 19]]
+ [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts"[0m
[1m[35m (0.1ms)[0m BEGIN
- [1m[36mAccount Load (0.6ms)[0m [1mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1[0m
+ [1m[36mSQL (0.3ms)[0m [1mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 19]]
+ [1m[35m (0.3ms)[0m COMMIT
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "synced_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2016-08-22 19:44:34.409001"], ["oauth_access_token", "token"], ["oauth_expires_at", "1471808674"], ["oauth_refresh_token", "refresh_token"], ["synced_id", 123], ["updated_at", "2016-08-22 19:44:34.409001"]]
+ [1m[35m (0.3ms)[0m COMMIT
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 20) LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = $1, "oauth_expires_at" = $2, "oauth_refresh_token" = $3, "updated_at" = $4 WHERE "accounts"."id" = 20[0m [["oauth_access_token", "refreshed_token"], ["oauth_expires_at", "1472067874"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2016-08-22 19:44:34.413410"]]
+ [1m[35m (0.3ms)[0m COMMIT
+ [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36mSQL (0.2ms)[0m [1mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 20]]
+ [1m[35m (0.3ms)[0m COMMIT
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", "2017-06-21 02:32:02.495645"], ["updated_at", "2017-06-21 02:32:02.495645"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "synced_id" = $1, "updated_at" = $2 WHERE "accounts"."id" = $3 [["synced_id", 0], ["updated_at", "2017-06-21 02:32:02.497408"], ["id", 21]]
+ [1m[36mAccount Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "synced_id", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", "2016-08-22 19:44:34.419833"], ["oauth_access_token", "token"], ["oauth_expires_at", 1471981474], ["oauth_refresh_token", "refresh_token"], ["synced_id", 123], ["updated_at", "2016-08-22 19:44:34.419833"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["created_at", "2017-06-21 02:32:02.506937"], ["updated_at", "2017-06-21 02:32:02.506937"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" IS NULL AND "accounts"."id" != 22) LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2017-06-21 02:32:02.508681"], ["id", 22]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 22]]
[1m[35m (0.1ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[35mAccount Load (0.7ms)[0m SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2016-08-22 19:44:34.429371"], ["updated_at", "2016-08-22 19:44:34.429371"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "synced_id" = $1, "updated_at" = $2 WHERE "accounts"."id" = 22[0m [["synced_id", 0], ["updated_at", "2016-08-22 19:44:34.431263"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
[1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
[1m[35m (0.1ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
[1m[35m (0.1ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
[1m[35m (0.1ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
-Processing by AuthenticatedController#index as HTML
-Redirected to http://test.host/auth/bookingsync/?account_id=
+Processing by AuthenticatedController#index as JS
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+Completed 401 Unauthorized in 4ms (Views: 3.1ms | ActiveRecord: 0.0ms)
[1m[35m (0.2ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[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.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
Processing by AuthenticatedController#index as HTML
- Rendered text template (0.0ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 8ms (Views: 8.0ms | ActiveRecord: 0.0ms)
+Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
[1m[35m (0.2ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
Processing by AuthenticatedController#index as HTML
- Parameters: {"xhr"=>true}
+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.2ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+Processing by AuthenticatedController#index as JS
Rendered text template (0.0ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m ROLLBACK
+Completed 401 Unauthorized in 15ms (Views: 14.0ms | ActiveRecord: 0.0ms)
+ [1m[35m (6.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+Processing by AuthenticatedController#index as JS
+ Rendered text template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
Processing by AuthenticatedController#index as HTML
- Parameters: {"xhr"=>true}
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.1ms)[0m ROLLBACK
+ [1m[35m (0.2ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[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 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
+Completed 200 OK in 14ms (Views: 13.5ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.1ms)
+Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
Processing by SessionsController#destroy as HTML
-Redirected to http://test.host/
+Redirected to http://test.host/signed_out
Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[35m (0.2ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
Processing by SessionsController#destroy as HTML
-Redirected to http://test.host/signed_out
+Redirected to http://test.host/
Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[35m (0.2ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
Processing by SessionsController#create as HTML
- Parameters: {"params"=>{"provider"=>"bookingsync"}}
- [1m[35mAccount Load (0.5ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.4ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:31.604312"], ["updated_at", "2017-06-21 02:32:31.604312"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/admin
-Completed 302 Found in 30ms (ActiveRecord: 6.5ms)
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[35mAccount Load (0.6ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (4.8ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (7.5ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (5.9ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 19:44:43.606046"], ["updated_at", "2016-08-22 19:44:43.606046"]]
+ [1m[35m (5.7ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/
+Completed 302 Found in 102ms (ActiveRecord: 54.9ms)
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
[1m[35m (0.1ms)[0m BEGIN
Processing by SessionsController#create as HTML
- Parameters: {"params"=>{"provider"=>"bookingsync"}}
- [1m[36mAccount Load (0.4ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:31.614440"], ["updated_at", "2017-06-21 02:32:31.614440"]]
+ [1m[36mAccount Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 19:44:43.630951"], ["updated_at", "2016-08-22 19:44:43.630951"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/
-Completed 302 Found in 4ms (ActiveRecord: 1.0ms)
- [1m[35m (0.1ms)[0m ROLLBACK
+Completed 302 Found in 6ms (ActiveRecord: 1.4ms)
+ [1m[35m (0.2ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
Processing by SessionsController#create as HTML
- Parameters: {"params"=>{"provider"=>"bookingsync"}}
+ Parameters: {"provider"=>"bookingsync"}
[1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
[1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:31.622290"], ["updated_at", "2017-06-21 02:32:31.622290"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/
-Completed 302 Found in 4ms (ActiveRecord: 0.9ms)
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 19:44:43.642974"], ["updated_at", "2016-08-22 19:44:43.642974"]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/admin
+Completed 302 Found in 8ms (ActiveRecord: 1.4ms)
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
[1m[35m (0.1ms)[0m BEGIN
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Completed 200 OK in 11ms (Views: 11.0ms | ActiveRecord: 0.0ms)
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
[1m[35m (0.1ms)[0m BEGIN
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.1ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
[1m[35m (0.1ms)[0m BEGIN
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["created_at", "2017-06-21 02:32:31.648883"], ["updated_at", "2017-06-21 02:32:31.648883"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.4ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" IS NULL AND "accounts"."id" != 4) LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2017-06-21 02:32:31.651805"], ["id", 4]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 4]]
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925951"], ["created_at", "2017-06-21 02:32:31.657509"], ["updated_at", "2017-06-21 02:32:31.657509"]]
- [1m[35m (0.4ms)[0m COMMIT
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35mAccount Exists (0.9ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 5) LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5[0m [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498185151"], ["updated_at", "2017-06-21 02:32:31.678151"], ["id", 5]]
- [1m[35m (0.4ms)[0m COMMIT
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts"[0m
- [1m[35m (0.1ms)[0m BEGIN
- [1m[36mSQL (0.2ms)[0m [1mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 5]]
- [1m[35m (0.3ms)[0m COMMIT
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925951"], ["created_at", "2017-06-21 02:32:31.684044"], ["updated_at", "2017-06-21 02:32:31.684044"]]
- [1m[35m (0.3ms)[0m COMMIT
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35m (0.1ms)[0m BEGIN
- [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 6) LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5 [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498185151"], ["updated_at", "2017-06-21 02:32:31.687768"], ["id", 6]]
- [1m[36m (0.4ms)[0m [1mCOMMIT[0m
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 6]]
- [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts"
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35mSQL (0.2ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = $1 [["id", 6]]
- [1m[36m (0.3ms)[0m [1mCOMMIT[0m
- [1m[35m (0.1ms)[0m BEGIN
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1498098751"], ["created_at", "2017-06-21 02:32:31.694188"], ["updated_at", "2017-06-21 02:32:31.694188"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
[1m[35m (0.1ms)[0m BEGIN
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:31.697801"], ["updated_at", "2017-06-21 02:32:31.697801"]]
+ [1m[35mAccount Exists (0.4ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["created_at", "2016-08-22 19:44:43.676492"], ["updated_at", "2016-08-22 19:44:43.676492"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-21 02:32:31.700063"], ["updated_at", "2017-06-21 02:32:31.700063"]]
+ [1m[35mAccount Exists (0.7ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" IS NULL AND "accounts"."id" != 4) LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2016-08-22 19:44:43.680756"], ["id", 4]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 9) LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:32:31.703209"], ["id", 9]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 4]]
+ [1m[35m (0.2ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
[1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:31.706837"], ["updated_at", "2017-06-21 02:32:31.706837"]]
+ [1m[35mSQL (6.1ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 19:44:43.697595"], ["updated_at", "2016-08-22 19:44:43.697595"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
[1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-21 02:32:31.709355"], ["updated_at", "2017-06-21 02:32:31.709355"]]
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2016-08-22 19:44:43.706470"], ["updated_at", "2016-08-22 19:44:43.706470"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.4ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 11) LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:32:31.713826"], ["id", 11]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 11]]
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:31.717843"], ["updated_at", "2017-06-21 02:32:31.717843"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-21 02:32:31.720268"], ["updated_at", "2017-06-21 02:32:31.720268"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 13) LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:32:31.723256"], ["id", 13]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 13]]
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:31.726953"], ["updated_at", "2017-06-21 02:32:31.726953"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "accounts"
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:31.732142"], ["updated_at", "2017-06-21 02:32:31.732142"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "accounts"
+ [1m[35mAccount Exists (6.6ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 6) LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2016-08-22 19:44:43.716864"], ["id", 6]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
[1m[35m (0.1ms)[0m BEGIN
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
[1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:31.735846"], ["updated_at", "2017-06-21 02:32:31.735846"]]
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 19:44:43.723389"], ["updated_at", "2016-08-22 19:44:43.723389"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2016-08-22 19:44:43.725826"], ["updated_at", "2016-08-22 19:44:43.725826"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
[1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:31.738447"], ["updated_at", "2017-06-21 02:32:31.738447"]]
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 8) LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2016-08-22 19:44:43.729130"], ["id", 8]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:31.741728"], ["updated_at", "2017-06-21 02:32:31.741728"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:31.744954"], ["updated_at", "2017-06-21 02:32:31.744954"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 8]]
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
[1m[35m (0.1ms)[0m BEGIN
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:31.748128"], ["updated_at", "2017-06-21 02:32:31.748128"]]
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 19:44:43.733858"], ["updated_at", "2016-08-22 19:44:43.733858"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:31.751765"], ["updated_at", "2017-06-21 02:32:31.751765"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35mAccount Load (0.5ms)[0m SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2017-06-21 02:32:31.758277"], ["updated_at", "2017-06-21 02:32:31.758277"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "synced_id" = $1, "updated_at" = $2 WHERE "accounts"."id" = $3[0m [["synced_id", 0], ["updated_at", "2017-06-21 02:32:31.760276"], ["id", 22]]
+ [1m[35mAccount Exists (0.4ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2016-08-22 19:44:43.736567"], ["updated_at", "2016-08-22 19:44:43.736567"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1[0m
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35m (0.2ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35mAccount Load (1.0ms)[0m SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
- [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.5ms)[0m INSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2017-06-21 02:34:39.899116"], ["updated_at", "2017-06-21 02:34:39.899116"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "synced_id" = $1, "updated_at" = $2 WHERE "accounts"."id" = $3[0m [["synced_id", 0], ["updated_at", "2017-06-21 02:34:39.901588"], ["id", 1]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1[0m
- [1m[35m (0.2ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1498098879"], ["created_at", "2017-06-21 02:34:39.921940"], ["updated_at", "2017-06-21 02:34:39.921940"]]
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 10) LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2016-08-22 19:44:43.740408"], ["id", 10]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497926079"], ["created_at", "2017-06-21 02:34:39.926188"], ["updated_at", "2017-06-21 02:34:39.926188"]]
- [1m[35m (0.4ms)[0m COMMIT
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 10]]
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
[1m[35m (0.1ms)[0m BEGIN
- [1m[36mAccount Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 3) LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5 [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498185279"], ["updated_at", "2017-06-21 02:34:39.954583"], ["id", 3]]
- [1m[36m (0.4ms)[0m [1mCOMMIT[0m
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 3]]
- [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts"
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35mSQL (0.2ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = $1 [["id", 3]]
- [1m[36m (0.4ms)[0m [1mCOMMIT[0m
- [1m[35m (0.1ms)[0m BEGIN
- [1m[36mAccount Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497926079"], ["created_at", "2017-06-21 02:34:39.963116"], ["updated_at", "2017-06-21 02:34:39.963116"]]
- [1m[36m (0.4ms)[0m [1mCOMMIT[0m
- [1m[35m (0.3ms)[0m BEGIN
- [1m[36mAccount Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 4) LIMIT 1[0m
- [1m[35mSQL (0.4ms)[0m UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5 [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498185279"], ["updated_at", "2017-06-21 02:34:39.968313"], ["id", 4]]
- [1m[36m (0.4ms)[0m [1mCOMMIT[0m
- [1m[35mAccount Load (0.4ms)[0m SELECT "accounts".* FROM "accounts"
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35mSQL (0.2ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = $1 [["id", 4]]
- [1m[36m (0.4ms)[0m [1mCOMMIT[0m
- [1m[35m (0.1ms)[0m BEGIN
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:34:39.974974"], ["updated_at", "2017-06-21 02:34:39.974974"]]
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 19:44:43.745297"], ["updated_at", "2016-08-22 19:44:43.745297"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
[1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-21 02:34:39.977061"], ["updated_at", "2017-06-21 02:34:39.977061"]]
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 19:44:43.752737"], ["updated_at", "2016-08-22 19:44:43.752737"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 6) LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:34:39.980437"], ["id", 6]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "accounts"[0m
[1m[35m (0.1ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
[1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:34:39.985361"], ["updated_at", "2017-06-21 02:34:39.985361"]]
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 19:44:43.757878"], ["updated_at", "2016-08-22 19:44:43.757878"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-21 02:34:39.987432"], ["updated_at", "2017-06-21 02:34:39.987432"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 8) LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:34:39.990486"], ["id", 8]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 8]]
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:34:39.994515"], ["updated_at", "2017-06-21 02:34:39.994515"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-21 02:34:39.996396"], ["updated_at", "2017-06-21 02:34:39.996396"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
[1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 10) LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:34:39.999016"], ["id", 10]]
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 19:44:43.761709"], ["updated_at", "2016-08-22 19:44:43.761709"]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 19:44:43.768013"], ["updated_at", "2016-08-22 19:44:43.768013"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 10]]
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:34:40.002814"], ["updated_at", "2017-06-21 02:34:40.002814"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "accounts"
- [1m[36mAccount Load (0.6ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
[1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:34:40.010048"], ["updated_at", "2017-06-21 02:34:40.010048"]]
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 19:44:43.771707"], ["updated_at", "2016-08-22 19:44:43.771707"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "accounts"
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:34:40.014147"], ["updated_at", "2017-06-21 02:34:40.014147"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:34:40.017362"], ["updated_at", "2017-06-21 02:34:40.017362"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m ROLLBACK
[1m[36m (0.1ms)[0m [1mBEGIN[0m
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
[1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:34:40.022005"], ["updated_at", "2017-06-21 02:34:40.022005"]]
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2016-08-22 19:44:43.775738"], ["updated_at", "2016-08-22 19:44:43.775738"]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
[1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:34:40.024819"], ["updated_at", "2017-06-21 02:34:40.024819"]]
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2016-08-22 19:44:43.779103"], ["updated_at", "2016-08-22 19:44:43.779103"]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
[1m[35m (0.1ms)[0m BEGIN
+ [1m[36mAccount Load (0.8ms)[0m [1mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", "2016-08-22 19:44:43.789563"], ["updated_at", "2016-08-22 19:44:43.789563"]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
- [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:34:40.027775"], ["updated_at", "2017-06-21 02:34:40.027775"]]
- [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
- [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:34:40.030346"], ["updated_at", "2017-06-21 02:34:40.030346"]]
+ [1m[35mSQL (0.6ms)[0m UPDATE "accounts" SET "synced_id" = $1, "updated_at" = $2 WHERE "accounts"."id" = $3 [["synced_id", 0], ["updated_at", "2016-08-22 19:44:43.792483"], ["id", 19]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["created_at", "2017-06-21 02:34:40.033407"], ["updated_at", "2017-06-21 02:34:40.033407"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" IS NULL AND "accounts"."id" != 19) LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5 [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2017-06-21 02:34:40.035380"], ["id", 19]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
- [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 19]]
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
[1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.4ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (6.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471981483"], ["created_at", "2016-08-22 19:44:43.811917"], ["updated_at", "2016-08-22 19:44:43.811917"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
[1m[35m (0.1ms)[0m BEGIN
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471808683"], ["created_at", "2016-08-22 19:44:43.823005"], ["updated_at", "2016-08-22 19:44:43.823005"]]
+ [1m[36m (7.1ms)[0m [1mCOMMIT[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36mAccount Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 21) LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5 [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472067883"], ["updated_at", "2016-08-22 19:44:43.857595"], ["id", 21]]
+ [1m[36m (0.4ms)[0m [1mCOMMIT[0m
+ [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts"
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35mSQL (0.2ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = $1 [["id", 21]]
+ [1m[36m (0.3ms)[0m [1mCOMMIT[0m
[1m[35m (0.1ms)[0m BEGIN
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471808683"], ["created_at", "2016-08-22 19:44:43.865020"], ["updated_at", "2016-08-22 19:44:43.865020"]]
+ [1m[36m (0.3ms)[0m [1mCOMMIT[0m
[1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 22) LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5[0m [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472067883"], ["updated_at", "2016-08-22 19:44:43.870166"], ["id", 22]]
+ [1m[35m (0.4ms)[0m COMMIT
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 22]]
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts"[0m
[1m[35m (0.1ms)[0m BEGIN
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Completed 200 OK in 17ms (Views: 17.3ms | ActiveRecord: 0.0ms)
- [1m[36m (0.2ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
-Processing by SessionsController#failure as HTML
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.0ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
+ [1m[36mSQL (0.2ms)[0m [1mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 22]]
+ [1m[35m (0.3ms)[0m COMMIT
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
Processing by SessionsController#destroy as HTML
Redirected to http://test.host/
-Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
- [1m[36m (0.2ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
+Completed 302 Found in 6ms (ActiveRecord: 0.0ms)
+ [1m[35m (12.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
Processing by SessionsController#destroy as HTML
Redirected to http://test.host/signed_out
-Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
-Processing by SessionsController#create as HTML
- Parameters: {"params"=>{"provider"=>"bookingsync"}}
- [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:34:40.127962"], ["updated_at", "2017-06-21 02:34:40.127962"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 4ms (ActiveRecord: 0.9ms)
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
-Processing by SessionsController#create as HTML
- Parameters: {"params"=>{"provider"=>"bookingsync"}}
- [1m[35mAccount Load (0.5ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
- [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
- [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:34:40.137202"], ["updated_at", "2017-06-21 02:34:40.137202"]]
- [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
-Redirected to http://test.host/
-Completed 302 Found in 5ms (ActiveRecord: 1.5ms)
- [1m[36m (0.1ms)[0m [1mROLLBACK[0m
- [1m[35m (0.1ms)[0m BEGIN
-Processing by SessionsController#create as HTML
- Parameters: {"params"=>{"provider"=>"bookingsync"}}
- [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
- [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
- [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
- [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:34:40.147022"], ["updated_at", "2017-06-21 02:34:40.147022"]]
- [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 4ms (ActiveRecord: 0.9ms)
- [1m[35m (0.2ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
-Processing by AuthenticatedController#index as HTML
- Parameters: {"xhr"=>true}
-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.2ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
-Processing by AuthenticatedController#index as HTML
- Parameters: {"xhr"=>true}
- Rendered text template (0.0ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 5ms (Views: 4.7ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[0m
-Processing by AuthenticatedController#index as HTML
- Rendered text template (0.0ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
- [1m[35m (0.2ms)[0m ROLLBACK
- [1m[36m (0.1ms)[0m [1mBEGIN[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.1ms)[0m ROLLBACK
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[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 4ms (ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by AuthenticatedController#index as HTML
- Rendering text template
- Rendered text template (0.0ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 9ms (Views: 8.5ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by AuthenticatedController#index as JS
- Rendering text template
- Rendered text template (0.0ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Filter chain halted as :authenticate_account! rendered or redirected
-Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by AuthenticatedController#index as JS
- Rendering text template
- Rendered text template (0.0ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Filter chain halted as :authenticate_account! rendered or redirected
-Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
- [1m[36mAccount Load (0.6ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (1.5ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.4ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (5.9ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (12.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:52 UTC], ["updated_at", 2016-08-22 19:44:52 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (1.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/admin
-Completed 302 Found in 48ms (ActiveRecord: 11.3ms)
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Completed 302 Found in 101ms (ActiveRecord: 35.9ms)
+ [1m[35m (0.5ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
[1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:52 UTC], ["updated_at", 2016-08-22 19:44:52 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/
-Completed 302 Found in 6ms (ActiveRecord: 1.5ms)
+Completed 302 Found in 6ms (ActiveRecord: 1.3ms)
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
Processing by SessionsController#create as HTML
Parameters: {"provider"=>"bookingsync"}
[1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:52 UTC], ["updated_at", 2016-08-22 19:44:52 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
Redirected to http://test.host/
Completed 302 Found in 5ms (ActiveRecord: 1.2ms)
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
Processing by SessionsController#failure as HTML
- Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Completed 200 OK in 11ms (Views: 7.2ms | ActiveRecord: 0.0ms)
+ Rendering /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
+Completed 200 OK in 23ms (Views: 17.6ms | ActiveRecord: 0.0ms)
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
Processing by SessionsController#failure as HTML
- Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.0ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ Rendering /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.0ms)
+Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[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.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[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 [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.0ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.0ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.0ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
- [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", 2017-06-21 02:35:17 UTC], ["synced_id", 0], ["id", 4]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 6], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2017-06-21 02:35:17 UTC], ["id", 6]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 8], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2017-06-21 02:35:17 UTC], ["id", 8]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 8], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[36mAccount Exists (5.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35mSQL (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:52 UTC], ["updated_at", 2016-08-22 19:44:52 UTC], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != $1) LIMIT $2[0m [["id", 4], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:44:52 UTC], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 4]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 10], ["LIMIT", 1]]
- [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2017-06-21 02:35:17 UTC], ["id", 10]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 10], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 4], ["LIMIT", 1]]
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.3ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
- [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (5.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:52 UTC], ["updated_at", 2016-08-22 19:44:52 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471808692"]]
+ [1m[35m (6.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497926117"]]
- [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 19], ["LIMIT", 1]]
- [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2017-06-21 02:35:17 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498185317"], ["id", 19]]
+ [1m[36mAccount Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 5], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:44:52 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472067892"], ["id", 5]]
[1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 5], ["LIMIT", 1]]
[1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35mSQL (0.2ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 19]]
+ [1m[35mSQL (0.4ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 5]]
+ [1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:52 UTC], ["updated_at", 2016-08-22 19:44:52 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471808692"]]
[1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497926117"]]
- [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 20], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2017-06-21 02:35:17 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498185317"], ["id", 20]]
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 6], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2016-08-22 19:44:52 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1472067892"], ["id", 6]]
[1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 20], ["LIMIT", 1]]
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35mSQL (0.2ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 20]]
- [1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 6]]
+ [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1498098917"]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:52 UTC], ["updated_at", 2016-08-22 19:44:52 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1471981492"]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (0.4ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:52 UTC], ["updated_at", 2016-08-22 19:44:52 UTC]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35mSQL (0.6ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", 2016-08-22 19:44:52 UTC], ["synced_id", 0], ["id", 8]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != $1) LIMIT $2[0m [["id", 22], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2017-06-21 02:35:17 UTC], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 22]]
+ [1m[36mAccount Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (6.1ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:52 UTC], ["updated_at", 2016-08-22 19:44:52 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 22], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:52 UTC], ["updated_at", 2016-08-22 19:44:52 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 10], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 19:44:52 UTC], ["id", 10]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.565889"], ["updated_at", "2017-06-21 02:35:23.565889"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:52 UTC], ["updated_at", 2016-08-22 19:44:52 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.569798"], ["updated_at", "2017-06-21 02:35:23.569798"], ["provider", "bookingsync"], ["synced_id", 123]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:52 UTC], ["updated_at", 2016-08-22 19:44:52 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.5ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
- [1m[35mSQL (0.7ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:35:23.575532"], ["id", 2]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 12], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 19:44:52 UTC], ["id", 12]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 12], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.582331"], ["updated_at", "2017-06-21 02:35:23.582331"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:52 UTC], ["updated_at", 2016-08-22 19:44:52 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.584294"], ["updated_at", "2017-06-21 02:35:23.584294"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[36mAccount Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:52 UTC], ["updated_at", 2016-08-22 19:44:52 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 4], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:35:23.586904"], ["id", 4]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 14], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2016-08-22 19:44:52 UTC], ["id", 14]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 4], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 14], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.591283"], ["updated_at", "2017-06-21 02:35:23.591283"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:52 UTC], ["updated_at", 2016-08-22 19:44:52 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.593429"], ["updated_at", "2017-06-21 02:35:23.593429"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:52 UTC], ["updated_at", 2016-08-22 19:44:52 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.7ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 6], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:35:23.597553"], ["id", 6]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 6], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.602159"], ["updated_at", "2017-06-21 02:35:23.602159"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:52 UTC], ["updated_at", 2016-08-22 19:44:52 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.3ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.5ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.607541"], ["updated_at", "2017-06-21 02:35:23.607541"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:52 UTC], ["updated_at", 2016-08-22 19:44:52 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.611813"], ["updated_at", "2017-06-21 02:35:23.611813"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:53 UTC], ["updated_at", 2016-08-22 19:44:53 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.614707"], ["updated_at", "2017-06-21 02:35:23.614707"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:53 UTC], ["updated_at", 2016-08-22 19:44:53 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.618114"], ["updated_at", "2017-06-21 02:35:23.618114"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:53 UTC], ["updated_at", 2016-08-22 19:44:53 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
[1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.620725"], ["updated_at", "2017-06-21 02:35:23.620725"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2016-08-22 19:44:53 UTC], ["updated_at", 2016-08-22 19:44:53 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
[1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.623614"], ["updated_at", "2017-06-21 02:35:23.623614"], ["provider", "bookingsync"], ["synced_id", 456]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.626332"], ["updated_at", "2017-06-21 02:35:23.626332"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 3ms (Views: 2.8ms | ActiveRecord: 0.0ms)
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
- [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.634546"], ["updated_at", "2017-06-21 02:35:23.634546"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", "2017-06-21 02:35:23.636255"], ["synced_id", 0], ["id", 15]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
+Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 1ms (Views: 1.0ms | ActiveRecord: 0.0ms)
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+ Rendering text template
+ Rendered text template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 2ms (Views: 0.9ms | ActiveRecord: 0.0ms)
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.687716"], ["updated_at", "2017-06-21 02:35:23.687716"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != $1) LIMIT $2[0m [["id", 16], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:35:23.689927"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 16]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 16], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.694187"], ["updated_at", "2017-06-21 02:35:23.694187"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1498098923"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.698527"], ["updated_at", "2017-06-21 02:35:23.698527"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497926123"]]
- [1m[35m (2.0ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 18], ["LIMIT", 1]]
- [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:35:23.717151"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498185323"], ["id", 18]]
- [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
- [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 18]]
- [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.723697"], ["updated_at", "2017-06-21 02:35:23.723697"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497926123"]]
- [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 19], ["LIMIT", 1]]
- [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:35:23.728672"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498185323"], ["id", 19]]
- [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 19], ["LIMIT", 1]]
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35mSQL (0.2ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 19]]
- [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#destroy as HTML
-Redirected to http://test.host/signed_out
+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 1ms (ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[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 [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.750295"], ["updated_at", "2017-06-21 02:35:23.750295"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 3ms (ActiveRecord: 0.9ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.756343"], ["updated_at", "2017-06-21 02:35:23.756343"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/admin
-Completed 302 Found in 4ms (ActiveRecord: 1.1ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#create as HTML
- Parameters: {"provider"=>"bookingsync"}
- [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
- [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
- [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
- [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.763723"], ["updated_at", "2017-06-21 02:35:23.763723"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
- [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
-Redirected to http://test.host/
-Completed 302 Found in 5ms (ActiveRecord: 1.1ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#failure as HTML
- Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
- Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Completed 200 OK in 15ms (Views: 11.1ms | ActiveRecord: 0.0ms)
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
-Processing by SessionsController#failure as HTML
- Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
- Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.0ms)
+ [1m[35m (0.1ms)[0m [1m[36mbegin 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 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+Processing by AuthenticatedController#index as HTML
+ Rendering html template
+ Rendered html template (0.1ms)
Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
-Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 8ms (Views: 7.4ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
+Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 6ms (Views: 5.1ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.1ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin 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.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by AuthenticatedController#index as HTML
+Completed 500 Internal Server Error in 5ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
+Processing by AuthenticatedController#index as JS
Rendering text template
Rendered text template (0.0ms)
Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.0ms)
- [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Completed 401 Unauthorized in 5ms (Views: 4.3ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by AuthenticatedController#index as JS
Rendering text template
Rendered text template (0.0ms)
Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
- [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Completed 401 Unauthorized in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+Processing by AuthenticatedController#index as HTML
+Completed 500 Internal Server Error in 6ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin 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 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
Processing by AuthenticatedController#index as JS
Rendering text template
Rendered text template (0.0ms)
Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
Filter chain halted as :authenticate_account! rendered or redirected
-Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
- [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+Completed 401 Unauthorized in 3ms (Views: 2.8ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+Processing by AuthenticatedController#index as HTML
+Completed 500 Internal Server Error in 6ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin 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 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
+Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 5ms (Views: 5.0ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 2ms (Views: 0.4ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin 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 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+Processing by AuthenticatedController#index as HTML
+ Rendering html template
+ Rendered html template (0.1ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 2ms (Views: 2.1ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 3ms (Views: 2.8ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+Processing by AuthenticatedController#index as HTML
+ Rendering html template
+ Rendered html template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 1ms (Views: 1.0ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin 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 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
+Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 6ms (Views: 5.4ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
+Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.2ms)[0m [1m[36mbegin transaction[0m
+Processing by AuthenticatedController#index as HTML
+ Rendering html template
+ Rendered html template (0.1ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
+ [1m[35m (0.1ms)[0m [1m[36mbegin 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 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m