g5_updatable 0.7.1 → 0.7.2
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 +4 -4
- data/lib/g5_updatable/locations_updater.rb +9 -8
- data/lib/g5_updatable/version.rb +1 -1
- data/spec/dummy/config/database.yml +2 -2
- data/spec/dummy/log/test.log +2627 -5723
- data/spec/lib/g5_updatable/locations_updater_spec.rb +11 -0
- metadata +3 -5
- data/spec/dummy/log/development.log +0 -82
@@ -149,6 +149,17 @@ describe G5Updatable::LocationsUpdater do
|
|
149
149
|
expect(described_class.on_update_callbacks).
|
150
150
|
to eq([callback_1, callback_2])
|
151
151
|
end
|
152
|
+
|
153
|
+
it "passes the location into each callback" do
|
154
|
+
accumulator = []
|
155
|
+
callback = -> (location) { accumulator << location.id }
|
156
|
+
described_class.on_update(&callback)
|
157
|
+
|
158
|
+
updater.update
|
159
|
+
location = G5Updatable::Location.first
|
160
|
+
|
161
|
+
expect(accumulator).to include(location.id)
|
162
|
+
end
|
152
163
|
end
|
153
164
|
|
154
165
|
describe ".on_update_callbacks" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: g5_updatable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -239,7 +239,6 @@ files:
|
|
239
239
|
- spec/dummy/db/migrate/20141222072623_create_restaurants.rb
|
240
240
|
- spec/dummy/db/schema.rb
|
241
241
|
- spec/dummy/db/test.sqlite3
|
242
|
-
- spec/dummy/log/development.log
|
243
242
|
- spec/dummy/log/test.log
|
244
243
|
- spec/dummy/public/404.html
|
245
244
|
- spec/dummy/public/422.html
|
@@ -280,7 +279,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
280
279
|
version: '0'
|
281
280
|
requirements: []
|
282
281
|
rubyforge_project:
|
283
|
-
rubygems_version: 2.4.
|
282
|
+
rubygems_version: 2.4.7
|
284
283
|
signing_key:
|
285
284
|
specification_version: 4
|
286
285
|
summary: Client/Locations data update engine for G5 applications
|
@@ -329,7 +328,6 @@ test_files:
|
|
329
328
|
- spec/dummy/db/migrate/20141222072623_create_restaurants.rb
|
330
329
|
- spec/dummy/db/schema.rb
|
331
330
|
- spec/dummy/db/test.sqlite3
|
332
|
-
- spec/dummy/log/development.log
|
333
331
|
- spec/dummy/log/test.log
|
334
332
|
- spec/dummy/public/404.html
|
335
333
|
- spec/dummy/public/422.html
|
@@ -1,82 +0,0 @@
|
|
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
|