bookingsync-engine 2.0.0 → 2.0.1

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: 618fbd337c3d18536a575427edeb554651b92aae
4
- data.tar.gz: 0cd23f81cf1d80600e4af74f4f2375c47c2a58bb
3
+ metadata.gz: eaa9ea497804f5d7b45a0f417ce6c0a48e9072c0
4
+ data.tar.gz: 7266930fcf0b9c2090db06eff5a4c390a7c6b3cf
5
5
  SHA512:
6
- metadata.gz: a33ee4fa9d0bcc3375801f46460f2455b31427f6d19365d66e87f5a63271b2f3013bb8eef791d6605b384be01051db106a61ce28a31adafc37f43ce34130d557
7
- data.tar.gz: ed9739c2ff05eff8933d9d23cacd1c78a2053d8463f947807f97554ce0a1e0097a4275e266ddbab52b9d00cc479fb859dfe9c7b96df450edaf7dc3eda59f1ad3
6
+ metadata.gz: dcba45975f5ca64f115729cd77082b1e9e9e74ae2a516dde0da8b2bc84bd0590c4fa3525889be538ce1becb7c0569de122000c97d74b78d2df344becd5130393
7
+ data.tar.gz: d4224704091d92d5d8c40c32660210a31e9ec5aa5b15468f5155e91480e2c2562d59d643aefd37b86c0f021320a684403ad1ac76d3771fe79687798f7fc9b3ec
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  ## Requirements
7
7
 
8
- This engine requires Rails `>= 4.1.0` and Ruby `>= 2.0.0`.
8
+ This engine requires Rails `>= 4.2.0` and Ruby `>= 2.2.0`.
9
9
 
10
10
  ## Documentation
11
11
 
@@ -13,7 +13,7 @@ This engine requires Rails `>= 4.1.0` and Ruby `>= 2.0.0`.
13
13
 
14
14
  ## Installation
15
15
 
16
- BookingSync Engine works with Rails 4.0 onwards and Ruby 2.0 onwards. To get started, add it to your Gemfile with:
16
+ BookingSync Engine works with Rails 4.2 onwards and Ruby 2.2 onwards. To get started, add it to your Gemfile with:
17
17
 
