bookingsync-engine 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 75f31ae9cf0b2602dbbab9ea743bb5cfa537e7fb
4
- data.tar.gz: b554f66299b9df0f0f5482d032da16c48ec0733b
3
+ metadata.gz: f55a6e835b6ed9a619a45ca38d1bc85c3e91b426
4
+ data.tar.gz: d9a4cfd9d9d7c30af32bf90fc254595e15c0f24f
5
5
  SHA512:
6
- metadata.gz: 2ddb554ba0f1411576fd6e8019d92c5b002098542fabc2c04f93b4a4546d005189ad2510043431877c93aece5bbf001074a1136f8e259f0ea934f5f8037aedb3
7
- data.tar.gz: 5c4e004307873196d810215b3c127405dd28238158af1acd3778f2bf940b6c27039112b818af517974814e7857030787dc1d3fb31156c565cf5af9fb60144511
6
+ metadata.gz: 552bb7ba519eb9fce5aa30e1f62bcd488a4e0b0566bdf5f4c51185ea37cf0c6d8275f753c8aa147989737c0cc50fc9957eb039f9bee712f536c79b45b10497d6
7
+ data.tar.gz: e8e32127494f4508bb2ad9f1b67274d77c345425cc5a4f78c0c514b21d860b83bd87ed6b6172267a845379ffeb4b935a64ca6a1862f5d222c14f76635fd3ea41
@@ -0,0 +1 @@
1
+ require 'bookingsync'
@@ -21,7 +21,7 @@ module BookingSync
21
21
  end
22
22
  end
23
23
 
24
- config.to_prepare do
24
+ initializer "bookingsync.controller_helper" do |app|
25
25
  require "bookingsync/engine/helpers"
26
26
  require "bookingsync/engine/session_helpers"
27
27
  require "bookingsync/engine/auth_helpers"
@@ -1,3 +1,3 @@
1
1
  module BookingSync
2
- ENGINE_VERSION = "0.4.5"
2
+ ENGINE_VERSION = "0.4.6"
3
3
  end
File without changes
Binary file
@@ -0,0 +1,112 @@
1
+  (1.5ms) CREATE 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)) 
2
+  (0.1ms) select sqlite_version(*)
3
+  (1.0ms) CREATE INDEX "index_accounts_on_uid" ON "accounts" ("uid")
4
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
5
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
6
+  (0.1ms) SELECT version FROM "schema_migrations"
7
+  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110454')
8
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110326')
9
+  (1.2ms) CREATE 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)) 
10
+  (0.1ms) select sqlite_version(*)
11
+  (1.4ms) CREATE INDEX "index_accounts_on_uid" ON "accounts" ("uid")
12
+  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
13
+  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
14
+  (0.1ms) SELECT version FROM "schema_migrations"
15
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110454')
16
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110326')
17
+  (1.2ms) CREATE 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)) 
18
+  (0.2ms) select sqlite_version(*)
19
+  (1.6ms) CREATE INDEX "index_accounts_on_uid" ON "accounts" ("uid")
20
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
21
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
22
+  (0.1ms) SELECT version FROM "schema_migrations"
23
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110454')
24
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110326')
25
+  (1.2ms) CREATE 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)) 
26
+  (0.1ms) select sqlite_version(*)
27
+  (0.9ms) CREATE INDEX "index_accounts_on_uid" ON "accounts" ("uid")
28
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
29
+  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
30
+  (0.1ms) SELECT version FROM "schema_migrations"
31
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110454')
32
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110326')
33
+  (1.4ms) CREATE 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)) 
34
+  (0.5ms) select sqlite_version(*)
35
+  (1.2ms) CREATE INDEX "index_accounts_on_uid" ON "accounts" ("uid")
36
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
37
+  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
38
+  (0.1ms) SELECT version FROM "schema_migrations"
39
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110454')
40
+  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110326')
41
+  (1.4ms) CREATE 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)) 
42
+  (0.2ms) select sqlite_version(*)
43
+  (1.3ms) CREATE INDEX "index_accounts_on_uid" ON "accounts" ("uid")
44
+  (1.5ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
45
+  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
46
+  (0.2ms) SELECT version FROM "schema_migrations"
47
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110454')
48
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110326')
49
+  (1.6ms) CREATE 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)) 
50
+  (0.1ms) select sqlite_version(*)
51
+  (1.1ms) CREATE INDEX "index_accounts_on_uid" ON "accounts" ("uid")
52
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
53
+  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
54
+  (0.1ms) SELECT version FROM "schema_migrations"
55
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110454')
56
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110326')
57
+  (1.7ms) CREATE 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)) 
58
+  (0.2ms) select sqlite_version(*)
59
+  (1.3ms) CREATE INDEX "index_accounts_on_uid" ON "accounts" ("uid")
60
+  (1.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
61
+  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
62
+  (0.1ms) SELECT version FROM "schema_migrations"
63
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110454')
64
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110326')
65
+  (1.4ms) CREATE 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)) 
66
+  (0.1ms) select sqlite_version(*)
67
+  (1.2ms) CREATE INDEX "index_accounts_on_uid" ON "accounts" ("uid")
68
+  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
69
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
70
+  (0.1ms) SELECT version FROM "schema_migrations"
71
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110454')
72
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110326')
73
+  (3.8ms) CREATE TABLE "accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime, "provider" varchar, "uid" integer, "name" varchar, "oauth_access_token" varchar, "oauth_refresh_token" varchar, "oauth_expires_at" varchar) 
74
+  (0.1ms) select sqlite_version(*)
75
+  (1.1ms) CREATE INDEX "index_accounts_on_uid" ON "accounts" ("uid")
76
+  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
77
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
78
+  (0.1ms) SELECT version FROM "schema_migrations"
79
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110454')
80
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110326')
81
+  (1.4ms) CREATE 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)) 
82
+  (0.1ms) select sqlite_version(*)
83
+  (1.1ms) CREATE INDEX "index_accounts_on_uid" ON "accounts" ("uid")
84
+  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
85
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
86
+  (0.1ms) SELECT version FROM "schema_migrations"
87
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110454')
88
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110326')
89
+  (1.5ms) CREATE TABLE "accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime, "provider" varchar, "uid" integer, "name" varchar, "oauth_access_token" varchar, "oauth_refresh_token" varchar, "oauth_expires_at" varchar) 
90
+  (0.1ms) select sqlite_version(*)
91
+  (1.2ms) CREATE INDEX "index_accounts_on_uid" ON "accounts" ("uid")
92
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
93
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
94
+  (0.1ms) SELECT version FROM "schema_migrations"
95
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110454')
96
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110326')
97
+  (1.1ms) CREATE 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)) 
98
+  (0.1ms) select sqlite_version(*)
99
+  (1.0ms) CREATE INDEX "index_accounts_on_uid" ON "accounts" ("uid")
100
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
101
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
102
+  (0.1ms) SELECT version FROM "schema_migrations"
103
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110454')
104
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110326')
105
+  (1.2ms) CREATE TABLE "accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime, "provider" varchar, "uid" integer, "name" varchar, "oauth_access_token" varchar, "oauth_refresh_token" varchar, "oauth_expires_at" varchar) 
106
+  (0.1ms) select sqlite_version(*)
107
+  (1.0ms) CREATE INDEX "index_accounts_on_uid" ON "accounts" ("uid")
108
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
109
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
110
+  (0.1ms) SELECT version FROM "schema_migrations"
111
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110454')
112
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110326')
@@ -1,146 +1,2720 @@
1
-  (0.3ms) begin transaction
1
+  (0.4ms) begin transaction
2
+  (0.1ms) SAVEPOINT active_record_1
3
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" IS NULL LIMIT 1
4
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2015-01-14 14:17:11.864440"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2015-01-14 14:17:11.864440"]]
5
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6
+  (0.0ms) SAVEPOINT active_record_1
7
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" IS NULL AND "accounts"."id" != 1) LIMIT 1
8
+ SQL (1.8ms) UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", nil], ["oauth_expires_at", nil], ["oauth_refresh_token", nil], ["updated_at", "2015-01-14 14:17:11.867401"]]
9
+  (0.1ms) RELEASE SAVEPOINT active_record_1
10
+ Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
11
+  (0.8ms) rollback transaction
12
+  (0.1ms) begin transaction
13
+  (0.1ms) SAVEPOINT active_record_1
14
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
15
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 14:17:11.880511"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 14:17:11.880511"]]
16
+  (0.1ms) RELEASE SAVEPOINT active_record_1
17
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
18
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
19
+  (0.0ms) SAVEPOINT active_record_1
20
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
21
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 14:17:11.889074"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 14:17:11.889074"]]
22
+  (0.0ms) RELEASE SAVEPOINT active_record_1
23
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
24
+  (0.5ms) rollback transaction
25
+  (0.0ms) begin transaction
26
+  (0.0ms) SAVEPOINT active_record_1
27
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
28
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 14:17:11.892760"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 14:17:11.892760"]]
29
+  (0.0ms) RELEASE SAVEPOINT active_record_1
30
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
31
+  (0.0ms) SAVEPOINT active_record_1
32
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
33
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 14:17:11.894925"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 14:17:11.894925"]]
34
+  (0.0ms) RELEASE SAVEPOINT active_record_1
35
+  (0.5ms) rollback transaction
36
+  (0.1ms) begin transaction
37
+  (0.1ms) SAVEPOINT active_record_1
38
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
39
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 14:17:11.900050"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 14:17:11.900050"]]
40
+  (0.1ms) RELEASE SAVEPOINT active_record_1
41
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
42
+  (0.1ms) SAVEPOINT active_record_1
43
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
44
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 14:17:11.903947"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 14:17:11.903947"]]
45
+  (0.1ms) RELEASE SAVEPOINT active_record_1
46
+  (0.5ms) rollback transaction
47
+  (0.1ms) begin transaction
48
+  (0.0ms) SAVEPOINT active_record_1
49
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
50
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 14:17:11.907705"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 14:17:11.907705"]]
51
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
53
+  (0.1ms) SAVEPOINT active_record_1
54
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
55
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 14:17:11.909819"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 14:17:11.909819"]]
56
+  (0.0ms) RELEASE SAVEPOINT active_record_1
57
+  (0.4ms) rollback transaction
58
+  (0.1ms) begin transaction
59
+  (0.1ms) SAVEPOINT active_record_1
60
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
61
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 14:17:11.913581"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 14:17:11.913581"]]
62
+  (0.0ms) RELEASE SAVEPOINT active_record_1
63
+  (0.0ms) SAVEPOINT active_record_1
64
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
65
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 14:17:11.915243"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 14:17:11.915243"]]
66
+  (0.1ms) RELEASE SAVEPOINT active_record_1
67
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
68
+  (0.0ms) SAVEPOINT active_record_1
69
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
70
+ SQL (0.1ms) 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-01-14 14:17:11.917442"]]
71
+  (0.0ms) RELEASE SAVEPOINT active_record_1
72
+  (0.4ms) rollback transaction
73
+  (0.1ms) begin transaction
74
+  (0.1ms) SAVEPOINT active_record_1
75
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
76
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 14:17:11.920923"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 14:17:11.920923"]]
77
+  (0.1ms) RELEASE SAVEPOINT active_record_1
78
+  (0.1ms) SAVEPOINT active_record_1
79
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
80
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 14:17:11.923683"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 14:17:11.923683"]]
81
+  (0.1ms) RELEASE SAVEPOINT active_record_1
82
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
83
+  (0.0ms) SAVEPOINT active_record_1
84
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
85
+ SQL (0.1ms) 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-01-14 14:17:11.926740"]]
86
+  (0.1ms) RELEASE SAVEPOINT active_record_1
87
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
88
+  (0.5ms) rollback transaction
89
+  (0.1ms) begin transaction
90
+  (0.0ms) SAVEPOINT active_record_1
91
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
92
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 14:17:11.930171"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 14:17:11.930171"]]
93
+  (0.0ms) RELEASE SAVEPOINT active_record_1
94
+  (0.0ms) SAVEPOINT active_record_1
95
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
96
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 14:17:11.931635"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 14:17:11.931635"]]
97
+  (0.0ms) RELEASE SAVEPOINT active_record_1
98
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
99
+  (0.0ms) SAVEPOINT active_record_1
100
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
101
+ SQL (0.1ms) 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-01-14 14:17:11.933578"]]
102
+  (0.0ms) RELEASE SAVEPOINT active_record_1
103
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
104
+  (0.5ms) rollback transaction
105
+  (0.1ms) begin transaction
106
+  (0.1ms) rollback transaction
107
+  (0.1ms) begin transaction
108
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
109
+  (0.1ms) SAVEPOINT active_record_1
110
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "uid", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-01-14 14:17:11.956404"], ["uid", 0], ["updated_at", "2015-01-14 14:17:11.956404"]]
111
+  (0.0ms) RELEASE SAVEPOINT active_record_1
112
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
113
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
114
+  (0.6ms) rollback transaction
115
+  (0.1ms) begin transaction
116
+ Processing by SessionsController#failure as HTML
117
+ Rendered /Users/manda/projects/bookingsync-engine-2/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
118
+ Completed 200 OK in 7ms (Views: 6.8ms | ActiveRecord: 0.0ms)
119
+  (0.1ms) rollback transaction
120
+  (0.0ms) begin transaction
121
+ Processing by SessionsController#failure as HTML
122
+ Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
123
+  (0.1ms) rollback transaction
124
+  (0.0ms) begin transaction
125
+ Processing by SessionsController#destroy as HTML
126
+ Redirected to http://test.host/signed_out
127
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
2
128
   (0.1ms) rollback transaction
3
129
   (0.1ms) begin transaction
130
+ Processing by SessionsController#destroy as HTML
131
+ Redirected to http://test.host/
132
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
4
133
   (0.0ms) rollback transaction
134
+  (0.0ms) begin transaction
135
+ Processing by SessionsController#create as HTML
136
+ Parameters: {"provider"=>"bookingsync"}
137
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
138
+  (0.1ms) SAVEPOINT active_record_1
139
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
140
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 14:17:12.008309"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 14:17:12.008309"]]
141
+  (0.0ms) RELEASE SAVEPOINT active_record_1
142
+ Redirected to http://test.host/admin
143
+ Completed 302 Found in 3ms (ActiveRecord: 0.6ms)
144
+  (0.5ms) rollback transaction
145
+  (0.0ms) begin transaction
146
+ Processing by SessionsController#create as HTML
147
+ Parameters: {"provider"=>"bookingsync"}
148
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
149
+  (0.0ms) SAVEPOINT active_record_1
150
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
151
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 14:17:12.013999"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 14:17:12.013999"]]
152
+  (0.0ms) RELEASE SAVEPOINT active_record_1
153
+ Redirected to http://test.host/
154
+ Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
155
+  (0.5ms) rollback transaction
156
+  (0.1ms) begin transaction
157
+ Processing by SessionsController#create as HTML
158
+ Parameters: {"provider"=>"bookingsync"}
159
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
160
+  (0.0ms) SAVEPOINT active_record_1
161
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
162
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 14:17:12.020165"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 14:17:12.020165"]]
163
+  (0.0ms) RELEASE SAVEPOINT active_record_1
164
+ Redirected to http://test.host/
165
+ Completed 302 Found in 3ms (ActiveRecord: 0.6ms)
166
+  (0.5ms) rollback transaction
167
+  (0.0ms) begin transaction
168
+  (0.0ms) rollback transaction
169
+  (0.0ms) begin transaction
170
+  (0.0ms) rollback transaction
171
+  (0.1ms) begin transaction
172
+  (0.1ms) rollback transaction
173
+  (0.0ms) begin transaction
174
+  (0.1ms) rollback transaction
175
+  (0.0ms) begin transaction
176
+ Processing by AuthenticatedController#index as JS
177
+ Filter chain halted as :authenticate_account! rendered or redirected
178
+ Completed 401 Unauthorized in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)
179
+  (0.1ms) rollback transaction
180
+  (0.1ms) begin transaction
181
+ Processing by AuthenticatedController#index as JS
182
+ Filter chain halted as :authenticate_account! rendered or redirected
183
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
184
+  (0.1ms) rollback transaction
185
+  (0.1ms) begin transaction
186
+ Processing by AuthenticatedController#index as HTML
187
+ Redirected to http://test.host/auth/bookingsync/?account_id=
188
+ Filter chain halted as :authenticate_account! rendered or redirected
189
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
190
+  (0.1ms) rollback transaction
191
+  (0.1ms) begin transaction
192
+ Processing by AuthenticatedController#index as HTML
193
+ Filter chain halted as :authenticate_account! rendered or redirected
194
+ Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
195
+  (0.1ms) rollback transaction
196
+  (0.3ms) begin transaction
197
+  (0.1ms) SAVEPOINT active_record_1
198
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" IS NULL LIMIT 1
199
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2015-01-14 14:26:20.924011"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2015-01-14 14:26:20.924011"]]
200
+  (0.0ms) RELEASE SAVEPOINT active_record_1
201
+  (0.0ms) SAVEPOINT active_record_1
202
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" IS NULL AND "accounts"."id" != 1) LIMIT 1
203
+ SQL (1.4ms) UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", nil], ["oauth_expires_at", nil], ["oauth_refresh_token", nil], ["updated_at", "2015-01-14 14:26:20.926673"]]
204
+  (0.1ms) RELEASE SAVEPOINT active_record_1
205
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
206
+  (0.6ms) rollback transaction
207
+  (0.1ms) begin transaction
208
+  (0.1ms) rollback transaction
209
+  (0.1ms) begin transaction
210
+  (0.1ms) SAVEPOINT active_record_1
211
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
212
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 14:26:20.950900"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 14:26:20.950900"]]
213
+  (0.1ms) RELEASE SAVEPOINT active_record_1
214
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
215
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
216
+  (0.0ms) SAVEPOINT active_record_1
217
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
218
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 14:26:20.959545"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 14:26:20.959545"]]
219
+  (0.0ms) RELEASE SAVEPOINT active_record_1
220
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
221
+  (0.5ms) rollback transaction
222
+  (0.1ms) begin transaction
223
+  (0.0ms) SAVEPOINT active_record_1
224
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
225
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 14:26:20.963767"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 14:26:20.963767"]]
226
+  (0.0ms) RELEASE SAVEPOINT active_record_1
227
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
228
+  (0.0ms) SAVEPOINT active_record_1
229
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
230
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 14:26:20.965789"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 14:26:20.965789"]]
231
+  (0.0ms) RELEASE SAVEPOINT active_record_1
232
+  (0.4ms) rollback transaction
233
+  (0.1ms) begin transaction
234
+  (0.0ms) SAVEPOINT active_record_1
235
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
236
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 14:26:20.969228"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 14:26:20.969228"]]
237
+  (0.0ms) RELEASE SAVEPOINT active_record_1
238
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
239
+  (0.0ms) SAVEPOINT active_record_1
240
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
241
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 14:26:20.971151"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 14:26:20.971151"]]
242
+  (0.0ms) RELEASE SAVEPOINT active_record_1
243
+  (0.4ms) rollback transaction
244
+  (0.0ms) begin transaction
245
+  (0.0ms) SAVEPOINT active_record_1
246
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
247
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 14:26:20.974857"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 14:26:20.974857"]]
248
+  (0.1ms) RELEASE SAVEPOINT active_record_1
249
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
250
+  (0.1ms) SAVEPOINT active_record_1
251
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
252
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 14:26:20.979172"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 14:26:20.979172"]]
253
+  (0.1ms) RELEASE SAVEPOINT active_record_1
254
+  (0.5ms) rollback transaction
255
+  (0.1ms) begin transaction
256
+  (0.0ms) SAVEPOINT active_record_1
257
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
258
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 14:26:20.983646"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 14:26:20.983646"]]
259
+  (0.0ms) RELEASE SAVEPOINT active_record_1
260
+  (0.0ms) SAVEPOINT active_record_1
261
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
262
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 14:26:20.985242"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 14:26:20.985242"]]
263
+  (0.0ms) RELEASE SAVEPOINT active_record_1
264
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
265
+  (0.0ms) SAVEPOINT active_record_1
266
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
267
+ SQL (0.1ms) 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-01-14 14:26:20.987410"]]
268
+  (0.0ms) RELEASE SAVEPOINT active_record_1
269
+  (0.5ms) rollback transaction
270
+  (0.1ms) begin transaction
271
+  (0.0ms) SAVEPOINT active_record_1
272
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
273
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 14:26:20.990554"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 14:26:20.990554"]]
274
+  (0.1ms) RELEASE SAVEPOINT active_record_1
275
+  (0.0ms) SAVEPOINT active_record_1
276
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
277
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 14:26:20.992285"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 14:26:20.992285"]]
278
+  (0.1ms) RELEASE SAVEPOINT active_record_1
279
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
280
+  (0.0ms) SAVEPOINT active_record_1
281
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
282
+ SQL (0.1ms) 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-01-14 14:26:20.994549"]]
283
+  (0.0ms) RELEASE SAVEPOINT active_record_1
284
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
285
+  (0.5ms) rollback transaction
286
+  (0.0ms) begin transaction
287
+  (0.0ms) SAVEPOINT active_record_1
288
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
289
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 14:26:20.997556"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 14:26:20.997556"]]
290
+  (0.0ms) RELEASE SAVEPOINT active_record_1
291
+  (0.0ms) SAVEPOINT active_record_1
292
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
293
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 14:26:20.999016"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 14:26:20.999016"]]
294
+  (0.1ms) RELEASE SAVEPOINT active_record_1
295
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
296
+  (0.0ms) SAVEPOINT active_record_1
297
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
298
+ SQL (0.1ms) 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-01-14 14:26:21.001507"]]
299
+  (0.0ms) RELEASE SAVEPOINT active_record_1
300
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
301
+  (0.5ms) rollback transaction
302
+  (0.0ms) begin transaction
303
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
304
+  (0.1ms) SAVEPOINT active_record_1
305
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "uid", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-01-14 14:26:21.007057"], ["uid", 0], ["updated_at", "2015-01-14 14:26:21.007057"]]
306
+  (0.0ms) RELEASE SAVEPOINT active_record_1
307
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
308
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
309
+  (0.5ms) rollback transaction
5
310
   (0.1ms) begin transaction
6
311
   (0.1ms) rollback transaction
7
312
   (0.1ms) begin transaction
8
313
   (0.1ms) rollback transaction
314
+  (0.0ms) begin transaction
315
+  (0.0ms) rollback transaction
9
316
   (0.1ms) begin transaction
10
317
   (0.0ms) rollback transaction
11
318
   (0.0ms) begin transaction
319
+ Processing by SessionsController#failure as HTML
320
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
321
+ Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.0ms)
322
+  (0.1ms) rollback transaction
323
+  (0.0ms) begin transaction
324
+ Processing by SessionsController#failure as HTML
325
+ Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
326
+  (0.1ms) rollback transaction
327
+  (0.0ms) begin transaction
328
+ Processing by SessionsController#destroy as HTML
329
+ Redirected to http://test.host/signed_out
330
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
331
+  (0.1ms) rollback transaction
332
+  (0.0ms) begin transaction
333
+ Processing by SessionsController#destroy as HTML
334
+ Redirected to http://test.host/
335
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
336
+  (0.1ms) rollback transaction
337
+  (0.0ms) begin transaction
338
+ Processing by SessionsController#create as HTML
339
+ Parameters: {"provider"=>"bookingsync"}
340
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
341
+  (0.0ms) SAVEPOINT active_record_1
342
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
343
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 14:26:21.063111"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 14:26:21.063111"]]
344
+  (0.0ms) RELEASE SAVEPOINT active_record_1
345
+ Redirected to http://test.host/admin
346
+ Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
347
+  (0.5ms) rollback transaction
348
+  (0.1ms) begin transaction
349
+ Processing by SessionsController#create as HTML
350
+ Parameters: {"provider"=>"bookingsync"}
351
+ Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
352
+  (0.0ms) SAVEPOINT active_record_1
353
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
354
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 14:26:21.071132"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 14:26:21.071132"]]
355
+  (0.1ms) RELEASE SAVEPOINT active_record_1
356
+ Redirected to http://test.host/
357
+ Completed 302 Found in 4ms (ActiveRecord: 0.7ms)
358
+  (0.6ms) rollback transaction
359
+  (0.2ms) begin transaction
360
+ Processing by SessionsController#create as HTML
361
+ Parameters: {"provider"=>"bookingsync"}
362
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
363
+  (0.1ms) SAVEPOINT active_record_1
364
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
365
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 14:26:21.079009"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 14:26:21.079009"]]
366
+  (0.1ms) RELEASE SAVEPOINT active_record_1
367
+ Redirected to http://test.host/
368
+ Completed 302 Found in 4ms (ActiveRecord: 0.8ms)
369
+  (0.5ms) rollback transaction
370
+  (0.1ms) begin transaction
371
+ Processing by AuthenticatedController#index as JS
372
+ Filter chain halted as :authenticate_account! rendered or redirected
373
+ Completed 401 Unauthorized in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)
374
+  (0.1ms) rollback transaction
375
+  (0.1ms) begin transaction
376
+ Processing by AuthenticatedController#index as JS
377
+ Filter chain halted as :authenticate_account! rendered or redirected
378
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
379
+  (0.1ms) rollback transaction
380
+  (0.0ms) begin transaction
381
+ Processing by AuthenticatedController#index as HTML
382
+ Redirected to http://test.host/auth/bookingsync/?account_id=
383
+ Filter chain halted as :authenticate_account! rendered or redirected
384
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
385
+  (0.0ms) rollback transaction
386
+  (0.0ms) begin transaction
387
+ Processing by AuthenticatedController#index as HTML
388
+ Filter chain halted as :authenticate_account! rendered or redirected
389
+ Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
390
+  (0.0ms) rollback transaction
391
+  (0.3ms) begin transaction
392
+  (0.1ms) rollback transaction
393
+  (0.1ms) begin transaction
12
394
   (0.0ms) rollback transaction
13
395
   (0.1ms) begin transaction
396
+  (0.1ms) rollback transaction
397
+  (0.1ms) begin transaction
14
398
   (0.0ms) rollback transaction
15
399
   (0.0ms) begin transaction
16
-  (0.0ms) rollback transaction
400
+ Processing by AuthenticatedController#index as JS
401
+ Rendered text template (0.0ms)
402
+ Filter chain halted as :authenticate_account! rendered or redirected
403
+ Completed 401 Unauthorized in 5ms (Views: 5.1ms | ActiveRecord: 0.0ms)
404
+  (0.1ms) rollback transaction
17
405
   (0.0ms) begin transaction
18
-  (0.0ms) rollback transaction
406
+ Processing by AuthenticatedController#index as JS
407
+ Filter chain halted as :authenticate_account! rendered or redirected
408
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
409
+  (0.1ms) rollback transaction
19
410
   (0.0ms) begin transaction
411
+ Processing by AuthenticatedController#index as HTML
412
+ Redirected to http://test.host/auth/bookingsync/?account_id=
413
+ Filter chain halted as :authenticate_account! rendered or redirected
414
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
20
415
   (0.0ms) rollback transaction
21
416
   (0.1ms) begin transaction
417
+ Processing by AuthenticatedController#index as HTML
418
+ Filter chain halted as :authenticate_account! rendered or redirected
419
+ Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
22
420
   (0.0ms) rollback transaction
421
+  (0.0ms) begin transaction
422
+ Processing by SessionsController#create as HTML
423
+ Parameters: {"provider"=>"bookingsync"}
424
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
425
+  (0.1ms) SAVEPOINT active_record_1
426
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
427
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 15:22:02.854779"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 15:22:02.854779"]]
428
+  (0.1ms) RELEASE SAVEPOINT active_record_1
429
+ Redirected to http://test.host/
430
+ Completed 302 Found in 33ms (ActiveRecord: 2.5ms)
431
+  (0.4ms) rollback transaction
432
+  (0.0ms) begin transaction
433
+ Processing by SessionsController#create as HTML
434
+ Parameters: {"provider"=>"bookingsync"}
435
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
436
+  (0.0ms) SAVEPOINT active_record_1
437
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
438
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 15:22:02.862200"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 15:22:02.862200"]]
439
+  (0.1ms) RELEASE SAVEPOINT active_record_1
440
+ Redirected to http://test.host/
441
+ Completed 302 Found in 3ms (ActiveRecord: 0.6ms)
442
+  (0.4ms) rollback transaction
443
+  (0.1ms) begin transaction
444
+ Processing by SessionsController#create as HTML
445
+ Parameters: {"provider"=>"bookingsync"}
446
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
447
+  (0.0ms) SAVEPOINT active_record_1
448
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
449
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 15:22:02.869164"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 15:22:02.869164"]]
450
+  (0.0ms) RELEASE SAVEPOINT active_record_1
451
+ Redirected to http://test.host/admin
452
+ Completed 302 Found in 3ms (ActiveRecord: 0.6ms)
453
+  (0.4ms) rollback transaction
454
+  (0.1ms) begin transaction
455
+ Processing by SessionsController#destroy as HTML
456
+ Redirected to http://test.host/signed_out
457
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
458
+  (0.1ms) rollback transaction
459
+  (0.1ms) begin transaction
460
+ Processing by SessionsController#destroy as HTML
461
+ Redirected to http://test.host/
462
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
463
+  (0.1ms) rollback transaction
464
+  (0.0ms) begin transaction
465
+ Processing by SessionsController#failure as HTML
466
+ Completed 200 OK in 3ms (Views: 2.7ms | ActiveRecord: 0.0ms)
467
+  (0.1ms) rollback transaction
468
+  (0.1ms) begin transaction
469
+ Processing by SessionsController#failure as HTML
470
+ Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.0ms)
471
+  (0.1ms) rollback transaction
472
+  (0.1ms) begin transaction
473
+  (0.1ms) rollback transaction
474
+  (0.0ms) begin transaction
475
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
476
+  (0.1ms) SAVEPOINT active_record_1
477
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "uid", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-01-14 15:22:02.914883"], ["uid", 0], ["updated_at", "2015-01-14 15:22:02.914883"]]
478
+  (0.0ms) RELEASE SAVEPOINT active_record_1
479
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
480
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
481
+  (0.4ms) rollback transaction
482
+  (0.1ms) begin transaction
483
+  (0.0ms) SAVEPOINT active_record_1
484
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
485
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 15:22:02.927542"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 15:22:02.927542"]]
486
+  (0.0ms) RELEASE SAVEPOINT active_record_1
487
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
488
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
489
+  (0.0ms) SAVEPOINT active_record_1
490
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
491
+ SQL (1.4ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 15:22:02.933685"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 15:22:02.933685"]]
492
+  (0.1ms) RELEASE SAVEPOINT active_record_1
493
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
494
+  (0.4ms) rollback transaction
495
+  (0.1ms) begin transaction
496
+  (0.1ms) SAVEPOINT active_record_1
497
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
498
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 15:22:02.938609"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 15:22:02.938609"]]
499
+  (0.0ms) RELEASE SAVEPOINT active_record_1
500
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
501
+  (0.0ms) SAVEPOINT active_record_1
502
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
503
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 15:22:02.940729"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 15:22:02.940729"]]
504
+  (0.0ms) RELEASE SAVEPOINT active_record_1
505
+  (0.6ms) rollback transaction
506
+  (0.1ms) begin transaction
507
+  (0.1ms) SAVEPOINT active_record_1
508
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
509
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 15:22:02.944169"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 15:22:02.944169"]]
510
+  (0.0ms) RELEASE SAVEPOINT active_record_1
511
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
512
+  (0.0ms) SAVEPOINT active_record_1
513
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
514
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 15:22:02.946255"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 15:22:02.946255"]]
515
+  (0.1ms) RELEASE SAVEPOINT active_record_1
516
+  (0.6ms) rollback transaction
517
+  (0.1ms) begin transaction
518
+  (0.1ms) SAVEPOINT active_record_1
519
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
520
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 15:22:02.950528"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 15:22:02.950528"]]
521
+  (0.1ms) RELEASE SAVEPOINT active_record_1
522
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
523
+  (0.1ms) SAVEPOINT active_record_1
524
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
525
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 15:22:02.954084"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 15:22:02.954084"]]
526
+  (0.1ms) RELEASE SAVEPOINT active_record_1
527
+  (0.5ms) rollback transaction
528
+  (0.1ms) begin transaction
529
+  (0.0ms) SAVEPOINT active_record_1
530
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
531
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 15:22:02.958375"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 15:22:02.958375"]]
532
+  (0.1ms) RELEASE SAVEPOINT active_record_1
533
+  (0.1ms) SAVEPOINT active_record_1
534
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
535
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 15:22:02.960279"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 15:22:02.960279"]]
536
+  (0.0ms) RELEASE SAVEPOINT active_record_1
537
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
538
+  (0.0ms) SAVEPOINT active_record_1
539
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
540
+ SQL (0.2ms) 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-01-14 15:22:02.963047"]]
541
+  (0.0ms) RELEASE SAVEPOINT active_record_1
542
+  (0.5ms) rollback transaction
543
+  (0.0ms) begin transaction
544
+  (0.0ms) SAVEPOINT active_record_1
545
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
546
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 15:22:02.967111"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 15:22:02.967111"]]
547
+  (0.0ms) RELEASE SAVEPOINT active_record_1
548
+  (0.1ms) SAVEPOINT active_record_1
549
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
550
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 15:22:02.968628"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 15:22:02.968628"]]
551
+  (0.0ms) RELEASE SAVEPOINT active_record_1
552
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
553
+  (0.0ms) SAVEPOINT active_record_1
554
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
555
+ SQL (0.1ms) 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-01-14 15:22:02.970495"]]
556
+  (0.0ms) RELEASE SAVEPOINT active_record_1
557
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
558
+  (0.4ms) rollback transaction
23
559
   (0.1ms) begin transaction
560
+  (0.1ms) SAVEPOINT active_record_1
561
+ Account Exists (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
562
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 15:22:02.974951"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 15:22:02.974951"]]
563
+  (0.1ms) RELEASE SAVEPOINT active_record_1
564
+  (0.1ms) SAVEPOINT active_record_1
565
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
566
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 15:22:02.977734"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 15:22:02.977734"]]
567
+  (0.1ms) RELEASE SAVEPOINT active_record_1
568
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
569
+  (0.1ms) SAVEPOINT active_record_1
570
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
571
+ SQL (0.1ms) 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-01-14 15:22:02.980809"]]
572
+  (0.1ms) RELEASE SAVEPOINT active_record_1
573
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
574
+  (0.4ms) rollback transaction
575
+  (0.1ms) begin transaction
576
+  (0.0ms) SAVEPOINT active_record_1
577
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" IS NULL LIMIT 1
578
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2015-01-14 15:22:02.984562"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2015-01-14 15:22:02.984562"]]
579
+  (0.0ms) RELEASE SAVEPOINT active_record_1
580
+  (0.0ms) SAVEPOINT active_record_1
581
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" IS NULL AND "accounts"."id" != 1) LIMIT 1
582
+ SQL (0.3ms) UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", nil], ["oauth_expires_at", nil], ["oauth_refresh_token", nil], ["updated_at", "2015-01-14 15:22:02.986248"]]
583
+  (0.0ms) RELEASE SAVEPOINT active_record_1
584
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
585
+  (0.5ms) rollback transaction
586
+  (0.3ms) begin transaction
24
587
   (0.1ms) rollback transaction
25
588
   (0.0ms) begin transaction
589
+  (0.1ms) rollback transaction
590
+  (0.1ms) begin transaction
26
591
   (0.0ms) rollback transaction
27
592
   (0.1ms) begin transaction
593
+  (0.1ms) rollback transaction
594
+  (0.1ms) begin transaction
595
+  (0.1ms) rollback transaction
596
+  (0.0ms) begin transaction
597
+  (0.0ms) SAVEPOINT active_record_1
598
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" IS NULL LIMIT 1
599
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2015-01-14 15:22:48.187674"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2015-01-14 15:22:48.187674"]]
600
+  (0.0ms) RELEASE SAVEPOINT active_record_1
601
+  (0.0ms) SAVEPOINT active_record_1
602
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" IS NULL AND "accounts"."id" != 1) LIMIT 1
603
+ SQL (1.3ms) UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", nil], ["oauth_expires_at", nil], ["oauth_refresh_token", nil], ["updated_at", "2015-01-14 15:22:48.190859"]]
604
+  (0.1ms) RELEASE SAVEPOINT active_record_1
605
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
606
+  (0.6ms) rollback transaction
607
+  (0.1ms) begin transaction
608
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
609
+  (0.1ms) SAVEPOINT active_record_1
610
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "uid", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-01-14 15:22:48.200613"], ["uid", 0], ["updated_at", "2015-01-14 15:22:48.200613"]]
611
+  (0.0ms) RELEASE SAVEPOINT active_record_1
612
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
613
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
614
+  (0.5ms) rollback transaction
615
+  (0.1ms) begin transaction
616
+  (0.0ms) SAVEPOINT active_record_1
617
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
618
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 15:22:48.214799"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 15:22:48.214799"]]
619
+  (0.0ms) RELEASE SAVEPOINT active_record_1
620
+  (0.0ms) SAVEPOINT active_record_1
621
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
622
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 15:22:48.216403"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 15:22:48.216403"]]
623
+  (0.0ms) RELEASE SAVEPOINT active_record_1
624
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
625
+  (0.1ms) SAVEPOINT active_record_1
626
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
627
+ SQL (0.1ms) 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-01-14 15:22:48.221444"]]
628
+  (0.0ms) RELEASE SAVEPOINT active_record_1
629
+  (0.6ms) rollback transaction
630
+  (0.1ms) begin transaction
631
+  (0.1ms) SAVEPOINT active_record_1
632
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
633
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 15:22:48.227096"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 15:22:48.227096"]]
634
+  (0.1ms) RELEASE SAVEPOINT active_record_1
635
+  (0.1ms) SAVEPOINT active_record_1
636
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
637
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 15:22:48.230025"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 15:22:48.230025"]]
638
+  (0.1ms) RELEASE SAVEPOINT active_record_1
639
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
640
+  (0.1ms) SAVEPOINT active_record_1
641
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
642
+ SQL (0.1ms) 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-01-14 15:22:48.233145"]]
643
+  (0.0ms) RELEASE SAVEPOINT active_record_1
644
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
645
+  (0.5ms) rollback transaction
646
+  (0.1ms) begin transaction
647
+  (0.1ms) SAVEPOINT active_record_1
648
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
649
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 15:22:48.237054"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 15:22:48.237054"]]
650
+  (0.0ms) RELEASE SAVEPOINT active_record_1
651
+  (0.0ms) SAVEPOINT active_record_1
652
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
653
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 15:22:48.238704"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 15:22:48.238704"]]
654
+  (0.0ms) RELEASE SAVEPOINT active_record_1
655
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
656
+  (0.0ms) SAVEPOINT active_record_1
657
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
658
+ SQL (0.1ms) 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-01-14 15:22:48.240588"]]
659
+  (0.0ms) RELEASE SAVEPOINT active_record_1
660
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
661
+  (0.6ms) rollback transaction
662
+  (0.1ms) begin transaction
663
+  (0.1ms) SAVEPOINT active_record_1
664
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
665
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 15:22:48.245490"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 15:22:48.245490"]]
666
+  (0.1ms) RELEASE SAVEPOINT active_record_1
667
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
668
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
669
+  (0.1ms) SAVEPOINT active_record_1
670
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
671
+ SQL (0.6ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 15:22:48.252175"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 15:22:48.252175"]]
672
+  (0.1ms) RELEASE SAVEPOINT active_record_1
673
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
674
+  (0.5ms) rollback transaction
675
+  (0.0ms) begin transaction
676
+  (0.0ms) SAVEPOINT active_record_1
677
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
678
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 15:22:48.266139"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 15:22:48.266139"]]
679
+  (0.0ms) RELEASE SAVEPOINT active_record_1
680
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
681
+  (0.1ms) SAVEPOINT active_record_1
682
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
683
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 15:22:48.268643"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 15:22:48.268643"]]
684
+  (0.1ms) RELEASE SAVEPOINT active_record_1
685
+  (0.4ms) rollback transaction
686
+  (0.0ms) begin transaction
687
+  (0.0ms) SAVEPOINT active_record_1
688
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
689
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 15:22:48.271864"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 15:22:48.271864"]]
690
+  (0.1ms) RELEASE SAVEPOINT active_record_1
691
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
692
+  (0.0ms) SAVEPOINT active_record_1
693
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
694
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 15:22:48.274111"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 15:22:48.274111"]]
695
+  (0.0ms) RELEASE SAVEPOINT active_record_1
696
+  (0.5ms) rollback transaction
697
+  (0.0ms) begin transaction
698
+  (0.0ms) SAVEPOINT active_record_1
699
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
700
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-01-14 15:22:48.277197"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-01-14 15:22:48.277197"]]
701
+  (0.0ms) RELEASE SAVEPOINT active_record_1
702
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
703
+  (0.0ms) SAVEPOINT active_record_1
704
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
705
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 15:22:48.279188"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 15:22:48.279188"]]
706
+  (0.0ms) RELEASE SAVEPOINT active_record_1
707
+  (0.4ms) rollback transaction
708
+  (0.1ms) begin transaction
28
709
  Processing by AuthenticatedController#index as HTML
29
710
  Rendered text template (0.0ms)
30
711
  Filter chain halted as :authenticate_account! rendered or redirected
31
- Completed 200 OK in 8ms (Views: 7.5ms | ActiveRecord: 0.0ms)
712
+ Completed 200 OK in 5ms (Views: 5.1ms | ActiveRecord: 0.0ms)
32
713
   (0.1ms) rollback transaction
33
714
   (0.1ms) begin transaction
34
715
  Processing by AuthenticatedController#index as HTML
35
716
  Redirected to http://test.host/auth/bookingsync/?account_id=
36
717
  Filter chain halted as :authenticate_account! rendered or redirected
37
- Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
718
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
38
719
   (0.1ms) rollback transaction
39
-  (0.0ms) begin transaction
720
+  (0.1ms) begin transaction
40
721
  Processing by AuthenticatedController#index as JS
41
722
  Filter chain halted as :authenticate_account! rendered or redirected
