caboose-rets 0.1.106 → 0.1.107

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: 33e108857d9c9a3c387271a66446780d9a72fdd4bc96222830b88eb39b17f37d
4
- data.tar.gz: bc4ab43973bcfb910f575755f95aa419361daff621316b4b502ba26db1fcbed1
3
+ metadata.gz: c4c3ac60af4a132e1c3bc72ce465c4e917c7c72d84bbd501ba781cc579ca3738
4
+ data.tar.gz: 901b4840ee937e43a3a411ab24526ee72cd81b211cbfdb76afe52bc6e7b6ccb6
5
5
  SHA512:
6
- metadata.gz: 188cb1739bf256712002615cf5d243ddc54cbb462550c4d1551debe6979f0fc490cd97a5c923272572fa71987a6904ffdcf92eec94fb9be257720aa8f00fe85c
7
- data.tar.gz: 7241b5885953de0f9b08e425e0782cc5110e237cfcee8aa9ed53bea893917cd5aee9fea0a1e69bf011dff684a7e648759bfe91330d4d6286dafe5cf0c093344b
6
+ metadata.gz: 4f9b269f86a02ae2ce6d51d3076e047591465bffc5676b095cf43aa4669dfcdbe4ede62ebd81aa41ca4afe252e648a95ae51ebd85357cb3134b81fe2b9b26741
7
+ data.tar.gz: d0445626e13be9adf1e39c2c01a26b2484cdb96413f7bf4673b1be0e3ffc85e249eb95f3819362059f211addf3f4bfc8c101497b2353bde2d950dc11ed67e210
@@ -101,10 +101,10 @@ module CabooseRets
101
101
 
102
102
  price_where = "list_price is not null and (list_price >= ? AND list_price <= ?)"
103
103
  beds_where = "beds_total is not null and (beds_total >= ? AND beds_total <= ?)"
104
- price_min = @property.list_price * 0.8 if @property
105
- price_max = @property.list_price * 1.2 if @property
106
- beds_min = @property.beds_total - 2 if @property
107
- beds_max = @property.beds_total + 2 if @property
104
+ price_min = @property.list_price * 0.8 if @property && @property.list_price
105
+ price_max = @property.list_price * 1.2 if @property && @property.list_price
106
+ beds_min = @property.beds_total - 2 if @property && @property.beds_total
107
+ beds_max = @property.beds_total + 2 if @property && @property.beds_total
108
108
 
109
109
  @related = Property.near("#{@property.latitude}, #{@property.longitude}", 50).where(:property_type => @property.property_type, :status => 'Active', :property_subtype => @property.property_subtype).where(price_where,price_min,price_max).where(beds_where,beds_min,beds_max).where("mls_number != ?",@property.mls_number).order('distance asc').limit(3) if @property
110
110
 
@@ -1,3 +1,3 @@
1
1
  module CabooseRets
2
- VERSION = '0.1.106'
2
+ VERSION = '0.1.107'
3
3
  end
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.106
4
+ version: 0.1.107
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-12 00:00:00.000000000 Z
11
+ date: 2019-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: caboose-cms
@@ -169,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
169
  version: '0'
170
170
  requirements: []
171
171
  rubyforge_project:
172
- rubygems_version: 2.7.8
172
+ rubygems_version: 2.7.7
173
173
  signing_key:
174
174
  specification_version: 4
175
175
  summary: Library to download RETS data to a local website.