g5_updatable 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/g5_updatable/application_controller.rb +2 -0
- data/app/controllers/g5_updatable/feed_controller.rb +0 -3
- data/app/controllers/g5_updatable/locations_controller.rb +6 -0
- data/config/routes.rb +1 -0
- data/lib/g5_updatable/version.rb +1 -1
- data/spec/controllers/locations_controller_spec.rb +15 -0
- data/spec/dummy/config/database.yml +11 -0
- data/spec/dummy/log/development.log +68 -0
- data/spec/dummy/log/test.log +12627 -0
- data/spec/lib/tmp/config/routes.rb +8 -0
- metadata +14 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39a571cc047013031bbb850d7f67c41f670f3538
|
4
|
+
data.tar.gz: 1b56bc2c70bb0eb86fda031069cbcb1c11f76f52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e8198dc412ba81cf5b4190e1a2bcd8e28203e29ed98e69136f5e7615b5ade82cd569a67545a104f7ee3c011b33b777c0bf1548c38e1ed8b676a3985548a0828
|
7
|
+
data.tar.gz: 0967808276864d27301e51554bfc23055d92273d8dee4eb1f1065e8f2328944a651873e7dd16ea91810af2bb6281a991fbb651493b29f291a6a6c35550b8d24c
|
data/config/routes.rb
CHANGED
data/lib/g5_updatable/version.rb
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe G5Updatable::LocationsController, type: :controller do
|
4
|
+
routes { G5Updatable::Engine.routes }
|
5
|
+
|
6
|
+
let!(:location) { create(:location) }
|
7
|
+
|
8
|
+
describe 'GET show' do
|
9
|
+
before { get :show, urn: location.urn }
|
10
|
+
subject { JSON.parse(response.body)['location'] }
|
11
|
+
|
12
|
+
its(['urn']) { is_expected.to eq(location.urn) }
|
13
|
+
its(['uid']) { is_expected.to eq(location.uid) }
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
[1m[36m (7.4ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL) [0m
|
2
|
+
[1m[35m (12.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
3
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
4
|
+
Migrating to CreateLocations (20140630175259)
|
5
|
+
[1m[35m (0.1ms)[0m BEGIN
|
6
|
+
[1m[36m (14.8ms)[0m [1mCREATE TABLE "locations" ("id" serial primary key, "uid" character varying(255), "name" character varying(255), "corporate" boolean, "urn" character varying(255), "state" character varying(255), "city" character varying(255), "street_address" character varying(255), "postal_code" character varying(255), "domain" character varying(255), "city_slug" character varying(255), "phone_number" character varying(255), "neighborhood" character varying(255), "primary_amenity" character varying(255), "primary_landmark" character varying(255), "qualifier" character varying(255), "floor_plans" character varying(255), "created_at" timestamp, "updated_at" timestamp) [0m
|
7
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140630175259"]]
|
8
|
+
[1m[36m (6.3ms)[0m [1mCOMMIT[0m
|
9
|
+
Migrating to CreateClients (20140630175330)
|
10
|
+
[1m[35m (5.6ms)[0m BEGIN
|
11
|
+
[1m[36m (12.3ms)[0m [1mCREATE TABLE "clients" ("id" serial primary key, "uid" character varying(255), "name" character varying(255), "vertical" character varying(255), "type" character varying(255), "domain" character varying(255), "created_at" timestamp, "updated_at" timestamp) [0m
|
12
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140630175330"]]
|
13
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
14
|
+
Migrating to DropClientsAndLocations (20140709220627)
|
15
|
+
[1m[35m (0.1ms)[0m BEGIN
|
16
|
+
[1m[36m (0.6ms)[0m [1mDROP TABLE "clients"[0m
|
17
|
+
[1m[35m (0.4ms)[0m DROP TABLE "locations"
|
18
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "20140709220627"]]
|
19
|
+
[1m[35m (1.0ms)[0m COMMIT
|
20
|
+
Migrating to CreateG5UpdatableClientsAndLocations (20140709222005)
|
21
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
22
|
+
[1m[35m (1.7ms)[0m CREATE TABLE "g5_updatable_clients" ("id" serial primary key, "uid" character varying(255), "urn" character varying(255), "properties" json, "created_at" timestamp, "updated_at" timestamp)
|
23
|
+
[1m[36m (0.4ms)[0m [1mCREATE INDEX "index_g5_updatable_clients_on_uid" ON "g5_updatable_clients" ("uid")[0m
|
24
|
+
[1m[35m (0.5ms)[0m CREATE INDEX "index_g5_updatable_clients_on_urn" ON "g5_updatable_clients" ("urn")
|
25
|
+
[1m[36m (1.8ms)[0m [1mCREATE TABLE "g5_updatable_locations" ("id" serial primary key, "uid" character varying(255), "urn" character varying(255), "client_uid" character varying(255), "properties" json, "created_at" timestamp, "updated_at" timestamp) [0m
|
26
|
+
[1m[35m (0.4ms)[0m CREATE INDEX "index_g5_updatable_locations_on_uid" ON "g5_updatable_locations" ("uid")
|
27
|
+
[1m[36m (0.4ms)[0m [1mCREATE INDEX "index_g5_updatable_locations_on_urn" ON "g5_updatable_locations" ("urn")[0m
|
28
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140709222005"]]
|
29
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
30
|
+
Migrating to CreateFavoriteFoods (20140714225203)
|
31
|
+
[1m[35m (0.3ms)[0m BEGIN
|
32
|
+
[1m[36m (2.0ms)[0m [1mCREATE TABLE "favorite_foods" ("id" serial primary key, "name" character varying(255), "location_uid" character varying(255), "created_at" timestamp, "updated_at" timestamp) [0m
|
33
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20140714225203"]]
|
34
|
+
[1m[36m (0.2ms)[0m [1mCOMMIT[0m
|
35
|
+
Migrating to CreateIntegrationSetting (20141030211945)
|
36
|
+
[1m[35m (0.2ms)[0m BEGIN
|
37
|
+
[1m[36m (2.7ms)[0m [1mCREATE TABLE "g5_updatable_integration_settings" ("id" serial primary key, "uid" character varying(255), "urn" character varying(255), "location_uid" character varying(255), "vendor_action" character varying(255), "job_frequency_in_minutes" integer, "properties" json, "created_at" timestamp, "updated_at" timestamp) [0m
|
38
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_g5_updatable_integration_settings_on_urn" ON "g5_updatable_integration_settings" ("urn")
|
39
|
+
[1m[36m (0.9ms)[0m [1mCREATE INDEX "index_g5_updatable_integration_settings_on_uid" ON "g5_updatable_integration_settings" ("uid")[0m
|
40
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_g5_updatable_integration_settings_on_vendor_action" ON "g5_updatable_integration_settings" ("vendor_action")
|
41
|
+
[1m[36m (0.6ms)[0m [1mCREATE INDEX "g5_u_is_loc_action" ON "g5_updatable_integration_settings" ("location_uid", "vendor_action")[0m
|
42
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141030211945"]]
|
43
|
+
[1m[36m (0.2ms)[0m [1mCOMMIT[0m
|
44
|
+
Migrating to RemoveIntegrationSetting (20141122211945)
|
45
|
+
[1m[35m (0.1ms)[0m BEGIN
|
46
|
+
[1m[36m (0.6ms)[0m [1mDROP TABLE "g5_updatable_integration_settings"[0m
|
47
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141122211945"]]
|
48
|
+
[1m[36m (0.8ms)[0m [1mCOMMIT[0m
|
49
|
+
Migrating to AddNameToClientsAndLocations (20141211211945)
|
50
|
+
[1m[35m (0.1ms)[0m BEGIN
|
51
|
+
[1m[36m (0.3ms)[0m [1mALTER TABLE "g5_updatable_clients" ADD COLUMN "name" character varying(255)[0m
|
52
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_g5_updatable_clients_on_name" ON "g5_updatable_clients" ("name")
|
53
|
+
[1m[36m (0.2ms)[0m [1mALTER TABLE "g5_updatable_locations" ADD COLUMN "name" character varying(255)[0m
|
54
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_g5_updatable_locations_on_name" ON "g5_updatable_locations" ("name")
|
55
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ($1)[0m [["version", "20141211211945"]]
|
56
|
+
[1m[35m (0.3ms)[0m COMMIT
|
57
|
+
Migrating to UpdateNames (20141211711945)
|
58
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
59
|
+
[1m[35mG5Updatable::Client Load (0.6ms)[0m SELECT "g5_updatable_clients".* FROM "g5_updatable_clients"
|
60
|
+
[1m[36mG5Updatable::Location Load (0.4ms)[0m [1mSELECT "g5_updatable_locations".* FROM "g5_updatable_locations"[0m
|
61
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141211711945"]]
|
62
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
63
|
+
Migrating to CreateRestaurants (20141222072623)
|
64
|
+
[1m[35m (0.1ms)[0m BEGIN
|
65
|
+
[1m[36m (2.0ms)[0m [1mCREATE TABLE "restaurants" ("id" serial primary key, "name" character varying(255), "client_uid" character varying(255), "created_at" timestamp, "updated_at" timestamp) [0m
|
66
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141222072623"]]
|
67
|
+
[1m[36m (0.2ms)[0m [1mCOMMIT[0m
|
68
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|