42
- Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
723
+ Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
43
724
   (0.1ms) rollback transaction
44
725
   (0.1ms) begin transaction
45
726
  Processing by AuthenticatedController#index as JS
46
727
  Filter chain halted as :authenticate_account! rendered or redirected
47
- Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
48
-  (0.1ms) rollback transaction
49
-  (0.0ms) begin transaction
728
+ Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
50
729
   (0.1ms) rollback transaction
51
-  (0.0ms) begin transaction
52
-  (0.0ms) rollback transaction
53
-  (0.0ms) begin transaction
54
-  (0.0ms) rollback transaction
55
-  (0.0ms) begin transaction
730
+  (0.1ms) begin transaction
731
+ Processing by SessionsController#failure as HTML
732
+ Completed 200 OK in 3ms (Views: 2.7ms | ActiveRecord: 0.0ms)
56
733
   (0.1ms) rollback transaction
57
734
   (0.1ms) begin transaction
735
+ Processing by SessionsController#failure as HTML
736
+ Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms)
58
737
   (0.1ms) rollback transaction
59
738
   (0.0ms) begin transaction
60
739
  Processing by SessionsController#create as HTML
61
740
  Parameters: {"provider"=>"bookingsync"}
62
741
  Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
63
- SQLite3::SQLException: no such table: accounts: SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
64
- Completed 500 Internal Server Error in 5ms
65
-  (0.1ms) rollback transaction
742
+  (0.0ms) SAVEPOINT active_record_1
743
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
744
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 15:22:48.317817"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 15:22:48.317817"]]
745
+  (0.0ms) RELEASE SAVEPOINT active_record_1
746
+ Redirected to http://test.host/admin
747
+ Completed 302 Found in 3ms (ActiveRecord: 0.6ms)
748
+  (0.6ms) rollback transaction
66
749
   (0.1ms) begin transaction
67
750
  Processing by SessionsController#create as HTML
68
751
  Parameters: {"provider"=>"bookingsync"}
69
752
  Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
70
- SQLite3::SQLException: no such table: accounts: SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
71
- Completed 500 Internal Server Error in 1ms
72
-  (0.1ms) rollback transaction
753
+  (0.0ms) SAVEPOINT active_record_1
754
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
755
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 15:22:48.324046"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 15:22:48.324046"]]
756
+  (0.0ms) RELEASE SAVEPOINT active_record_1
757
+ Redirected to http://test.host/
758
+ Completed 302 Found in 3ms (ActiveRecord: 0.6ms)
759
+  (0.5ms) rollback transaction
73
760
   (0.1ms) begin transaction
74
761
  Processing by SessionsController#create as HTML
75
762
  Parameters: {"provider"=>"bookingsync"}
76
763
  Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
