g5_updatable 0.10.3 → 0.20.3.pre.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 +4 -4
- data/README.md +33 -2
- data/app/concerns/g5_updatable/belongs_to_client.rb +3 -3
- data/app/controllers/g5_updatable/feed_controller.rb +1 -1
- data/app/controllers/g5_updatable/locations_controller.rb +2 -2
- data/app/controllers/g5_updatable/syncs_controller.rb +3 -3
- data/app/models/g5_updatable/client.rb +4 -4
- data/app/models/g5_updatable/hub_amenities_location.rb +6 -0
- data/app/models/g5_updatable/hub_amenity.rb +21 -0
- data/app/models/g5_updatable/location.rb +75 -2
- data/app/serializers/g5_updatable/location_serializer.rb +8 -0
- data/db/migrate/20151103043916_add_latitude_and_longitude_to_location.rb +6 -0
- data/db/migrate/20151103050229_copy_lat_long_props_to_lat_long_columns.rb +19 -0
- data/db/migrate/20151106070749_add_latitude_longitude_indexes_to_location.rb +6 -0
- data/db/migrate/20161122070749_add_amenities.rb +25 -0
- data/db/migrate/20161209070749_add_client_urn_to_locations.rb +6 -0
- data/lib/g5_updatable.rb +5 -3
- data/lib/g5_updatable/all_client_urns_fetcher.rb +17 -0
- data/lib/g5_updatable/client_feed_processor.rb +26 -14
- data/lib/g5_updatable/client_updater.rb +37 -12
- data/lib/g5_updatable/factories.rb +2 -2
- data/lib/g5_updatable/fetcher.rb +22 -0
- data/lib/g5_updatable/indifferentizer.rb +11 -0
- data/lib/g5_updatable/locations_updater.rb +68 -20
- data/lib/g5_updatable/rspec/factories.rb +53 -2
- data/lib/g5_updatable/version.rb +1 -1
- data/lib/tasks/g5_updatable_tasks.rake +11 -4
- data/spec/concerns/g5_updatable/belongs_to_client_spec.rb +1 -3
- data/spec/controllers/feed_controller_spec.rb +21 -0
- data/spec/controllers/syncs_controller_spec.rb +3 -3
- data/spec/dummy/config/database.yml +2 -2
- data/spec/dummy/db/schema.rb +28 -1
- data/spec/dummy/log/development.log +172 -146
- data/spec/dummy/log/test.log +101011 -13426
- data/spec/dummy/log/tests.log +0 -0
- data/spec/fixtures/client-g5-c-1soj8m6e-g5-multifamily-missing-locations.json +121 -0
- data/spec/fixtures/client-g5-c-1soj8m6e-g5-multifamily-no-locations.json +41 -0
- data/spec/fixtures/client-g5-c-1soj8m6e-g5-multifamily.json +471 -0
- data/spec/fixtures/hub-client.json +187 -0
- data/spec/fixtures/hub-clients.json +19972 -0
- data/spec/fixtures/hub-location.json +166 -0
- data/spec/fixtures/location-g5-cl-1soj9pe2-541-apartments.json +98 -0
- data/spec/fixtures/urns.json +10 -0
- data/spec/lib/g5_updatable/all_client_urns_fetcher_spec.rb +56 -0
- data/spec/lib/g5_updatable/client_feed_processor_spec.rb +86 -33
- data/spec/lib/g5_updatable/client_updater_spec.rb +55 -23
- data/spec/lib/g5_updatable/locations_updater_spec.rb +140 -54
- data/spec/models/g5_updatable/client_spec.rb +2 -0
- data/spec/models/g5_updatable/hub_amenities_location_spec.rb +6 -0
- data/spec/models/g5_updatable/hub_amenity_spec.rb +29 -0
- data/spec/models/g5_updatable/location_spec.rb +240 -10
- data/spec/serializers/g5_updatable/location_serializer_spec.rb +2 -1
- data/spec/spec_helper.rb +2 -1
- data/spec/support/fixture_helper.rb +5 -0
- data/spec/support/shared_examples/belongs_to_client.rb +4 -5
- metadata +84 -17
@@ -6,9 +6,16 @@ describe G5Updatable::Location do
|
|
6
6
|
|
7
7
|
it { expect(location).to validate_presence_of(:uid) }
|
8
8
|
it { expect(location).to validate_presence_of(:urn) }
|
9
|
+
it { expect(location).to validate_uniqueness_of(:urn) }
|
9
10
|
it { expect(location).to validate_presence_of(:client_uid) }
|
11
|
+
it { expect(location).to validate_presence_of(:client_urn) }
|
12
|
+
it { expect(location).to have_attribute(:latitude) }
|
13
|
+
it { expect(location).to have_attribute(:longitude) }
|
10
14
|
end
|
11
15
|
|
16
|
+
it { is_expected.to have_many(:hub_amenities_locations).dependent(:destroy) }
|
17
|
+
it { is_expected.to have_many(:hub_amenities).through(:hub_amenities_locations) }
|
18
|
+
|
12
19
|
it_behaves_like 'a model with first-class properties' do
|
13
20
|
let(:instance_factory_name) { :location }
|
14
21
|
end
|
@@ -19,25 +26,22 @@ describe G5Updatable::Location do
|
|
19
26
|
|
20
27
|
describe '#client' do
|
21
28
|
let(:client) { create(:client) }
|
22
|
-
let(:location) { create(:location, client_uid: client.uid) }
|
29
|
+
let(:location) { create(:location, client_uid: client.uid, client_urn: nil) }
|
23
30
|
subject { location.client }
|
24
31
|
|
25
|
-
it {
|
32
|
+
it { is_expected.to eq(client) }
|
26
33
|
|
27
34
|
describe 'client_urn' do
|
28
|
-
it '
|
29
|
-
expect(location.client_urn).to eq(client.
|
30
|
-
end
|
31
|
-
|
32
|
-
it 'returns nil if client not found' do
|
33
|
-
expect(create(:location, client_uid: 'madeup').client_urn).to be_nil
|
35
|
+
it 'uses client_uid to set client_urn if not present' do
|
36
|
+
expect(location.client_urn).to eq(client.uid.split('/').last)
|
34
37
|
end
|
35
38
|
end
|
36
39
|
end
|
37
40
|
|
38
41
|
context 'scopes' do
|
39
|
-
let
|
40
|
-
let!(:
|
42
|
+
let(:client) { create(:client) }
|
43
|
+
let!(:location) { create(:location, client_urn: 'a client urn', client_uid: 'a client uid') }
|
44
|
+
let!(:location2) { create(:g5mf_location, :all_properties) }
|
41
45
|
|
42
46
|
describe '.by_client_uid' do
|
43
47
|
it 'returns locations' do
|
@@ -45,6 +49,12 @@ describe G5Updatable::Location do
|
|
45
49
|
end
|
46
50
|
end
|
47
51
|
|
52
|
+
describe '.by_client_urn' do
|
53
|
+
it 'returns locations' do
|
54
|
+
expect(described_class.by_client_urn(location.client_urn)).to eq [location]
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
48
58
|
describe '.max_updated_at' do
|
49
59
|
it 'returns locations' do
|
50
60
|
expect(described_class.max_updated_at.to_s).to eq location2.updated_at.to_s
|
@@ -56,6 +66,56 @@ describe G5Updatable::Location do
|
|
56
66
|
expect(described_class.by_urn(location.urn)).to eq [location]
|
57
67
|
end
|
58
68
|
end
|
69
|
+
|
70
|
+
describe '.in_status' do
|
71
|
+
it 'returns locations matching status' do
|
72
|
+
expect(described_class.in_status(location2.status)).to eq [location2]
|
73
|
+
end
|
74
|
+
|
75
|
+
it 'returns locations with one of the statuses' do
|
76
|
+
expect(described_class.in_status([location2.status, 'madeup'])).to eq [location2]
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
describe '.by_postal_code' do
|
81
|
+
it 'returns locations with matching postal code' do
|
82
|
+
expect(described_class.by_postal_code(location2.postal_code)).to eq [location2]
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
describe '.by_city' do
|
87
|
+
it 'returns locations with matching city' do
|
88
|
+
expect(described_class.by_city(location2.city)).to eq [location2]
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
describe '.by_state' do
|
93
|
+
it 'returns locations with matching state' do
|
94
|
+
expect(described_class.by_state(location2.state)).to eq [location2]
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
describe '.by_neighborhood' do
|
99
|
+
it 'returns locations with neighborhood' do
|
100
|
+
expect(described_class.by_neighborhood(location2.neighborhood)).to eq [location2]
|
101
|
+
expect(described_class.by_neighborhood(location2.neighborhood_2)).to eq [location2]
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
describe '#neighborhoods' do
|
106
|
+
it 'returns all neighborhoods' do
|
107
|
+
expect(location2.neighborhoods).to eq([location2.neighborhood, location2.neighborhood_2])
|
108
|
+
end
|
109
|
+
|
110
|
+
it 'return empty array if no neighborhoods' do
|
111
|
+
expect(location.neighborhoods).to be_empty
|
112
|
+
end
|
113
|
+
|
114
|
+
it 'ignores blank neighborhoods' do
|
115
|
+
location_with_blank = create(:g5mf_location, urn: 'sumpn', uid: 'http://sumpn', properties: {neighborhood: ''})
|
116
|
+
expect(location_with_blank.neighborhoods).to be_empty
|
117
|
+
end
|
118
|
+
end
|
59
119
|
end
|
60
120
|
|
61
121
|
describe '#display_name' do
|
@@ -76,4 +136,174 @@ describe G5Updatable::Location do
|
|
76
136
|
its(:display_name) { is_expected.to be_nil }
|
77
137
|
end
|
78
138
|
end
|
139
|
+
|
140
|
+
describe "#live?" do
|
141
|
+
subject { described_class.new(properties: properties) }
|
142
|
+
context "status is Live" do
|
143
|
+
let(:properties) { {'status' => 'Live'} }
|
144
|
+
its(:live?) { is_expected.to eq true }
|
145
|
+
end
|
146
|
+
|
147
|
+
context "status is something else" do
|
148
|
+
let(:properties) { {'status' => 'Pending'} }
|
149
|
+
its(:live?) { is_expected.to eq false }
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
context "#no_deploy?" do
|
154
|
+
subject { described_class.new(properties: properties) }
|
155
|
+
context "status is No Deploy" do
|
156
|
+
let(:properties) { {'status' => 'No Deploy'} }
|
157
|
+
its(:no_deploy?) { is_expected.to eq true }
|
158
|
+
end
|
159
|
+
|
160
|
+
context "status is something else" do
|
161
|
+
let(:properties) { {'status' => 'Pending'} }
|
162
|
+
its(:no_deploy?) { is_expected.to eq false }
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
context "#pending?" do
|
167
|
+
subject { described_class.new(properties: properties) }
|
168
|
+
context "status is Pending" do
|
169
|
+
let(:properties) { {'status' => 'Pending'} }
|
170
|
+
its(:pending?) { is_expected.to eq true }
|
171
|
+
end
|
172
|
+
|
173
|
+
context "status is something else" do
|
174
|
+
let(:properties) { {'status' => 'Live'} }
|
175
|
+
its(:pending?) { is_expected.to eq false }
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
context "#deleted?" do
|
180
|
+
subject { described_class.new(properties: properties) }
|
181
|
+
context "status is Deleted" do
|
182
|
+
let(:properties) { {'status' => 'Deleted'} }
|
183
|
+
its(:deleted?) { is_expected.to eq true }
|
184
|
+
end
|
185
|
+
|
186
|
+
context "status is something else" do
|
187
|
+
let(:properties) { {'status' => 'Live'} }
|
188
|
+
its(:deleted?) { is_expected.to eq false }
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
context "#suspended?" do
|
193
|
+
subject { described_class.new(properties: properties) }
|
194
|
+
context "status is Suspended" do
|
195
|
+
let(:properties) { {'status' => 'Suspended'} }
|
196
|
+
its(:suspended?) { is_expected.to eq true }
|
197
|
+
end
|
198
|
+
|
199
|
+
context "status is something else" do
|
200
|
+
let(:properties) { {'status' => 'Live'} }
|
201
|
+
its(:suspended?) { is_expected.to eq false }
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
context "#status?" do
|
206
|
+
subject { location.status?(status_parameter) }
|
207
|
+
let(:location) { described_class.new(properties: properties) }
|
208
|
+
let(:status_parameter) { "Given Status" }
|
209
|
+
|
210
|
+
context "status property matches the given status parameter" do
|
211
|
+
let(:properties) { {"status" => "Given Status"} }
|
212
|
+
it { is_expected.to eq true }
|
213
|
+
end
|
214
|
+
|
215
|
+
context "status property matches the given status parameter regardless of letter case" do
|
216
|
+
let(:properties) { {"status" => "giveN StAtus"} }
|
217
|
+
it { is_expected.to eq true }
|
218
|
+
end
|
219
|
+
|
220
|
+
context "status property matches the given status parameter, regardless of leading/trailing whitespace" do
|
221
|
+
let(:properties) { {"status" => " Given Status \t"} }
|
222
|
+
let(:status_parameter) { " Given Status \t\n" }
|
223
|
+
it { is_expected.to eq true }
|
224
|
+
end
|
225
|
+
|
226
|
+
context "status is something else" do
|
227
|
+
let(:properties) { {'status' => 'Live'} }
|
228
|
+
it { is_expected.to eq false }
|
229
|
+
end
|
230
|
+
|
231
|
+
context "no status" do
|
232
|
+
let(:properties) { {} }
|
233
|
+
it { is_expected.to eq false }
|
234
|
+
end
|
235
|
+
|
236
|
+
context "no properties attribute" do
|
237
|
+
let(:properties) { nil }
|
238
|
+
it { is_expected.to eq false }
|
239
|
+
end
|
240
|
+
end
|
241
|
+
|
242
|
+
describe '#amenities' do
|
243
|
+
let!(:location) { create(:location) }
|
244
|
+
let!(:amenity) { create(:hub_amenity) }
|
245
|
+
let!(:amenity2) { create(:hub_amenity) }
|
246
|
+
|
247
|
+
before do
|
248
|
+
location.hub_amenities << amenity
|
249
|
+
location.hub_amenities << amenity2
|
250
|
+
location.refresh_flat_amenity_names!
|
251
|
+
location.reload
|
252
|
+
end
|
253
|
+
|
254
|
+
it 'associates amenities' do
|
255
|
+
expect(location.hub_amenities).to match_array([amenity, amenity2])
|
256
|
+
expect(location.hub_amenities_locations.collect(&:location)).to eq([location, location])
|
257
|
+
end
|
258
|
+
|
259
|
+
it 'sets the flat amenity names' do
|
260
|
+
expect(location.flat_amenity_names).to eq("|#{location.hub_amenities.collect(&:name).sort.join('|')}|")
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
264
|
+
describe 'amenity scopes' do
|
265
|
+
let!(:location) { create(:location, properties: {city: 'mycity', state: 'AK', status: 'Pending'}, amenity_names_array: ['a', 'b', 'c', 'z']) }
|
266
|
+
let!(:location2) { create(:location, urn: 'adiffurn', uid: 'adiffuid', amenity_names_array: ['b', 'c', 'd', 'z']) }
|
267
|
+
|
268
|
+
describe '#by_amenity_names' do
|
269
|
+
it 'finds by one matching amenity' do
|
270
|
+
expect(described_class.by_amenity_names('a')).to eq([location])
|
271
|
+
expect(described_class.by_amenity_names('a', 'b')).to eq([location])
|
272
|
+
expect(described_class.by_amenity_names('b', 'a')).to eq([location])
|
273
|
+
end
|
274
|
+
|
275
|
+
it 'finds by multiple matching amenities' do
|
276
|
+
expect(described_class.by_amenity_names(['b', 'c'])).to match_array([location, location2])
|
277
|
+
expect(described_class.by_amenity_names('c', 'b')).to match_array([location, location2])
|
278
|
+
expect(described_class.by_amenity_names(['c', 'b'])).to match_array([location, location2])
|
279
|
+
end
|
280
|
+
|
281
|
+
it 'finds by multiple matching amenities that are not in order' do
|
282
|
+
expect(described_class.by_amenity_names(['a', 'c'])).to match_array([location])
|
283
|
+
expect(described_class.by_amenity_names('d', 'b')).to match_array([location2])
|
284
|
+
expect(described_class.by_amenity_names(['z', 'b'])).to match_array([location, location2])
|
285
|
+
end
|
286
|
+
|
287
|
+
it 'does not match if one amenity does not match' do
|
288
|
+
expect(described_class.by_amenity_names('b', 'y')).to be_empty
|
289
|
+
end
|
290
|
+
|
291
|
+
it 'is chainable' do
|
292
|
+
expect(described_class.by_city('mycity').by_amenity_names(['a', 'c']).by_state('AK').in_status('Pending')).to match_array([location])
|
293
|
+
end
|
294
|
+
end
|
295
|
+
end
|
296
|
+
|
297
|
+
describe '#amenity_names_to_tokenized_string' do
|
298
|
+
[{input: ['a'], expected: '|a|'},
|
299
|
+
{input: ['b', 'a'], expected: '|a|b|'},
|
300
|
+
{input: 'b', expected: '|b|'},
|
301
|
+
{input: '', expected: nil},
|
302
|
+
{input: nil, expected: nil}
|
303
|
+
].each do |test_hash|
|
304
|
+
it "converts #{test_hash[:input]} to #{test_hash[:expected]}" do
|
305
|
+
expect(described_class.amenity_names_to_tokenized_string(test_hash[:input])).to eq(test_hash[:expected])
|
306
|
+
end
|
307
|
+
end
|
308
|
+
end
|
79
309
|
end
|
@@ -7,12 +7,13 @@ describe G5Updatable::LocationSerializer do
|
|
7
7
|
uid: "https://example.com/locations/test-urn",
|
8
8
|
urn: "test-urn",
|
9
9
|
client_uid: "https://example.com/client",
|
10
|
+
name: "Test Name",
|
10
11
|
properties: {
|
11
12
|
name: "Test Name"
|
12
13
|
}
|
13
14
|
)
|
14
15
|
end
|
15
|
-
subject { G5Updatable::LocationSerializer.new(location).as_json
|
16
|
+
subject { G5Updatable::LocationSerializer.new(location).as_json }
|
16
17
|
|
17
18
|
its([:uid]) { is_expected.to eq("https://example.com/locations/test-urn") }
|
18
19
|
its([:urn]) { is_expected.to eq("test-urn") }
|
data/spec/spec_helper.rb
CHANGED
@@ -4,12 +4,12 @@ ENV["RAILS_ENV"] ||= 'test'
|
|
4
4
|
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
5
5
|
require 'rspec/rails'
|
6
6
|
require 'rspec/its'
|
7
|
+
require 'webmock/rspec'
|
7
8
|
|
8
9
|
require 'generator_spec'
|
9
10
|
require 'factory_girl'
|
10
11
|
require 'g5_updatable/rspec'
|
11
12
|
require 'shoulda/matchers'
|
12
|
-
require 'g5_foundation_client/rspec'
|
13
13
|
|
14
14
|
Rails.backtrace_cleaner.remove_silencers!
|
15
15
|
|
@@ -23,6 +23,7 @@ ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
|
|
23
23
|
|
24
24
|
RSpec.configure do |config|
|
25
25
|
config.include FactoryGirl::Syntax::Methods
|
26
|
+
config.include FixturesHelper
|
26
27
|
# ## Mock Framework
|
27
28
|
#
|
28
29
|
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
|
@@ -1,9 +1,8 @@
|
|
1
|
-
RSpec.shared_examples
|
2
|
-
|
1
|
+
RSpec.shared_examples 'belongs to client' do
|
3
2
|
subject { described_class.new }
|
3
|
+
|
4
4
|
it do
|
5
|
-
is_expected.to belong_to(:client).class_name(
|
6
|
-
|
5
|
+
is_expected.to belong_to(:client).class_name('G5Updatable::Client').
|
6
|
+
with_foreign_key(:client_urn).with_primary_key(:urn)
|
7
7
|
end
|
8
|
-
|
9
8
|
end
|
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.
|
4
|
+
version: 0.20.3.pre.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -25,19 +25,19 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: g5_authentication_client
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.5.3
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.5.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: pg
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,18 +56,18 @@ dependencies:
|
|
56
56
|
name: active_model_serializers
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0
|
61
|
+
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0
|
68
|
+
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: httparty
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '4'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '4'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rspec-rails
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -150,6 +150,34 @@ dependencies:
|
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: webmock
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: shoulda-matchers
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - "~>"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '3.1'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - "~>"
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '3.1'
|
153
181
|
description: Client/Locations data update engine for G5 applications
|
154
182
|
email:
|
155
183
|
- brian.bauer@getg5.com
|
@@ -172,6 +200,8 @@ files:
|
|
172
200
|
- app/controllers/g5_updatable/syncs_controller.rb
|
173
201
|
- app/helpers/g5_updatable/base_updatable_helper.rb
|
174
202
|
- app/models/g5_updatable/client.rb
|
203
|
+
- app/models/g5_updatable/hub_amenities_location.rb
|
204
|
+
- app/models/g5_updatable/hub_amenity.rb
|
175
205
|
- app/models/g5_updatable/location.rb
|
176
206
|
- app/serializers/g5_updatable/location_serializer.rb
|
177
207
|
- app/views/layouts/g5_updatable/base_updatable.html.erb
|
@@ -181,11 +211,19 @@ files:
|
|
181
211
|
- db/migrate/20141122211945_remove_integration_setting.rb
|
182
212
|
- db/migrate/20141211211945_add_name_to_clients_and_locations.rb
|
183
213
|
- db/migrate/20141211711945_update_names.rb
|
214
|
+
- db/migrate/20151103043916_add_latitude_and_longitude_to_location.rb
|
215
|
+
- db/migrate/20151103050229_copy_lat_long_props_to_lat_long_columns.rb
|
216
|
+
- db/migrate/20151106070749_add_latitude_longitude_indexes_to_location.rb
|
217
|
+
- db/migrate/20161122070749_add_amenities.rb
|
218
|
+
- db/migrate/20161209070749_add_client_urn_to_locations.rb
|
184
219
|
- lib/g5_updatable.rb
|
220
|
+
- lib/g5_updatable/all_client_urns_fetcher.rb
|
185
221
|
- lib/g5_updatable/client_feed_processor.rb
|
186
222
|
- lib/g5_updatable/client_updater.rb
|
187
223
|
- lib/g5_updatable/engine.rb
|
188
224
|
- lib/g5_updatable/factories.rb
|
225
|
+
- lib/g5_updatable/fetcher.rb
|
226
|
+
- lib/g5_updatable/indifferentizer.rb
|
189
227
|
- lib/g5_updatable/locations_updater.rb
|
190
228
|
- lib/g5_updatable/rspec.rb
|
191
229
|
- lib/g5_updatable/rspec/factories.rb
|
@@ -195,6 +233,7 @@ files:
|
|
195
233
|
- lib/tasks/g5_updatable_tasks.rake
|
196
234
|
- spec/concerns/g5_updatable/belongs_to_client_spec.rb
|
197
235
|
- spec/concerns/g5_updatable/belongs_to_location_spec.rb
|
236
|
+
- spec/controllers/feed_controller_spec.rb
|
198
237
|
- spec/controllers/locations_controller_spec.rb
|
199
238
|
- spec/controllers/syncs_controller_spec.rb
|
200
239
|
- spec/dummy/README.rdoc
|
@@ -241,11 +280,21 @@ files:
|
|
241
280
|
- spec/dummy/db/test.sqlite3
|
242
281
|
- spec/dummy/log/development.log
|
243
282
|
- spec/dummy/log/test.log
|
283
|
+
- spec/dummy/log/tests.log
|
244
284
|
- spec/dummy/public/404.html
|
245
285
|
- spec/dummy/public/422.html
|
246
286
|
- spec/dummy/public/500.html
|
247
287
|
- spec/dummy/public/favicon.ico
|
248
288
|
- spec/dummy/tmp/pids/server.pid
|
289
|
+
- spec/fixtures/client-g5-c-1soj8m6e-g5-multifamily-missing-locations.json
|
290
|
+
- spec/fixtures/client-g5-c-1soj8m6e-g5-multifamily-no-locations.json
|
291
|
+
- spec/fixtures/client-g5-c-1soj8m6e-g5-multifamily.json
|
292
|
+
- spec/fixtures/hub-client.json
|
293
|
+
- spec/fixtures/hub-clients.json
|
294
|
+
- spec/fixtures/hub-location.json
|
295
|
+
- spec/fixtures/location-g5-cl-1soj9pe2-541-apartments.json
|
296
|
+
- spec/fixtures/urns.json
|
297
|
+
- spec/lib/g5_updatable/all_client_urns_fetcher_spec.rb
|
249
298
|
- spec/lib/g5_updatable/client_feed_processor_spec.rb
|
250
299
|
- spec/lib/g5_updatable/client_updater_spec.rb
|
251
300
|
- spec/lib/g5_updatable/locations_updater_spec.rb
|
@@ -254,9 +303,12 @@ files:
|
|
254
303
|
- spec/lib/generators/tmp/config/routes.rb
|
255
304
|
- spec/lib/tmp/config/routes.rb
|
256
305
|
- spec/models/g5_updatable/client_spec.rb
|
306
|
+
- spec/models/g5_updatable/hub_amenities_location_spec.rb
|
307
|
+
- spec/models/g5_updatable/hub_amenity_spec.rb
|
257
308
|
- spec/models/g5_updatable/location_spec.rb
|
258
309
|
- spec/serializers/g5_updatable/location_serializer_spec.rb
|
259
310
|
- spec/spec_helper.rb
|
311
|
+
- spec/support/fixture_helper.rb
|
260
312
|
- spec/support/shared_example_for_urn_as_parameter.rb
|
261
313
|
- spec/support/shared_examples/belongs_to_client.rb
|
262
314
|
- spec/support/shared_examples_for_first_class_properties_json.rb
|
@@ -275,18 +327,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
275
327
|
version: '0'
|
276
328
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
277
329
|
requirements:
|
278
|
-
- - "
|
330
|
+
- - ">"
|
279
331
|
- !ruby/object:Gem::Version
|
280
|
-
version:
|
332
|
+
version: 1.3.1
|
281
333
|
requirements: []
|
282
334
|
rubyforge_project:
|
283
|
-
rubygems_version: 2.
|
335
|
+
rubygems_version: 2.5.1
|
284
336
|
signing_key:
|
285
337
|
specification_version: 4
|
286
338
|
summary: Client/Locations data update engine for G5 applications
|
287
339
|
test_files:
|
288
340
|
- spec/concerns/g5_updatable/belongs_to_client_spec.rb
|
289
341
|
- spec/concerns/g5_updatable/belongs_to_location_spec.rb
|
342
|
+
- spec/controllers/feed_controller_spec.rb
|
290
343
|
- spec/controllers/locations_controller_spec.rb
|
291
344
|
- spec/controllers/syncs_controller_spec.rb
|
292
345
|
- spec/dummy/app/assets/javascripts/application.js
|
@@ -331,6 +384,7 @@ test_files:
|
|
331
384
|
- spec/dummy/db/test.sqlite3
|
332
385
|
- spec/dummy/log/development.log
|
333
386
|
- spec/dummy/log/test.log
|
387
|
+
- spec/dummy/log/tests.log
|
334
388
|
- spec/dummy/public/404.html
|
335
389
|
- spec/dummy/public/422.html
|
336
390
|
- spec/dummy/public/500.html
|
@@ -338,6 +392,15 @@ test_files:
|
|
338
392
|
- spec/dummy/Rakefile
|
339
393
|
- spec/dummy/README.rdoc
|
340
394
|
- spec/dummy/tmp/pids/server.pid
|
395
|
+
- spec/fixtures/client-g5-c-1soj8m6e-g5-multifamily-missing-locations.json
|
396
|
+
- spec/fixtures/client-g5-c-1soj8m6e-g5-multifamily-no-locations.json
|
397
|
+
- spec/fixtures/client-g5-c-1soj8m6e-g5-multifamily.json
|
398
|
+
- spec/fixtures/hub-client.json
|
399
|
+
- spec/fixtures/hub-clients.json
|
400
|
+
- spec/fixtures/hub-location.json
|
401
|
+
- spec/fixtures/location-g5-cl-1soj9pe2-541-apartments.json
|
402
|
+
- spec/fixtures/urns.json
|
403
|
+
- spec/lib/g5_updatable/all_client_urns_fetcher_spec.rb
|
341
404
|
- spec/lib/g5_updatable/client_feed_processor_spec.rb
|
342
405
|
- spec/lib/g5_updatable/client_updater_spec.rb
|
343
406
|
- spec/lib/g5_updatable/locations_updater_spec.rb
|
@@ -346,9 +409,13 @@ test_files:
|
|
346
409
|
- spec/lib/generators/tmp/config/routes.rb
|
347
410
|
- spec/lib/tmp/config/routes.rb
|
348
411
|
- spec/models/g5_updatable/client_spec.rb
|
412
|
+
- spec/models/g5_updatable/hub_amenities_location_spec.rb
|
413
|
+
- spec/models/g5_updatable/hub_amenity_spec.rb
|
349
414
|
- spec/models/g5_updatable/location_spec.rb
|
350
415
|
- spec/serializers/g5_updatable/location_serializer_spec.rb
|
351
416
|
- spec/spec_helper.rb
|
417
|
+
- spec/support/fixture_helper.rb
|
352
418
|
- spec/support/shared_example_for_urn_as_parameter.rb
|
353
419
|
- spec/support/shared_examples/belongs_to_client.rb
|
354
420
|
- spec/support/shared_examples_for_first_class_properties_json.rb
|
421
|
+
has_rdoc:
|