caboose-rets 0.1.195 → 0.1.197
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ae9127c4ea1ed4c63d14cbd9276194add06de8cef432c5c7e239e09b34a51ba
|
4
|
+
data.tar.gz: 889cccc0b40b15ba30301c00ae0722b917d7f68066a9d356f5b87469fac78814
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a51961c562377fad60b8ae261aa63bbdab298f13698af76690860c9b3feef74a050389f40d0369287de1c7f0a332e77d42a8dc1f687b0bb4081573bdc41775f
|
7
|
+
data.tar.gz: d3be76e4aa57f9bbbede583ab8546070b918479ba402982ecf7c9844a614a721d5769afb89345c6de0534ea1682d247c20d25fe309a0d1589b314072f9f0ae7e
|
@@ -448,13 +448,15 @@ class CabooseRets::RetsImporter # < ActiveRecord::Base
|
|
448
448
|
|
449
449
|
def self.coords_from_address(address)
|
450
450
|
begin
|
451
|
-
|
451
|
+
config = YAML::load(File.open("#{Rails.root}/config/rets_importer.yml"))
|
452
|
+
api_key = config[Rails.env]['google_api_key']
|
453
|
+
uri = "https://maps.googleapis.com/maps/api/geocode/json?key=#{api_key}&address=#{address}"
|
452
454
|
uri.gsub!(" ", "+")
|
453
455
|
resp = HTTParty.get(uri)
|
454
456
|
json = JSON.parse(resp.body)
|
455
457
|
return json['results'][0]['geometry']['location']
|
456
458
|
rescue
|
457
|
-
self.
|
459
|
+
self.log3("Property",nil,"Error with Geocoder API, url: #{uri}")
|
458
460
|
sleep(2)
|
459
461
|
return false
|
460
462
|
end
|
@@ -236,7 +236,7 @@ class CabooseRets::RetsImporter # < ActiveRecord::Base
|
|
236
236
|
self.log3('Agent',mls_id,"Skipping importing Agent #{mls_id} because last_updated is today...")
|
237
237
|
end
|
238
238
|
end
|
239
|
-
end
|
239
|
+
end
|
240
240
|
|
241
241
|
def self.import_open_house(oh_id, save_images = true)
|
242
242
|
self.log3('OpenHouse',oh_id,"Importing Open House #{oh_id}...")
|
@@ -367,7 +367,7 @@ class CabooseRets::RetsImporter # < ActiveRecord::Base
|
|
367
367
|
|
368
368
|
def self.coords_from_address(address)
|
369
369
|
begin
|
370
|
-
uri = "https://maps.googleapis.com/maps/api/geocode/json?key=
|
370
|
+
uri = "https://maps.googleapis.com/maps/api/geocode/json?key=12345&address=#{address}"
|
371
371
|
uri.gsub!(" ", "+")
|
372
372
|
resp = HTTParty.get(uri)
|
373
373
|
json = JSON.parse(resp.body)
|
data/lib/caboose_rets/version.rb
CHANGED