77
- SQLite3::SQLException: no such table: accounts: SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
78
- Completed 500 Internal Server Error in 1ms
764
+  (0.1ms) SAVEPOINT active_record_1
765
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
766
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-01-14 15:22:48.329955"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-01-14 15:22:48.329955"]]
767
+  (0.0ms) RELEASE SAVEPOINT active_record_1
768
+ Redirected to http://test.host/
769
+ Completed 302 Found in 3ms (ActiveRecord: 0.6ms)
770
+  (0.4ms) rollback transaction
771
+  (0.0ms) begin transaction
772
+ Processing by SessionsController#destroy as HTML
773
+ Redirected to http://test.host/
774
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
775
+  (0.1ms) rollback transaction
776
+  (0.1ms) begin transaction
777
+ Processing by SessionsController#destroy as HTML
778
+ Redirected to http://test.host/signed_out
779
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
780
+  (0.0ms) rollback transaction
781
+  (0.5ms) begin transaction
782
+ Processing by AuthenticatedController#index as HTML
783
+ Rendered text template (0.1ms)
784
+ Filter chain halted as :authenticate_account! rendered or redirected
785
+ Completed 200 OK in 16ms (Views: 14.8ms | ActiveRecord: 0.0ms)
786
+  (0.2ms) rollback transaction
787
+  (0.1ms) begin transaction
788
+ Processing by AuthenticatedController#index as HTML
789
+ Redirected to http://test.host/auth/bookingsync/?account_id=
790
+ Filter chain halted as :authenticate_account! rendered or redirected
791
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
792
+  (0.1ms) rollback transaction
793
+  (0.2ms) begin transaction
794
+ Processing by AuthenticatedController#index as JS
795
+ Filter chain halted as :authenticate_account! rendered or redirected
796
+ Completed 401 Unauthorized in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
797
+  (0.1ms) rollback transaction
798
+  (0.1ms) begin transaction
799
+ Processing by AuthenticatedController#index as JS
800
+ Filter chain halted as :authenticate_account! rendered or redirected
801
+ Completed 401 Unauthorized in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
802
+  (0.1ms) rollback transaction
803
+  (0.1ms) begin transaction
804
+ Processing by SessionsController#create as HTML
805
+ Parameters: {"provider"=>"bookingsync"}
806
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
807
+  (0.1ms) SAVEPOINT active_record_1
808
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
809
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:52:26.652332"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:52:26.652332"]]
810
+  (0.1ms) RELEASE SAVEPOINT active_record_1
811
+ Redirected to http://test.host/
812
+ Completed 302 Found in 51ms (ActiveRecord: 2.9ms)
813
+  (0.9ms) rollback transaction
814
+  (0.1ms) begin transaction
815
+ Processing by SessionsController#create as HTML
816
+ Parameters: {"provider"=>"bookingsync"}
817
+ Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
818
+  (0.1ms) SAVEPOINT active_record_1
819
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
820
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:52:26.664726"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:52:26.664726"]]
821
+  (0.1ms) RELEASE SAVEPOINT active_record_1
822
+ Redirected to http://test.host/
823
+ Completed 302 Found in 7ms (ActiveRecord: 1.1ms)
824
+  (0.6ms) rollback transaction
825
+  (0.2ms) begin transaction
826
+ Processing by SessionsController#create as HTML
827
+ Parameters: {"provider"=>"bookingsync"}
828
+ Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
829
+  (0.1ms) SAVEPOINT active_record_1
830
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
831
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:52:26.676363"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:52:26.676363"]]
832
+  (0.1ms) RELEASE SAVEPOINT active_record_1
833
+ Redirected to http://test.host/admin
834
+ Completed 302 Found in 6ms (ActiveRecord: 1.0ms)
835
+  (0.6ms) rollback transaction
836
+  (0.1ms) begin transaction
837
+ Processing by SessionsController#destroy as HTML
838
+ Redirected to http://test.host/
839
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
840
+  (0.1ms) rollback transaction
841
+  (0.1ms) begin transaction
842
+ Processing by SessionsController#destroy as HTML
843
+ Redirected to http://test.host/signed_out
844
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
845
+  (0.1ms) rollback transaction
846
+  (0.1ms) begin transaction
847
+ Processing by SessionsController#failure as HTML
848
+ Completed 200 OK in 6ms (Views: 5.3ms | ActiveRecord: 0.0ms)
849
+  (0.1ms) rollback transaction
850
+  (0.1ms) begin transaction
851
+ Processing by SessionsController#failure as HTML
852
+ Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.0ms)
853
+  (0.1ms) rollback transaction
854
+  (0.1ms) begin transaction
855
+  (0.1ms) SAVEPOINT active_record_1
856
+ Account Exists (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
857
+ SQL (0.6ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:52:26.709846"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:52:26.709846"]]
858
+  (0.1ms) RELEASE SAVEPOINT active_record_1
859
+  (0.1ms) SAVEPOINT active_record_1
860
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
861
+ SQL (1.5ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:52:26.713804"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:52:26.713804"]]
862
+  (0.1ms) RELEASE SAVEPOINT active_record_1
863
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
864
+  (0.1ms) SAVEPOINT active_record_1
865
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
866
+ SQL (0.2ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-17 11:52:26.721121"]]
867
+  (0.1ms) RELEASE SAVEPOINT active_record_1
868
+  (0.6ms) rollback transaction
869
+  (0.1ms) begin transaction
870
+  (0.1ms) SAVEPOINT active_record_1
871
+ Account Exists (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
872
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:52:26.728406"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:52:26.728406"]]
873
+  (0.1ms) RELEASE SAVEPOINT active_record_1
874
+  (0.1ms) SAVEPOINT active_record_1
875
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
876
+ SQL (0.6ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:52:26.732311"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:52:26.732311"]]
877
+  (0.1ms) RELEASE SAVEPOINT active_record_1
878
+ Account Load (0.4ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
879
+  (0.1ms) SAVEPOINT active_record_1
880
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
881
+ SQL (0.1ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-17 11:52:26.737292"]]
882
+  (0.1ms) RELEASE SAVEPOINT active_record_1
883
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
884
+  (0.7ms) rollback transaction
885
+  (0.1ms) begin transaction
886
+  (0.1ms) SAVEPOINT active_record_1
887
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
888
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:52:26.743490"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:52:26.743490"]]
889
+  (0.1ms) RELEASE SAVEPOINT active_record_1
890
+  (0.1ms) SAVEPOINT active_record_1
891
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
892
+ SQL (0.7ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:52:26.747240"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:52:26.747240"]]
893
+  (0.1ms) RELEASE SAVEPOINT active_record_1
894
+ Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
895
+  (0.1ms) SAVEPOINT active_record_1
896
+ Account Exists (0.3ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
897
+ SQL (0.2ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-17 11:52:26.753392"]]
898
+  (0.1ms) RELEASE SAVEPOINT active_record_1
899
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
900
+  (0.7ms) rollback transaction
901
+  (0.1ms) begin transaction
902
+  (0.1ms) SAVEPOINT active_record_1
903
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
904
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:52:26.759537"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:52:26.759537"]]
905
+  (0.1ms) RELEASE SAVEPOINT active_record_1
906
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
907
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
908
+  (0.1ms) SAVEPOINT active_record_1
909
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
910
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:52:26.769026"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:52:26.769026"]]
911
+  (0.1ms) RELEASE SAVEPOINT active_record_1
912
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
913
+  (0.6ms) rollback transaction
914
+  (0.1ms) begin transaction
915
+  (0.1ms) SAVEPOINT active_record_1
916
+ Account Exists (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
917
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:52:26.775027"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:52:26.775027"]]
918
+  (0.1ms) RELEASE SAVEPOINT active_record_1
919
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
920
+  (0.1ms) SAVEPOINT active_record_1
921
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
922
+ SQL (0.6ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:52:26.779616"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:52:26.779616"]]
923
+  (0.1ms) RELEASE SAVEPOINT active_record_1
924
+  (0.5ms) rollback transaction
925
+  (0.1ms) begin transaction
926
+  (0.1ms) SAVEPOINT active_record_1
927
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
928
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:52:26.785771"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:52:26.785771"]]
929
+  (0.1ms) RELEASE SAVEPOINT active_record_1
930
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
931
+  (0.1ms) SAVEPOINT active_record_1
932
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
933
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:52:26.790236"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:52:26.790236"]]
934
+  (0.1ms) RELEASE SAVEPOINT active_record_1
935
+  (1.1ms) rollback transaction
936
+  (0.1ms) begin transaction
937
+  (0.1ms) SAVEPOINT active_record_1
938
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
939
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:52:26.798754"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:52:26.798754"]]
940
+  (0.1ms) RELEASE SAVEPOINT active_record_1
941
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
942
+  (0.1ms) SAVEPOINT active_record_1
943
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
944
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:52:26.802004"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:52:26.802004"]]
945
+  (0.1ms) RELEASE SAVEPOINT active_record_1
946
+  (0.6ms) rollback transaction
947
+  (0.1ms) begin transaction
948
+  (0.1ms) rollback transaction
949
+  (0.1ms) begin transaction
950
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
951
+  (0.1ms) SAVEPOINT active_record_1
952
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "uid", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-02-17 11:52:26.823940"], ["uid", 0], ["updated_at", "2015-02-17 11:52:26.823940"]]
953
+  (0.1ms) RELEASE SAVEPOINT active_record_1
954
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
955
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
956
+  (0.6ms) rollback transaction
957
+  (0.1ms) begin transaction
958
+  (0.1ms) SAVEPOINT active_record_1
959
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
960
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:52:26.847475"], ["oauth_access_token", "token"], ["oauth_expires_at", 1424260346], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-17 11:52:26.847475"]]
961
+  (0.1ms) RELEASE SAVEPOINT active_record_1
962
+  (0.5ms) rollback transaction
963
+  (0.1ms) begin transaction
964
+  (0.1ms) SAVEPOINT active_record_1
965
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
966
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:52:26.855020"], ["oauth_access_token", "token"], ["oauth_expires_at", "1424087546"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-17 11:52:26.855020"]]
967
+  (0.1ms) RELEASE SAVEPOINT active_record_1
968
+  (0.1ms) SAVEPOINT active_record_1
969
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
970
+ SQL (0.4ms) 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", "1424346746"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-17 11:52:26.857682"]]
971
+  (0.1ms) RELEASE SAVEPOINT active_record_1
972
+  (0.5ms) rollback transaction
973
+  (0.1ms) begin transaction
974
+  (0.1ms) SAVEPOINT active_record_1
975
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
976
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:52:26.862942"], ["oauth_access_token", "token"], ["oauth_expires_at", "1424087546"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-17 11:52:26.862942"]]
977
+  (0.1ms) RELEASE SAVEPOINT active_record_1
978
+  (0.1ms) SAVEPOINT active_record_1
979
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
980
+ SQL (0.5ms) 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", "1424346746"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-17 11:52:26.868269"]]
981
+  (0.1ms) RELEASE SAVEPOINT active_record_1
982
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
983
+  (0.6ms) rollback transaction
984
+  (0.1ms) begin transaction
985
+  (0.1ms) SAVEPOINT active_record_1
986
+ Account Exists (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" IS NULL LIMIT 1
987
+ SQL (0.7ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:52:26.875550"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2015-02-17 11:52:26.875550"]]
988
+  (0.1ms) RELEASE SAVEPOINT active_record_1
989
+  (0.1ms) SAVEPOINT active_record_1
990
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" IS NULL AND "accounts"."id" != 1) LIMIT 1
991
+ SQL (0.4ms) UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", nil], ["oauth_expires_at", nil], ["oauth_refresh_token", nil], ["updated_at", "2015-02-17 11:52:26.879050"]]
992
+  (0.1ms) RELEASE SAVEPOINT active_record_1
993
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
994
+  (0.9ms) rollback transaction
995
+  (0.1ms) begin transaction
996
+  (0.1ms) rollback transaction
997
+  (0.1ms) begin transaction
998
+  (0.1ms) rollback transaction
999
+  (0.1ms) begin transaction
1000
+  (0.1ms) rollback transaction
1001
+  (0.1ms) begin transaction
1002
+  (0.2ms) rollback transaction
1003
+  (0.1ms) begin transaction
1004
+  (0.1ms) rollback transaction
1005
+  (4.5ms) begin transaction
1006
+  (0.2ms) rollback transaction
1007
+  (0.1ms) begin transaction
1008
+  (0.1ms) rollback transaction
1009
+  (0.1ms) begin transaction
1010
+  (0.1ms) rollback transaction
1011
+  (0.1ms) begin transaction
1012
+  (0.1ms) rollback transaction
1013
+  (0.1ms) begin transaction
1014
+  (0.1ms) rollback transaction
1015
+  (0.1ms) begin transaction
1016
+ Processing by SessionsController#destroy as HTML
1017
+ Redirected to http://test.host/signed_out
1018
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
1019
+  (0.1ms) rollback transaction
1020
+  (0.1ms) begin transaction
1021
+ Processing by SessionsController#destroy as HTML
1022
+ Redirected to http://test.host/
1023
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
1024
+  (0.1ms) rollback transaction
1025
+  (0.1ms) begin transaction
1026
+ Processing by SessionsController#failure as HTML
1027
+ Completed 200 OK in 11ms (Views: 10.9ms | ActiveRecord: 0.0ms)
1028
+  (0.1ms) rollback transaction
1029
+  (0.1ms) begin transaction
1030
+ Processing by SessionsController#failure as HTML
1031
+ Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)
1032
+  (0.1ms) rollback transaction
1033
+  (0.1ms) begin transaction
1034
+ Processing by SessionsController#create as HTML
1035
+ Parameters: {"provider"=>"bookingsync"}
1036
+ Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1037
+  (0.1ms) SAVEPOINT active_record_1
1038
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1039
+ SQL (0.8ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:54:10.030066"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:54:10.030066"]]
1040
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1041
+ Redirected to http://test.host/
1042
+ Completed 302 Found in 63ms (ActiveRecord: 4.1ms)
1043
+  (0.6ms) rollback transaction
1044
+  (0.1ms) begin transaction
1045
+ Processing by SessionsController#create as HTML
1046
+ Parameters: {"provider"=>"bookingsync"}
1047
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1048
+  (0.1ms) SAVEPOINT active_record_1
1049
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1050
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:54:10.043176"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:54:10.043176"]]
1051
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1052
+ Redirected to http://test.host/admin
1053
+ Completed 302 Found in 5ms (ActiveRecord: 1.0ms)
1054
+  (0.5ms) rollback transaction
1055
+  (0.1ms) begin transaction
1056
+ Processing by SessionsController#create as HTML
1057
+ Parameters: {"provider"=>"bookingsync"}
1058
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1059
+  (0.1ms) SAVEPOINT active_record_1
1060
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1061
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:54:10.052677"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:54:10.052677"]]
1062
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1063
+ Redirected to http://test.host/
1064
+ Completed 302 Found in 6ms (ActiveRecord: 1.1ms)
1065
+  (0.7ms) rollback transaction
1066
+  (0.1ms) begin transaction
1067
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
1068
+  (0.1ms) SAVEPOINT active_record_1
1069
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "uid", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-02-17 11:54:10.063340"], ["uid", 0], ["updated_at", "2015-02-17 11:54:10.063340"]]
1070
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1071
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
1072
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
1073
+  (0.5ms) rollback transaction
1074
+  (0.1ms) begin transaction
1075
+  (0.2ms) SAVEPOINT active_record_1
1076
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" IS NULL LIMIT 1
1077
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:54:10.085653"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2015-02-17 11:54:10.085653"]]
1078
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1079
+  (0.2ms) SAVEPOINT active_record_1
1080
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" IS NULL AND "accounts"."id" != 1) LIMIT 1
1081
+ SQL (1.6ms) UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", nil], ["oauth_expires_at", nil], ["oauth_refresh_token", nil], ["updated_at", "2015-02-17 11:54:10.090317"]]
1082
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1083
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
1084
+  (0.6ms) rollback transaction
1085
+  (0.1ms) begin transaction
1086
+  (0.1ms) SAVEPOINT active_record_1
1087
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1088
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:54:10.099813"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:54:10.099813"]]
1089
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1090
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
1091
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1092
+  (0.1ms) SAVEPOINT active_record_1
1093
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1094
+ SQL (0.6ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:54:10.109377"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:54:10.109377"]]
1095
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1096
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
1097
+  (0.6ms) rollback transaction
1098
+  (0.1ms) begin transaction
1099
+  (0.1ms) SAVEPOINT active_record_1
1100
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1101
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:54:10.115534"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:54:10.115534"]]
1102
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1103
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1104
+  (0.1ms) SAVEPOINT active_record_1
1105
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1106
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:54:10.119698"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:54:10.119698"]]
1107
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1108
+  (0.6ms) rollback transaction
1109
+  (0.1ms) begin transaction
1110
+  (0.1ms) SAVEPOINT active_record_1
1111
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1112
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:54:10.126712"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:54:10.126712"]]
1113
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1114
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1115
+  (0.1ms) SAVEPOINT active_record_1
1116
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1117
+ SQL (0.6ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:54:10.131176"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:54:10.131176"]]
1118
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1119
+  (0.5ms) rollback transaction
1120
+  (0.1ms) begin transaction
1121
+  (0.1ms) SAVEPOINT active_record_1
1122
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1123
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:54:10.136707"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:54:10.136707"]]
1124
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1125
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1126
+  (0.1ms) SAVEPOINT active_record_1
1127
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1128
+ SQL (0.6ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:54:10.140913"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:54:10.140913"]]
1129
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1130
+  (0.5ms) rollback transaction
1131
+  (0.1ms) begin transaction
1132
+  (0.1ms) SAVEPOINT active_record_1
1133
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1134
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:54:10.147170"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:54:10.147170"]]
1135
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1136
+  (0.1ms) SAVEPOINT active_record_1
1137
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1138
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:54:10.150456"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:54:10.150456"]]
1139
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1140
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1141
+  (0.1ms) SAVEPOINT active_record_1
1142
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
1143
+ SQL (0.2ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-17 11:54:10.154811"]]
1144
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1145
+  (0.6ms) rollback transaction
1146
+  (0.1ms) begin transaction
1147
+  (0.1ms) SAVEPOINT active_record_1
1148
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1149
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:54:10.160303"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:54:10.160303"]]
1150
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1151
+  (0.1ms) SAVEPOINT active_record_1
1152
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1153
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:54:10.163513"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:54:10.163513"]]
1154
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1155
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1156
+  (0.1ms) SAVEPOINT active_record_1
1157
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
1158
+ SQL (0.2ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-17 11:54:10.167885"]]
1159
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1160
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
1161
+  (0.6ms) rollback transaction
1162
+  (0.1ms) begin transaction
1163
+  (0.1ms) SAVEPOINT active_record_1
1164
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1165
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:54:10.173237"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:54:10.173237"]]
1166
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1167
+  (0.1ms) SAVEPOINT active_record_1
1168
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1169
+ SQL (0.6ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:54:10.176459"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:54:10.176459"]]
1170
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1171
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1172
+  (0.1ms) SAVEPOINT active_record_1
1173
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
1174
+ SQL (0.1ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-17 11:54:10.180831"]]
1175
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1176
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
1177
+  (0.6ms) rollback transaction
1178
+  (0.1ms) begin transaction
1179
+  (0.1ms) SAVEPOINT active_record_1
1180
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1181
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:54:10.187568"], ["oauth_access_token", "token"], ["oauth_expires_at", "1424087650"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-17 11:54:10.187568"]]
1182
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1183
+  (0.1ms) SAVEPOINT active_record_1
1184
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
1185
+ SQL (0.4ms) 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", "1424346850"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-17 11:54:10.191641"]]
1186
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1187
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
1188
+  (0.5ms) rollback transaction
1189
+  (0.1ms) begin transaction
1190
+  (0.1ms) SAVEPOINT active_record_1
1191
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1192
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:54:10.198258"], ["oauth_access_token", "token"], ["oauth_expires_at", "1424087650"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-17 11:54:10.198258"]]
1193
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1194
+  (0.1ms) SAVEPOINT active_record_1
1195
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
1196
+ SQL (0.3ms) 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", "1424346850"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-17 11:54:10.201621"]]
1197
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1198
+  (0.5ms) rollback transaction
1199
+  (0.1ms) begin transaction
1200
+  (0.1ms) SAVEPOINT active_record_1
1201
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1202
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:54:10.206427"], ["oauth_access_token", "token"], ["oauth_expires_at", 1424260450], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-17 11:54:10.206427"]]
1203
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1204
+  (0.5ms) rollback transaction
1205
+  (0.1ms) begin transaction
1206
+  (0.2ms) rollback transaction
1207
+  (0.1ms) begin transaction
1208
+ Processing by AuthenticatedController#index as JS
1209
+ Filter chain halted as :authenticate_account! rendered or redirected
1210
+ Completed 401 Unauthorized in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms)
1211
+  (0.1ms) rollback transaction
1212
+  (0.1ms) begin transaction
1213
+ Processing by AuthenticatedController#index as JS
1214
+ Filter chain halted as :authenticate_account! rendered or redirected
1215
+ Completed 401 Unauthorized in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
1216
+  (0.1ms) rollback transaction
1217
+  (0.1ms) begin transaction
1218
+ Processing by AuthenticatedController#index as HTML
1219
+ Redirected to http://test.host/auth/bookingsync/?account_id=
1220
+ Filter chain halted as :authenticate_account! rendered or redirected
1221
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
1222
+  (0.1ms) rollback transaction
1223
+  (0.2ms) begin transaction
1224
+ Processing by AuthenticatedController#index as HTML
1225
+ Filter chain halted as :authenticate_account! rendered or redirected
1226
+ Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
1227
+  (0.1ms) rollback transaction
1228
+  (0.4ms) begin transaction
1229
+ Processing by SessionsController#destroy as HTML
1230
+ Redirected to http://test.host/signed_out
1231
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
1232
+  (0.2ms) rollback transaction
1233
+  (0.1ms) begin transaction
1234
+ Processing by SessionsController#destroy as HTML
1235
+ Redirected to http://test.host/
1236
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
1237
+  (0.1ms) rollback transaction
1238
+  (0.1ms) begin transaction
1239
+ Processing by SessionsController#create as HTML
1240
+ Parameters: {"provider"=>"bookingsync"}
1241
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1242
+  (0.1ms) SAVEPOINT active_record_1
1243
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1244
+ SQL (0.7ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:55:16.019788"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:55:16.019788"]]
1245
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1246
+ Redirected to http://test.host/
1247
+ Completed 302 Found in 48ms (ActiveRecord: 3.9ms)
1248
+  (0.6ms) rollback transaction
1249
+  (0.1ms) begin transaction
1250
+ Processing by SessionsController#create as HTML
1251
+ Parameters: {"provider"=>"bookingsync"}
1252
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1253
+  (0.1ms) SAVEPOINT active_record_1
1254
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1255
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:55:16.030759"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:55:16.030759"]]
1256
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1257
+ Redirected to http://test.host/
1258
+ Completed 302 Found in 6ms (ActiveRecord: 1.1ms)
1259
+  (0.5ms) rollback transaction
1260
+  (0.1ms) begin transaction
1261
+ Processing by SessionsController#create as HTML
1262
+ Parameters: {"provider"=>"bookingsync"}
1263
+ Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1264
+  (0.1ms) SAVEPOINT active_record_1
1265
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1266
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:55:16.042689"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:55:16.042689"]]
1267
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1268
+ Redirected to http://test.host/admin
1269
+ Completed 302 Found in 6ms (ActiveRecord: 1.0ms)
1270
+  (0.6ms) rollback transaction
1271
+  (0.1ms) begin transaction
1272
+ Processing by SessionsController#failure as HTML
1273
+ Completed 200 OK in 14ms (Views: 13.2ms | ActiveRecord: 0.0ms)
1274
+  (0.2ms) rollback transaction
1275
+  (0.1ms) begin transaction
1276
+ Processing by SessionsController#failure as HTML
1277
+ Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)
1278
+  (0.1ms) rollback transaction
1279
+  (0.1ms) begin transaction
1280
+  (0.1ms) rollback transaction
1281
+  (0.1ms) begin transaction
1282
+  (0.1ms) rollback transaction
1283
+  (0.1ms) begin transaction
1284
+  (0.1ms) rollback transaction
1285
+  (0.1ms) begin transaction
1286
+  (0.1ms) rollback transaction
1287
+  (0.1ms) begin transaction
1288
+  (0.1ms) rollback transaction
1289
+  (0.1ms) begin transaction
1290
+ Processing by AuthenticatedController#index as JS
1291
+ Filter chain halted as :authenticate_account! rendered or redirected
1292
+ Completed 401 Unauthorized in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)
1293
+  (0.1ms) rollback transaction
1294
+  (0.1ms) begin transaction
1295
+ Processing by AuthenticatedController#index as JS
1296
+ Filter chain halted as :authenticate_account! rendered or redirected
1297
+ Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
1298
+  (0.1ms) rollback transaction
1299
+  (0.1ms) begin transaction
1300
+ Processing by AuthenticatedController#index as HTML
1301
+ Redirected to http://test.host/auth/bookingsync/?account_id=
1302
+ Filter chain halted as :authenticate_account! rendered or redirected
1303
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
1304
+  (0.1ms) rollback transaction
1305
+  (0.1ms) begin transaction
1306
+ Processing by AuthenticatedController#index as HTML
1307
+ Filter chain halted as :authenticate_account! rendered or redirected
1308
+ Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
1309
+  (0.1ms) rollback transaction
1310
+  (0.1ms) begin transaction
1311
+  (0.1ms) SAVEPOINT active_record_1
1312
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1313
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:55:16.111190"], ["oauth_access_token", "token"], ["oauth_expires_at", "1424087716"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-17 11:55:16.111190"]]
1314
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1315
+  (0.1ms) SAVEPOINT active_record_1
1316
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
1317
+ SQL (1.3ms) 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", "1424346916"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-17 11:55:16.115297"]]
1318
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1319
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
1320
+  (0.7ms) rollback transaction
1321
+  (0.1ms) begin transaction
1322
+  (0.2ms) SAVEPOINT active_record_1
1323
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1324
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:55:16.124459"], ["oauth_access_token", "token"], ["oauth_expires_at", "1424087716"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-17 11:55:16.124459"]]
1325
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1326
+  (0.1ms) SAVEPOINT active_record_1
1327
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
1328
+ SQL (0.3ms) 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", "1424346916"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-17 11:55:16.126926"]]
1329
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1330
+  (0.5ms) rollback transaction
1331
+  (0.1ms) begin transaction
1332
+  (0.1ms) SAVEPOINT active_record_1
1333
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1334
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:55:16.131704"], ["oauth_access_token", "token"], ["oauth_expires_at", 1424260516], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-17 11:55:16.131704"]]
1335
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1336
+  (0.5ms) rollback transaction
1337
+  (0.1ms) begin transaction
1338
+  (0.1ms) SAVEPOINT active_record_1
1339
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" IS NULL LIMIT 1
1340
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:55:16.138347"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2015-02-17 11:55:16.138347"]]
1341
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1342
+  (0.1ms) SAVEPOINT active_record_1
1343
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" IS NULL AND "accounts"."id" != 1) LIMIT 1
1344
+ SQL (0.4ms) UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", nil], ["oauth_expires_at", nil], ["oauth_refresh_token", nil], ["updated_at", "2015-02-17 11:55:16.141104"]]
1345
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1346
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
1347
+  (0.7ms) rollback transaction
1348
+  (0.1ms) begin transaction
1349
+  (0.0ms) SAVEPOINT active_record_1
1350
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1351
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:55:16.146742"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:55:16.146742"]]
1352
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1353
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
1354
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1355
+  (0.1ms) SAVEPOINT active_record_1
1356
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1357
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:55:16.154571"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:55:16.154571"]]
1358
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1359
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
1360
+  (0.6ms) rollback transaction
1361
+  (0.1ms) begin transaction
1362
+  (0.1ms) SAVEPOINT active_record_1
1363
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1364
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:55:16.159459"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:55:16.159459"]]
1365
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1366
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1367
+  (0.1ms) SAVEPOINT active_record_1
1368
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1369
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:55:16.162675"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:55:16.162675"]]
1370
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1371
+  (0.5ms) rollback transaction
1372
+  (0.2ms) begin transaction
1373
+  (0.1ms) SAVEPOINT active_record_1
1374
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1375
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:55:16.168856"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:55:16.168856"]]
1376
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1377
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1378
+  (0.1ms) SAVEPOINT active_record_1
1379
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1380
+ SQL (0.6ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:55:16.173068"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:55:16.173068"]]
1381
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1382
+  (0.7ms) rollback transaction
1383
+  (0.1ms) begin transaction
1384
+  (0.1ms) SAVEPOINT active_record_1
1385
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1386
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:55:16.178827"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:55:16.178827"]]
1387
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1388
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1389
+  (0.1ms) SAVEPOINT active_record_1
1390
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1391
+ SQL (0.6ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:55:16.182793"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:55:16.182793"]]
1392
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1393
+  (0.6ms) rollback transaction
1394
+  (0.1ms) begin transaction
1395
+  (0.1ms) SAVEPOINT active_record_1
1396
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1397
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:55:16.187921"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:55:16.187921"]]
1398
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1399
+  (0.2ms) SAVEPOINT active_record_1
1400
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1401
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:55:16.191482"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:55:16.191482"]]
1402
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1403
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1404
+  (0.1ms) SAVEPOINT active_record_1
1405
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
1406
+ SQL (0.2ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-17 11:55:16.195563"]]
1407
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1408
+  (0.6ms) rollback transaction
1409
+  (0.1ms) begin transaction
1410
+  (0.1ms) SAVEPOINT active_record_1
1411
+ Account Exists (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1412
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:55:16.201362"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:55:16.201362"]]
1413
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1414
+  (0.1ms) SAVEPOINT active_record_1
1415
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1416
+ SQL (0.6ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:55:16.204651"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:55:16.204651"]]
1417
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1418
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1419
+  (0.2ms) SAVEPOINT active_record_1
1420
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
1421
+ SQL (0.1ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-17 11:55:16.209963"]]
1422
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1423
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
1424
+  (0.6ms) rollback transaction
1425
+  (0.1ms) begin transaction
1426
+  (0.1ms) SAVEPOINT active_record_1
1427
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1428
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:55:16.214826"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:55:16.214826"]]
1429
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1430
+  (0.1ms) SAVEPOINT active_record_1
1431
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1432
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:55:16.217196"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:55:16.217196"]]
1433
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1434
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1435
+  (0.0ms) SAVEPOINT active_record_1
1436
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
1437
+ SQL (0.1ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-17 11:55:16.220079"]]
1438
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1439
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
1440
+  (0.8ms) rollback transaction
1441
+  (0.1ms) begin transaction
1442
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
1443
+  (0.1ms) SAVEPOINT active_record_1
1444
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "uid", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-02-17 11:55:16.230650"], ["uid", 0], ["updated_at", "2015-02-17 11:55:16.230650"]]
1445
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1446
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
1447
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
1448
+  (0.5ms) rollback transaction
1449
+  (0.1ms) begin transaction
1450
+  (0.1ms) rollback transaction
1451
+  (0.6ms) begin transaction
1452
+  (0.1ms) rollback transaction
1453
+  (0.1ms) begin transaction
1454
+  (0.1ms) rollback transaction
1455
+  (0.1ms) begin transaction
1456
+  (0.1ms) rollback transaction
1457
+  (0.1ms) begin transaction
1458
+  (0.1ms) rollback transaction
1459
+  (0.1ms) begin transaction
1460
+  (0.1ms) rollback transaction
1461
+  (0.1ms) begin transaction
1462
+ Processing by AuthenticatedController#index as JS
1463
+ Rendered text template (0.0ms)
1464
+ Filter chain halted as :authenticate_account! rendered or redirected
1465
+ Completed 401 Unauthorized in 11ms (Views: 10.2ms | ActiveRecord: 0.0ms)
1466
+  (0.1ms) rollback transaction
1467
+  (0.1ms) begin transaction
1468
+ Processing by AuthenticatedController#index as JS
1469
+ Filter chain halted as :authenticate_account! rendered or redirected
1470
+ Completed 401 Unauthorized in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
1471
+  (0.1ms) rollback transaction
1472
+  (0.1ms) begin transaction
1473
+ Processing by AuthenticatedController#index as HTML
1474
+ Redirected to http://test.host/auth/bookingsync/?account_id=
1475
+ Filter chain halted as :authenticate_account! rendered or redirected
1476
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
1477
+  (0.1ms) rollback transaction
1478
+  (0.1ms) begin transaction
1479
+ Processing by AuthenticatedController#index as HTML
1480
+ Filter chain halted as :authenticate_account! rendered or redirected
1481
+ Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
1482
+  (0.1ms) rollback transaction
1483
+  (0.1ms) begin transaction
1484
+ Processing by SessionsController#create as HTML
1485
+ Parameters: {"provider"=>"bookingsync"}
1486
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1487
+  (0.1ms) SAVEPOINT active_record_1
1488
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1489
+ SQL (1.0ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:57:14.546252"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:57:14.546252"]]
1490
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1491
+ Redirected to http://test.host/
1492
+ Completed 302 Found in 92ms (ActiveRecord: 3.1ms)
1493
+  (0.6ms) rollback transaction
1494
+  (0.1ms) begin transaction
1495
+ Processing by SessionsController#create as HTML
1496
+ Parameters: {"provider"=>"bookingsync"}
1497
+ Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1498
+  (0.1ms) SAVEPOINT active_record_1
1499
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1500
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:57:14.558554"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:57:14.558554"]]
1501
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1502
+ Redirected to http://test.host/
1503
+ Completed 302 Found in 6ms (ActiveRecord: 1.1ms)
1504
+  (0.6ms) rollback transaction
1505
+  (0.1ms) begin transaction
1506
+ Processing by SessionsController#create as HTML
1507
+ Parameters: {"provider"=>"bookingsync"}
1508
+ Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1509
+  (0.1ms) SAVEPOINT active_record_1
1510
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1511
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:57:14.568675"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:57:14.568675"]]
1512
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1513
+ Redirected to http://test.host/admin
1514
+ Completed 302 Found in 4ms (ActiveRecord: 0.9ms)
1515
+  (0.5ms) rollback transaction
1516
+  (0.1ms) begin transaction
1517
+ Processing by SessionsController#destroy as HTML
1518
+ Redirected to http://test.host/signed_out
1519
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
1520
+  (0.1ms) rollback transaction
1521
+  (0.1ms) begin transaction
1522
+ Processing by SessionsController#destroy as HTML
1523
+ Redirected to http://test.host/
1524
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
1525
+  (0.2ms) rollback transaction
1526
+  (0.1ms) begin transaction
1527
+ Processing by SessionsController#failure as HTML
1528
+ Completed 200 OK in 5ms (Views: 5.1ms | ActiveRecord: 0.0ms)
1529
+  (0.1ms) rollback transaction
1530
+  (0.1ms) begin transaction
1531
+ Processing by SessionsController#failure as HTML
1532
+ Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms)
1533
+  (0.1ms) rollback transaction
1534
+  (0.1ms) begin transaction
1535
+  (0.1ms) rollback transaction
1536
+  (0.1ms) begin transaction
1537
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
1538
+  (0.1ms) SAVEPOINT active_record_1
1539
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "uid", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-02-17 11:57:14.619311"], ["uid", 0], ["updated_at", "2015-02-17 11:57:14.619311"]]
1540
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1541
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
1542
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
1543
+  (0.7ms) rollback transaction
1544
+  (0.2ms) begin transaction
1545
+  (0.1ms) SAVEPOINT active_record_1
1546
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" IS NULL LIMIT 1
1547
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:57:14.648354"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2015-02-17 11:57:14.648354"]]
1548
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1549
+  (0.1ms) SAVEPOINT active_record_1
1550
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" IS NULL AND "accounts"."id" != 1) LIMIT 1
1551
+ SQL (1.2ms) UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", nil], ["oauth_expires_at", nil], ["oauth_refresh_token", nil], ["updated_at", "2015-02-17 11:57:14.651802"]]
1552
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1553
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
1554
+  (0.7ms) rollback transaction
1555
+  (0.1ms) begin transaction
1556
+  (0.1ms) SAVEPOINT active_record_1
1557
+ Account Exists (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1558
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:57:14.661323"], ["oauth_access_token", "token"], ["oauth_expires_at", "1424087834"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-17 11:57:14.661323"]]
1559
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1560
+  (0.1ms) SAVEPOINT active_record_1
1561
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
1562
+ SQL (0.5ms) 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", "1424347034"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-17 11:57:14.665979"]]
1563
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1564
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
1565
+  (0.7ms) rollback transaction
1566
+  (0.1ms) begin transaction
1567
+  (0.1ms) SAVEPOINT active_record_1
1568
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1569
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:57:14.674249"], ["oauth_access_token", "token"], ["oauth_expires_at", "1424087834"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-17 11:57:14.674249"]]
1570
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1571
+  (0.1ms) SAVEPOINT active_record_1
1572
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
1573
+ SQL (0.6ms) 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", "1424347034"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-17 11:57:14.678329"]]
1574
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1575
+  (0.7ms) rollback transaction
1576
+  (0.1ms) begin transaction
1577
+  (0.1ms) SAVEPOINT active_record_1
1578
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1579
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:57:14.685213"], ["oauth_access_token", "token"], ["oauth_expires_at", 1424260634], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-17 11:57:14.685213"]]
1580
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1581
+  (0.5ms) rollback transaction
1582
+  (0.1ms) begin transaction
1583
+  (0.1ms) SAVEPOINT active_record_1
1584
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1585
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:57:14.691468"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:57:14.691468"]]
1586
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1587
+  (0.3ms) SELECT COUNT(*) FROM "accounts"
1588
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1589
+  (0.1ms) SAVEPOINT active_record_1
1590
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1591
+ SQL (0.6ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:57:14.705528"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:57:14.705528"]]
1592
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1593
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
1594
+  (0.5ms) rollback transaction
1595
+  (0.1ms) begin transaction
1596
+  (0.1ms) SAVEPOINT active_record_1
1597
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1598
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:57:14.711862"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:57:14.711862"]]
1599
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1600
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1601
+  (0.1ms) SAVEPOINT active_record_1
1602
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1603
+ SQL (0.6ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:57:14.716541"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:57:14.716541"]]
1604
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1605
+  (0.6ms) rollback transaction
1606
+  (0.1ms) begin transaction
1607
+  (0.1ms) SAVEPOINT active_record_1
1608
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1609
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:57:14.722977"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:57:14.722977"]]
1610
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1611
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1612
+  (0.1ms) SAVEPOINT active_record_1
1613
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1614
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:57:14.727541"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:57:14.727541"]]
1615
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1616
+  (0.8ms) rollback transaction
1617
+  (0.1ms) begin transaction
1618
+  (0.1ms) SAVEPOINT active_record_1
1619
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1620
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:57:14.733191"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:57:14.733191"]]
1621
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1622
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1623
+  (0.1ms) SAVEPOINT active_record_1
1624
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1625
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-17 11:57:14.736266"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:57:14.736266"]]
1626
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1627
+  (0.5ms) rollback transaction
1628
+  (0.1ms) begin transaction
1629
+  (0.1ms) SAVEPOINT active_record_1
1630
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1631
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:57:14.740948"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:57:14.740948"]]
1632
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1633
+  (0.0ms) SAVEPOINT active_record_1
1634
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1635
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:57:14.743298"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:57:14.743298"]]
1636
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1637
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1638
+  (0.1ms) SAVEPOINT active_record_1
1639
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
1640
+ SQL (0.2ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-17 11:57:14.747052"]]
1641
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1642
+  (0.5ms) rollback transaction
1643
+  (0.1ms) begin transaction
1644
+  (0.1ms) SAVEPOINT active_record_1
1645
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1646
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:57:14.752435"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:57:14.752435"]]
1647
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1648
+  (0.1ms) SAVEPOINT active_record_1
1649
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1650
+ SQL (0.6ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:57:14.756092"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:57:14.756092"]]
1651
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1652
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1653
+  (0.1ms) SAVEPOINT active_record_1
1654
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
1655
+ SQL (0.2ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-17 11:57:14.760876"]]
1656
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1657
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
1658
+  (0.7ms) rollback transaction
1659
+  (0.1ms) begin transaction
1660
+  (0.1ms) SAVEPOINT active_record_1
1661
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1662
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:57:14.767534"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-17 11:57:14.767534"]]
1663
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1664
+  (0.1ms) SAVEPOINT active_record_1
1665
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1666
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-17 11:57:14.769682"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-17 11:57:14.769682"]]
1667
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1668
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1669
+  (0.0ms) SAVEPOINT active_record_1
1670
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
1671
+ SQL (0.1ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-17 11:57:14.772446"]]
1672
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1673
+ Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
1674
+  (0.7ms) rollback transaction
1675
+  (1.2ms) CREATE 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)) 
1676
+  (0.5ms) select sqlite_version(*)
1677
+  (1.4ms) CREATE INDEX "index_accounts_on_uid" ON "accounts" ("uid")
1678
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
1679
+  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1680
+  (0.1ms) SELECT version FROM "schema_migrations"
1681
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110454')
1682
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110326')
1683
+  (0.3ms) begin transaction
1684
+  (0.1ms) SAVEPOINT active_record_1
1685
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1686
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:36:20.976310"], ["oauth_access_token", "token"], ["oauth_expires_at", "1424180180"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-18 13:36:20.976310"]]
1687
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1688
+  (0.0ms) SAVEPOINT active_record_1
1689
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
1690
+ SQL (1.2ms) 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", "1424439380"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-18 13:36:20.979913"]]
1691
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1692
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
1693
+  (0.9ms) rollback transaction
1694
+  (0.1ms) begin transaction
1695
+  (0.0ms) SAVEPOINT active_record_1
1696
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1697
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:36:20.990531"], ["oauth_access_token", "token"], ["oauth_expires_at", "1424180180"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-18 13:36:20.990531"]]
1698
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1699
+  (0.1ms) SAVEPOINT active_record_1
1700
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
1701
+ SQL (0.3ms) 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", "1424439380"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-18 13:36:20.992406"]]
1702
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1703
+  (0.4ms) rollback transaction
1704
+  (0.1ms) begin transaction
1705
+  (0.0ms) SAVEPOINT active_record_1
1706
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1707
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:36:20.995552"], ["oauth_access_token", "token"], ["oauth_expires_at", 1424352980], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-18 13:36:20.995552"]]
1708
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1709
+  (0.4ms) rollback transaction
1710
+  (0.1ms) begin transaction
1711
+  (0.0ms) SAVEPOINT active_record_1
1712
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1713
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:36:21.000344"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 13:36:21.000344"]]
1714
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1715
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
1716
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1717
+  (0.1ms) SAVEPOINT active_record_1
1718
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1719
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:36:21.010535"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:36:21.010535"]]
1720
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1721
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
1722
+  (0.5ms) rollback transaction
1723
+  (0.0ms) begin transaction
1724
+  (0.0ms) SAVEPOINT active_record_1
1725
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1726
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:36:21.014299"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 13:36:21.014299"]]
1727
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1728
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1729
+  (0.0ms) SAVEPOINT active_record_1
1730
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1731
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:36:21.016337"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:36:21.016337"]]
1732
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1733
+  (0.5ms) rollback transaction
1734
+  (0.1ms) begin transaction
1735
+  (0.0ms) SAVEPOINT active_record_1
1736
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1737
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:36:21.019991"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 13:36:21.019991"]]
1738
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1739
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1740
+  (0.0ms) SAVEPOINT active_record_1
1741
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1742
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:36:21.022231"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:36:21.022231"]]
1743
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1744
+  (0.4ms) rollback transaction
1745
+  (0.1ms) begin transaction
1746
+  (0.0ms) SAVEPOINT active_record_1
1747
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1748
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:36:21.026929"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 13:36:21.026929"]]
1749
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1750
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1751
+  (0.0ms) SAVEPOINT active_record_1
1752
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1753
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:36:21.029062"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:36:21.029062"]]
1754
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1755
+  (0.4ms) rollback transaction
1756
+  (0.0ms) begin transaction
1757
+  (0.0ms) SAVEPOINT active_record_1
1758
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1759
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:36:21.032208"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 13:36:21.032208"]]
1760
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1761
+  (0.0ms) SAVEPOINT active_record_1
1762
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1763
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:36:21.033811"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:36:21.033811"]]
1764
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1765
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1766
+  (0.1ms) SAVEPOINT active_record_1
1767
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
1768
+ SQL (0.1ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-18 13:36:21.037237"]]
1769
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1770
+  (0.5ms) rollback transaction
1771
+  (0.1ms) begin transaction
1772
+  (0.1ms) SAVEPOINT active_record_1
1773
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1774
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:36:21.041054"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 13:36:21.041054"]]
1775
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1776
+  (0.0ms) SAVEPOINT active_record_1
1777
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1778
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:36:21.043058"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:36:21.043058"]]
1779
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1780
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1781
+  (0.0ms) SAVEPOINT active_record_1
1782
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
1783
+ SQL (0.1ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-18 13:36:21.045131"]]
1784
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1785
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
1786
+  (0.5ms) rollback transaction
1787
+  (0.1ms) begin transaction
1788
+  (0.0ms) SAVEPOINT active_record_1
1789
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1790
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:36:21.048577"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 13:36:21.048577"]]
1791
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1792
+  (0.1ms) SAVEPOINT active_record_1
1793
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1794
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:36:21.050159"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:36:21.050159"]]
1795
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1796
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1797
+  (0.0ms) SAVEPOINT active_record_1
1798
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
1799
+ SQL (0.1ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-18 13:36:21.052350"]]
1800
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1801
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
1802
+  (0.6ms) rollback transaction
1803
+  (0.0ms) begin transaction
1804
+  (0.0ms) SAVEPOINT active_record_1
1805
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" IS NULL LIMIT 1
1806
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:36:21.055815"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2015-02-18 13:36:21.055815"]]
1807
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1808
+  (0.0ms) SAVEPOINT active_record_1
1809
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" IS NULL AND "accounts"."id" != 1) LIMIT 1
1810
+ SQL (0.4ms) UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", nil], ["oauth_expires_at", nil], ["oauth_refresh_token", nil], ["updated_at", "2015-02-18 13:36:21.057459"]]
1811
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1812
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
1813
+  (0.5ms) rollback transaction
1814
+  (0.1ms) begin transaction
1815
+  (0.1ms) rollback transaction
1816
+  (0.0ms) begin transaction
1817
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
1818
+  (0.1ms) SAVEPOINT active_record_1
1819
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "uid", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-02-18 13:36:21.071800"], ["uid", 0], ["updated_at", "2015-02-18 13:36:21.071800"]]
1820
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1821
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
1822
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
1823
+  (0.5ms) rollback transaction
1824
+  (0.1ms) begin transaction
1825
+ Processing by SessionsController#destroy as HTML
1826
+ Redirected to http://test.host/signed_out
1827
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
1828
+  (0.1ms) rollback transaction
1829
+  (0.1ms) begin transaction
1830
+ Processing by SessionsController#destroy as HTML
1831
+ Redirected to http://test.host/
1832
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
1833
+  (0.1ms) rollback transaction
1834
+  (0.0ms) begin transaction
1835
+ Processing by SessionsController#failure as HTML
1836
+ Completed 200 OK in 10ms (Views: 9.5ms | ActiveRecord: 0.0ms)
1837
+  (0.1ms) rollback transaction
1838
+  (0.1ms) begin transaction
1839
+ Processing by SessionsController#failure as HTML
1840
+ Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
1841
+  (0.1ms) rollback transaction
1842
+  (0.1ms) begin transaction
1843
+ Processing by SessionsController#create as HTML
1844
+ Parameters: {"provider"=>"bookingsync"}
1845
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1846
+  (0.0ms) SAVEPOINT active_record_1
1847
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1848
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:36:21.117481"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:36:21.117481"]]
1849
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1850
+ Redirected to http://test.host/
1851
+ Completed 302 Found in 3ms (ActiveRecord: 0.7ms)
1852
+  (0.5ms) rollback transaction
1853
+  (0.1ms) begin transaction
1854
+ Processing by SessionsController#create as HTML
1855
+ Parameters: {"provider"=>"bookingsync"}
1856
+ Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1857
+  (0.1ms) SAVEPOINT active_record_1
1858
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1859
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:36:21.125719"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:36:21.125719"]]
1860
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1861
+ Redirected to http://test.host/admin
1862
+ Completed 302 Found in 4ms (ActiveRecord: 0.8ms)
1863
+  (0.6ms) rollback transaction
1864
+  (0.1ms) begin transaction
1865
+ Processing by SessionsController#create as HTML
1866
+ Parameters: {"provider"=>"bookingsync"}
1867
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1868
+  (0.0ms) SAVEPOINT active_record_1
1869
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1870
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:36:21.133129"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:36:21.133129"]]
1871
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1872
+ Redirected to http://test.host/
1873
+ Completed 302 Found in 3ms (ActiveRecord: 0.6ms)
1874
+  (0.4ms) rollback transaction
1875
+  (0.1ms) begin transaction
1876
+  (0.1ms) rollback transaction
1877
+  (0.1ms) begin transaction
1878
+  (0.1ms) rollback transaction
1879
+  (0.1ms) begin transaction
1880
+  (0.1ms) rollback transaction
1881
+  (0.1ms) begin transaction
1882
+  (0.1ms) rollback transaction
1883
+  (0.1ms) begin transaction
1884
+  (0.0ms) rollback transaction
1885
+  (0.0ms) begin transaction
1886
+ Processing by AuthenticatedController#index as JS
1887
+ Filter chain halted as :authenticate_account! rendered or redirected
1888
+ Completed 401 Unauthorized in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms)
1889
+  (0.1ms) rollback transaction
1890
+  (0.1ms) begin transaction
1891
+ Processing by AuthenticatedController#index as JS
1892
+ Filter chain halted as :authenticate_account! rendered or redirected
1893
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
1894
+  (0.1ms) rollback transaction
1895
+  (0.1ms) begin transaction
1896
+ Processing by AuthenticatedController#index as HTML
1897
+ Redirected to http://test.host/auth/bookingsync/?account_id=
1898
+ Filter chain halted as :authenticate_account! rendered or redirected
1899
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
1900
+  (0.0ms) rollback transaction
1901
+  (0.1ms) begin transaction
1902
+ Processing by AuthenticatedController#index as HTML
1903
+ Filter chain halted as :authenticate_account! rendered or redirected
1904
+ Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
1905
+  (0.1ms) rollback transaction
1906
+  (0.3ms) begin transaction
1907
+ Processing by SessionsController#destroy as HTML
1908
+ Redirected to http://test.host/signed_out
1909
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
1910
+  (0.1ms) rollback transaction
1911
+  (0.0ms) begin transaction
1912
+ Processing by SessionsController#destroy as HTML
1913
+ Redirected to http://test.host/
1914
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
1915
+  (0.1ms) rollback transaction
1916
+  (0.0ms) begin transaction
1917
+ Processing by SessionsController#failure as HTML
1918
+ Completed 200 OK in 6ms (Views: 6.3ms | ActiveRecord: 0.0ms)
1919
+  (0.1ms) rollback transaction
1920
+  (0.1ms) begin transaction
1921
+ Processing by SessionsController#failure as HTML
1922
+ Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
1923
+  (0.1ms) rollback transaction
1924
+  (0.1ms) begin transaction
1925
+ Processing by SessionsController#create as HTML
1926
+ Parameters: {"provider"=>"bookingsync"}
1927
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1928
+  (0.1ms) SAVEPOINT active_record_1
1929
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1930
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:41:26.229152"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:41:26.229152"]]
1931
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1932
+ Redirected to http://test.host/
1933
+ Completed 302 Found in 34ms (ActiveRecord: 2.2ms)
1934
+  (0.5ms) rollback transaction
1935
+  (0.0ms) begin transaction
1936
+ Processing by SessionsController#create as HTML
1937
+ Parameters: {"provider"=>"bookingsync"}
1938
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1939
+  (0.0ms) SAVEPOINT active_record_1
1940
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1941
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:41:26.236533"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:41:26.236533"]]
1942
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1943
+ Redirected to http://test.host/admin
1944
+ Completed 302 Found in 3ms (ActiveRecord: 0.6ms)
1945
+  (0.5ms) rollback transaction
1946
+  (0.1ms) begin transaction
1947
+ Processing by SessionsController#create as HTML
1948
+ Parameters: {"provider"=>"bookingsync"}
1949
+ Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1950
+  (0.1ms) SAVEPOINT active_record_1
1951
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1952
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:41:26.243458"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:41:26.243458"]]
1953
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1954
+ Redirected to http://test.host/
1955
+ Completed 302 Found in 4ms (ActiveRecord: 0.8ms)
1956
+  (0.5ms) rollback transaction
1957
+  (0.1ms) begin transaction
1958
+  (0.1ms) SAVEPOINT active_record_1
1959
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1960
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:41:26.249285"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 13:41:26.249285"]]
1961
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1962
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
1963
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1964
+  (0.1ms) SAVEPOINT active_record_1
1965
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1966
+ SQL (0.9ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:41:26.256794"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:41:26.256794"]]
1967
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1968
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
1969
+  (0.5ms) rollback transaction
1970
+  (0.1ms) begin transaction
1971
+  (0.0ms) SAVEPOINT active_record_1
1972
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1973
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:41:26.261515"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 13:41:26.261515"]]
1974
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1975
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1976
+  (0.0ms) SAVEPOINT active_record_1
1977
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1978
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:41:26.263814"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:41:26.263814"]]
1979
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1980
+  (0.4ms) rollback transaction
1981
+  (0.1ms) begin transaction
1982
+  (0.0ms) SAVEPOINT active_record_1
1983
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1984
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:41:26.268049"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 13:41:26.268049"]]
1985
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1986
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1987
+  (0.0ms) SAVEPOINT active_record_1
1988
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1989
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:41:26.270734"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:41:26.270734"]]
1990
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1991
+  (0.4ms) rollback transaction
1992
+  (0.0ms) begin transaction
1993
+  (0.0ms) SAVEPOINT active_record_1
1994
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1995
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:41:26.273931"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 13:41:26.273931"]]
1996
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1997
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1998
+  (0.0ms) SAVEPOINT active_record_1
1999
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2000
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:41:26.276467"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:41:26.276467"]]
2001
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2002
+  (0.5ms) rollback transaction
2003
+  (0.1ms) begin transaction
2004
+  (0.1ms) SAVEPOINT active_record_1
2005
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2006
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:41:26.281168"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 13:41:26.281168"]]
2007
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2008
+  (0.0ms) SAVEPOINT active_record_1
2009
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2010
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:41:26.283864"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:41:26.283864"]]
2011
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2012
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
2013
+  (0.0ms) SAVEPOINT active_record_1
2014
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
2015
+ SQL (0.3ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-18 13:41:26.287557"]]
2016
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2017
+  (0.8ms) rollback transaction
2018
+  (0.0ms) begin transaction
2019
+  (0.0ms) SAVEPOINT active_record_1
2020
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2021
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:41:26.292997"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 13:41:26.292997"]]
2022
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2023
+  (0.1ms) SAVEPOINT active_record_1
2024
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2025
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:41:26.295073"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:41:26.295073"]]
2026
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2027
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
2028
+  (0.0ms) SAVEPOINT active_record_1
2029
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
2030
+ SQL (0.1ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-18 13:41:26.297332"]]
2031
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2032
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
2033
+  (0.6ms) rollback transaction
2034
+  (0.1ms) begin transaction
2035
+  (0.0ms) SAVEPOINT active_record_1
2036
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2037
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:41:26.300809"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 13:41:26.300809"]]
2038
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2039
+  (0.0ms) SAVEPOINT active_record_1
2040
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2041
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:41:26.302500"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:41:26.302500"]]
2042
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2043
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
2044
+  (0.0ms) SAVEPOINT active_record_1
2045
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
2046
+ SQL (0.1ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-18 13:41:26.304600"]]
2047
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2048
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
2049
+  (0.5ms) rollback transaction
2050
+  (0.0ms) begin transaction
2051
+  (0.0ms) SAVEPOINT active_record_1
2052
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2053
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:41:26.309159"], ["oauth_access_token", "token"], ["oauth_expires_at", "1424180486"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-18 13:41:26.309159"]]
2054
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2055
+  (0.0ms) SAVEPOINT active_record_1
2056
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
2057
+ SQL (0.4ms) 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", "1424439686"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-18 13:41:26.311667"]]
2058
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2059
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
2060
+  (0.5ms) rollback transaction
2061
+  (0.1ms) begin transaction
2062
+  (0.0ms) SAVEPOINT active_record_1
2063
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2064
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:41:26.316333"], ["oauth_access_token", "token"], ["oauth_expires_at", "1424180486"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-18 13:41:26.316333"]]
2065
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2066
+  (0.1ms) SAVEPOINT active_record_1
2067
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
2068
+ SQL (0.3ms) 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", "1424439686"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-18 13:41:26.318900"]]
2069
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2070
+  (0.4ms) rollback transaction
2071
+  (0.1ms) begin transaction
2072
+  (0.0ms) SAVEPOINT active_record_1
2073
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2074
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:41:26.322310"], ["oauth_access_token", "token"], ["oauth_expires_at", 1424353286], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-18 13:41:26.322310"]]
2075
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2076
+  (0.4ms) rollback transaction
2077
+  (0.0ms) begin transaction
2078
+  (0.0ms) SAVEPOINT active_record_1
2079
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" IS NULL LIMIT 1
2080
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:41:26.326527"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2015-02-18 13:41:26.326527"]]
2081
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2082
+  (0.0ms) SAVEPOINT active_record_1
2083
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" IS NULL AND "accounts"."id" != 1) LIMIT 1
2084
+ SQL (0.3ms) UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", nil], ["oauth_expires_at", nil], ["oauth_refresh_token", nil], ["updated_at", "2015-02-18 13:41:26.328658"]]
2085
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2086
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
2087
+  (0.5ms) rollback transaction
2088
+  (0.1ms) begin transaction
2089
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
2090
+  (0.1ms) SAVEPOINT active_record_1
2091
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "uid", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-02-18 13:41:26.338751"], ["uid", 0], ["updated_at", "2015-02-18 13:41:26.338751"]]
2092
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2093
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
2094
+  (0.5ms) rollback transaction
2095
+  (0.1ms) begin transaction
2096
+  (0.1ms) rollback transaction
2097
+  (0.0ms) begin transaction
2098
+  (0.0ms) rollback transaction
2099
+  (0.0ms) begin transaction
2100
+  (0.0ms) rollback transaction
2101
+  (0.0ms) begin transaction
2102
+  (0.1ms) rollback transaction
2103
+  (0.1ms) begin transaction
2104
+  (0.2ms) rollback transaction
2105
+  (0.1ms) begin transaction
2106
+  (0.1ms) rollback transaction
2107
+  (0.1ms) begin transaction
2108
+ Processing by AuthenticatedController#index as JS
2109
+ Filter chain halted as :authenticate_account! rendered or redirected
2110
+ Completed 401 Unauthorized in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)
2111
+  (0.1ms) rollback transaction
2112
+  (0.0ms) begin transaction
2113
+ Processing by AuthenticatedController#index as JS
2114
+ Filter chain halted as :authenticate_account! rendered or redirected
2115
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
2116
+  (0.1ms) rollback transaction
2117
+  (0.0ms) begin transaction
2118
+ Processing by AuthenticatedController#index as HTML
2119
+ Redirected to http://test.host/auth/bookingsync/?account_id=
2120
+ Filter chain halted as :authenticate_account! rendered or redirected
2121
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
2122
+  (0.1ms) rollback transaction
2123
+  (0.1ms) begin transaction
2124
+ Processing by AuthenticatedController#index as HTML
2125
+ Filter chain halted as :authenticate_account! rendered or redirected
2126
+ Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
2127
+  (0.1ms) rollback transaction
2128
+  (0.3ms) begin transaction
2129
+  (0.1ms) SAVEPOINT active_record_1
2130
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2131
+ SQL (0.5ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 456], ["created_at", "2015-02-18 13:41:32.406951"], ["updated_at", "2015-02-18 13:41:32.406951"]]
2132
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2133
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
2134
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
2135
+  (0.2ms) SAVEPOINT active_record_1
2136
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2137
+ SQL (1.5ms) INSERT INTO "accounts" ("uid", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["uid", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-02-18 13:41:32.418454"], ["updated_at", "2015-02-18 13:41:32.418454"]]
2138
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2139
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
2140
+  (0.5ms) rollback transaction
2141
+  (0.1ms) begin transaction
2142
+  (0.1ms) SAVEPOINT active_record_1
2143
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2144
+ SQL (0.3ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 456], ["created_at", "2015-02-18 13:41:32.426136"], ["updated_at", "2015-02-18 13:41:32.426136"]]
2145
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2146
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
2147
+  (0.0ms) SAVEPOINT active_record_1
2148
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2149
+ SQL (0.3ms) INSERT INTO "accounts" ("uid", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["uid", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-02-18 13:41:32.429446"], ["updated_at", "2015-02-18 13:41:32.429446"]]
2150
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2151
+  (0.5ms) rollback transaction
2152
+  (0.1ms) begin transaction
2153
+  (0.1ms) SAVEPOINT active_record_1
2154
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2155
+ SQL (0.3ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 456], ["created_at", "2015-02-18 13:41:32.434967"], ["updated_at", "2015-02-18 13:41:32.434967"]]
2156
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2157
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
2158
+  (0.0ms) SAVEPOINT active_record_1
2159
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2160
+ SQL (0.3ms) INSERT INTO "accounts" ("uid", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["uid", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-02-18 13:41:32.438125"], ["updated_at", "2015-02-18 13:41:32.438125"]]
2161
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2162
+  (0.4ms) rollback transaction
2163
+  (0.1ms) begin transaction
2164
+  (0.1ms) SAVEPOINT active_record_1
2165
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2166
+ SQL (0.4ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 456], ["created_at", "2015-02-18 13:41:32.443042"], ["updated_at", "2015-02-18 13:41:32.443042"]]
2167
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2168
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
2169
+  (0.1ms) SAVEPOINT active_record_1
2170
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2171
+ SQL (0.4ms) INSERT INTO "accounts" ("uid", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["uid", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-02-18 13:41:32.448385"], ["updated_at", "2015-02-18 13:41:32.448385"]]
2172
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2173
+  (0.5ms) rollback transaction
2174
+  (0.1ms) begin transaction
2175
+  (0.0ms) SAVEPOINT active_record_1
2176
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2177
+ SQL (0.3ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 456], ["created_at", "2015-02-18 13:41:32.452739"], ["updated_at", "2015-02-18 13:41:32.452739"]]
2178
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2179
+  (0.1ms) SAVEPOINT active_record_1
2180
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2181
+ SQL (0.5ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 123], ["created_at", "2015-02-18 13:41:32.456753"], ["updated_at", "2015-02-18 13:41:32.456753"]]
2182
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2183
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
2184
+  (0.1ms) SAVEPOINT active_record_1
2185
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
2186
+ SQL (0.1ms) 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-02-18 13:41:32.462404"], ["id", 2]]
2187
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2188
+  (0.6ms) rollback transaction
2189
+  (0.1ms) begin transaction
2190
+  (0.0ms) SAVEPOINT active_record_1
2191
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2192
+ SQL (0.2ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 456], ["created_at", "2015-02-18 13:41:32.466861"], ["updated_at", "2015-02-18 13:41:32.466861"]]
2193
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2194
+  (0.0ms) SAVEPOINT active_record_1
2195
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2196
+ SQL (0.3ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 123], ["created_at", "2015-02-18 13:41:32.469037"], ["updated_at", "2015-02-18 13:41:32.469037"]]
2197
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2198
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
2199
+  (0.0ms) SAVEPOINT active_record_1
2200
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
2201
+ SQL (0.1ms) 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-02-18 13:41:32.472155"], ["id", 2]]
2202
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2203
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
2204
+  (0.6ms) rollback transaction
2205
+  (0.1ms) begin transaction
2206
+  (0.1ms) SAVEPOINT active_record_1
2207
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2208
+ SQL (0.4ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 456], ["created_at", "2015-02-18 13:41:32.478656"], ["updated_at", "2015-02-18 13:41:32.478656"]]
2209
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2210
+  (0.1ms) SAVEPOINT active_record_1
2211
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2212
+ SQL (0.4ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 123], ["created_at", "2015-02-18 13:41:32.482138"], ["updated_at", "2015-02-18 13:41:32.482138"]]
2213
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2214
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
2215
+  (0.0ms) SAVEPOINT active_record_1
2216
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
2217
+ SQL (0.1ms) 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-02-18 13:41:32.485974"], ["id", 2]]
2218
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2219
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
2220
+  (0.6ms) rollback transaction
2221
+  (0.1ms) begin transaction
2222
+  (0.0ms) SAVEPOINT active_record_1
2223
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" IS NULL LIMIT 1
2224
+ SQL (0.3ms) 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-02-18 13:41:32.490868"], ["updated_at", "2015-02-18 13:41:32.490868"]]
2225
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2226
+  (0.0ms) SAVEPOINT active_record_1
2227
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" IS NULL AND "accounts"."id" != 1) LIMIT 1
2228
+ SQL (0.3ms) 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-02-18 13:41:32.492961"], ["id", 1]]
2229
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2230
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
2231
+  (0.5ms) rollback transaction
2232
+  (0.1ms) begin transaction
2233
+  (0.1ms) SAVEPOINT active_record_1
2234
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2235
+ SQL (0.3ms) INSERT INTO "accounts" ("uid", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["uid", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1424180492"], ["created_at", "2015-02-18 13:41:32.504106"], ["updated_at", "2015-02-18 13:41:32.504106"]]
2236
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2237
+  (0.1ms) SAVEPOINT active_record_1
2238
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
2239
+ SQL (0.3ms) 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", "1424439692"], ["updated_at", "2015-02-18 13:41:32.508423"], ["id", 1]]
2240
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2241
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
2242
+  (0.6ms) rollback transaction
2243
+  (0.1ms) begin transaction
2244
+  (0.1ms) SAVEPOINT active_record_1
2245
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2246
+ SQL (0.4ms) INSERT INTO "accounts" ("uid", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["uid", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1424180492"], ["created_at", "2015-02-18 13:41:32.515077"], ["updated_at", "2015-02-18 13:41:32.515077"]]
2247
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2248
+  (0.1ms) SAVEPOINT active_record_1
2249
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
2250
+ SQL (0.4ms) 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", "1424439692"], ["updated_at", "2015-02-18 13:41:32.519307"], ["id", 1]]
2251
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2252
+  (0.6ms) rollback transaction
2253
+  (0.1ms) begin transaction
2254
+  (0.0ms) SAVEPOINT active_record_1
2255
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2256
+ SQL (0.3ms) INSERT INTO "accounts" ("uid", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["uid", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1424353292"], ["created_at", "2015-02-18 13:41:32.524310"], ["updated_at", "2015-02-18 13:41:32.524310"]]
2257
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2258
+  (0.4ms) rollback transaction
2259
+  (0.1ms) begin transaction
2260
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
2261
+  (0.1ms) SAVEPOINT active_record_1
2262
+ SQL (0.4ms) INSERT INTO "accounts" ("uid", "created_at", "updated_at") VALUES (?, ?, ?) [["uid", 0], ["created_at", "2015-02-18 13:41:32.531854"], ["updated_at", "2015-02-18 13:41:32.531854"]]
2263
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2264
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
2265
+  (0.5ms) rollback transaction
2266
+  (0.1ms) begin transaction
2267
+  (0.1ms) rollback transaction
2268
+  (0.1ms) begin transaction
2269
+ Processing by SessionsController#destroy as HTML
2270
+ Redirected to http://test.host/signed_out
2271
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
2272
+  (0.1ms) rollback transaction
2273
+  (0.1ms) begin transaction
2274
+ Processing by SessionsController#destroy as HTML
2275
+ Redirected to http://test.host/
2276
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
2277
+  (0.1ms) rollback transaction
2278
+  (0.1ms) begin transaction
2279
+ Processing by SessionsController#failure as HTML
2280
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
2281
+ Completed 200 OK in 9ms (Views: 8.6ms | ActiveRecord: 0.0ms)
2282
+  (0.2ms) rollback transaction
2283
+  (0.1ms) begin transaction
2284
+ Processing by SessionsController#failure as HTML
2285
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
2286
+ Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)
2287
+  (0.1ms) rollback transaction
2288
+  (0.1ms) begin transaction
2289
+ Processing by SessionsController#create as HTML
2290
+ Parameters: {"provider"=>"bookingsync"}
2291
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
2292
+  (0.1ms) SAVEPOINT active_record_1
2293
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2294
+ SQL (0.3ms) INSERT INTO "accounts" ("uid", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["uid", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-02-18 13:41:32.595844"], ["updated_at", "2015-02-18 13:41:32.595844"]]
2295
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2296
+ Redirected to http://test.host/
2297
+ Completed 302 Found in 5ms (ActiveRecord: 0.7ms)
2298
+  (0.5ms) rollback transaction
2299
+  (0.0ms) begin transaction
2300
+ Processing by SessionsController#create as HTML
2301
+ Parameters: {"provider"=>"bookingsync"}
2302
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
2303
+  (0.1ms) SAVEPOINT active_record_1
2304
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2305
+ SQL (0.3ms) INSERT INTO "accounts" ("uid", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["uid", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-02-18 13:41:32.603730"], ["updated_at", "2015-02-18 13:41:32.603730"]]
2306
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2307
+ Redirected to http://test.host/admin
2308
+ Completed 302 Found in 4ms (ActiveRecord: 0.6ms)
2309
+  (0.5ms) rollback transaction
2310
+  (0.1ms) begin transaction
2311
+ Processing by SessionsController#create as HTML
2312
+ Parameters: {"provider"=>"bookingsync"}
2313
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
2314
+  (0.1ms) SAVEPOINT active_record_1
2315
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2316
+ SQL (0.3ms) INSERT INTO "accounts" ("uid", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["uid", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-02-18 13:41:32.613581"], ["updated_at", "2015-02-18 13:41:32.613581"]]
2317
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2318
+ Redirected to http://test.host/
2319
+ Completed 302 Found in 5ms (ActiveRecord: 0.7ms)
2320
+  (0.5ms) rollback transaction
2321
+  (0.1ms) begin transaction
2322
+  (0.1ms) rollback transaction
2323
+  (0.0ms) begin transaction
2324
+  (0.1ms) rollback transaction
2325
+  (0.1ms) begin transaction
2326
+  (0.1ms) rollback transaction
2327
+  (0.1ms) begin transaction
2328
+  (0.1ms) rollback transaction
2329
+  (0.1ms) begin transaction
2330
+  (0.1ms) rollback transaction
2331
+  (0.1ms) begin transaction
2332
+ Processing by AuthenticatedController#index as JS
2333
+ Rendered text template (0.0ms)
2334
+ Filter chain halted as :authenticate_account! rendered or redirected
2335
+ Completed 401 Unauthorized in 5ms (Views: 4.3ms | ActiveRecord: 0.0ms)
2336
+  (0.1ms) rollback transaction
2337
+  (0.1ms) begin transaction
2338
+ Processing by AuthenticatedController#index as JS
2339
+ Rendered text template (0.0ms)
2340
+ Filter chain halted as :authenticate_account! rendered or redirected
2341
+ Completed 401 Unauthorized in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
2342
+  (0.1ms) rollback transaction
2343
+  (0.1ms) begin transaction
2344
+ Processing by AuthenticatedController#index as HTML
2345
+ Redirected to http://test.host/auth/bookingsync/?account_id=
2346
+ Filter chain halted as :authenticate_account! rendered or redirected
2347
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
2348
+  (0.1ms) rollback transaction
2349
+  (0.1ms) begin transaction
2350
+ Processing by AuthenticatedController#index as HTML
2351
+ Rendered text template (0.0ms)
2352
+ Filter chain halted as :authenticate_account! rendered or redirected
2353
+ Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
2354
+  (0.1ms) rollback transaction
2355
+  (0.3ms) begin transaction
2356
+ Processing by SessionsController#destroy as HTML
2357
+ Redirected to http://test.host/signed_out
2358
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
2359
+  (0.1ms) rollback transaction
2360
+  (0.0ms) begin transaction
2361
+ Processing by SessionsController#destroy as HTML
2362
+ Redirected to http://test.host/
2363
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
2364
+  (0.1ms) rollback transaction
2365
+  (0.0ms) begin transaction
2366
+ Processing by SessionsController#create as HTML
2367
+ Parameters: {"provider"=>"bookingsync"}
2368
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
2369
+  (0.1ms) SAVEPOINT active_record_1
2370
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2371
+ SQL (0.7ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:46:16.836683"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:46:16.836683"]]
2372
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2373
+ Redirected to http://test.host/
2374
+ Completed 302 Found in 36ms (ActiveRecord: 2.6ms)
2375
+  (0.7ms) rollback transaction
2376
+  (0.1ms) begin transaction
2377
+ Processing by SessionsController#create as HTML
2378
+ Parameters: {"provider"=>"bookingsync"}
2379
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
2380
+  (0.1ms) SAVEPOINT active_record_1
2381
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2382
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:46:16.848866"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:46:16.848866"]]
2383
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2384
+ Redirected to http://test.host/
2385
+ Completed 302 Found in 7ms (ActiveRecord: 1.1ms)
2386
+  (0.8ms) rollback transaction
2387
+  (0.1ms) begin transaction
2388
+ Processing by SessionsController#create as HTML
2389
+ Parameters: {"provider"=>"bookingsync"}
2390
+ Account Load (0.4ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
2391
+  (0.1ms) SAVEPOINT active_record_1
2392
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2393
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:46:16.860920"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:46:16.860920"]]
2394
+  (0.2ms) RELEASE SAVEPOINT active_record_1
2395
+ Redirected to http://test.host/admin
2396
+ Completed 302 Found in 6ms (ActiveRecord: 1.2ms)
2397
+  (0.6ms) rollback transaction
2398
+  (0.1ms) begin transaction
2399
+ Processing by SessionsController#failure as HTML
2400
+ Completed 200 OK in 14ms (Views: 13.3ms | ActiveRecord: 0.0ms)
2401
+  (0.1ms) rollback transaction
2402
+  (0.1ms) begin transaction
2403
+ Processing by SessionsController#failure as HTML
2404
+ Completed 200 OK in 1ms (Views: 1.0ms | ActiveRecord: 0.0ms)
2405
+  (0.1ms) rollback transaction
2406
+  (0.1ms) begin transaction
2407
+  (0.1ms) rollback transaction
2408
+  (0.1ms) begin transaction
2409
+  (0.0ms) rollback transaction
2410
+  (0.0ms) begin transaction
2411
+  (0.0ms) rollback transaction
2412
+  (0.0ms) begin transaction
2413
+  (0.1ms) rollback transaction
2414
+  (0.0ms) begin transaction
79
2415
   (0.1ms) rollback transaction
80
2416
   (0.1ms) begin transaction
81
- Processing by SessionsController#failure as HTML
82
- Completed 200 OK in 3ms (Views: 2.7ms | ActiveRecord: 0.0ms)
2417
+ Processing by AuthenticatedController#index as JS
2418
+ Filter chain halted as :authenticate_account! rendered or redirected
2419
+ Completed 401 Unauthorized in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)
83
2420
   (0.1ms) rollback transaction
84
2421
   (0.1ms) begin transaction
85
- Processing by SessionsController#failure as HTML
86
- Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
2422
+ Processing by AuthenticatedController#index as JS
2423
+ Filter chain halted as :authenticate_account! rendered or redirected
2424
+ Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
87
2425
   (0.1ms) rollback transaction
88
-  (0.0ms) begin transaction
89
- Processing by SessionsController#destroy as HTML
90
- Redirected to http://test.host/
2426
+  (0.1ms) begin transaction
2427
+ Processing by AuthenticatedController#index as HTML
2428
+ Redirected to http://test.host/auth/bookingsync/?account_id=
2429
+ Filter chain halted as :authenticate_account! rendered or redirected
91
2430
  Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
92
2431
   (0.1ms) rollback transaction
93
2432
   (0.1ms) begin transaction
94
- Processing by SessionsController#destroy as HTML
95
- Redirected to http://test.host/signed_out
96
- Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
2433
+ Processing by AuthenticatedController#index as HTML
2434
+ Filter chain halted as :authenticate_account! rendered or redirected
2435
+ Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
97
2436
   (0.1ms) rollback transaction
98
-  (0.3ms) begin transaction
99
-  (0.1ms) rollback transaction
100
-  (0.1ms) begin transaction
101
-  (0.0ms) rollback transaction
2437
+  (0.0ms) begin transaction
2438
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
2439
+  (0.1ms) SAVEPOINT active_record_1
2440
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "uid", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-02-18 13:46:16.918514"], ["uid", 0], ["updated_at", "2015-02-18 13:46:16.918514"]]
2441
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2442
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
2443
+  (0.5ms) rollback transaction
102
2444
   (0.1ms) begin transaction
103
-  (0.1ms) rollback transaction
104
-  (0.2ms) begin transaction
105
-  (0.1ms) rollback transaction
106
-  (0.0ms) begin transaction
107
-  (0.1ms) rollback transaction
2445
+  (0.0ms) SAVEPOINT active_record_1
2446
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" IS NULL LIMIT 1
2447
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:46:16.930161"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2015-02-18 13:46:16.930161"]]
2448
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2449
+  (0.1ms) SAVEPOINT active_record_1
2450
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" IS NULL AND "accounts"."id" != 1) LIMIT 1
2451
+ SQL (1.2ms) UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", nil], ["oauth_expires_at", nil], ["oauth_refresh_token", nil], ["updated_at", "2015-02-18 13:46:16.932961"]]
2452
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2453
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
2454
+  (0.6ms) rollback transaction
2455
+  (0.1ms) begin transaction
2456
+  (0.1ms) SAVEPOINT active_record_1
2457
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2458
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:46:16.940365"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 13:46:16.940365"]]
2459
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2460
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
2461
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
2462
+  (0.1ms) SAVEPOINT active_record_1
2463
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2464
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:46:16.946129"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:46:16.946129"]]
2465
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2466
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
2467
+  (0.5ms) rollback transaction
108
2468
   (0.1ms) begin transaction
