caboose-rets 0.1.25 → 0.1.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/caboose_rets/properties_controller.rb +2 -2
- data/app/controllers/caboose_rets/rets_controller.rb +3 -3
- data/app/models/caboose_rets/agent.rb +3 -3
- data/app/models/caboose_rets/property.rb +1 -1
- data/app/models/caboose_rets/rets_importer.rb +8 -3
- data/app/views/caboose_rets/rets/admin_import_form.html.erb +4 -4
- data/lib/caboose_rets/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 254faba117caf0a31d78445efc80d351b8604cfc
|
4
|
+
data.tar.gz: e102328e3e15d0b70fc42fbb0d0221f05aa1c329
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b789e6caadc04bbcfb3786148b0493fac621cbdab04337be83d9684b2a3e44b33eabc964df9a23d6af2e9a466f4d0f9002176a26cc7542b07f2cd7dee3921f24
|
7
|
+
data.tar.gz: f862d4548e70f064e333d2499dce183d713af35a8cd55e8024720115fcaf27ad77245da088c747bdddde3a7f8450034742206c5348032d3c1905d406d52ce723
|
@@ -94,7 +94,7 @@ module CabooseRets
|
|
94
94
|
@saved = logged_in? && SavedProperty.where(:user_id => logged_in_user.id, :mls_number => params[:mls_number]).exists?
|
95
95
|
if @property.nil?
|
96
96
|
@mls_number = params[:mls_number]
|
97
|
-
|
97
|
+
# CabooseRets::RetsImporter.delay(:priority => 10, :queue => 'rets').import_property(@mls_number.to_i)
|
98
98
|
render 'properties/property_not_exists'
|
99
99
|
return
|
100
100
|
end
|
@@ -109,7 +109,7 @@ module CabooseRets
|
|
109
109
|
|
110
110
|
if @property.nil?
|
111
111
|
@mls = params[:mls]
|
112
|
-
|
112
|
+
# CabooseRets::RetsImporter.delay(:priority => 10, :queue => 'rets').import_property(@mls_number.to_i)
|
113
113
|
render 'properties/property_not_exists'
|
114
114
|
return
|
115
115
|
end
|
@@ -12,11 +12,11 @@ module CabooseRets
|
|
12
12
|
def admin_import
|
13
13
|
return if !user_is_allowed('properties', 'edit')
|
14
14
|
|
15
|
-
|
16
|
-
CabooseRets::RetsImporter.delay(:priority => 10, :queue => 'rets').
|
15
|
+
mui = params[:mls]
|
16
|
+
CabooseRets::RetsImporter.delay(:priority => 10, :queue => 'rets').import_properties(mui)
|
17
17
|
|
18
18
|
resp = Caboose::StdClass.new
|
19
|
-
resp.success = "The property is being imported from
|
19
|
+
resp.success = "The property is being imported from Matrix. This may take a few minutes depending on how many images it has."
|
20
20
|
render :json => resp
|
21
21
|
end
|
22
22
|
|
@@ -29,14 +29,14 @@ class CabooseRets::Agent < ActiveRecord::Base
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
-
def refresh_from_mls
|
33
|
-
CabooseRets::RetsImporter.import('
|
32
|
+
def refresh_from_mls
|
33
|
+
CabooseRets::RetsImporter.import('Agent',"(Matrix_Unique_ID=#{self.matrix_unique_id})")
|
34
34
|
CabooseRets::RetsImporter.download_property_images(self)
|
35
35
|
end
|
36
36
|
|
37
37
|
def self.refresh_from_mls(agent_number)
|
38
38
|
CabooseRets::RetsImporter.import('Agent', "(Agent_Number=#{self.agent_number})")
|
39
|
-
CabooseRets::RetsImporter.
|
39
|
+
CabooseRets::RetsImporter.import_agent(self.matrix_unique_id)
|
40
40
|
end
|
41
41
|
|
42
42
|
def parse(data)
|
@@ -13,7 +13,7 @@ class CabooseRets::Property <ActiveRecord::Base
|
|
13
13
|
def self.geolocatable() all(conditions: "latitude IS NOT NULL AND longitude IS NOT NULL") end
|
14
14
|
|
15
15
|
def refresh_from_mls
|
16
|
-
CabooseRets::RetsImporter.
|
16
|
+
CabooseRets::RetsImporter.import_properties(self.matrix_unique_id, false)
|
17
17
|
end
|
18
18
|
|
19
19
|
def parse(data)
|
@@ -151,9 +151,14 @@ class CabooseRets::RetsImporter # < ActiveRecord::Base
|
|
151
151
|
#=============================================================================
|
152
152
|
|
153
153
|
# def self.import_property(mui, save_images = true)
|
154
|
-
# self.import('
|
155
|
-
# p = CabooseRets::Property.where(:
|
156
|
-
#
|
154
|
+
# self.import('Listing', "(Matrix_Unique_ID=#{mui})")
|
155
|
+
# p = CabooseRets::Property.where(:matrix_unique_id => mui.to_s).first
|
156
|
+
# if p != nil
|
157
|
+
# self.download_property_images(p)
|
158
|
+
# self.update_coords(p)
|
159
|
+
# else
|
160
|
+
# self.log("No Property associated with #{mui}")
|
161
|
+
# end
|
157
162
|
# end
|
158
163
|
|
159
164
|
def self.import_properties(mui, save_images = true)
|
@@ -1,8 +1,8 @@
|
|
1
|
-
<h1>Import Property from
|
1
|
+
<h1>Import Property from Matrix</h1>
|
2
2
|
|
3
3
|
<form action='/admin/rets/import' method='post' id='import_form' onsubmit="import_property(); return false;">
|
4
4
|
<input type='hidden' name='authenticity_token' value='<%= form_authenticity_token %>' />
|
5
|
-
<p><input type='text' name='mls' id='mls' placeholder='
|
5
|
+
<p><input type='text' name='mls' id='mls' placeholder='Matrix Unique ID #' value="" style='width: 300px;' /></p>
|
6
6
|
<div id='message'></div>
|
7
7
|
<p><input type='submit' value='Import Property' /></p>
|
8
8
|
</form>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
function import_property()
|
14
14
|
{
|
15
|
-
$('#message').html("<p class='loading'>Importing property from
|
15
|
+
$('#message').html("<p class='loading'>Importing property from Matrix...</p>");
|
16
16
|
$.ajax({
|
17
17
|
url: '/admin/rets/import',
|
18
18
|
type: 'post',
|
@@ -25,4 +25,4 @@ function import_property()
|
|
25
25
|
}
|
26
26
|
|
27
27
|
</script>
|
28
|
-
<% end %>
|
28
|
+
<% end %>
|
data/lib/caboose_rets/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caboose-rets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: caboose-cms
|