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.
@@ -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.1
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-23 00:00:00.000000000 Z
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.6
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
- SQL (1.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
2
-  (12.2ms) CREATE TABLE "favorite_foods" ("id" serial primary key, "name" character varying, "location_uid" character varying, "created_at" timestamp, "updated_at" timestamp)
3
-  (3.9ms) 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) 
4
-  (1.3ms) CREATE INDEX "index_g5_updatable_clients_on_name" ON "g5_updatable_clients" USING btree ("name")
5
-  (1.1ms) CREATE INDEX "index_g5_updatable_clients_on_uid" ON "g5_updatable_clients" USING btree ("uid")
6
-  (1.1ms) CREATE INDEX "index_g5_updatable_clients_on_urn" ON "g5_updatable_clients" USING btree ("urn")
7
-  (3.5ms) 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) 
8
-  (0.9ms) CREATE INDEX "index_g5_updatable_locations_on_name" ON "g5_updatable_locations" USING btree ("name")
9
-  (1.0ms) CREATE INDEX "index_g5_updatable_locations_on_uid" ON "g5_updatable_locations" USING btree ("uid")
10
-  (0.9ms) CREATE INDEX "index_g5_updatable_locations_on_urn" ON "g5_updatable_locations" USING btree ("urn")
11
-  (3.5ms) CREATE TABLE "restaurants" ("id" serial primary key, "name" character varying, "client_uid" character varying, "created_at" timestamp, "updated_at" timestamp) 
12
-  (2.4ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
13
-  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
14
-  (3.3ms) SELECT version FROM "schema_migrations"
15
-  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20141222072623')
16
-  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140630175259')
17
-  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140630175330')
18
-  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20140709220627')
19
-  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140714225203')
20
- SQL (0.5ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
21
-  (7.4ms) CREATE TABLE "favorite_foods" ("id" serial primary key, "name" character varying, "location_uid" character varying, "created_at" timestamp, "updated_at" timestamp) 
22
-  (4.2ms) 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
-  (1.3ms) CREATE INDEX "index_g5_updatable_clients_on_name" ON "g5_updatable_clients" USING btree ("name")
24
-  (1.0ms) CREATE INDEX "index_g5_updatable_clients_on_uid" ON "g5_updatable_clients" USING btree ("uid")
25
-  (1.1ms) CREATE INDEX "index_g5_updatable_clients_on_urn" ON "g5_updatable_clients" USING btree ("urn")
26
-  (3.7ms) 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
-  (1.0ms) CREATE INDEX "index_g5_updatable_locations_on_name" ON "g5_updatable_locations" USING btree ("name")
28
-  (1.0ms) CREATE INDEX "index_g5_updatable_locations_on_uid" ON "g5_updatable_locations" USING btree ("uid")
29
-  (1.0ms) CREATE INDEX "index_g5_updatable_locations_on_urn" ON "g5_updatable_locations" USING btree ("urn")
30
-  (3.5ms) CREATE TABLE "restaurants" ("id" serial primary key, "name" character varying, "client_uid" character varying, "created_at" timestamp, "updated_at" timestamp)
31
-  (2.1ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
32
-  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
33
-  (1.6ms) SELECT version FROM "schema_migrations"
34
-  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20141222072623')
35
-  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140630175259')
36
-  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140630175330')
37
-  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20140709220627')
38
-  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20140714225203')
39
- ActiveRecord::SchemaMigration Load (2.9ms) SELECT "schema_migrations".* FROM "schema_migrations"
40
- SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
41
-  (7.1ms) DROP TABLE "favorite_foods"
42
-  (7.1ms) CREATE TABLE "favorite_foods" ("id" serial primary key, "name" character varying, "location_uid" character varying, "created_at" timestamp, "updated_at" timestamp) 
43
-  (3.5ms) DROP TABLE "g5_updatable_clients"
44
-  (4.1ms) 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) 
45
-  (1.1ms) CREATE INDEX "index_g5_updatable_clients_on_name" ON "g5_updatable_clients" USING btree ("name")
46
-  (1.3ms) CREATE INDEX "index_g5_updatable_clients_on_uid" ON "g5_updatable_clients" USING btree ("uid")
47
-  (1.1ms) CREATE INDEX "index_g5_updatable_clients_on_urn" ON "g5_updatable_clients" USING btree ("urn")
48
-  (2.4ms) DROP TABLE "g5_updatable_locations"
49
-  (4.3ms) 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
-  (1.2ms) CREATE INDEX "index_g5_updatable_locations_on_name" ON "g5_updatable_locations" USING btree ("name")
51
-  (1.1ms) CREATE INDEX "index_g5_updatable_locations_on_uid" ON "g5_updatable_locations" USING btree ("uid")
52
-  (1.1ms) CREATE INDEX "index_g5_updatable_locations_on_urn" ON "g5_updatable_locations" USING btree ("urn")
53
-  (1.8ms) DROP TABLE "restaurants"
54
-  (4.4ms) CREATE TABLE "restaurants" ("id" serial primary key, "name" character varying, "client_uid" character varying, "created_at" timestamp, "updated_at" timestamp) 
55
-  (0.8ms) SELECT version FROM "schema_migrations"
56
-  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20140709222005')
57
-  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20141030211945')
58
-  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20141122211945')
59
-  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20141211211945')
60
-  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20141211711945')
61
- SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
62
-  (4.8ms) DROP TABLE "favorite_foods"
63
-  (5.0ms) CREATE TABLE "favorite_foods" ("id" serial primary key, "name" character varying, "location_uid" character varying, "created_at" timestamp, "updated_at" timestamp)
64
-  (3.3ms) DROP TABLE "g5_updatable_clients"
65
-  (5.3ms) 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
-  (1.6ms) CREATE INDEX "index_g5_updatable_clients_on_name" ON "g5_updatable_clients" USING btree ("name")
67
-  (1.2ms) CREATE INDEX "index_g5_updatable_clients_on_uid" ON "g5_updatable_clients" USING btree ("uid")
68
-  (1.0ms) CREATE INDEX "index_g5_updatable_clients_on_urn" ON "g5_updatable_clients" USING btree ("urn")
69
-  (2.6ms) DROP TABLE "g5_updatable_locations"
70
-  (5.0ms) 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) 
71
-  (1.1ms) CREATE INDEX "index_g5_updatable_locations_on_name" ON "g5_updatable_locations" USING btree ("name")
72
-  (1.1ms) CREATE INDEX "index_g5_updatable_locations_on_uid" ON "g5_updatable_locations" USING btree ("uid")
73
-  (1.1ms) CREATE INDEX "index_g5_updatable_locations_on_urn" ON "g5_updatable_locations" USING btree ("urn")
74
-  (1.8ms) DROP TABLE "restaurants"
75
-  (3.4ms) CREATE TABLE "restaurants" ("id" serial primary key, "name" character varying, "client_uid" character varying, "created_at" timestamp, "updated_at" timestamp)
76
-  (0.8ms) SELECT version FROM "schema_migrations"
77
-  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20140709222005')
78
-  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20141030211945')
79
-  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20141122211945')
80
-  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20141211211945')
81
-  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20141211711945')
82
- ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"