109
-  (0.1ms) rollback transaction
110
-  (0.0ms) begin transaction
111
-  (0.0ms) rollback transaction
2469
+  (0.0ms) SAVEPOINT active_record_1
2470
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2471
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:46:16.950195"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 13:46:16.950195"]]
2472
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2473
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
2474
+  (0.1ms) SAVEPOINT active_record_1
2475
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2476
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:46:16.952953"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:46:16.952953"]]
2477
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2478
+  (0.5ms) rollback transaction
2479
+  (0.0ms) begin transaction
2480
+  (0.0ms) SAVEPOINT active_record_1
2481
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2482
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:46:16.956480"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 13:46:16.956480"]]
2483
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2484
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
2485
+  (0.1ms) SAVEPOINT active_record_1
2486
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2487
+ SQL (0.6ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:46:16.959172"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:46:16.959172"]]
2488
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2489
+  (0.5ms) rollback transaction
112
2490
   (0.1ms) begin transaction
113
-  (0.1ms) rollback transaction
114
-  (0.0ms) begin transaction
115
-  (0.0ms) rollback transaction
116
-  (0.0ms) begin transaction
117
-  (0.0ms) rollback transaction
2491
+  (0.0ms) SAVEPOINT active_record_1
2492
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2493
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:46:16.962760"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 13:46:16.962760"]]
2494
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2495
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
2496
+  (0.0ms) SAVEPOINT active_record_1
2497
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2498
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:46:16.965211"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:46:16.965211"]]
2499
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2500
+  (0.5ms) rollback transaction
2501
+  (0.1ms) begin transaction
2502
+  (0.1ms) SAVEPOINT active_record_1
2503
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2504
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:46:16.968757"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 13:46:16.968757"]]
2505
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2506
+  (0.1ms) SAVEPOINT active_record_1
2507
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2508
+ SQL (0.5ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:46:16.971615"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:46:16.971615"]]
2509
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2510
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
2511
+  (0.1ms) SAVEPOINT active_record_1
2512
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
2513
+ SQL (0.2ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-18 13:46:16.975937"]]
2514
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2515
+  (0.5ms) rollback transaction
118
2516
   (0.1ms) begin transaction
119
-  (0.0ms) rollback transaction
120
-  (0.0ms) begin transaction
121
-  (0.1ms) rollback transaction
122
-  (0.0ms) begin transaction
123
-  (0.0ms) rollback transaction
124
-  (0.0ms) begin transaction
125
-  (0.1ms) rollback transaction
2517
+  (0.0ms) SAVEPOINT active_record_1
2518
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2519
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:46:16.979729"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 13:46:16.979729"]]
2520
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2521
+  (0.0ms) SAVEPOINT active_record_1
2522
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2523
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:46:16.981560"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:46:16.981560"]]
2524
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2525
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
2526
+  (0.0ms) SAVEPOINT active_record_1
2527
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
2528
+ SQL (0.1ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-18 13:46:16.983777"]]
2529
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2530
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
2531
+  (0.6ms) rollback transaction
126
2532
   (0.1ms) begin transaction
127
-  (0.0ms) rollback transaction
2533
+  (0.1ms) SAVEPOINT active_record_1
2534
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2535
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:46:16.988388"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 13:46:16.988388"]]
2536
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2537
+  (0.0ms) SAVEPOINT active_record_1
2538
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2539
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 13:46:16.990204"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 13:46:16.990204"]]
2540
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2541
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
2542
+  (0.0ms) SAVEPOINT active_record_1
2543
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
2544
+ SQL (0.1ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-18 13:46:16.992503"]]
2545
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2546
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
2547
+  (0.5ms) rollback transaction
128
2548
   (0.1ms) begin transaction
129
-  (0.0ms) rollback transaction
2549
+  (0.1ms) SAVEPOINT active_record_1
2550
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2551
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:46:16.996784"], ["oauth_access_token", "token"], ["oauth_expires_at", "1424180776"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-18 13:46:16.996784"]]
2552
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2553
+  (0.0ms) SAVEPOINT active_record_1
2554
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
2555
+ SQL (0.2ms) 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", "1424439976"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-18 13:46:16.999595"]]
2556
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2557
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
2558
+  (0.5ms) rollback transaction
2559
+  (0.1ms) begin transaction
2560
+  (0.0ms) SAVEPOINT active_record_1
2561
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2562
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:46:17.004014"], ["oauth_access_token", "token"], ["oauth_expires_at", "1424180777"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-18 13:46:17.004014"]]
2563
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2564
+  (0.0ms) SAVEPOINT active_record_1
2565
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
2566
+ SQL (0.3ms) 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", "1424439977"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-18 13:46:17.005816"]]
2567
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2568
+  (0.6ms) rollback transaction
2569
+  (0.1ms) begin transaction
2570
+  (0.1ms) SAVEPOINT active_record_1
2571
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2572
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 13:46:17.010279"], ["oauth_access_token", "token"], ["oauth_expires_at", 1424353577], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-18 13:46:17.010279"]]
2573
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2574
+  (0.4ms) rollback transaction
2575
+  (0.1ms) begin transaction
2576
+  (0.1ms) rollback transaction
2577
+  (0.3ms) begin transaction
2578
+  (0.1ms) SAVEPOINT active_record_1
2579
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" IS NULL LIMIT 1
2580
+ SQL (0.5ms) 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-02-18 13:46:23.148261"], ["updated_at", "2015-02-18 13:46:23.148261"]]
2581
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2582
+  (0.0ms) SAVEPOINT active_record_1
2583
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" IS NULL AND "accounts"."id" != 1) LIMIT 1
2584
+ SQL (1.4ms) 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-02-18 13:46:23.151927"], ["id", 1]]
2585
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2586
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
2587
+  (0.6ms) rollback transaction
2588
+  (0.1ms) begin transaction
2589
+  (0.1ms) SAVEPOINT active_record_1
2590
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2591
+ SQL (0.3ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 456], ["created_at", "2015-02-18 13:46:23.164885"], ["updated_at", "2015-02-18 13:46:23.164885"]]
2592
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2593
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
2594
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
2595
+  (0.1ms) SAVEPOINT active_record_1
2596
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2597
+ SQL (0.8ms) INSERT INTO "accounts" ("uid", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["uid", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-02-18 13:46:23.172278"], ["updated_at", "2015-02-18 13:46:23.172278"]]
2598
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2599
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
2600
+  (0.6ms) rollback transaction
130
2601
   (0.1ms) begin transaction
131
-  (0.0ms) rollback transaction
2602
+  (0.0ms) SAVEPOINT active_record_1
2603
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2604
+ SQL (0.2ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 456], ["created_at", "2015-02-18 13:46:23.178568"], ["updated_at", "2015-02-18 13:46:23.178568"]]
2605
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2606
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
2607
+  (0.0ms) SAVEPOINT active_record_1
2608
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2609
+ SQL (0.3ms) INSERT INTO "accounts" ("uid", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["uid", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-02-18 13:46:23.181273"], ["updated_at", "2015-02-18 13:46:23.181273"]]
2610
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2611
+  (0.7ms) rollback transaction
2612
+  (0.1ms) begin transaction
2613
+  (0.1ms) SAVEPOINT active_record_1
2614
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2615
+ SQL (0.5ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 456], ["created_at", "2015-02-18 13:46:23.186838"], ["updated_at", "2015-02-18 13:46:23.186838"]]
2616
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2617
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
2618
+  (0.1ms) SAVEPOINT active_record_1
2619
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2620
+ SQL (0.3ms) INSERT INTO "accounts" ("uid", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["uid", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-02-18 13:46:23.190608"], ["updated_at", "2015-02-18 13:46:23.190608"]]
2621
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2622
+  (0.5ms) rollback transaction
132
2623
   (0.1ms) begin transaction
133
-  (0.1ms) rollback transaction
2624
+  (0.1ms) SAVEPOINT active_record_1
2625
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2626
+ SQL (0.4ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 456], ["created_at", "2015-02-18 13:46:23.196635"], ["updated_at", "2015-02-18 13:46:23.196635"]]
2627
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2628
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
2629
+  (0.1ms) SAVEPOINT active_record_1
2630
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2631
+ SQL (0.3ms) INSERT INTO "accounts" ("uid", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["uid", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-02-18 13:46:23.200192"], ["updated_at", "2015-02-18 13:46:23.200192"]]
2632
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2633
+  (0.4ms) rollback transaction
2634
+  (0.1ms) begin transaction
2635
+  (0.0ms) SAVEPOINT active_record_1
2636
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2637
+ SQL (0.3ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 456], ["created_at", "2015-02-18 13:46:23.204129"], ["updated_at", "2015-02-18 13:46:23.204129"]]
2638
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2639
+  (0.0ms) SAVEPOINT active_record_1
2640
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2641
+ SQL (0.3ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 123], ["created_at", "2015-02-18 13:46:23.206160"], ["updated_at", "2015-02-18 13:46:23.206160"]]
2642
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2643
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
2644
+  (0.0ms) SAVEPOINT active_record_1
2645
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
2646
+ SQL (0.1ms) 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-02-18 13:46:23.209365"], ["id", 2]]
2647
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2648
+  (0.6ms) rollback transaction
134
2649
   (0.0ms) begin transaction
135
- Processing by SessionsController#failure as HTML
136
- Rendered /Users/pr0d1r2/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.4ms)
137
- Completed 200 OK in 7ms (Views: 6.9ms | ActiveRecord: 0.0ms)
138
-  (0.1ms) rollback transaction
2650
+  (0.0ms) SAVEPOINT active_record_1
2651
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2652
+ SQL (0.3ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 456], ["created_at", "2015-02-18 13:46:23.213367"], ["updated_at", "2015-02-18 13:46:23.213367"]]
2653
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2654
+  (0.1ms) SAVEPOINT active_record_1
2655
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2656
+ SQL (0.4ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 123], ["created_at", "2015-02-18 13:46:23.216652"], ["updated_at", "2015-02-18 13:46:23.216652"]]
2657
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2658
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
2659
+  (0.1ms) SAVEPOINT active_record_1
2660
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
2661
+ SQL (0.1ms) 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-02-18 13:46:23.220560"], ["id", 2]]
2662
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2663
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
2664
+  (0.5ms) rollback transaction
2665
+  (0.1ms) begin transaction
2666
+  (0.0ms) SAVEPOINT active_record_1
2667
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2668
+ SQL (0.3ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 456], ["created_at", "2015-02-18 13:46:23.224887"], ["updated_at", "2015-02-18 13:46:23.224887"]]
2669
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2670
+  (0.1ms) SAVEPOINT active_record_1
2671
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2672
+ SQL (0.3ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 123], ["created_at", "2015-02-18 13:46:23.227708"], ["updated_at", "2015-02-18 13:46:23.227708"]]
2673
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2674
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
2675
+  (0.0ms) SAVEPOINT active_record_1
2676
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
2677
+ SQL (0.1ms) 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-02-18 13:46:23.231077"], ["id", 2]]
2678
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2679
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
2680
+  (0.4ms) rollback transaction
2681
+  (0.1ms) begin transaction
2682
+  (0.1ms) SAVEPOINT active_record_1
2683
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2684
+ SQL (0.4ms) INSERT INTO "accounts" ("uid", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["uid", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1424180783"], ["created_at", "2015-02-18 13:46:23.244175"], ["updated_at", "2015-02-18 13:46:23.244175"]]
2685
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2686
+  (0.1ms) SAVEPOINT active_record_1
2687
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
2688
+ SQL (0.3ms) 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", "1424439983"], ["updated_at", "2015-02-18 13:46:23.247467"], ["id", 1]]
2689
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2690
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
2691
+  (0.5ms) rollback transaction
2692
+  (0.1ms) begin transaction
2693
+  (0.1ms) SAVEPOINT active_record_1
2694
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2695
+ SQL (0.4ms) INSERT INTO "accounts" ("uid", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["uid", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1424180783"], ["created_at", "2015-02-18 13:46:23.254472"], ["updated_at", "2015-02-18 13:46:23.254472"]]
2696
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2697
+  (0.0ms) SAVEPOINT active_record_1
2698
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
2699
+ SQL (0.3ms) 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", "1424439983"], ["updated_at", "2015-02-18 13:46:23.258216"], ["id", 1]]
2700
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2701
+  (0.5ms) rollback transaction
2702
+  (0.1ms) begin transaction
2703
+  (0.1ms) SAVEPOINT active_record_1
2704
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2705
+ SQL (0.3ms) INSERT INTO "accounts" ("uid", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["uid", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1424353583"], ["created_at", "2015-02-18 13:46:23.263933"], ["updated_at", "2015-02-18 13:46:23.263933"]]
2706
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2707
+  (0.5ms) rollback transaction
2708
+  (0.1ms) begin transaction
2709
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
2710
+  (0.1ms) SAVEPOINT active_record_1
2711
+ SQL (0.3ms) INSERT INTO "accounts" ("uid", "created_at", "updated_at") VALUES (?, ?, ?) [["uid", 0], ["created_at", "2015-02-18 13:46:23.272472"], ["updated_at", "2015-02-18 13:46:23.272472"]]
2712
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2713
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
2714
+  (0.6ms) rollback transaction
139
2715
   (0.1ms) begin transaction
140
- Processing by SessionsController#failure as HTML
141
- Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)
142
2716
   (0.1ms) rollback transaction
143
-  (0.0ms) begin transaction
2717
+  (0.1ms) begin transaction
144
2718
  Processing by SessionsController#destroy as HTML
145
2719
  Redirected to http://test.host/signed_out
146
2720
  Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
@@ -148,38 +2722,72 @@ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
148
2722
   (0.1ms) begin transaction
149
2723
  Processing by SessionsController#destroy as HTML
150
2724
  Redirected to http://test.host/
151
- Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
2725
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
2726
+  (0.1ms) rollback transaction
2727
+  (0.1ms) begin transaction
2728
+ Processing by SessionsController#failure as HTML
2729
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
2730
+ Completed 200 OK in 10ms (Views: 9.4ms | ActiveRecord: 0.0ms)
2731
+  (0.1ms) rollback transaction
2732
+  (0.1ms) begin transaction
2733
+ Processing by SessionsController#failure as HTML
2734
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
2735
+ Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
152
2736
   (0.1ms) rollback transaction
153
2737
   (0.1ms) begin transaction
154
2738
  Processing by SessionsController#create as HTML
155
2739
  Parameters: {"provider"=>"bookingsync"}
156
- Account Load (0.4ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
157
- SQLite3::SQLException: no such table: accounts: SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
158
- Completed 500 Internal Server Error in 6ms
159
-  (0.1ms) rollback transaction
2740
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
2741
+  (0.1ms) SAVEPOINT active_record_1
2742
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2743
+ SQL (0.3ms) INSERT INTO "accounts" ("uid", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["uid", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-02-18 13:46:23.342486"], ["updated_at", "2015-02-18 13:46:23.342486"]]
2744
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2745
+ Redirected to http://test.host/
2746
+ Completed 302 Found in 6ms (ActiveRecord: 0.8ms)
2747
+  (0.5ms) rollback transaction
160
2748
   (0.1ms) begin transaction
161
2749
  Processing by SessionsController#create as HTML
162
2750
  Parameters: {"provider"=>"bookingsync"}
163
- Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
164
- SQLite3::SQLException: no such table: accounts: SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
165
- Completed 500 Internal Server Error in 1ms
166
-  (0.1ms) rollback transaction
2751
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
2752
+  (0.1ms) SAVEPOINT active_record_1
2753
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2754
+ SQL (0.3ms) INSERT INTO "accounts" ("uid", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["uid", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-02-18 13:46:23.351852"], ["updated_at", "2015-02-18 13:46:23.351852"]]
2755
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2756
+ Redirected to http://test.host/admin
2757
+ Completed 302 Found in 4ms (ActiveRecord: 0.6ms)
2758
+  (0.6ms) rollback transaction
167
2759
   (0.1ms) begin transaction
168
2760
  Processing by SessionsController#create as HTML
169
2761
  Parameters: {"provider"=>"bookingsync"}
170
- Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
171
- SQLite3::SQLException: no such table: accounts: SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
172
- Completed 500 Internal Server Error in 1ms
2762
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
2763
+  (0.1ms) SAVEPOINT active_record_1
2764
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2765
+ SQL (0.3ms) INSERT INTO "accounts" ("uid", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["uid", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-02-18 13:46:23.361951"], ["updated_at", "2015-02-18 13:46:23.361951"]]
2766
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2767
+ Redirected to http://test.host/
2768
+ Completed 302 Found in 5ms (ActiveRecord: 0.7ms)
2769
+  (0.6ms) rollback transaction
2770
+  (0.1ms) begin transaction
2771
+  (0.1ms) rollback transaction
2772
+  (0.1ms) begin transaction
2773
+  (0.1ms) rollback transaction
2774
+  (0.1ms) begin transaction
2775
+  (0.1ms) rollback transaction
2776
+  (0.1ms) begin transaction
2777
+  (0.1ms) rollback transaction
2778
+  (0.0ms) begin transaction
173
2779
   (0.1ms) rollback transaction
174
2780
   (0.1ms) begin transaction
175
2781
  Processing by AuthenticatedController#index as JS
2782
+ Rendered text template (0.0ms)
176
2783
  Filter chain halted as :authenticate_account! rendered or redirected
177
- Completed 401 Unauthorized in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)
2784
+ Completed 401 Unauthorized in 4ms (Views: 3.4ms | ActiveRecord: 0.0ms)
178
2785
   (0.1ms) rollback transaction
179
-  (0.1ms) begin transaction
2786
+  (0.0ms) begin transaction
180
2787
  Processing by AuthenticatedController#index as JS
2788
+ Rendered text template (0.0ms)
181
2789
  Filter chain halted as :authenticate_account! rendered or redirected
182
- Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)
2790
+ Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
183
2791
   (0.1ms) rollback transaction
184
2792
   (0.1ms) begin transaction
185
2793
  Processing by AuthenticatedController#index as HTML
@@ -187,34 +2795,153 @@ Redirected to http://test.host/auth/bookingsync/?account_id=
187
2795
  Filter chain halted as :authenticate_account! rendered or redirected
188
2796
  Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
189
2797
   (0.1ms) rollback transaction
190
-  (0.1ms) begin transaction
2798
+  (0.0ms) begin transaction
191
2799
  Processing by AuthenticatedController#index as HTML
2800
+ Rendered text template (0.0ms)
192
2801
  Filter chain halted as :authenticate_account! rendered or redirected
193
2802
  Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
194
2803
   (0.1ms) rollback transaction
195
2804
   (0.3ms) begin transaction
196
- Processing by AuthenticatedController#index as JS
197
- Rendered text template (0.0ms)
198
- Filter chain halted as :authenticate_account! rendered or redirected
199
- Completed 401 Unauthorized in 6ms (Views: 5.8ms | ActiveRecord: 0.0ms)
200
-  (0.1ms) rollback transaction
201
-  (0.1ms) begin transaction
202
- Processing by AuthenticatedController#index as JS
203
- Filter chain halted as :authenticate_account! rendered or redirected
204
- Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
205
-  (0.1ms) rollback transaction
2805
+  (0.1ms) SAVEPOINT active_record_1
2806
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2807
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 15:19:40.166022"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 15:19:40.166022"]]
2808
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2809
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
2810
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
2811
+  (0.1ms) SAVEPOINT active_record_1
2812
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2813
+ SQL (1.0ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 15:19:40.180105"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 15:19:40.180105"]]
2814
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2815
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
2816
+  (0.5ms) rollback transaction
2817
+  (0.0ms) begin transaction
2818
+  (0.0ms) SAVEPOINT active_record_1
2819
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2820
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 15:19:40.185023"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 15:19:40.185023"]]
2821
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2822
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
2823
+  (0.0ms) SAVEPOINT active_record_1
2824
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2825
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 15:19:40.187542"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 15:19:40.187542"]]
2826
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2827
+  (0.5ms) rollback transaction
206
2828
   (0.1ms) begin transaction
207
- Processing by AuthenticatedController#index as HTML
208
- Redirected to http://test.host/auth/bookingsync/?account_id=
209
- Filter chain halted as :authenticate_account! rendered or redirected
210
- Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
211
-  (0.1ms) rollback transaction
2829
+  (0.1ms) SAVEPOINT active_record_1
2830
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2831
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 15:19:40.193705"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 15:19:40.193705"]]
2832
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2833
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
2834
+  (0.0ms) SAVEPOINT active_record_1
2835
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2836
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 15:19:40.196421"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 15:19:40.196421"]]
2837
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2838
+  (0.6ms) rollback transaction
2839
+  (0.1ms) begin transaction
2840
+  (0.0ms) SAVEPOINT active_record_1
2841
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2842
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 15:19:40.201906"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 15:19:40.201906"]]
2843
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2844
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
2845
+  (0.0ms) SAVEPOINT active_record_1
2846
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2847
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 15:19:40.204853"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 15:19:40.204853"]]
2848
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2849
+  (0.6ms) rollback transaction
212
2850
   (0.1ms) begin transaction
