caboose-rets 0.1.196 → 0.1.197

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e25407e4d2656292fd7d5d5c8d637dcdfd3731e37caeeff3abcb7c033398358
4
- data.tar.gz: 06bff2e64c850854f62b50a8809ba4be9bad62be3e668f4506dda3308b9c6a40
3
+ metadata.gz: 7ae9127c4ea1ed4c63d14cbd9276194add06de8cef432c5c7e239e09b34a51ba
4
+ data.tar.gz: 889cccc0b40b15ba30301c00ae0722b917d7f68066a9d356f5b87469fac78814
5
5
  SHA512:
6
- metadata.gz: db10c7885eb8b690b3500975ccb8e0f1dea6e65af88ae5f5a905231dbbb9ce0de648b932ceda6b44b15f71452e02313774bca20ef9cdcf508c3e3da920b5bfb6
7
- data.tar.gz: 82f649967e310399847ab549111ceec69054fc99f518e1b67bb24fd8c83eda587023c14f94d845d5df2e7b235275f0aee531483e9b2da64a234616034602d448
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
- uri = "https://maps.googleapis.com/maps/api/geocode/json?key=AIzaSyB9Wwx7sdWaUnFyLcdQ61NOV7DE2NZkDUE&address=#{address}"
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.log "Error: #{uri}"
459
+ self.log3("Property",nil,"Error with Geocoder API, url: #{uri}")
458
460
  sleep(2)
459
461
  return false
460
462
  end
@@ -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=AIzaSyB9Wwx7sdWaUnFyLcdQ61NOV7DE2NZkDUE&address=#{address}"
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)
@@ -1,3 +1,3 @@
1
1
  module CabooseRets
2
- VERSION = '0.1.196'
2
+ VERSION = '0.1.197'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-rets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.196
4
+ version: 0.1.197
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry