mls 1.1.4 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mls.rb +0 -4
- data/lib/mls/lead_listing.rb +4 -3
- data/lib/mls/listing.rb +37 -15
- data/lib/mls/region.rb +1 -1
- data/mls.gemspec +1 -1
- metadata +2 -7
- data/lib/mls/coworking_space.rb +0 -5
- data/lib/mls/lease.rb +0 -2
- data/lib/mls/sale.rb +0 -2
- data/lib/mls/sublease.rb +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d966f4641bdffc44263761b3feb02e298e21dca
|
4
|
+
data.tar.gz: fcccc0fa5e8595beaa734bd44af6c4d04d0d7bca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cad4104cad88b181f74d4598bd693f1c9591ef1d39bd170468297b3e08f3c578d7c3edec24e15c5eb1087c3681a51e2dc7a665c3438d4bea1fb68f4260fb8856
|
7
|
+
data.tar.gz: d0c8e5a94404263d58fa5adff8530b3bc21a00c140e1d3ac1cd4d9b4171ed0e8cc203131ddd4d58e331c341f077ce493a87c81652ec495d327264d4be809dd31
|
data/lib/mls.rb
CHANGED
@@ -92,14 +92,10 @@ require 'mls/organization'
|
|
92
92
|
require 'mls/property'
|
93
93
|
require 'mls/region'
|
94
94
|
require 'mls/listing'
|
95
|
-
require 'mls/lease'
|
96
|
-
require 'mls/sublease'
|
97
95
|
require 'mls/space'
|
98
96
|
require 'mls/lead'
|
99
97
|
require 'mls/lead_listing'
|
100
98
|
require 'mls/lead_property'
|
101
|
-
require 'mls/sale'
|
102
|
-
require 'mls/coworking_space'
|
103
99
|
require 'mls/address'
|
104
100
|
require 'mls/locality'
|
105
101
|
require 'mls/flyer'
|
data/lib/mls/lead_listing.rb
CHANGED
data/lib/mls/listing.rb
CHANGED
@@ -1,31 +1,37 @@
|
|
1
1
|
class Listing < MLS::Model
|
2
|
-
|
2
|
+
self.inheritance_column = nil
|
3
|
+
|
3
4
|
include MLS::Slugger
|
4
5
|
include MLS::Avatar
|
5
6
|
|
6
|
-
|
7
|
+
STATES = %w(processing visible invisible off_market expired)
|
7
8
|
LEASE_STATES = %w(listed leased)
|
8
|
-
TYPES = %w(lease sublease coworking_space)
|
9
9
|
SPACE_TYPES = %w(unit floor building)
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
TYPES = %w(Sale Lease Sublease CoworkingSpace)
|
11
|
+
TERMS = ['Full Service', 'Net Lease', 'NN', 'NNN', 'Absolute NNN', 'Gross Lease', 'Modified Gross', 'Industrial Gross', 'Absolute Gross', 'Ground Lease', 'Other']
|
12
|
+
SALE_TERMS = ['Cash to Seller', 'Purchase Money Mtg.', 'Owner Financing', 'Build-to-Suit', 'Sale/Leaseback', 'Other']
|
13
|
+
RATE_UNITS = {
|
14
|
+
'/sqft/yr' => 'rate_per_sqft_per_year',
|
15
|
+
'/sqft/mo' => 'rate_per_sqft_per_month',
|
16
|
+
'/mo' => 'rate_per_month',
|
17
|
+
'/yr' => 'rate_per_year',
|
18
|
+
}
|
19
|
+
TERM_UNITS = ['years', 'months']
|
20
|
+
AMENITIES = %W(kitchen showers patio reception ready_to_move_in furniture natural_light high_ceilings)
|
15
21
|
|
16
22
|
belongs_to :property
|
17
23
|
belongs_to :floorplan
|
18
24
|
belongs_to :flyer
|
19
|
-
|
25
|
+
|
26
|
+
has_many :spaces
|
27
|
+
|
20
28
|
has_many :photos, -> { order('photos.order ASC') }, :as => :subject, :inverse_of => :subject
|
21
29
|
|
22
30
|
has_many :agencies, -> { order(:order) }, :as => :subject
|
23
31
|
has_many :agents, :through => :agencies, :source => :agent
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
#
|
28
|
-
# has_many :addresses
|
32
|
+
|
33
|
+
has_one :address
|
34
|
+
has_many :addresses
|
29
35
|
|
30
36
|
# has_many :comments
|
31
37
|
# has_many :regions
|
@@ -108,7 +114,23 @@ class Listing < MLS::Model
|
|
108
114
|
|
109
115
|
price.round(2)
|
110
116
|
end
|
111
|
-
|
117
|
+
|
118
|
+
def lease? # TODO: test me
|
119
|
+
type == 'Lease'
|
120
|
+
end
|
121
|
+
|
122
|
+
def sublease? # TODO: test me
|
123
|
+
type == 'Sublease'
|
124
|
+
end
|
125
|
+
|
126
|
+
def coworking? # TODO: test me
|
127
|
+
type == 'CoworkingSpace'
|
128
|
+
end
|
129
|
+
|
130
|
+
def sale?
|
131
|
+
type == 'Sale'
|
132
|
+
end
|
133
|
+
|
112
134
|
def name
|
113
135
|
return read_attribute(:name) if read_attribute(:name)
|
114
136
|
|
data/lib/mls/region.rb
CHANGED
data/mls.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "mls"
|
6
|
-
s.version = '1.
|
6
|
+
s.version = '1.2.0'
|
7
7
|
s.authors = ["Jon Bracy", "James R. Bracy"]
|
8
8
|
s.email = ["jon@42floors.com", "james@42floors.com"]
|
9
9
|
s.homepage = "http://mls.42floors.com"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Bracy
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-10-
|
12
|
+
date: 2014-10-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -195,24 +195,20 @@ files:
|
|
195
195
|
- lib/mls/account.rb
|
196
196
|
- lib/mls/address.rb
|
197
197
|
- lib/mls/agency.rb
|
198
|
-
- lib/mls/coworking_space.rb
|
199
198
|
- lib/mls/floorplan.rb
|
200
199
|
- lib/mls/flyer.rb
|
201
200
|
- lib/mls/inquiry.rb
|
202
201
|
- lib/mls/lead.rb
|
203
202
|
- lib/mls/lead_listing.rb
|
204
203
|
- lib/mls/lead_property.rb
|
205
|
-
- lib/mls/lease.rb
|
206
204
|
- lib/mls/listing.rb
|
207
205
|
- lib/mls/locality.rb
|
208
206
|
- lib/mls/organization.rb
|
209
207
|
- lib/mls/photo.rb
|
210
208
|
- lib/mls/property.rb
|
211
209
|
- lib/mls/region.rb
|
212
|
-
- lib/mls/sale.rb
|
213
210
|
- lib/mls/session.rb
|
214
211
|
- lib/mls/space.rb
|
215
|
-
- lib/mls/sublease.rb
|
216
212
|
- lib/mls/use.rb
|
217
213
|
- mls.gemspec
|
218
214
|
- test/fixtures/flyer.pdf
|
@@ -249,4 +245,3 @@ test_files:
|
|
249
245
|
- test/mls/resource_test.rb
|
250
246
|
- test/mls_test.rb
|
251
247
|
- test/test_helper.rb
|
252
|
-
has_rdoc:
|
data/lib/mls/coworking_space.rb
DELETED
data/lib/mls/lease.rb
DELETED
data/lib/mls/sale.rb
DELETED
data/lib/mls/sublease.rb
DELETED