213
- Processing by AuthenticatedController#index as HTML
214
- Filter chain halted as :authenticate_account! rendered or redirected
215
- Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
216
-  (0.1ms) rollback transaction
2851
+  (0.0ms) SAVEPOINT active_record_1
2852
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2853
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 15:19:40.208855"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 15:19:40.208855"]]
2854
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2855
+  (0.0ms) SAVEPOINT active_record_1
2856
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2857
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 15:19:40.210533"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 15:19:40.210533"]]
2858
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2859
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
2860
+  (0.1ms) SAVEPOINT active_record_1
2861
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
2862
+ SQL (0.1ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-18 15:19:40.213454"]]
2863
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2864
+  (0.6ms) rollback transaction
2865
+  (0.0ms) begin transaction
2866
+  (0.1ms) SAVEPOINT active_record_1
2867
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2868
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 15:19:40.217853"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 15:19:40.217853"]]
2869
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2870
+  (0.0ms) SAVEPOINT active_record_1
2871
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2872
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 15:19:40.220068"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 15:19:40.220068"]]
2873
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2874
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
2875
+  (0.0ms) SAVEPOINT active_record_1
2876
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
2877
+ SQL (0.1ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-18 15:19:40.223032"]]
2878
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2879
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
2880
+  (0.5ms) rollback transaction
2881
+  (0.1ms) begin transaction
2882
+  (0.0ms) SAVEPOINT active_record_1
2883
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
2884
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 15:19:40.227198"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-18 15:19:40.227198"]]
2885
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2886
+  (0.0ms) SAVEPOINT active_record_1
2887
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2888
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-18 15:19:40.229305"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 15:19:40.229305"]]
2889
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2890
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
2891
+  (0.0ms) SAVEPOINT active_record_1
2892
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
2893
+ SQL (0.1ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-18 15:19:40.232364"]]
2894
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2895
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
2896
+  (0.5ms) rollback transaction
2897
+  (0.1ms) begin transaction
2898
+  (0.0ms) SAVEPOINT active_record_1
2899
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" IS NULL LIMIT 1
2900
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2015-02-18 15:19:40.235889"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2015-02-18 15:19:40.235889"]]
2901
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2902
+  (0.0ms) SAVEPOINT active_record_1
2903
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" IS NULL AND "accounts"."id" != 1) LIMIT 1
2904
+ SQL (0.4ms) UPDATE "accounts" SET "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 1 [["oauth_access_token", nil], ["oauth_expires_at", nil], ["oauth_refresh_token", nil], ["updated_at", "2015-02-18 15:19:40.237781"]]
2905
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2906
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
2907
+  (0.4ms) rollback transaction
217
2908
   (0.0ms) begin transaction
