mls 0.9.8 → 0.9.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mls/models/listing.rb +1 -0
- data/lib/mls/models/photo.rb +2 -2
- data/mls.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a48350597f0c312c6b077ac66648738287dab16
|
4
|
+
data.tar.gz: 21a59dc3dcc2e25d80c0e9f07ec4d2c966445052
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f8f9ba018aaac555e596c3652a02cba7ed27f6eec40c77b141e042178c20f3ae2361c7475e8f4bb7b348a6edcc3343f61d06b7507188bea5c3d9a80000e972e
|
7
|
+
data.tar.gz: bc7ae317b92a8f64bc0fc1192861ceffdde2c25da4ef0c536db829f545b353cdc5a80ecd324ff4dbd51c5c323fae9ebdb4fee69ac984025e15aaf67d5d5b9eee
|
data/lib/mls/models/listing.rb
CHANGED
@@ -290,6 +290,7 @@ class MLS::Listing < MLS::Resource
|
|
290
290
|
def to_hash
|
291
291
|
hash = super
|
292
292
|
hash[:address_attributes] = address.to_hash if address
|
293
|
+
hash[:spaces_attributes] = spaces.inject([]) { |acc, x| acc << x.to_hash; acc } if spaces
|
293
294
|
hash[:agents_attributes] = agents.inject([]) { |acc, x| acc << x.to_hash; acc } if agents
|
294
295
|
hash[:photo_ids] = photos.map(&:id) if photos
|
295
296
|
hash[:videos_attributes] = videos.map(&:to_hash) unless videos.blank?
|
data/lib/mls/models/photo.rb
CHANGED
@@ -27,7 +27,7 @@ class MLS::Photo < MLS::Resource
|
|
27
27
|
url = MLS.url.dup
|
28
28
|
url.user = nil
|
29
29
|
url.path = "/api/photos"
|
30
|
-
response = RestClient.post(url.to_s, {:
|
30
|
+
response = RestClient.post(url.to_s, {:photo => attrs}, MLS.headers)
|
31
31
|
attrs[:file].close unless attrs[:file].closed?
|
32
32
|
|
33
33
|
MLS::Photo::Parser.parse(response.body)
|
@@ -37,4 +37,4 @@ end
|
|
37
37
|
|
38
38
|
class MLS::Photo::Parser < MLS::Parser
|
39
39
|
|
40
|
-
end
|
40
|
+
end
|
data/mls.gemspec
CHANGED
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: 0.9.
|
4
|
+
version: 0.9.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James R. Bracy
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-09-
|
12
|
+
date: 2013-09-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -273,7 +273,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
273
273
|
version: '0'
|
274
274
|
requirements: []
|
275
275
|
rubyforge_project: mls
|
276
|
-
rubygems_version: 2.0.
|
276
|
+
rubygems_version: 2.0.3
|
277
277
|
signing_key:
|
278
278
|
specification_version: 4
|
279
279
|
summary: 42Floors MLS Client
|