bookingsync-engine 0.4.3 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d93adbbbc222b81d24568db7658cb1eed95d072e
4
- data.tar.gz: e473056b861f09e6b3e25be301472b1584792850
3
+ metadata.gz: 2f4553c2aa2d33fff7c7e4682e1b798942337185
4
+ data.tar.gz: b0601325fb091cf3245eced3569f2d4d003b1605
5
5
  SHA512:
6
- metadata.gz: 67b4de4948fff649d4c5f0342915836f434d2d622c061234652ce6282f74f6789e2f11ecc2244c8a94c32c663f929563ba4b2d882c2f0805b374220b548d2e22
7
- data.tar.gz: 0d209ea2ca8feff16d6d64ee807cbc7f55ce1e3a9c0c4dbbf911489fded2179c36356e7e1869e2150bc818491fe4b4a8a0cb58926ea245a3142d684a7f0c82ed
6
+ metadata.gz: 0a7a8ba13b2292f623347ddb0a07c2a65af71fff6da88d60721f14f951c68c91cce45ae32708762fe64137d5008b36cb4e4ac9461c7fec9b3f175a1e89715067
7
+ data.tar.gz: 7a63be0dcbff43a7aaf6d7cc66cbef937d2445e42e4a59af56ce6f4df667f2c14d86fedaa5452ca0eb59e6cd7341ce2e1112b1ddcb28ed7cb89a6e43a93ff76e
data/config/routes.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  BookingSync::Engine.routes.draw do
2
- get '/auth/:provider/callback', to: 'sessions#create'
2
+ get '/auth/bookingsync/callback', to: 'sessions#create'
3
3
  get '/auth/failure', to: 'sessions#failure'
4
4
  get '/signout' => 'sessions#destroy', as: :signout
5
5
  end
@@ -1,3 +1,3 @@
1
1
  module BookingSync
2
- ENGINE_VERSION = "0.4.3"
2
+ ENGINE_VERSION = "0.4.4"
3
3
  end
@@ -1108,3 +1108,895 @@ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
1108
1108
   (0.0ms) RELEASE SAVEPOINT active_record_1
1109
1109
  Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
1110
1110
   (0.6ms) rollback transaction
