g5_updatable 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/g5_updatable/locations_updater.rb +3 -1
- data/lib/g5_updatable/version.rb +1 -1
- data/spec/dummy/config/database.yml +2 -2
- data/spec/dummy/log/development.log +82 -0
- data/spec/dummy/log/test.log +5714 -2158
- data/spec/lib/g5_updatable/locations_updater_spec.rb +25 -3
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43f06bc38ca96cb022b56ce87834f37552738d9f
|
4
|
+
data.tar.gz: e0379ee13b9fcd04e1ae7c3937a811b6fe1c0a00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7c00575e9cf9da95dd2a9d118a48d1b9663678fc2fa94e83e4ebb0e6ef4081130dc0fa8fbc84a3822710e3c8af859e8629f499d9b6bbdb0fe110fc206d76958
|
7
|
+
data.tar.gz: fa948d41fcfab80831224df7acad35d7e87a02f50a86dae62a97156fafe5f1a602538c34549e4210b9db17f8d7be9d964f5c1ed447b5165120c7f1af1e94e98c
|
@@ -39,7 +39,9 @@ class G5Updatable::LocationsUpdater
|
|
39
39
|
if @g5_locations.empty?
|
40
40
|
G5Updatable::Location.by_client_uid(@client_uid)
|
41
41
|
else
|
42
|
-
G5Updatable::Location
|
42
|
+
G5Updatable::Location
|
43
|
+
.where.not(urn: @g5_locations.map(&:urn))
|
44
|
+
.where(client_uid: @client_uid)
|
43
45
|
end.destroy_all
|
44
46
|
end
|
45
47
|
end
|
data/lib/g5_updatable/version.rb
CHANGED
@@ -0,0 +1,82 @@
|
|
1
|
+
[1m[36mSQL (1.1ms)[0m [1mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
2
|
+
[1m[35m (12.2ms)[0m CREATE TABLE "favorite_foods" ("id" serial primary key, "name" character varying, "location_uid" character varying, "created_at" timestamp, "updated_at" timestamp)
|
3
|
+
[1m[36m (3.9ms)[0m [1mCREATE TABLE "g5_updatable_clients" ("id" serial primary key, "uid" character varying, "urn" character varying, "properties" json, "created_at" timestamp, "updated_at" timestamp, "name" character varying) [0m
|
4
|
+
[1m[35m (1.3ms)[0m CREATE INDEX "index_g5_updatable_clients_on_name" ON "g5_updatable_clients" USING btree ("name")
|
5
|
+
[1m[36m (1.1ms)[0m [1mCREATE INDEX "index_g5_updatable_clients_on_uid" ON "g5_updatable_clients" USING btree ("uid")[0m
|
6
|
+
[1m[35m (1.1ms)[0m CREATE INDEX "index_g5_updatable_clients_on_urn" ON "g5_updatable_clients" USING btree ("urn")
|
7
|
+
[1m[36m (3.5ms)[0m [1mCREATE TABLE "g5_updatable_locations" ("id" serial primary key, "uid" character varying, "urn" character varying, "client_uid" character varying, "properties" json, "created_at" timestamp, "updated_at" timestamp, "name" character varying) [0m
|
8
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_g5_updatable_locations_on_name" ON "g5_updatable_locations" USING btree ("name")
|
9
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_g5_updatable_locations_on_uid" ON "g5_updatable_locations" USING btree ("uid")[0m
|
10
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_g5_updatable_locations_on_urn" ON "g5_updatable_locations" USING btree ("urn")
|
11
|
+
[1m[36m (3.5ms)[0m [1mCREATE TABLE "restaurants" ("id" serial primary key, "name" character varying, "client_uid" character varying, "created_at" timestamp, "updated_at" timestamp) [0m
|
12
|
+
[1m[35m (2.4ms)[0m CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
|
13
|
+
[1m[36m (1.3ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
14
|
+
[1m[35m (3.3ms)[0m SELECT version FROM "schema_migrations"
|
15
|
+
[1m[36m (0.5ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20141222072623')[0m
|
16
|
+
[1m[35m (0.4ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140630175259')
|
17
|
+
[1m[36m (0.3ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140630175330')[0m
|
18
|
+
[1m[35m (0.4ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140709220627')
|
19
|
+
[1m[36m (0.3ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140714225203')[0m
|
20
|
+
[1m[35mSQL (0.5ms)[0m CREATE EXTENSION IF NOT EXISTS "plpgsql"
|
21
|
+
[1m[36m (7.4ms)[0m [1mCREATE TABLE "favorite_foods" ("id" serial primary key, "name" character varying, "location_uid" character varying, "created_at" timestamp, "updated_at" timestamp) [0m
|
22
|
+
[1m[35m (4.2ms)[0m CREATE TABLE "g5_updatable_clients" ("id" serial primary key, "uid" character varying, "urn" character varying, "properties" json, "created_at" timestamp, "updated_at" timestamp, "name" character varying)
|
23
|
+
[1m[36m (1.3ms)[0m [1mCREATE INDEX "index_g5_updatable_clients_on_name" ON "g5_updatable_clients" USING btree ("name")[0m
|
24
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_g5_updatable_clients_on_uid" ON "g5_updatable_clients" USING btree ("uid")
|
25
|
+
[1m[36m (1.1ms)[0m [1mCREATE INDEX "index_g5_updatable_clients_on_urn" ON "g5_updatable_clients" USING btree ("urn")[0m
|
26
|
+
[1m[35m (3.7ms)[0m CREATE TABLE "g5_updatable_locations" ("id" serial primary key, "uid" character varying, "urn" character varying, "client_uid" character varying, "properties" json, "created_at" timestamp, "updated_at" timestamp, "name" character varying)
|
27
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_g5_updatable_locations_on_name" ON "g5_updatable_locations" USING btree ("name")[0m
|
28
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_g5_updatable_locations_on_uid" ON "g5_updatable_locations" USING btree ("uid")
|
29
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_g5_updatable_locations_on_urn" ON "g5_updatable_locations" USING btree ("urn")[0m
|
30
|
+
[1m[35m (3.5ms)[0m CREATE TABLE "restaurants" ("id" serial primary key, "name" character varying, "client_uid" character varying, "created_at" timestamp, "updated_at" timestamp)
|
31
|
+
[1m[36m (2.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
32
|
+
[1m[35m (1.0ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
33
|
+
[1m[36m (1.6ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
34
|
+
[1m[35m (0.4ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20141222072623')
|
35
|
+
[1m[36m (0.3ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140630175259')[0m
|
36
|
+
[1m[35m (0.2ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140630175330')
|
37
|
+
[1m[36m (0.2ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140709220627')[0m
|
38
|
+
[1m[35m (0.3ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140714225203')
|
39
|
+
[1m[36mActiveRecord::SchemaMigration Load (2.9ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
40
|
+
[1m[36mSQL (0.3ms)[0m [1mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
41
|
+
[1m[35m (7.1ms)[0m DROP TABLE "favorite_foods"
|
42
|
+
[1m[36m (7.1ms)[0m [1mCREATE TABLE "favorite_foods" ("id" serial primary key, "name" character varying, "location_uid" character varying, "created_at" timestamp, "updated_at" timestamp) [0m
|
43
|
+
[1m[35m (3.5ms)[0m DROP TABLE "g5_updatable_clients"
|
44
|
+
[1m[36m (4.1ms)[0m [1mCREATE TABLE "g5_updatable_clients" ("id" serial primary key, "uid" character varying, "urn" character varying, "properties" json, "created_at" timestamp, "updated_at" timestamp, "name" character varying) [0m
|
45
|
+
[1m[35m (1.1ms)[0m CREATE INDEX "index_g5_updatable_clients_on_name" ON "g5_updatable_clients" USING btree ("name")
|
46
|
+
[1m[36m (1.3ms)[0m [1mCREATE INDEX "index_g5_updatable_clients_on_uid" ON "g5_updatable_clients" USING btree ("uid")[0m
|
47
|
+
[1m[35m (1.1ms)[0m CREATE INDEX "index_g5_updatable_clients_on_urn" ON "g5_updatable_clients" USING btree ("urn")
|
48
|
+
[1m[36m (2.4ms)[0m [1mDROP TABLE "g5_updatable_locations"[0m
|
49
|
+
[1m[35m (4.3ms)[0m CREATE TABLE "g5_updatable_locations" ("id" serial primary key, "uid" character varying, "urn" character varying, "client_uid" character varying, "properties" json, "created_at" timestamp, "updated_at" timestamp, "name" character varying)
|
50
|
+
[1m[36m (1.2ms)[0m [1mCREATE INDEX "index_g5_updatable_locations_on_name" ON "g5_updatable_locations" USING btree ("name")[0m
|
51
|
+
[1m[35m (1.1ms)[0m CREATE INDEX "index_g5_updatable_locations_on_uid" ON "g5_updatable_locations" USING btree ("uid")
|
52
|
+
[1m[36m (1.1ms)[0m [1mCREATE INDEX "index_g5_updatable_locations_on_urn" ON "g5_updatable_locations" USING btree ("urn")[0m
|
53
|
+
[1m[35m (1.8ms)[0m DROP TABLE "restaurants"
|
54
|
+
[1m[36m (4.4ms)[0m [1mCREATE TABLE "restaurants" ("id" serial primary key, "name" character varying, "client_uid" character varying, "created_at" timestamp, "updated_at" timestamp) [0m
|
55
|
+
[1m[35m (0.8ms)[0m SELECT version FROM "schema_migrations"
|
56
|
+
[1m[36m (0.5ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140709222005')[0m
|
57
|
+
[1m[35m (0.4ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20141030211945')
|
58
|
+
[1m[36m (0.4ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20141122211945')[0m
|
59
|
+
[1m[35m (0.3ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20141211211945')
|
60
|
+
[1m[36m (0.3ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20141211711945')[0m
|
61
|
+
[1m[35mSQL (0.3ms)[0m CREATE EXTENSION IF NOT EXISTS "plpgsql"
|
62
|
+
[1m[36m (4.8ms)[0m [1mDROP TABLE "favorite_foods"[0m
|
63
|
+
[1m[35m (5.0ms)[0m CREATE TABLE "favorite_foods" ("id" serial primary key, "name" character varying, "location_uid" character varying, "created_at" timestamp, "updated_at" timestamp)
|
64
|
+
[1m[36m (3.3ms)[0m [1mDROP TABLE "g5_updatable_clients"[0m
|
65
|
+
[1m[35m (5.3ms)[0m CREATE TABLE "g5_updatable_clients" ("id" serial primary key, "uid" character varying, "urn" character varying, "properties" json, "created_at" timestamp, "updated_at" timestamp, "name" character varying)
|
66
|
+
[1m[36m (1.6ms)[0m [1mCREATE INDEX "index_g5_updatable_clients_on_name" ON "g5_updatable_clients" USING btree ("name")[0m
|
67
|
+
[1m[35m (1.2ms)[0m CREATE INDEX "index_g5_updatable_clients_on_uid" ON "g5_updatable_clients" USING btree ("uid")
|
68
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_g5_updatable_clients_on_urn" ON "g5_updatable_clients" USING btree ("urn")[0m
|
69
|
+
[1m[35m (2.6ms)[0m DROP TABLE "g5_updatable_locations"
|
70
|
+
[1m[36m (5.0ms)[0m [1mCREATE TABLE "g5_updatable_locations" ("id" serial primary key, "uid" character varying, "urn" character varying, "client_uid" character varying, "properties" json, "created_at" timestamp, "updated_at" timestamp, "name" character varying) [0m
|
71
|
+
[1m[35m (1.1ms)[0m CREATE INDEX "index_g5_updatable_locations_on_name" ON "g5_updatable_locations" USING btree ("name")
|
72
|
+
[1m[36m (1.1ms)[0m [1mCREATE INDEX "index_g5_updatable_locations_on_uid" ON "g5_updatable_locations" USING btree ("uid")[0m
|
73
|
+
[1m[35m (1.1ms)[0m CREATE INDEX "index_g5_updatable_locations_on_urn" ON "g5_updatable_locations" USING btree ("urn")
|
74
|
+
[1m[36m (1.8ms)[0m [1mDROP TABLE "restaurants"[0m
|
75
|
+
[1m[35m (3.4ms)[0m CREATE TABLE "restaurants" ("id" serial primary key, "name" character varying, "client_uid" character varying, "created_at" timestamp, "updated_at" timestamp)
|
76
|
+
[1m[36m (0.8ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
77
|
+
[1m[35m (0.5ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140709222005')
|
78
|
+
[1m[36m (0.4ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20141030211945')[0m
|
79
|
+
[1m[35m (0.3ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20141122211945')
|
80
|
+
[1m[36m (0.3ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20141211211945')[0m
|
81
|
+
[1m[35m (0.3ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20141211711945')
|
82
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.5ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|