2909
+  (0.1ms) SAVEPOINT active_record_1
2910
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2911
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 15:19:40.254194"], ["oauth_access_token", "token"], ["oauth_expires_at", "1424186380"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-18 15:19:40.254194"]]
2912
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2913
+  (0.0ms) SAVEPOINT active_record_1
2914
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
2915
+ SQL (0.3ms) 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", "1424445580"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-18 15:19:40.256485"]]
2916
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2917
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
2918
+  (0.4ms) rollback transaction
2919
+  (0.1ms) begin transaction
2920
+  (0.0ms) SAVEPOINT active_record_1
2921
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2922
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 15:19:40.260673"], ["oauth_access_token", "token"], ["oauth_expires_at", "1424186380"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-18 15:19:40.260673"]]
2923
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2924
+  (0.0ms) SAVEPOINT active_record_1
2925
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
2926
+ SQL (0.3ms) 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", "1424445580"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-18 15:19:40.262481"]]
2927
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2928
+  (0.4ms) rollback transaction
2929
+  (0.1ms) begin transaction
2930
+  (0.0ms) SAVEPOINT active_record_1
2931
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2932
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 15:19:40.265863"], ["oauth_access_token", "token"], ["oauth_expires_at", 1424359180], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-18 15:19:40.265863"]]
2933
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2934
+  (0.4ms) rollback transaction
2935
+  (0.0ms) begin transaction
2936
+  (0.1ms) rollback transaction
2937
+  (0.1ms) begin transaction
2938
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
2939
+  (0.1ms) SAVEPOINT active_record_1
2940
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "uid", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-02-18 15:19:40.281098"], ["uid", 0], ["updated_at", "2015-02-18 15:19:40.281098"]]
2941
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2942
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
2943
+  (0.4ms) rollback transaction
2944
+  (0.1ms) begin transaction
218
2945
  Processing by SessionsController#destroy as HTML
219
2946
  Redirected to http://test.host/signed_out
220
2947
  Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
@@ -225,81 +2952,88 @@ Redirected to http://test.host/
225
2952
  Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
226
2953
   (0.1ms) rollback transaction
227
2954
   (0.1ms) begin transaction
2955
+ Processing by SessionsController#failure as HTML
2956
+ Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.0ms)
2957
+  (0.1ms) rollback transaction
2958
+  (0.1ms) begin transaction
2959
+ Processing by SessionsController#failure as HTML
2960
+ Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)
2961
+  (0.1ms) rollback transaction
2962
+  (0.1ms) begin transaction
228
2963
  Processing by SessionsController#create as HTML
229
2964
  Parameters: {"provider"=>"bookingsync"}
230
- Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
231
- SQLite3::SQLException: no such table: accounts: SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
232
- Completed 500 Internal Server Error in 7ms
233
-  (0.1ms) rollback transaction
234
-  (0.1ms) begin transaction
2965
+ Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
2966
+  (0.1ms) SAVEPOINT active_record_1
2967
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2968
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 15:19:40.325124"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 15:19:40.325124"]]
2969
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2970
+ Redirected to http://test.host/
2971
+ Completed 302 Found in 5ms (ActiveRecord: 0.9ms)
2972
+  (0.5ms) rollback transaction
2973
+  (0.2ms) begin transaction
235
2974
  Processing by SessionsController#create as HTML
236
2975
  Parameters: {"provider"=>"bookingsync"}
237
2976
  Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
238
- SQLite3::SQLException: no such table: accounts: SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
239
- Completed 500 Internal Server Error in 1ms
240
-  (0.1ms) rollback transaction
2977
+  (0.1ms) SAVEPOINT active_record_1
2978
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2979
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 15:19:40.335038"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 15:19:40.335038"]]
2980
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2981
+ Redirected to http://test.host/admin
2982
+ Completed 302 Found in 5ms (ActiveRecord: 1.0ms)
2983
+  (0.6ms) rollback transaction
241
2984
   (0.1ms) begin transaction
242
2985
  Processing by SessionsController#create as HTML
243
2986
  Parameters: {"provider"=>"bookingsync"}
244
- Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
245
- SQLite3::SQLException: no such table: accounts: SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
246
- Completed 500 Internal Server Error in 1ms
247
-  (0.1ms) rollback transaction
2987
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
2988
+  (0.0ms) SAVEPOINT active_record_1
2989
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
2990
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-18 15:19:40.343812"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-18 15:19:40.343812"]]
2991
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2992
+ Redirected to http://test.host/
2993
+ Completed 302 Found in 3ms (ActiveRecord: 0.6ms)
2994
+  (0.4ms) rollback transaction
248
2995
   (0.1ms) begin transaction
249
- Processing by SessionsController#failure as HTML
250
- Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms)
251
2996
   (0.1ms) rollback transaction
252
-  (0.1ms) begin transaction
253
- Processing by SessionsController#failure as HTML
254
- Completed 200 OK in 1ms (Views: 1.2ms | ActiveRecord: 0.0ms)
2997
+  (0.0ms) begin transaction
255
2998
   (0.1ms) rollback transaction
256
2999
   (0.1ms) begin transaction
257
3000
   (0.1ms) rollback transaction
258
3001
   (0.1ms) begin transaction
259
-  (0.0ms) rollback transaction
3002
+  (0.1ms) rollback transaction
260
3003
   (0.1ms) begin transaction
261
3004
   (0.1ms) rollback transaction
262
-  (0.0ms) begin transaction
3005
+  (0.1ms) begin transaction
3006
+ Processing by AuthenticatedController#index as JS
3007
+ Filter chain halted as :authenticate_account! rendered or redirected
3008
+ Completed 401 Unauthorized in 3ms (Views: 2.0ms | ActiveRecord: 0.0ms)
263
3009
   (0.1ms) rollback transaction
264
-  (0.0ms) begin transaction
265
-  (0.0ms) rollback transaction
266
-  (0.0ms) begin transaction
267
-  (0.0ms) rollback transaction
268
-  (0.0ms) begin transaction
269
-  (0.0ms) rollback transaction
270
-  (0.0ms) begin transaction
3010
+  (0.1ms) begin transaction
3011
+ Processing by AuthenticatedController#index as JS
3012
+ Filter chain halted as :authenticate_account! rendered or redirected
3013
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
271
3014
   (0.1ms) rollback transaction
272
3015
   (0.0ms) begin transaction
273
-  (0.0ms) rollback transaction
274
-  (0.0ms) begin transaction
275
-  (0.0ms) rollback transaction
276
-  (0.0ms) begin transaction
277
-  (0.0ms) rollback transaction
278
-  (0.0ms) begin transaction
3016
+ Processing by AuthenticatedController#index as HTML
3017
+ Redirected to http://test.host/auth/bookingsync/?account_id=
3018
+ Filter chain halted as :authenticate_account! rendered or redirected
3019
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
279
3020
   (0.1ms) rollback transaction
280
-  (0.1ms) begin transaction
281
-  (0.0ms) rollback transaction
282
3021
   (0.0ms) begin transaction
283
-  (0.0ms) rollback transaction
284
-  (0.1ms) begin transaction
285
-  (0.1ms) rollback transaction
286
-  (0.1ms) begin transaction
3022
+ Processing by AuthenticatedController#index as HTML
3023
+ Filter chain halted as :authenticate_account! rendered or redirected
3024
+ Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
287
3025
   (0.1ms) rollback transaction
288
-  (0.1ms) begin transaction
289
-  (0.0ms) rollback transaction
290
-  (0.0ms) begin transaction
291
-  (0.0ms) rollback transaction
292
-  (0.3ms) begin transaction
3026
+  (0.4ms) begin transaction
293
3027
   (0.1ms) rollback transaction
294
-  (0.1ms) begin transaction
295
-  (0.0ms) rollback transaction
296
-  (0.1ms) begin transaction
3028
+  (0.0ms) begin transaction
297
3029
   (0.1ms) rollback transaction
3030
+  (0.0ms) begin transaction
3031
+  (0.0ms) rollback transaction
298
3032
   (0.1ms) begin transaction
299
3033
   (0.0ms) rollback transaction
300
3034
   (0.0ms) begin transaction
301
3035
   (0.1ms) rollback transaction
302
-  (0.0ms) begin transaction
3036
+  (0.1ms) begin transaction
303
3037
  Processing by SessionsController#destroy as HTML
304
3038
  Redirected to http://test.host/signed_out
305
3039
  Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
@@ -307,81 +3041,212 @@ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
307
3041
   (0.1ms) begin transaction
308
3042
  Processing by SessionsController#destroy as HTML
309
3043
  Redirected to http://test.host/
310
- Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
3044
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
311
3045
   (0.1ms) rollback transaction
312
3046
   (0.0ms) begin transaction
313
3047
  Processing by SessionsController#failure as HTML
314
- Completed 200 OK in 8ms (Views: 7.4ms | ActiveRecord: 0.0ms)
3048
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
3049
+ Completed 200 OK in 11ms (Views: 11.1ms | ActiveRecord: 0.0ms)
315
3050
   (0.1ms) rollback transaction
316
3051
   (0.1ms) begin transaction
317
3052
  Processing by SessionsController#failure as HTML
318
- Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
3053
+ Rendered /Users/manda/projects/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
3054
+ Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms)
319
3055
   (0.1ms) rollback transaction
320
-  (0.1ms) begin transaction
3056
+  (0.0ms) begin transaction
321
3057
  Processing by SessionsController#create as HTML
322
3058
  Parameters: {"provider"=>"bookingsync"}
323
- Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
324
- SQLite3::SQLException: no such table: accounts: SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
325
- Completed 500 Internal Server Error in 8ms
326
-  (0.1ms) rollback transaction
3059
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
3060
+  (0.1ms) SAVEPOINT active_record_1
3061
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
3062
+ SQL (0.5ms) INSERT INTO "accounts" ("uid", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["uid", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-02-18 15:19:46.669423"], ["updated_at", "2015-02-18 15:19:46.669423"]]
3063
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3064
+ Redirected to http://test.host/
3065
+ Completed 302 Found in 40ms (ActiveRecord: 2.6ms)
3066
+  (0.6ms) rollback transaction
327
3067
   (0.1ms) begin transaction
328
3068
  Processing by SessionsController#create as HTML
329
3069
  Parameters: {"provider"=>"bookingsync"}
330
- Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
331
- SQLite3::SQLException: no such table: accounts: SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
332
- Completed 500 Internal Server Error in 1ms
333
-  (0.1ms) rollback transaction
3070
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
3071
+  (0.1ms) SAVEPOINT active_record_1
3072
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
3073
+ SQL (0.4ms) INSERT INTO "accounts" ("uid", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["uid", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-02-18 15:19:46.680025"], ["updated_at", "2015-02-18 15:19:46.680025"]]
3074
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3075
+ Redirected to http://test.host/admin
3076
+ Completed 302 Found in 6ms (ActiveRecord: 0.9ms)
3077
+  (0.6ms) rollback transaction
334
3078
   (0.1ms) begin transaction
335
3079
  Processing by SessionsController#create as HTML
336
3080
  Parameters: {"provider"=>"bookingsync"}
337
- Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
338
- SQLite3::SQLException: no such table: accounts: SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
339
- Completed 500 Internal Server Error in 1ms
340
-  (0.1ms) rollback transaction
3081
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
3082
+  (0.1ms) SAVEPOINT active_record_1
3083
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
3084
+ SQL (0.3ms) INSERT INTO "accounts" ("uid", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["uid", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-02-18 15:19:46.690245"], ["updated_at", "2015-02-18 15:19:46.690245"]]
3085
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3086
+ Redirected to http://test.host/
3087
+ Completed 302 Found in 4ms (ActiveRecord: 0.6ms)
3088
+  (0.4ms) rollback transaction
341
3089
   (0.1ms) begin transaction
342
-  (0.0ms) rollback transaction
343
-  (0.0ms) begin transaction
344
-  (0.0ms) rollback transaction
345
-  (0.0ms) begin transaction
346
-  (0.0ms) rollback transaction
347
-  (0.0ms) begin transaction
348
-  (0.0ms) rollback transaction
349
-  (0.0ms) begin transaction
350
-  (0.0ms) rollback transaction
351
-  (0.0ms) begin transaction
352
-  (0.0ms) rollback transaction
3090
+  (0.0ms) SAVEPOINT active_record_1
3091
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
3092
+ SQL (0.4ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 456], ["created_at", "2015-02-18 15:19:46.694898"], ["updated_at", "2015-02-18 15:19:46.694898"]]
3093
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3094
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
3095
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
3096
+  (0.0ms) SAVEPOINT active_record_1
3097
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
3098
+ SQL (1.0ms) INSERT INTO "accounts" ("uid", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["uid", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-02-18 15:19:46.701105"], ["updated_at", "2015-02-18 15:19:46.701105"]]
3099
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3100
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
3101
+  (0.5ms) rollback transaction
3102
+  (0.1ms) begin transaction
3103
+  (0.0ms) SAVEPOINT active_record_1
3104
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
3105
+ SQL (0.3ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 456], ["created_at", "2015-02-18 15:19:46.706278"], ["updated_at", "2015-02-18 15:19:46.706278"]]
3106
+  (0.2ms) RELEASE SAVEPOINT active_record_1
3107
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
3108
+  (0.1ms) SAVEPOINT active_record_1
3109
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
3110
+ SQL (0.4ms) INSERT INTO "accounts" ("uid", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["uid", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-02-18 15:19:46.710502"], ["updated_at", "2015-02-18 15:19:46.710502"]]
3111
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3112
+  (0.4ms) rollback transaction
353
3113
   (0.1ms) begin transaction
354
-  (0.0ms) rollback transaction
355
-  (0.0ms) begin transaction
356
-  (0.0ms) rollback transaction
3114
+  (0.0ms) SAVEPOINT active_record_1
3115
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
3116
+ SQL (0.3ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 456], ["created_at", "2015-02-18 15:19:46.715500"], ["updated_at", "2015-02-18 15:19:46.715500"]]
3117
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3118
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
3119
+  (0.1ms) SAVEPOINT active_record_1
3120
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
3121
+ SQL (0.4ms) INSERT INTO "accounts" ("uid", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["uid", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-02-18 15:19:46.719064"], ["updated_at", "2015-02-18 15:19:46.719064"]]
3122
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3123
+  (0.6ms) rollback transaction
3124
+  (0.1ms) begin transaction
3125
+  (0.1ms) SAVEPOINT active_record_1
3126
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
3127
+ SQL (0.4ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 456], ["created_at", "2015-02-18 15:19:46.724680"], ["updated_at", "2015-02-18 15:19:46.724680"]]
3128
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3129
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
3130
+  (0.1ms) SAVEPOINT active_record_1
3131
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
3132
+ SQL (0.4ms) INSERT INTO "accounts" ("uid", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["uid", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2015-02-18 15:19:46.728176"], ["updated_at", "2015-02-18 15:19:46.728176"]]
3133
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3134
+  (0.7ms) rollback transaction
357
3135
   (0.1ms) begin transaction
358
-  (0.0ms) rollback transaction
359
-  (0.0ms) begin transaction
360
-  (0.0ms) rollback transaction
3136
+  (0.1ms) SAVEPOINT active_record_1
3137
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
3138
+ SQL (0.4ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 456], ["created_at", "2015-02-18 15:19:46.733306"], ["updated_at", "2015-02-18 15:19:46.733306"]]
3139
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3140
+  (0.1ms) SAVEPOINT active_record_1
3141
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
3142
+ SQL (0.4ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 123], ["created_at", "2015-02-18 15:19:46.736163"], ["updated_at", "2015-02-18 15:19:46.736163"]]
3143
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3144
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
3145
+  (0.0ms) SAVEPOINT active_record_1
3146
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
3147
+ SQL (0.1ms) 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-02-18 15:19:46.740351"], ["id", 2]]
3148
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3149
+  (0.5ms) rollback transaction
3150
+  (0.1ms) begin transaction
3151
+  (0.0ms) SAVEPOINT active_record_1
3152
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
3153
+ SQL (0.2ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 456], ["created_at", "2015-02-18 15:19:46.744612"], ["updated_at", "2015-02-18 15:19:46.744612"]]
3154
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3155
+  (0.0ms) SAVEPOINT active_record_1
3156
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
3157
+ SQL (0.3ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 123], ["created_at", "2015-02-18 15:19:46.746686"], ["updated_at", "2015-02-18 15:19:46.746686"]]
3158
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3159
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
3160
+  (0.1ms) SAVEPOINT active_record_1
3161
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
3162
+ SQL (0.1ms) 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-02-18 15:19:46.750189"], ["id", 2]]
3163
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3164
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
3165
+  (0.5ms) rollback transaction
3166
+  (0.1ms) begin transaction
3167
+  (0.1ms) SAVEPOINT active_record_1
3168
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
3169
+ SQL (0.3ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 456], ["created_at", "2015-02-18 15:19:46.756028"], ["updated_at", "2015-02-18 15:19:46.756028"]]
3170
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3171
+  (0.0ms) SAVEPOINT active_record_1
3172
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
3173
+ SQL (0.3ms) INSERT INTO "accounts" ("provider", "uid", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["provider", "bookingsync"], ["uid", 123], ["created_at", "2015-02-18 15:19:46.758254"], ["updated_at", "2015-02-18 15:19:46.758254"]]
3174
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3175
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = ? AND "accounts"."provider" = ? LIMIT 1 [["uid", 123], ["provider", "bookingsync"]]
3176
+  (0.1ms) SAVEPOINT active_record_1
3177
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
3178
+ SQL (0.1ms) 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-02-18 15:19:46.760981"], ["id", 2]]
3179
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3180
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
3181
+  (0.5ms) rollback transaction
3182
+  (0.1ms) begin transaction
3183
+  (0.0ms) SAVEPOINT active_record_1
3184
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" IS NULL LIMIT 1
3185
+ SQL (0.3ms) 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-02-18 15:19:46.764598"], ["updated_at", "2015-02-18 15:19:46.764598"]]
3186
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3187
+  (0.0ms) SAVEPOINT active_record_1
3188
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" IS NULL AND "accounts"."id" != 1) LIMIT 1
3189
+ SQL (0.3ms) 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-02-18 15:19:46.767351"], ["id", 1]]
3190
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3191
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
3192
+  (0.5ms) rollback transaction
361
3193
   (0.1ms) begin transaction
362
-  (0.0ms) rollback transaction
3194
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
3195
+  (0.1ms) SAVEPOINT active_record_1
3196
+ SQL (0.5ms) INSERT INTO "accounts" ("uid", "created_at", "updated_at") VALUES (?, ?, ?) [["uid", 0], ["created_at", "2015-02-18 15:19:46.777881"], ["updated_at", "2015-02-18 15:19:46.777881"]]
3197
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3198
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
3199
+  (0.5ms) rollback transaction
3200
+  (0.1ms) begin transaction
3201
+  (0.1ms) SAVEPOINT active_record_1
3202
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
3203
+ SQL (0.3ms) INSERT INTO "accounts" ("uid", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["uid", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1424186386"], ["created_at", "2015-02-18 15:19:46.793543"], ["updated_at", "2015-02-18 15:19:46.793543"]]
3204
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3205
+  (0.0ms) SAVEPOINT active_record_1
3206
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
3207
+ SQL (0.3ms) 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", "1424445586"], ["updated_at", "2015-02-18 15:19:46.796234"], ["id", 1]]
3208
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3209
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
3210
+  (0.5ms) rollback transaction
363
3211
   (0.1ms) begin transaction
364
-  (0.0ms) rollback transaction
365
-  (0.0ms) begin transaction
366
-  (0.0ms) rollback transaction
3212
+  (0.0ms) SAVEPOINT active_record_1
3213
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
3214
+ SQL (0.5ms) INSERT INTO "accounts" ("uid", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["uid", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1424186386"], ["created_at", "2015-02-18 15:19:46.800853"], ["updated_at", "2015-02-18 15:19:46.800853"]]
3215
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3216
+  (0.1ms) SAVEPOINT active_record_1
3217
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
3218
+ SQL (0.4ms) 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", "1424445586"], ["updated_at", "2015-02-18 15:19:46.804649"], ["id", 1]]
3219
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3220
+  (0.5ms) rollback transaction
3221
+  (0.1ms) begin transaction
3222
+  (0.1ms) SAVEPOINT active_record_1
3223
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
3224
+ SQL (0.3ms) INSERT INTO "accounts" ("uid", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["uid", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1424359186"], ["created_at", "2015-02-18 15:19:46.810239"], ["updated_at", "2015-02-18 15:19:46.810239"]]
3225
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3226
+  (0.6ms) rollback transaction
3227
+  (0.1ms) begin transaction
3228
+  (0.1ms) rollback transaction
367
3229
   (0.1ms) begin transaction
368
3230
  Processing by AuthenticatedController#index as JS
3231
+ Rendered text template (0.0ms)
369
3232
  Filter chain halted as :authenticate_account! rendered or redirected
370
- Completed 401 Unauthorized in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)
3233
+ Completed 401 Unauthorized in 4ms (Views: 3.9ms | ActiveRecord: 0.0ms)
371
3234
   (0.1ms) rollback transaction
372
3235
   (0.1ms) begin transaction
373
3236
  Processing by AuthenticatedController#index as JS
3237
+ Rendered text template (0.0ms)
374
3238
  Filter chain halted as :authenticate_account! rendered or redirected
375
- Completed 401 Unauthorized in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
3239
+ Completed 401 Unauthorized in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
376
3240
   (0.1ms) rollback transaction
377
-  (0.1ms) begin transaction
3241
+  (0.0ms) begin transaction
378
3242
  Processing by AuthenticatedController#index as HTML
379
3243
  Redirected to http://test.host/auth/bookingsync/?account_id=
380
3244
  Filter chain halted as :authenticate_account! rendered or redirected
381
3245
  Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
382
3246
   (0.1ms) rollback transaction
383
-  (0.1ms) begin transaction
3247
+  (0.0ms) begin transaction
384
3248
  Processing by AuthenticatedController#index as HTML
3249
+ Rendered text template (0.0ms)
385
3250
  Filter chain halted as :authenticate_account! rendered or redirected
386
- Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
3251
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
387
3252
   (0.1ms) rollback transaction