18
18
  ```ruby
19
19
  gem 'bookingsync-engine'
@@ -1,3 +1,3 @@
1
1
  module BookingSync
2
- ENGINE_VERSION = "2.0.0"
2
+ ENGINE_VERSION = "2.0.1"
3
3
  end
@@ -0,0 +1,25 @@
1
+  (9.2ms) CREATE TABLE "accounts" ("id" serial primary key, "created_at" timestamp, "updated_at" timestamp, "provider" character varying, "synced_id" integer, "name" character varying, "oauth_access_token" character varying, "oauth_refresh_token" character varying, "oauth_expires_at" character varying) 
2
+  (1.2ms) CREATE INDEX "index_accounts_on_synced_id" ON "accounts" USING btree ("synced_id")
3
+  (2.1ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
4
+  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5
+  (0.2ms) SELECT version FROM "schema_migrations"
6
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110454')
7
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110326')
8
+  (8.3ms) CREATE TABLE "accounts" ("id" serial primary key, "created_at" timestamp, "updated_at" timestamp, "provider" character varying, "synced_id" integer, "name" character varying, "oauth_access_token" character varying, "oauth_refresh_token" character varying, "oauth_expires_at" character varying)
9
+  (1.3ms) CREATE INDEX "index_accounts_on_synced_id" ON "accounts" USING btree ("synced_id")
10
+  (3.4ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
11
+  (1.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
12
+  (0.3ms) SELECT version FROM "schema_migrations"
13
+  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110454')
14
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110326')
15
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
16
+  (113.6ms) DROP DATABASE IF EXISTS "bookingsync_engine_test"
17
+  (261.8ms) CREATE DATABASE "bookingsync_engine_test" ENCODING = 'unicode'
18
+  (6.5ms) CREATE TABLE "accounts" ("id" serial primary key, "created_at" timestamp, "updated_at" timestamp, "provider" character varying, "synced_id" integer, "name" character varying, "oauth_access_token" character varying, "oauth_refresh_token" character varying, "oauth_expires_at" character varying) 
19
+  (1.3ms) CREATE INDEX "index_accounts_on_synced_id" ON "accounts" USING btree ("synced_id")
20
+  (3.1ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
21
+  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
22
+  (0.2ms) SELECT version FROM "schema_migrations"
23
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110454')
24
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140522110326')
25
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
@@ -0,0 +1,472 @@
1
+  (0.4ms) BEGIN
2
+  (0.1ms) ROLLBACK
3
+  (0.0ms) BEGIN
4
+  (0.0ms) ROLLBACK
5
+  (0.0ms) BEGIN
6
+  (0.0ms) ROLLBACK
7
+  (0.1ms) BEGIN
8
+  (0.1ms) ROLLBACK
9
+  (0.0ms) BEGIN
10
+  (0.0ms) ROLLBACK
11
+  (0.0ms) BEGIN
12
+ Processing by SessionsController#destroy as HTML
13
+ Redirected to http://test.host/signed_out
14
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
15
+  (0.2ms) ROLLBACK
16
+  (0.0ms) BEGIN
17
+ Processing by SessionsController#destroy as HTML
18
+ Redirected to http://test.host/
19
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
20
+  (0.1ms) ROLLBACK
21
+  (0.0ms) BEGIN
22
+ Processing by SessionsController#create as HTML
23
+ Parameters: {"provider"=>"bookingsync"}
24
+ Account Load (0.5ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
25
+  (0.1ms) SAVEPOINT active_record_1
26
+ Account Exists (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
27
+ SQL (0.4ms) INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-04-26 15:39:34.097391"], ["updated_at", "2017-04-26 15:39:34.097391"]]
28
+  (0.1ms) RELEASE SAVEPOINT active_record_1
29
+ Redirected to http://test.host/admin
30
+ Completed 302 Found in 31ms (ActiveRecord: 4.8ms)
31
+  (0.2ms) ROLLBACK
32
+  (0.0ms) BEGIN
33
+ Processing by SessionsController#create as HTML
34
+ Parameters: {"provider"=>"bookingsync"}
35
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
36
+  (0.1ms) SAVEPOINT active_record_1
37
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
38
+ SQL (0.1ms) INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-04-26 15:39:34.104015"], ["updated_at", "2017-04-26 15:39:34.104015"]]
39
+  (0.0ms) RELEASE SAVEPOINT active_record_1
40
+ Redirected to http://test.host/
41
+ Completed 302 Found in 3ms (ActiveRecord: 0.6ms)
42
+  (0.2ms) ROLLBACK
43
+  (0.0ms) BEGIN
44
+ Processing by SessionsController#create as HTML
45
+ Parameters: {"provider"=>"bookingsync"}
46
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
47
+  (0.5ms) SAVEPOINT active_record_1
48
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
49
+ SQL (0.2ms) INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-04-26 15:39:34.110597"], ["updated_at", "2017-04-26 15:39:34.110597"]]
50
+  (0.1ms) RELEASE SAVEPOINT active_record_1
51
+ Redirected to http://test.host/
52
+ Completed 302 Found in 4ms (ActiveRecord: 1.1ms)
53
+  (0.1ms) ROLLBACK
54
+  (0.0ms) BEGIN
55
+ Processing by SessionsController#failure as HTML
56
+ Rendered /var/www/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
57
+ Completed 200 OK in 5ms (Views: 5.3ms | ActiveRecord: 0.0ms)
58
+  (0.1ms) ROLLBACK
59
+  (0.0ms) BEGIN
60
+ Processing by SessionsController#failure as HTML
61
+ Rendered /var/www/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
62
+ Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
63
+  (0.1ms) ROLLBACK
64
+  (0.2ms) BEGIN
65
+  (0.0ms) SAVEPOINT active_record_1
66
+ Account Exists (0.6ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
67
+ SQL (0.1ms) INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1493307574"], ["created_at", "2017-04-26 15:39:34.126702"], ["updated_at", "2017-04-26 15:39:34.126702"]]
68
+  (0.0ms) RELEASE SAVEPOINT active_record_1
69
+  (0.1ms) ROLLBACK
70
+  (0.0ms) BEGIN
71
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
72
+ SQL (0.1ms) INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1493134774"], ["created_at", "2017-04-26 15:39:34.131460"], ["updated_at", "2017-04-26 15:39:34.131460"]]
73
+  (0.3ms) COMMIT
74
+  (0.0ms) BEGIN
75
+  (0.0ms) BEGIN
76
+ Account Exists (0.5ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 5) LIMIT 1
77
+ SQL (0.2ms) UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5 [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1493393974"], ["updated_at", "2017-04-26 15:39:34.149332"], ["id", 5]]
78
+  (1.3ms) COMMIT
79
+  (0.1ms) ROLLBACK
80
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 5]]
81
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts"
82
+  (0.0ms) BEGIN
83
+ SQL (0.1ms) DELETE FROM "accounts" WHERE "accounts"."id" = $1 [["id", 5]]
84
+  (0.3ms) COMMIT
85
+  (0.0ms) BEGIN
86
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
87
+ SQL (0.2ms) INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1493134774"], ["created_at", "2017-04-26 15:39:34.157104"], ["updated_at", "2017-04-26 15:39:34.157104"]]
88
+  (0.3ms) COMMIT
89
+  (0.1ms) BEGIN
90
+ Account Exists (0.3ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 6) LIMIT 1
91
+ SQL (0.2ms) UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5 [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1493393974"], ["updated_at", "2017-04-26 15:39:34.161035"], ["id", 6]]
92
+  (0.3ms) COMMIT
93
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts"
94
+  (0.0ms) BEGIN
95
+ SQL (0.1ms) DELETE FROM "accounts" WHERE "accounts"."id" = $1 [["id", 6]]
96
+  (0.2ms) COMMIT
97
+  (0.0ms) BEGIN
98
+  (0.1ms) ROLLBACK
99
+  (0.0ms) BEGIN
100
+  (0.0ms) SAVEPOINT active_record_1
101
+ Account Exists (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT 1
102
+ SQL (0.2ms) INSERT INTO "accounts" ("oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["created_at", "2017-04-26 15:39:34.196953"], ["updated_at", "2017-04-26 15:39:34.196953"]]
103
+  (0.1ms) RELEASE SAVEPOINT active_record_1
104
+  (0.0ms) SAVEPOINT active_record_1
105
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" IS NULL AND "accounts"."id" != 7) LIMIT 1
106
+ SQL (0.1ms) UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5 [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2017-04-26 15:39:34.199160"], ["id", 7]]
107
+  (0.0ms) RELEASE SAVEPOINT active_record_1
108
+ Account Load (0.4ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 7]]
109
+  (0.1ms) ROLLBACK
110
+  (0.0ms) BEGIN
111
+ Account Load (0.4ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
112
+  (0.1ms) SAVEPOINT active_record_1
113
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2017-04-26 15:39:34.207528"], ["updated_at", "2017-04-26 15:39:34.207528"]]
114
+  (0.1ms) RELEASE SAVEPOINT active_record_1
115
+  (0.0ms) SAVEPOINT active_record_1
116
+ SQL (0.2ms) UPDATE "accounts" SET "synced_id" = $1, "updated_at" = $2 WHERE "accounts"."id" = $3 [["synced_id", 0], ["updated_at", "2017-04-26 15:39:34.209310"], ["id", 8]]
117
+  (0.0ms) RELEASE SAVEPOINT active_record_1
118
+ Account Exists (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1
119
+  (0.1ms) ROLLBACK
120
+  (0.0ms) BEGIN
121
+  (0.0ms) SAVEPOINT active_record_1
122
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
123
+ SQL (0.1ms) INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-04-26 15:39:34.219445"], ["updated_at", "2017-04-26 15:39:34.219445"]]
124
+  (0.0ms) RELEASE SAVEPOINT active_record_1
125
+  (0.2ms) SELECT COUNT(*) FROM "accounts"
126
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
127
+  (0.0ms) SAVEPOINT active_record_1
128
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
129
+ SQL (0.2ms) INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-04-26 15:39:34.224876"], ["updated_at", "2017-04-26 15:39:34.224876"]]
130
+  (0.0ms) RELEASE SAVEPOINT active_record_1
131
+  (0.2ms) SELECT COUNT(*) FROM "accounts"
132
+  (0.1ms) ROLLBACK
133
+  (0.0ms) BEGIN
134
+  (0.0ms) SAVEPOINT active_record_1
135
+ Account Exists (1.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
136
+ SQL (0.2ms) INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-04-26 15:39:34.235230"], ["updated_at", "2017-04-26 15:39:34.235230"]]
137
+  (0.1ms) RELEASE SAVEPOINT active_record_1
138
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
139
+  (0.1ms) SAVEPOINT active_record_1
140
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
141
+ SQL (0.1ms) INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-04-26 15:39:34.238252"], ["updated_at", "2017-04-26 15:39:34.238252"]]
142
+  (0.0ms) RELEASE SAVEPOINT active_record_1
143
+  (0.2ms) ROLLBACK
144
+  (0.0ms) BEGIN
145
+  (0.0ms) SAVEPOINT active_record_1
146
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
147
+ SQL (0.2ms) INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-04-26 15:39:34.241211"], ["updated_at", "2017-04-26 15:39:34.241211"]]
148
+  (0.0ms) RELEASE SAVEPOINT active_record_1
149
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
150
+  (0.0ms) SAVEPOINT active_record_1
151
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
152
+ SQL (0.1ms) INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-04-26 15:39:34.243552"], ["updated_at", "2017-04-26 15:39:34.243552"]]
153
+  (0.0ms) RELEASE SAVEPOINT active_record_1
154
+  (0.0ms) ROLLBACK
155
+  (0.6ms) BEGIN
156
+  (0.0ms) SAVEPOINT active_record_1
157
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
158
+ SQL (0.1ms) INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-04-26 15:39:34.247047"], ["updated_at", "2017-04-26 15:39:34.247047"]]
159
+  (0.0ms) RELEASE SAVEPOINT active_record_1
160
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
161
+  (0.0ms) SAVEPOINT active_record_1
162
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
163
+ SQL (0.1ms) INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-04-26 15:39:34.249351"], ["updated_at", "2017-04-26 15:39:34.249351"]]
164
+  (0.0ms) RELEASE SAVEPOINT active_record_1
165
+  (0.0ms) ROLLBACK
166
+  (0.0ms) BEGIN
167
+  (0.0ms) SAVEPOINT active_record_1
168
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
169
+ SQL (0.1ms) INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-04-26 15:39:34.252257"], ["updated_at", "2017-04-26 15:39:34.252257"]]
170
+  (0.0ms) RELEASE SAVEPOINT active_record_1
171
+  (0.0ms) SAVEPOINT active_record_1
172
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
173
+ SQL (0.1ms) INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-04-26 15:39:34.253789"], ["updated_at", "2017-04-26 15:39:34.253789"]]
174
+  (0.1ms) RELEASE SAVEPOINT active_record_1
175
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
176
+  (0.0ms) SAVEPOINT active_record_1
177
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 18) LIMIT 1
178
+ SQL (0.1ms) UPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-04-26 15:39:34.255910"], ["id", 18]]
179
+  (0.0ms) RELEASE SAVEPOINT active_record_1
180
+  (0.0ms) ROLLBACK
181
+  (0.0ms) BEGIN
182
+  (0.0ms) SAVEPOINT active_record_1
183
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
184
+ SQL (0.1ms) INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-04-26 15:39:34.258865"], ["updated_at", "2017-04-26 15:39:34.258865"]]
185
+  (0.1ms) RELEASE SAVEPOINT active_record_1
186
+  (0.0ms) SAVEPOINT active_record_1
187
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
188
+ SQL (0.1ms) INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-04-26 15:39:34.260527"], ["updated_at", "2017-04-26 15:39:34.260527"]]
189
+  (0.0ms) RELEASE SAVEPOINT active_record_1
190
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
191
+  (0.1ms) SAVEPOINT active_record_1
192
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 20) LIMIT 1
193
+ SQL (0.1ms) UPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-04-26 15:39:34.262841"], ["id", 20]]
194
+  (0.0ms) RELEASE SAVEPOINT active_record_1
195
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 20]]
196
+  (0.1ms) ROLLBACK
197
+  (0.0ms) BEGIN
198
+  (0.0ms) SAVEPOINT active_record_1
199
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
200
+ SQL (0.1ms) INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-04-26 15:39:34.266246"], ["updated_at", "2017-04-26 15:39:34.266246"]]
201
+  (0.0ms) RELEASE SAVEPOINT active_record_1
202
+  (0.0ms) SAVEPOINT active_record_1
203
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
204
+ SQL (0.1ms) INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-04-26 15:39:34.267796"], ["updated_at", "2017-04-26 15:39:34.267796"]]
205
+  (0.0ms) RELEASE SAVEPOINT active_record_1
206
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
207
+  (0.0ms) SAVEPOINT active_record_1
208
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 22) LIMIT 1
209
+ SQL (0.1ms) UPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-04-26 15:39:34.270013"], ["id", 22]]
210
+  (0.0ms) RELEASE SAVEPOINT active_record_1
211
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 22]]
212
+  (0.1ms) ROLLBACK
213
+  (0.0ms) BEGIN
214
+ Processing by AuthenticatedController#index as HTML
215
+ Rendered text template (0.0ms)
216
+ Filter chain halted as :authenticate_account! rendered or redirected
217
+ Completed 200 OK in 1ms (Views: 1.1ms | ActiveRecord: 0.0ms)
218
+  (0.1ms) ROLLBACK
219
+  (0.0ms) BEGIN
220
+ Processing by AuthenticatedController#index as HTML
221
+ Redirected to http://test.host/auth/bookingsync/?account_id=
222
+ Filter chain halted as :authenticate_account! rendered or redirected
223
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
224
+  (0.1ms) ROLLBACK
225
+  (0.1ms) BEGIN
226
+ Processing by AuthenticatedController#index as JS
227
+ Rendered text template (0.0ms)
228
+ Filter chain halted as :authenticate_account! rendered or redirected
229
+ Completed 401 Unauthorized in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
230
+  (0.1ms) ROLLBACK
231
+  (0.0ms) BEGIN
232
+ Processing by AuthenticatedController#index as JS
233
+ Rendered text template (0.0ms)
234
+ Filter chain halted as :authenticate_account! rendered or redirected
235
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
236
+  (0.0ms) ROLLBACK
237
+  (0.0ms) BEGIN
238
+  (0.1ms) ROLLBACK
239
+  (0.0ms) BEGIN
240
+  (0.1ms) ROLLBACK
241
+  (0.0ms) BEGIN
242
+  (0.0ms) ROLLBACK
243
+  (0.0ms) BEGIN
244
+  (0.0ms) ROLLBACK
245
+  (0.0ms) BEGIN
246
+  (0.1ms) ROLLBACK
247
+  (0.0ms) BEGIN
248
+ Processing by SessionsController#create as HTML
249
+ Parameters: {"provider"=>"bookingsync"}
250
+ Account Load (0.4ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
251
+  (0.1ms) SAVEPOINT active_record_1
252
+ Account Exists (0.3ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
253
+ SQL (0.3ms) INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-04-26 15:41:50.571200"], ["updated_at", "2017-04-26 15:41:50.571200"]]
254
+  (0.1ms) RELEASE SAVEPOINT active_record_1
255
+ Redirected to http://test.host/
256
+ Completed 302 Found in 33ms (ActiveRecord: 4.5ms)
257
+  (0.1ms) ROLLBACK
258
+  (0.0ms) BEGIN
259
+ Processing by SessionsController#create as HTML
260
+ Parameters: {"provider"=>"bookingsync"}
261
+ Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
262
+  (0.1ms) SAVEPOINT active_record_1
263
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
264
+ SQL (0.1ms) INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-04-26 15:41:50.580496"], ["updated_at", "2017-04-26 15:41:50.580496"]]
265
+  (0.0ms) RELEASE SAVEPOINT active_record_1
266
+ Redirected to http://test.host/
267
+ Completed 302 Found in 4ms (ActiveRecord: 0.7ms)
268
+  (0.1ms) ROLLBACK
269
+  (0.0ms) BEGIN
270
+ Processing by SessionsController#create as HTML
271
+ Parameters: {"provider"=>"bookingsync"}
272
+ Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
273
+  (0.1ms) SAVEPOINT active_record_1
274
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
275
+ SQL (0.2ms) INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-04-26 15:41:50.588669"], ["updated_at", "2017-04-26 15:41:50.588669"]]
276
+  (0.0ms) RELEASE SAVEPOINT active_record_1
277
+ Redirected to http://test.host/admin
278
+ Completed 302 Found in 4ms (ActiveRecord: 0.7ms)
279
+  (0.1ms) ROLLBACK
280
+  (0.0ms) BEGIN
281
+ Processing by SessionsController#failure as HTML
282
+ Rendered /var/www/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
283
+ Completed 200 OK in 12ms (Views: 11.7ms | ActiveRecord: 0.0ms)
284
+  (0.1ms) ROLLBACK
285
+  (0.0ms) BEGIN
286
+ Processing by SessionsController#failure as HTML
287
+ Rendered /var/www/bookingsync/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.0ms)
288
+ Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
289
+  (0.1ms) ROLLBACK
290
+  (0.1ms) BEGIN
291
+ Processing by SessionsController#destroy as HTML
292
+ Redirected to http://test.host/signed_out
293
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
294
+  (0.1ms) ROLLBACK
295
+  (0.0ms) BEGIN
296
+ Processing by SessionsController#destroy as HTML
297
+ Redirected to http://test.host/
298
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
299
+  (0.1ms) ROLLBACK
300
+  (0.0ms) BEGIN
301
+ Processing by AuthenticatedController#index as HTML
302
+ Redirected to http://test.host/auth/bookingsync/?account_id=
303
+ Filter chain halted as :authenticate_account! rendered or redirected
304
+ Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
305
+  (0.1ms) ROLLBACK
306
+  (0.0ms) BEGIN
307
+ Processing by AuthenticatedController#index as HTML
308
+ Rendered text template (0.0ms)
309
+ Filter chain halted as :authenticate_account! rendered or redirected
310
+ Completed 200 OK in 4ms (Views: 4.0ms | ActiveRecord: 0.0ms)
311
+  (0.1ms) ROLLBACK
312
+  (0.0ms) BEGIN
313
+ Processing by AuthenticatedController#index as JS
314
+ Rendered text template (0.0ms)
315
+ Filter chain halted as :authenticate_account! rendered or redirected
316
+ Completed 401 Unauthorized in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
317
+  (0.1ms) ROLLBACK
318
+  (0.0ms) BEGIN
319
+ Processing by AuthenticatedController#index as JS
320
+ Rendered text template (0.0ms)
321
+ Filter chain halted as :authenticate_account! rendered or redirected
322
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
323
+  (0.0ms) ROLLBACK
324
+  (0.0ms) BEGIN
325
+  (0.1ms) SAVEPOINT active_record_1
326
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
327
+ SQL (0.1ms) INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1493307710"], ["created_at", "2017-04-26 15:41:50.641220"], ["updated_at", "2017-04-26 15:41:50.641220"]]
328
+  (0.0ms) RELEASE SAVEPOINT active_record_1
329
+  (0.1ms) ROLLBACK
330
+  (0.0ms) BEGIN
331
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
332
+ SQL (0.1ms) INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1493134910"], ["created_at", "2017-04-26 15:41:50.644766"], ["updated_at", "2017-04-26 15:41:50.644766"]]
333
+  (0.3ms) COMMIT
334
+  (0.1ms) BEGIN
335
+  (0.0ms) BEGIN
336
+ Account Exists (0.6ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 5) LIMIT 1
337
+ SQL (0.2ms) UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5 [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1493394110"], ["updated_at", "2017-04-26 15:41:50.665555"], ["id", 5]]
338
+  (0.4ms) COMMIT
339
+  (0.1ms) ROLLBACK
340
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 5]]
341
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts"
342
+  (0.0ms) BEGIN
343
+ SQL (0.1ms) DELETE FROM "accounts" WHERE "accounts"."id" = $1 [["id", 5]]
344
+  (0.3ms) COMMIT
345
+  (0.8ms) BEGIN
346
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
347
+ SQL (0.2ms) INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1493134910"], ["created_at", "2017-04-26 15:41:50.674111"], ["updated_at", "2017-04-26 15:41:50.674111"]]
348
+  (0.3ms) COMMIT
349
+  (0.1ms) BEGIN
350
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 6) LIMIT 1
351
+ SQL (0.1ms) UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5 [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1493394110"], ["updated_at", "2017-04-26 15:41:50.677690"], ["id", 6]]
352
+  (0.3ms) COMMIT
353
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts"
354
+  (0.0ms) BEGIN
355
+ SQL (0.1ms) DELETE FROM "accounts" WHERE "accounts"."id" = $1 [["id", 6]]
356
+  (0.2ms) COMMIT
357
+  (0.0ms) BEGIN
358
+  (0.0ms) SAVEPOINT active_record_1
359
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT 1
360
+ SQL (0.1ms) INSERT INTO "accounts" ("oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["created_at", "2017-04-26 15:41:50.682399"], ["updated_at", "2017-04-26 15:41:50.682399"]]
361
+  (0.1ms) RELEASE SAVEPOINT active_record_1
362
+  (0.0ms) SAVEPOINT active_record_1
363
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" IS NULL AND "accounts"."id" != 7) LIMIT 1
364
+ SQL (0.1ms) UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5 [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2017-04-26 15:41:50.684651"], ["id", 7]]
365
+  (0.1ms) RELEASE SAVEPOINT active_record_1
366
+ Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 7]]
367
+  (0.1ms) ROLLBACK
368
+  (0.0ms) BEGIN
369
+  (0.0ms) SAVEPOINT active_record_1
370
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
371
+ SQL (0.1ms) INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-04-26 15:41:50.688553"], ["updated_at", "2017-04-26 15:41:50.688553"]]
372
+  (0.1ms) RELEASE SAVEPOINT active_record_1
373
+  (0.0ms) SAVEPOINT active_record_1
374
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
375
+ SQL (0.1ms) INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-04-26 15:41:50.690386"], ["updated_at", "2017-04-26 15:41:50.690386"]]
376
+  (0.1ms) RELEASE SAVEPOINT active_record_1
377
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
378
+  (0.0ms) SAVEPOINT active_record_1
379
+ Account Exists (0.5ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 9) LIMIT 1
380
+ SQL (0.2ms) UPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-04-26 15:41:50.693897"], ["id", 9]]
381
+  (0.1ms) RELEASE SAVEPOINT active_record_1
382
+  (0.1ms) ROLLBACK
383
+  (0.1ms) BEGIN
384
+  (0.0ms) SAVEPOINT active_record_1
385
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
386
+ SQL (0.1ms) INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-04-26 15:41:50.697394"], ["updated_at", "2017-04-26 15:41:50.697394"]]
387
+  (0.1ms) RELEASE SAVEPOINT active_record_1
388
+  (0.0ms) SAVEPOINT active_record_1
389
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
390
+ SQL (0.1ms) INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-04-26 15:41:50.699294"], ["updated_at", "2017-04-26 15:41:50.699294"]]
391
+  (0.0ms) RELEASE SAVEPOINT active_record_1
392
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
393
+  (0.0ms) SAVEPOINT active_record_1
394
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 11) LIMIT 1
395
+ SQL (0.2ms) UPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-04-26 15:41:50.701687"], ["id", 11]]
396
+  (0.1ms) RELEASE SAVEPOINT active_record_1
397
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 11]]
398
+  (0.1ms) ROLLBACK
399
+  (0.0ms) BEGIN
400
+  (0.0ms) SAVEPOINT active_record_1
401
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
402
+ SQL (0.5ms) INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-04-26 15:41:50.705088"], ["updated_at", "2017-04-26 15:41:50.705088"]]
403
+  (0.1ms) RELEASE SAVEPOINT active_record_1
404
+  (0.0ms) SAVEPOINT active_record_1
405
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
406
+ SQL (0.1ms) INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-04-26 15:41:50.707575"], ["updated_at", "2017-04-26 15:41:50.707575"]]
407
+  (0.0ms) RELEASE SAVEPOINT active_record_1
408
+ Account Load (0.3ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
409
+  (0.0ms) SAVEPOINT active_record_1
410
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 13) LIMIT 1
411
+ SQL (0.1ms) UPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-04-26 15:41:50.710236"], ["id", 13]]
412
+  (0.1ms) RELEASE SAVEPOINT active_record_1
413
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 13]]
414
+  (0.1ms) ROLLBACK
415
+  (0.0ms) BEGIN
416
+  (0.0ms) SAVEPOINT active_record_1
417
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
418
+ SQL (0.2ms) INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-04-26 15:41:50.713940"], ["updated_at", "2017-04-26 15:41:50.713940"]]
419
+  (0.0ms) RELEASE SAVEPOINT active_record_1
420
+  (0.2ms) SELECT COUNT(*) FROM "accounts"
421
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
422
+  (0.0ms) SAVEPOINT active_record_1
423
+ Account Exists (0.4ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
424
+ SQL (0.2ms) INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-04-26 15:41:50.719135"], ["updated_at", "2017-04-26 15:41:50.719135"]]
425
+  (0.1ms) RELEASE SAVEPOINT active_record_1
426
+  (0.1ms) SELECT COUNT(*) FROM "accounts"
427
+  (0.1ms) ROLLBACK
428
+  (0.0ms) BEGIN
429
+  (0.0ms) SAVEPOINT active_record_1
430
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
431
+ SQL (0.1ms) INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-04-26 15:41:50.722421"], ["updated_at", "2017-04-26 15:41:50.722421"]]
432
+  (0.5ms) RELEASE SAVEPOINT active_record_1
433
+ Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
434
+  (0.1ms) SAVEPOINT active_record_1
435
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
436
+ SQL (0.1ms) INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-04-26 15:41:50.725478"], ["updated_at", "2017-04-26 15:41:50.725478"]]
437
+  (0.0ms) RELEASE SAVEPOINT active_record_1
438
+  (0.1ms) ROLLBACK
439
+  (0.0ms) BEGIN
440
+  (0.0ms) SAVEPOINT active_record_1
441
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
442
+ SQL (0.1ms) INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-04-26 15:41:50.728489"], ["updated_at", "2017-04-26 15:41:50.728489"]]
443
+  (0.0ms) RELEASE SAVEPOINT active_record_1
444
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
445
+  (0.0ms) SAVEPOINT active_record_1
446
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
447
+ SQL (0.1ms) INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-04-26 15:41:50.730739"], ["updated_at", "2017-04-26 15:41:50.730739"]]
448
+  (0.0ms) RELEASE SAVEPOINT active_record_1
449
+  (0.0ms) ROLLBACK
450
+  (0.0ms) BEGIN
451
+  (0.0ms) SAVEPOINT active_record_1
452
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
453
+ SQL (0.1ms) INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-04-26 15:41:50.733205"], ["updated_at", "2017-04-26 15:41:50.733205"]]
454
+  (0.0ms) RELEASE SAVEPOINT active_record_1
455
+ Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
456
+  (0.1ms) SAVEPOINT active_record_1
457
+ Account Exists (0.1ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
458
+ SQL (0.1ms) INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-04-26 15:41:50.735450"], ["updated_at", "2017-04-26 15:41:50.735450"]]
459
+  (0.0ms) RELEASE SAVEPOINT active_record_1
460
+  (0.0ms) ROLLBACK
461
+  (0.0ms) BEGIN
462
+  (0.1ms) ROLLBACK
463
+  (0.0ms) BEGIN
464
+ Account Load (0.4ms) SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
465
+  (0.1ms) SAVEPOINT active_record_1
466
+ SQL (0.2ms) INSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2017-04-26 15:41:50.771537"], ["updated_at", "2017-04-26 15:41:50.771537"]]
467
+  (0.0ms) RELEASE SAVEPOINT active_record_1
468
+  (0.0ms) SAVEPOINT active_record_1
469
+ SQL (0.2ms) UPDATE "accounts" SET "synced_id" = $1, "updated_at" = $2 WHERE "accounts"."id" = $3 [["synced_id", 0], ["updated_at", "2017-04-26 15:41:50.773121"], ["id", 22]]
470
+  (0.0ms) RELEASE SAVEPOINT active_record_1
471
+ Account Exists (0.2ms) SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1
472
+  (0.1ms) ROLLBACK
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: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastien Grosjean
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: 4.0.0
20
+ version: 4.2.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: 4.0.0
27
+ version: 4.2.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: omniauth-bookingsync
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -197,6 +197,8 @@ files:
197
197
  - spec/dummy/db/migrate/20140522110326_create_accounts.rb
198
198
  - spec/dummy/db/migrate/20140522110454_add_o_auth_fields_to_accounts.rb
199
199
  - spec/dummy/db/schema.rb
200
+ - spec/dummy/log/development.log
201
+ - spec/dummy/log/test.log
200
202
  - spec/dummy/public/404.html
201
203
  - spec/dummy/public/422.html
202
204
  - spec/dummy/public/500.html
@@ -226,53 +228,55 @@ required_rubygems_version: !ruby/object:Gem::Requirement
226
228
  version: '0'
227
229
  requirements: []
228
230
  rubyforge_project:
229
- rubygems_version: 2.5.1
231
+ rubygems_version: 2.5.2
230
232
  signing_key:
231
233
  specification_version: 4
232
234
  summary: A Rails engine to simplify integration with BookingSync API
233
235
  test_files:
236
+ - spec/fixtures/accounts.yml
237
+ - spec/models/account_spec.rb
238
+ - spec/routing/oauth_routing_spec.rb
239
+ - spec/spec_helper.rb
234
240
  - spec/controllers/authenticated_controller_spec.rb
235
241
  - spec/controllers/sessions_controller_spec.rb
236
- - spec/dummy/app/assets/javascripts/application.js
242
+ - spec/dummy/bin/bundle
243
+ - spec/dummy/bin/rails
244
+ - spec/dummy/bin/rake
237
245
  - spec/dummy/app/assets/stylesheets/application.css
238
- - spec/dummy/app/controllers/application_controller.rb
246
+ - spec/dummy/app/assets/javascripts/application.js
247
+ - spec/dummy/app/models/account.rb
248
+ - spec/dummy/app/helpers/application_helper.rb
239
249
  - spec/dummy/app/controllers/authenticated_controller.rb
250
+ - spec/dummy/app/controllers/application_controller.rb
240
251
  - spec/dummy/app/controllers/home_controller.rb
241
- - spec/dummy/app/helpers/application_helper.rb
242
- - spec/dummy/app/models/account.rb
243
252
  - spec/dummy/app/views/layouts/application.html.erb
244
- - spec/dummy/bin/bundle
245
- - spec/dummy/bin/rails
246
- - spec/dummy/bin/rake
247
- - spec/dummy/config/application.rb
248
- - spec/dummy/config/boot.rb
249
- - spec/dummy/config/database.yml
250
- - spec/dummy/config/database.yml.travis
253
+ - spec/dummy/config.ru
254
+ - spec/dummy/Rakefile
251
255
  - spec/dummy/config/environment.rb
256
+ - spec/dummy/config/routes.rb
257
+ - spec/dummy/config/locales/en.yml
258
+ - spec/dummy/config/database.yml.travis
252
259
  - spec/dummy/config/environments/development.rb
253
- - spec/dummy/config/environments/production.rb
254
260
  - spec/dummy/config/environments/test.rb
261
+ - spec/dummy/config/environments/production.rb
262
+ - spec/dummy/config/boot.rb
263
+ - spec/dummy/config/database.yml
264
+ - spec/dummy/config/initializers/inflections.rb
255
265
  - spec/dummy/config/initializers/backtrace_silencers.rb
266
+ - spec/dummy/config/initializers/wrap_parameters.rb
267
+ - spec/dummy/config/initializers/session_store.rb
268
+ - spec/dummy/config/initializers/secret_token.rb
256
269
  - spec/dummy/config/initializers/filter_parameter_logging.rb
257
- - spec/dummy/config/initializers/inflections.rb
258
270
  - spec/dummy/config/initializers/mime_types.rb
259
- - spec/dummy/config/initializers/secret_token.rb
260
- - spec/dummy/config/initializers/session_store.rb
261
- - spec/dummy/config/initializers/wrap_parameters.rb
262
- - spec/dummy/config/locales/en.yml
263
- - spec/dummy/config/routes.rb
264
- - spec/dummy/config.ru
271
+ - spec/dummy/config/application.rb
272
+ - spec/dummy/log/development.log
273
+ - spec/dummy/log/test.log
274
+ - spec/dummy/README.rdoc
275
+ - spec/dummy/db/schema.rb
265
276
  - spec/dummy/db/migrate/20140522110326_create_accounts.rb
266
277
  - spec/dummy/db/migrate/20140522110454_add_o_auth_fields_to_accounts.rb
267
- - spec/dummy/db/schema.rb
268
278
  - spec/dummy/public/404.html
269
- - spec/dummy/public/422.html
270
279
  - spec/dummy/public/500.html
271
280
  - spec/dummy/public/favicon.ico
272
- - spec/dummy/Rakefile
273
- - spec/dummy/README.rdoc
274
- - spec/fixtures/accounts.yml
275
- - spec/models/account_spec.rb
276
- - spec/routing/oauth_routing_spec.rb
277
- - spec/spec_helper.rb
281
+ - spec/dummy/public/422.html
278
282
  - spec/support/omniauth.rb