1111
+  (0.2ms) begin transaction
1112
+ Processing by SessionsController#destroy as HTML
1113
+ Redirected to http://test.host/
1114
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
1115
+  (0.0ms) rollback transaction
1116
+  (0.0ms) begin transaction
1117
+ Processing by SessionsController#destroy as HTML
1118
+ Redirected to http://test.host/signed_out
1119
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
1120
+  (0.0ms) rollback transaction
1121
+  (0.0ms) begin transaction
1122
+ Processing by SessionsController#create as HTML
1123
+ Parameters: {"provider"=>"bookingsync"}
1124
+ Account Load (0.4ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1125
+  (0.0ms) SAVEPOINT active_record_1
1126
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1127
+ 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-13 11:59:22.264039"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 11:59:22.264039"]]
1128
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1129
+ Redirected to http://test.host/
1130
+ Completed 302 Found in 21ms (ActiveRecord: 2.4ms)
1131
+  (0.3ms) rollback transaction
1132
+  (0.0ms) begin transaction
1133
+ Processing by SessionsController#create as HTML
1134
+ Parameters: {"provider"=>"bookingsync"}
1135
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1136
+  (0.0ms) SAVEPOINT active_record_1
1137
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1138
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.268374"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 11:59:22.268374"]]
1139
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1140
+ Redirected to http://test.host/
1141
+ Completed 302 Found in 1ms (ActiveRecord: 0.3ms)
1142
+  (0.3ms) rollback transaction
1143
+  (0.0ms) begin transaction
1144
+ Processing by SessionsController#create as HTML
1145
+ Parameters: {"provider"=>"bookingsync"}
1146
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1147
+  (0.0ms) SAVEPOINT active_record_1
1148
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1149
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.270992"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 11:59:22.270992"]]
1150
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1151
+ Redirected to http://test.host/admin
1152
+ Completed 302 Found in 1ms (ActiveRecord: 0.3ms)
1153
+  (0.3ms) rollback transaction
1154
+  (0.0ms) begin transaction
1155
+ Processing by SessionsController#failure as HTML
1156
+ Completed 200 OK in 8ms (Views: 7.5ms | ActiveRecord: 0.0ms)
1157
+  (0.0ms) rollback transaction
1158
+  (0.0ms) begin transaction
1159
+ Processing by SessionsController#failure as HTML
1160
+ Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
1161
+  (0.0ms) rollback transaction
1162
+  (0.0ms) begin transaction
1163
+ Processing by AuthenticatedController#index as HTML
1164
+ Filter chain halted as :authenticate_account! rendered or redirected
1165
+ Completed 200 OK in 1ms (Views: 1.1ms | ActiveRecord: 0.0ms)
1166
+  (0.0ms) rollback transaction
1167
+  (0.0ms) begin transaction
1168
+ Processing by AuthenticatedController#index as HTML
1169
+ Redirected to http://test.host/auth/bookingsync/?account_id=
1170
+ Filter chain halted as :authenticate_account! rendered or redirected
1171
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
1172
+  (0.0ms) rollback transaction
1173
+  (0.0ms) begin transaction
1174
+ Processing by AuthenticatedController#index as JS
1175
+ Filter chain halted as :authenticate_account! rendered or redirected
1176
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
1177
+  (0.0ms) rollback transaction
1178
+  (0.0ms) begin transaction
1179
+ Processing by AuthenticatedController#index as JS
1180
+ Filter chain halted as :authenticate_account! rendered or redirected
1181
+ Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
1182
+  (0.0ms) rollback transaction
1183
+  (0.0ms) begin transaction
1184
+  (0.0ms) SAVEPOINT active_record_1
1185
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1186
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.292671"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 11:59:22.292671"]]
1187
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1188
+  (0.0ms) SAVEPOINT active_record_1
1189
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1190
+ SQL (0.3ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.293954"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 11:59:22.293954"]]
1191
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1192
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1193
+  (0.0ms) SAVEPOINT active_record_1
1194
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
1195
+ 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-13 11:59:22.295857"]]
1196
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1197
+  (0.7ms) rollback transaction
1198
+  (0.0ms) begin transaction
1199
+  (0.0ms) SAVEPOINT active_record_1
1200
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1201
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.298619"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 11:59:22.298619"]]
1202
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1203
+  (0.0ms) SAVEPOINT active_record_1
1204
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1205
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.299478"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 11:59:22.299478"]]
1206
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1207
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1208
+  (0.0ms) SAVEPOINT active_record_1
1209
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
1210
+ SQL (0.0ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-13 11:59:22.300610"]]
1211
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1212
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
1213
+  (0.5ms) rollback transaction
1214
+  (0.0ms) begin transaction
1215
+  (0.0ms) SAVEPOINT active_record_1
1216
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1217
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.302465"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 11:59:22.302465"]]
1218
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1219
+  (0.0ms) SAVEPOINT active_record_1
1220
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1221
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.303256"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 11:59:22.303256"]]
1222
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1223
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1224
+  (0.0ms) SAVEPOINT active_record_1
1225
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
1226
+ SQL (0.0ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-13 11:59:22.304308"]]
1227
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1228
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
1229
+  (0.5ms) rollback transaction
1230
+  (0.0ms) begin transaction
1231
+  (0.0ms) SAVEPOINT active_record_1
1232
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1233
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.306309"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 11:59:22.306309"]]
1234
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1235
+  (0.0ms) SELECT COUNT(*) FROM "accounts"
1236
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1237
+  (0.0ms) SAVEPOINT active_record_1
1238
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1239
+ 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-02-13 11:59:22.309457"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 11:59:22.309457"]]
1240
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1241
+  (0.0ms) SELECT COUNT(*) FROM "accounts"
1242
+  (0.5ms) rollback transaction
1243
+  (0.0ms) begin transaction
1244
+  (0.0ms) SAVEPOINT active_record_1
1245
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1246
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.311448"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 11:59:22.311448"]]
1247
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1248
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1249
+  (0.0ms) SAVEPOINT active_record_1
1250
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1251
+ 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-02-13 11:59:22.312447"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 11:59:22.312447"]]
1252
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1253
+  (0.6ms) rollback transaction
1254
+  (0.0ms) begin transaction
1255
+  (0.0ms) SAVEPOINT active_record_1
1256
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1257
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.314257"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 11:59:22.314257"]]
1258
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1259
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1260
+  (0.0ms) SAVEPOINT active_record_1
1261
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1262
+ 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-02-13 11:59:22.315304"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 11:59:22.315304"]]
1263
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1264
+  (0.6ms) rollback transaction
1265
+  (0.0ms) begin transaction
1266
+  (0.0ms) SAVEPOINT active_record_1
1267
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1268
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.317159"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 11:59:22.317159"]]
1269
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1270
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1271
+  (0.0ms) SAVEPOINT active_record_1
1272
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1273
+ 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-02-13 11:59:22.318174"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 11:59:22.318174"]]
1274
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1275
+  (0.5ms) rollback transaction
1276
+  (0.0ms) begin transaction
1277
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
1278
+  (0.0ms) SAVEPOINT active_record_1
1279
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "uid", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-02-13 11:59:22.322566"], ["uid", 0], ["updated_at", "2015-02-13 11:59:22.322566"]]
1280
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1281
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
1282
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
1283
+  (0.3ms) rollback transaction
1284
+  (0.0ms) begin transaction
1285
+  (0.0ms) rollback transaction
1286
+  (0.0ms) begin transaction
1287
+  (0.0ms) SAVEPOINT active_record_1
1288
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1289
+ 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-13 11:59:22.335773"], ["oauth_access_token", "token"], ["oauth_expires_at", 1423915162], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-13 11:59:22.335773"]]
1290
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1291
+  (0.3ms) rollback transaction
1292
+  (0.0ms) begin transaction
1293
+  (0.0ms) SAVEPOINT active_record_1
1294
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1295
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.338284"], ["oauth_access_token", "token"], ["oauth_expires_at", "1423742362"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-13 11:59:22.338284"]]
1296
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1297
+  (0.0ms) SAVEPOINT active_record_1
1298
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
1299
+ 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", "1424001562"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-13 11:59:22.339133"]]
1300
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1301
+  (0.5ms) rollback transaction
1302
+  (0.0ms) begin transaction
1303
+  (0.0ms) SAVEPOINT active_record_1
1304
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1305
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.341119"], ["oauth_access_token", "token"], ["oauth_expires_at", "1423742362"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-13 11:59:22.341119"]]
1306
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1307
+  (0.0ms) SAVEPOINT active_record_1
1308
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
1309
+ 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", "1424001562"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-13 11:59:22.342036"]]
1310
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1311
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
1312
+  (0.5ms) rollback transaction
1313
+  (0.0ms) begin transaction
1314
+  (0.0ms) SAVEPOINT active_record_1
1315
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" IS NULL LIMIT 1
1316
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2015-02-13 11:59:22.344110"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2015-02-13 11:59:22.344110"]]
1317
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1318
+  (0.0ms) SAVEPOINT active_record_1
1319
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" IS NULL AND "accounts"."id" != 1) LIMIT 1
1320
+ SQL (0.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-13 11:59:22.344871"]]
1321
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1322
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
1323
+  (0.5ms) rollback transaction
1324
+  (0.0ms) begin transaction
1325
+  (0.0ms) rollback transaction
1326
+  (0.0ms) begin transaction
1327
+  (0.0ms) rollback transaction
1328
+  (0.0ms) begin transaction
1329
+  (0.0ms) rollback transaction
1330
+  (0.0ms) begin transaction
1331
+  (0.0ms) rollback transaction
1332
+  (0.2ms) begin transaction
1333
+  (0.0ms) rollback transaction
1334
+  (0.0ms) begin transaction
1335
+  (0.1ms) rollback transaction
1336
+  (0.1ms) begin transaction
1337
+  (0.0ms) rollback transaction
1338
+  (0.0ms) begin transaction
1339
+  (0.0ms) rollback transaction
1340
+  (0.0ms) begin transaction
1341
+  (0.1ms) rollback transaction
1342
+  (0.0ms) begin transaction
1343
+ Processing by AuthenticatedController#index as HTML
1344
+ Rendered text template (0.0ms)
1345
+ Filter chain halted as :authenticate_account! rendered or redirected
1346
+ Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.0ms)
1347
+  (0.0ms) rollback transaction
1348
+  (0.0ms) begin transaction
1349
+ Processing by AuthenticatedController#index as HTML
1350
+ Redirected to http://test.host/auth/bookingsync/?account_id=
1351
+ Filter chain halted as :authenticate_account! rendered or redirected
1352
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
1353
+  (0.0ms) rollback transaction
1354
+  (0.0ms) begin transaction
1355
+ Processing by AuthenticatedController#index as JS
1356
+ Filter chain halted as :authenticate_account! rendered or redirected
1357
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
1358
+  (0.0ms) rollback transaction
1359
+  (0.0ms) begin transaction
1360
+ Processing by AuthenticatedController#index as JS
1361
+ Filter chain halted as :authenticate_account! rendered or redirected
1362
+ Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
1363
+  (0.1ms) rollback transaction
1364
+  (0.0ms) begin transaction
1365
+  (0.0ms) rollback transaction
1366
+  (0.0ms) begin transaction
1367
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
1368
+  (0.0ms) SAVEPOINT active_record_1
1369
+ SQL (0.4ms) INSERT INTO "accounts" ("created_at", "uid", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-02-13 12:01:28.774397"], ["uid", 0], ["updated_at", "2015-02-13 12:01:28.774397"]]
1370
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1371
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
1372
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
1373
+  (0.4ms) rollback transaction
1374
+  (0.0ms) begin transaction
1375
+  (0.0ms) SAVEPOINT active_record_1
1376
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1377
+ 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-13 12:01:28.786845"], ["oauth_access_token", "token"], ["oauth_expires_at", 1423915288], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-13 12:01:28.786845"]]
1378
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1379
+  (0.3ms) rollback transaction
1380
+  (0.0ms) begin transaction
1381
+  (0.0ms) SAVEPOINT active_record_1
1382
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1383
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:01:28.789217"], ["oauth_access_token", "token"], ["oauth_expires_at", "1423742488"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-13 12:01:28.789217"]]
1384
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1385
+  (0.0ms) SAVEPOINT active_record_1
1386
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
1387
+ 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", "1424001688"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-13 12:01:28.790583"]]
1388
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1389
+  (0.5ms) rollback transaction
1390
+  (0.0ms) begin transaction
1391
+  (0.0ms) SAVEPOINT active_record_1
1392
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1393
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:01:28.793031"], ["oauth_access_token", "token"], ["oauth_expires_at", "1423742488"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-13 12:01:28.793031"]]
1394
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1395
+  (0.0ms) SAVEPOINT active_record_1
1396
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
1397
+ 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", "1424001688"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-13 12:01:28.794056"]]
1398
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1399
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
1400
+  (0.5ms) rollback transaction
1401
+  (0.0ms) begin transaction
1402
+  (0.0ms) SAVEPOINT active_record_1
1403
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" IS NULL LIMIT 1
1404
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:01:28.796286"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2015-02-13 12:01:28.796286"]]
1405
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1406
+  (0.0ms) SAVEPOINT active_record_1
1407
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" IS NULL AND "accounts"."id" != 1) LIMIT 1
1408
+ SQL (0.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-13 12:01:28.797089"]]
1409
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1410
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
1411
+  (0.5ms) rollback transaction
1412
+  (0.0ms) begin transaction
1413
+  (0.0ms) SAVEPOINT active_record_1
1414
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1415
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:01:28.799331"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:01:28.799331"]]
1416
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1417
+  (0.0ms) SAVEPOINT active_record_1
1418
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1419
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:01:28.800178"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:01:28.800178"]]
1420
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1421
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1422
+  (0.0ms) SAVEPOINT active_record_1
1423
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
1424
+ SQL (0.0ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-13 12:01:28.802970"]]
1425
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1426
+  (0.5ms) rollback transaction
1427
+  (0.0ms) begin transaction
1428
+  (0.0ms) SAVEPOINT active_record_1
1429
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1430
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:01:28.805072"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:01:28.805072"]]
1431
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1432
+  (0.0ms) SAVEPOINT active_record_1
1433
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1434
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:01:28.805863"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:01:28.805863"]]
1435
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1436
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1437
+  (0.0ms) SAVEPOINT active_record_1
1438
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
1439
+ SQL (0.0ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-13 12:01:28.807089"]]
1440
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1441
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
1442
+  (0.5ms) rollback transaction
1443
+  (0.0ms) begin transaction
1444
+  (0.0ms) SAVEPOINT active_record_1
1445
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1446
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:01:28.808819"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:01:28.808819"]]
1447
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1448
+  (0.0ms) SAVEPOINT active_record_1
1449
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1450
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:01:28.809568"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:01:28.809568"]]
1451
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1452
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1453
+  (0.0ms) SAVEPOINT active_record_1
1454
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
1455
+ SQL (0.0ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-13 12:01:28.810660"]]
1456
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1457
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
1458
+  (0.5ms) rollback transaction
1459
+  (0.0ms) begin transaction
1460
+  (0.0ms) SAVEPOINT active_record_1
1461
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1462
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:01:28.812450"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:01:28.812450"]]
1463
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1464
+  (0.0ms) SELECT COUNT(*) FROM "accounts"
1465
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1466
+  (0.0ms) SAVEPOINT active_record_1
1467
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1468
+ 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-02-13 12:01:28.814921"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:01:28.814921"]]
1469
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1470
+  (0.0ms) SELECT COUNT(*) FROM "accounts"
1471
+  (0.5ms) rollback transaction
1472
+  (0.0ms) begin transaction
1473
+  (0.0ms) SAVEPOINT active_record_1
1474
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1475
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:01:28.816968"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:01:28.816968"]]
1476
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1477
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1478
+  (0.0ms) SAVEPOINT active_record_1
1479
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1480
+ 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-02-13 12:01:28.817994"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:01:28.817994"]]
1481
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1482
+  (0.5ms) rollback transaction
1483
+  (0.0ms) begin transaction
1484
+  (0.0ms) SAVEPOINT active_record_1
1485
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1486
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:01:28.819868"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:01:28.819868"]]
1487
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1488
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1489
+  (0.0ms) SAVEPOINT active_record_1
1490
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1491
+ 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-13 12:01:28.820945"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:01:28.820945"]]
1492
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1493
+  (0.6ms) rollback transaction
1494
+  (0.0ms) begin transaction
1495
+  (0.0ms) SAVEPOINT active_record_1
1496
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1497
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:01:28.823262"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:01:28.823262"]]
1498
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1499
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1500
+  (0.0ms) SAVEPOINT active_record_1
1501
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1502
+ 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-02-13 12:01:28.824310"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:01:28.824310"]]
1503
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1504
+  (0.4ms) rollback transaction
1505
+  (0.0ms) begin transaction
1506
+ Processing by SessionsController#create as HTML
1507
+ Parameters: {"provider"=>"bookingsync"}
1508
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1509
+  (0.0ms) SAVEPOINT active_record_1
1510
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1511
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:01:28.828089"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:01:28.828089"]]
1512
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1513
+ Redirected to http://test.host/
1514
+ Completed 302 Found in 1ms (ActiveRecord: 0.3ms)
1515
+  (0.3ms) rollback transaction
1516
+  (0.0ms) begin transaction
1517
+ Processing by SessionsController#create as HTML
1518
+ Parameters: {"provider"=>"bookingsync"}
1519
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1520
+  (0.0ms) SAVEPOINT active_record_1
1521
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1522
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:01:28.831108"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:01:28.831108"]]
1523
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1524
+ Redirected to http://test.host/admin
1525
+ Completed 302 Found in 1ms (ActiveRecord: 0.3ms)
1526
+  (0.3ms) rollback transaction
1527
+  (0.0ms) begin transaction
1528
+ Processing by SessionsController#create as HTML
1529
+ Parameters: {"provider"=>"bookingsync"}
1530
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1531
+  (0.0ms) SAVEPOINT active_record_1
1532
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1533
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:01:28.833999"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:01:28.833999"]]
1534
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1535
+ Redirected to http://test.host/
1536
+ Completed 302 Found in 1ms (ActiveRecord: 0.3ms)
1537
+  (0.3ms) rollback transaction
1538
+  (0.0ms) begin transaction
1539
+ Processing by SessionsController#failure as HTML
1540
+ Completed 200 OK in 3ms (Views: 2.7ms | ActiveRecord: 0.0ms)
1541
+  (0.0ms) rollback transaction
1542
+  (0.0ms) begin transaction
1543
+ Processing by SessionsController#failure as HTML
1544
+ Completed 200 OK in 0ms (Views: 0.4ms | ActiveRecord: 0.0ms)
1545
+  (0.0ms) rollback transaction
1546
+  (0.0ms) begin transaction
1547
+ Processing by SessionsController#destroy as HTML
1548
+ Redirected to http://test.host/
1549
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
1550
+  (0.0ms) rollback transaction
1551
+  (0.0ms) begin transaction
1552
+ Processing by SessionsController#destroy as HTML
1553
+ Redirected to http://test.host/signed_out
1554
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
1555
+  (0.0ms) rollback transaction
1556
+  (0.2ms) begin transaction
1557
+  (0.0ms) rollback transaction
1558
+  (0.0ms) begin transaction
1559
+  (0.0ms) rollback transaction
1560
+  (0.0ms) begin transaction
1561
+  (0.0ms) rollback transaction
1562
+  (0.0ms) begin transaction
1563
+  (0.0ms) rollback transaction
1564
+  (0.0ms) begin transaction
1565
+  (0.0ms) rollback transaction
1566
+  (0.0ms) begin transaction
1567
+ Processing by SessionsController#destroy as HTML
1568
+ Redirected to http://test.host/signed_out
1569
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
1570
+  (0.0ms) rollback transaction
1571
+  (0.0ms) begin transaction
1572
+ Processing by SessionsController#destroy as HTML
1573
+ Redirected to http://test.host/
1574
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
1575
+  (0.1ms) rollback transaction
1576
+  (0.0ms) begin transaction
1577
+ Processing by SessionsController#failure as HTML
1578
+ Completed 200 OK in 5ms (Views: 4.6ms | ActiveRecord: 0.0ms)
1579
+  (0.0ms) rollback transaction
1580
+  (0.0ms) begin transaction
1581
+ Processing by SessionsController#failure as HTML
1582
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
1583
+  (0.0ms) rollback transaction
1584
+  (0.0ms) begin transaction
1585
+ Processing by SessionsController#create as HTML
1586
+ Parameters: {"provider"=>"bookingsync"}
1587
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1588
+  (0.0ms) SAVEPOINT active_record_1
1589
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1590
+ 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-13 12:02:14.045860"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:14.045860"]]
1591
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1592
+ Redirected to http://test.host/
1593
+ Completed 302 Found in 14ms (ActiveRecord: 1.1ms)
1594
+  (0.5ms) rollback transaction
1595
+  (0.0ms) begin transaction
1596
+ Processing by SessionsController#create as HTML
1597
+ Parameters: {"provider"=>"bookingsync"}
1598
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1599
+  (0.0ms) SAVEPOINT active_record_1
1600
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1601
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:02:14.049656"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:14.049656"]]
1602
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1603
+ Redirected to http://test.host/admin
1604
+ Completed 302 Found in 1ms (ActiveRecord: 0.3ms)
1605
+  (0.3ms) rollback transaction
1606
+  (0.0ms) begin transaction
1607
+ Processing by SessionsController#create as HTML
1608
+ Parameters: {"provider"=>"bookingsync"}
1609
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1610
+  (0.0ms) SAVEPOINT active_record_1
1611
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1612
+ 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-02-13 12:02:14.052702"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:14.052702"]]
1613
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1614
+ Redirected to http://test.host/
1615
+ Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
1616
+  (0.3ms) rollback transaction
1617
+  (0.0ms) begin transaction
1618
+  (0.1ms) rollback transaction
1619
+  (0.0ms) begin transaction
1620
+  (0.0ms) SAVEPOINT active_record_1
1621
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" IS NULL LIMIT 1
1622
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:02:14.058887"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2015-02-13 12:02:14.058887"]]
1623
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1624
+  (0.0ms) SAVEPOINT active_record_1
1625
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" IS NULL AND "accounts"."id" != 1) LIMIT 1
1626
+ 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-13 12:02:14.060317"]]
1627
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1628
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
1629
+  (0.4ms) rollback transaction
1630
+  (0.0ms) begin transaction
1631
+  (0.0ms) SAVEPOINT active_record_1
1632
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1633
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:14.062778"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:14.062778"]]
1634
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1635
+  (0.0ms) SELECT COUNT(*) FROM "accounts"
1636
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1637
+  (0.0ms) SAVEPOINT active_record_1
1638
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1639
+ 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-02-13 12:02:14.065358"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:14.065358"]]
1640
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1641
+  (0.0ms) SELECT COUNT(*) FROM "accounts"
1642
+  (0.5ms) rollback transaction
1643
+  (0.0ms) begin transaction
1644
+  (0.0ms) SAVEPOINT active_record_1
1645
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1646
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:14.067402"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:14.067402"]]
1647
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1648
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1649
+  (0.0ms) SAVEPOINT active_record_1
1650
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1651
+ 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-02-13 12:02:14.068405"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:14.068405"]]
1652
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1653
+  (0.5ms) rollback transaction
1654
+  (0.0ms) begin transaction
1655
+  (0.0ms) SAVEPOINT active_record_1
1656
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1657
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:14.070233"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:14.070233"]]
1658
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1659
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1660
+  (0.0ms) SAVEPOINT active_record_1
1661
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1662
+ 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-02-13 12:02:14.071246"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:14.071246"]]
1663
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1664
+  (0.6ms) rollback transaction
1665
+  (0.0ms) begin transaction
1666
+  (0.0ms) SAVEPOINT active_record_1
1667
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1668
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:14.073056"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:14.073056"]]
1669
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1670
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1671
+  (0.0ms) SAVEPOINT active_record_1
1672
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1673
+ 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-02-13 12:02:14.074071"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:14.074071"]]
1674
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1675
+  (0.5ms) rollback transaction
1676
+  (0.0ms) begin transaction
1677
+  (0.0ms) SAVEPOINT active_record_1
1678
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1679
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:14.075880"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:14.075880"]]
1680
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1681
+  (0.0ms) SAVEPOINT active_record_1
1682
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1683
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:14.076650"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:14.076650"]]
1684
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1685
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1686
+  (0.0ms) SAVEPOINT active_record_1
1687
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
1688
+ 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-13 12:02:14.077739"]]
1689
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1690
+  (0.4ms) rollback transaction
1691
+  (0.0ms) begin transaction
1692
+  (0.0ms) SAVEPOINT active_record_1
1693
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1694
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:14.079500"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:14.079500"]]
1695
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1696
+  (0.0ms) SAVEPOINT active_record_1
1697
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1698
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:14.080291"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:14.080291"]]
1699
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1700
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1701
+  (0.0ms) SAVEPOINT active_record_1
1702
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
1703
+ SQL (0.0ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-13 12:02:14.081434"]]
1704
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1705
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
1706
+  (0.6ms) rollback transaction
1707
+  (0.0ms) begin transaction
1708
+  (0.0ms) SAVEPOINT active_record_1
1709
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1710
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:14.083272"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:14.083272"]]
1711
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1712
+  (0.0ms) SAVEPOINT active_record_1
1713
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1714
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:14.084049"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:14.084049"]]
1715
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1716
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1717
+  (0.0ms) SAVEPOINT active_record_1
1718
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
1719
+ SQL (0.0ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-13 12:02:14.085230"]]
1720
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1721
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
1722
+  (0.5ms) rollback transaction
1723
+  (0.1ms) begin transaction
1724
+  (0.0ms) SAVEPOINT active_record_1
1725
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1726
+ 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-13 12:02:14.087480"], ["oauth_access_token", "token"], ["oauth_expires_at", "1423742534"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-13 12:02:14.087480"]]
1727
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1728
+  (0.0ms) SAVEPOINT active_record_1
1729
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
1730
+ 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", "1424001734"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-13 12:02:14.088451"]]
1731
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1732
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
1733
+  (0.6ms) rollback transaction
1734
+  (0.0ms) begin transaction
1735
+  (0.0ms) SAVEPOINT active_record_1
1736
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1737
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:02:14.090795"], ["oauth_access_token", "token"], ["oauth_expires_at", "1423742534"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-13 12:02:14.090795"]]
1738
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1739
+  (0.0ms) SAVEPOINT active_record_1
1740
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
1741
+ 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", "1424001734"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-13 12:02:14.091595"]]
1742
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1743
+  (0.4ms) rollback transaction
1744
+  (0.0ms) begin transaction
1745
+  (0.0ms) SAVEPOINT active_record_1
1746
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1747
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:02:14.093361"], ["oauth_access_token", "token"], ["oauth_expires_at", 1423915334], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-13 12:02:14.093361"]]
1748
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1749
+  (0.3ms) rollback transaction
1750
+  (0.0ms) begin transaction
1751
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
1752
+  (0.0ms) SAVEPOINT active_record_1
1753
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "uid", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-02-13 12:02:14.096394"], ["uid", 0], ["updated_at", "2015-02-13 12:02:14.096394"]]
1754
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1755
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
1756
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
1757
+  (0.4ms) rollback transaction
1758
+  (0.0ms) begin transaction
1759
+ Processing by AuthenticatedController#index as JS
1760
+ Filter chain halted as :authenticate_account! rendered or redirected
1761
+ Completed 401 Unauthorized in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
1762
+  (0.0ms) rollback transaction
1763
+  (0.0ms) begin transaction
1764
+ Processing by AuthenticatedController#index as JS
1765
+ Filter chain halted as :authenticate_account! rendered or redirected
1766
+ Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
1767
+  (0.0ms) rollback transaction
1768
+  (0.0ms) begin transaction
1769
+ Processing by AuthenticatedController#index as HTML
1770
+ Redirected to http://test.host/auth/bookingsync/?account_id=
1771
+ Filter chain halted as :authenticate_account! rendered or redirected
1772
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
1773
+  (0.0ms) rollback transaction
1774
+  (0.0ms) begin transaction
1775
+ Processing by AuthenticatedController#index as HTML
1776
+ Filter chain halted as :authenticate_account! rendered or redirected
1777
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
1778
+  (0.0ms) rollback transaction
1779
+  (0.2ms) begin transaction
1780
+  (0.0ms) SAVEPOINT active_record_1
1781
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1782
+ 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-13 12:02:27.232195"], ["oauth_access_token", "token"], ["oauth_expires_at", 1423915347], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-13 12:02:27.232195"]]
1783
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1784
+  (0.5ms) rollback transaction
1785
+  (0.0ms) begin transaction
1786
+  (0.0ms) SAVEPOINT active_record_1
1787
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1788
+ 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-13 12:02:27.239404"], ["oauth_access_token", "token"], ["oauth_expires_at", "1423742547"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-13 12:02:27.239404"]]
1789
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1790
+  (0.0ms) SAVEPOINT active_record_1
1791
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
1792
+ 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", "1424001747"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-13 12:02:27.240802"]]
1793
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1794
+  (0.5ms) rollback transaction
1795
+  (0.0ms) begin transaction
1796
+  (0.0ms) SAVEPOINT active_record_1
1797
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1798
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:02:27.243029"], ["oauth_access_token", "token"], ["oauth_expires_at", "1423742547"], ["oauth_refresh_token", "refresh_token"], ["uid", 123], ["updated_at", "2015-02-13 12:02:27.243029"]]
1799
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1800
+  (0.0ms) SAVEPOINT active_record_1
1801
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 1) LIMIT 1
1802
+ 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", "1424001747"], ["oauth_refresh_token", "refreshed_refresh_token"], ["updated_at", "2015-02-13 12:02:27.244054"]]
1803
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1804
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
1805
+  (0.6ms) rollback transaction
1806
+  (0.0ms) begin transaction
1807
+  (0.0ms) rollback transaction
1808
+  (0.0ms) begin transaction
1809
+  (0.0ms) SAVEPOINT active_record_1
1810
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" IS NULL LIMIT 1
1811
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:02:27.249614"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires"], ["oauth_refresh_token", "refresh"], ["updated_at", "2015-02-13 12:02:27.249614"]]
1812
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1813
+  (0.0ms) SAVEPOINT active_record_1
1814
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" IS NULL AND "accounts"."id" != 1) LIMIT 1
1815
+ SQL (0.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-13 12:02:27.250423"]]
1816
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1817
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 1]]
1818
+  (0.5ms) rollback transaction
1819
+  (0.0ms) begin transaction
1820
+  (0.0ms) SAVEPOINT active_record_1
1821
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1822
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:27.252443"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:27.252443"]]
1823
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1824
+  (0.0ms) SAVEPOINT active_record_1
1825
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1826
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:27.253255"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:27.253255"]]
1827
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1828
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1829
+  (0.0ms) SAVEPOINT active_record_1
1830
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
1831
+ 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-13 12:02:27.255950"]]
1832
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1833
+  (0.6ms) rollback transaction
1834
+  (0.0ms) begin transaction
1835
+  (0.0ms) SAVEPOINT active_record_1
1836
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1837
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:27.258039"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:27.258039"]]
1838
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1839
+  (0.0ms) SAVEPOINT active_record_1
1840
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1841
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:27.258805"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:27.258805"]]
1842
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1843
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1844
+  (0.0ms) SAVEPOINT active_record_1
1845
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
1846
+ SQL (0.0ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-13 12:02:27.259907"]]
1847
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1848
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
1849
+  (0.6ms) rollback transaction
1850
+  (0.0ms) begin transaction
1851
+  (0.0ms) SAVEPOINT active_record_1
1852
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1853
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:27.261710"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:27.261710"]]
1854
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1855
+  (0.0ms) SAVEPOINT active_record_1
1856
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1857
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:27.262482"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:27.262482"]]
1858
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1859
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1860
+  (0.0ms) SAVEPOINT active_record_1
1861
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."uid" = 123 AND "accounts"."id" != 2) LIMIT 1
1862
+ SQL (0.0ms) UPDATE "accounts" SET "name" = ?, "oauth_access_token" = ?, "oauth_expires_at" = ?, "oauth_refresh_token" = ?, "updated_at" = ? WHERE "accounts"."id" = 2 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["updated_at", "2015-02-13 12:02:27.263567"]]
1863
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1864
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
1865
+  (0.5ms) rollback transaction
1866
+  (0.0ms) begin transaction
1867
+  (0.0ms) SAVEPOINT active_record_1
1868
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1869
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:27.265373"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:27.265373"]]
1870
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1871
+  (0.0ms) SELECT COUNT(*) FROM "accounts"
1872
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1873
+  (0.0ms) SAVEPOINT active_record_1
1874
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1875
+ 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-13 12:02:27.267722"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:27.267722"]]
1876
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1877
+  (0.0ms) SELECT COUNT(*) FROM "accounts"
1878
+  (0.4ms) rollback transaction
1879
+  (0.0ms) begin transaction
1880
+  (0.0ms) SAVEPOINT active_record_1
1881
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1882
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:27.269947"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:27.269947"]]
1883
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1884
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1885
+  (0.0ms) SAVEPOINT active_record_1
1886
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1887
+ 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-02-13 12:02:27.270974"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:27.270974"]]
1888
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1889
+  (0.6ms) rollback transaction
1890
+  (0.0ms) begin transaction
1891
+  (0.0ms) SAVEPOINT active_record_1
1892
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1893
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:27.272800"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:27.272800"]]
1894
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1895
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1896
+  (0.0ms) SAVEPOINT active_record_1
1897
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1898
+ 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-02-13 12:02:27.273814"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:27.273814"]]
1899
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1900
+  (0.5ms) rollback transaction
1901
+  (0.0ms) begin transaction
1902
+  (0.0ms) SAVEPOINT active_record_1
1903
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 456 LIMIT 1
1904
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-02-13 12:02:27.275580"], ["provider", "bookingsync"], ["uid", 456], ["updated_at", "2015-02-13 12:02:27.275580"]]
1905
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1906
+ Account Load (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1907
+  (0.0ms) SAVEPOINT active_record_1
1908
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1909
+ 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-02-13 12:02:27.276599"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:27.276599"]]
1910
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1911
+  (0.5ms) rollback transaction
1912
+  (0.0ms) begin transaction
1913
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
1914
+  (0.0ms) SAVEPOINT active_record_1
1915
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "uid", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-02-13 12:02:27.279909"], ["uid", 0], ["updated_at", "2015-02-13 12:02:27.279909"]]
1916
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1917
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
1918
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 0 LIMIT 1
1919
+  (0.4ms) rollback transaction
1920
+  (0.0ms) begin transaction
1921
+ Processing by SessionsController#failure as HTML
1922
+ Rendered /Users/grk/code/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.1ms)
1923
+ Completed 200 OK in 5ms (Views: 4.8ms | ActiveRecord: 0.0ms)
1924
+  (0.1ms) rollback transaction
1925
+  (0.0ms) begin transaction
1926
+ Processing by SessionsController#failure as HTML
1927
+ Completed 200 OK in 0ms (Views: 0.4ms | ActiveRecord: 0.0ms)
1928
+  (0.0ms) rollback transaction
1929
+  (0.0ms) begin transaction
1930
+ Processing by SessionsController#destroy as HTML
1931
+ Redirected to http://test.host/
1932
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
1933
+  (0.0ms) rollback transaction
1934
+  (0.0ms) begin transaction
1935
+ Processing by SessionsController#destroy as HTML
1936
+ Redirected to http://test.host/signed_out
1937
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
1938
+  (0.0ms) rollback transaction
1939
+  (0.0ms) begin transaction
1940
+ Processing by SessionsController#create as HTML
1941
+ Parameters: {"provider"=>"bookingsync"}
1942
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1943
+  (0.0ms) SAVEPOINT active_record_1
1944
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1945
+ 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-02-13 12:02:27.300142"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:27.300142"]]
1946
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1947
+ Redirected to http://test.host/admin
1948
+ Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
1949
+  (0.3ms) rollback transaction
1950
+  (0.0ms) begin transaction
1951
+ Processing by SessionsController#create as HTML
1952
+ Parameters: {"provider"=>"bookingsync"}
1953
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1954
+  (0.0ms) SAVEPOINT active_record_1
1955
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1956
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:02:27.302981"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:27.302981"]]
1957
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1958
+ Redirected to http://test.host/
1959
+ Completed 302 Found in 1ms (ActiveRecord: 0.3ms)
1960
+  (0.3ms) rollback transaction
1961
+  (0.0ms) begin transaction
1962
+ Processing by SessionsController#create as HTML
1963
+ Parameters: {"provider"=>"bookingsync"}
1964
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."uid" = 123 AND "accounts"."provider" = 'bookingsync' LIMIT 1
1965
+  (0.0ms) SAVEPOINT active_record_1
1966
+ Account Exists (0.0ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."uid" = 123 LIMIT 1
1967
+ SQL (0.1ms) INSERT INTO "accounts" ("created_at", "name", "oauth_access_token", "oauth_expires_at", "oauth_refresh_token", "provider", "uid", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-02-13 12:02:27.305763"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_expires_at", "expires at"], ["oauth_refresh_token", "refresh token"], ["provider", "bookingsync"], ["uid", 123], ["updated_at", "2015-02-13 12:02:27.305763"]]
1968
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1969
+ Redirected to http://test.host/
1970
+ Completed 302 Found in 1ms (ActiveRecord: 0.3ms)
1971
+  (0.3ms) rollback transaction
1972
+  (0.0ms) begin transaction
1973
+ Processing by AuthenticatedController#index as HTML
1974
+ Filter chain halted as :authenticate_account! rendered or redirected
1975
+ Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)
1976
+  (0.0ms) rollback transaction
1977
+  (0.0ms) begin transaction
1978
+ Processing by AuthenticatedController#index as HTML
1979
+ Redirected to http://test.host/auth/bookingsync/?account_id=
1980
+ Filter chain halted as :authenticate_account! rendered or redirected
1981
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
1982
+  (0.0ms) rollback transaction
1983
+  (0.0ms) begin transaction
1984
+ Processing by AuthenticatedController#index as JS
1985
+ Filter chain halted as :authenticate_account! rendered or redirected
1986
+ Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
1987
+  (0.0ms) rollback transaction
1988
+  (0.0ms) begin transaction
1989
+ Processing by AuthenticatedController#index as JS
1990
+ Filter chain halted as :authenticate_account! rendered or redirected
1991
+ Completed 401 Unauthorized in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
1992
+  (0.0ms) rollback transaction
1993
+  (0.0ms) begin transaction
1994
+  (0.0ms) rollback transaction
1995
+  (0.0ms) begin transaction
1996
+  (0.0ms) rollback transaction
1997
+  (0.0ms) begin transaction
1998
+  (0.0ms) rollback transaction
1999
+  (0.0ms) begin transaction
2000
+  (0.0ms) rollback transaction
2001
+  (0.0ms) begin transaction
2002
+  (0.0ms) rollback transaction
@@ -2,9 +2,13 @@ require 'spec_helper'
2
2
 
3
3
  describe 'oauth routing', type: :routing do
4
4
  routes { BookingSync::Engine.routes }
5
- it 'has a auth callback route' do
6
- expect(get: '/auth/facebook/callback').to route_to(controller: 'sessions',
7
- action: 'create', provider: 'facebook')
5
+ it 'has a bookingsync auth callback route' do
6
+ expect(get: '/auth/bookingsync/callback').to route_to(controller: 'sessions', action: 'create')
7
+ end
8
+
9
+ it "doesn't capture auth callback routes for other providers" do
10
+ expect(get: '/auth/facebook/callback').to_not route_to(controller: 'sessions',
11
+ action: 'create')
8
12
  end
9
13
 
10
14
  it 'has a auth failure route' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bookingsync-engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastien Grosjean
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-02-12 00:00:00.000000000 Z
12
+ date: 2015-02-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails