mls 0.9.8 → 0.9.9

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
  SHA1:
3
- metadata.gz: abcb23a9cfbf5137fb8f3490011ba5c59ae2caf8
4
- data.tar.gz: 8bfd2c335759dd13991f0e097b6ac5574c59088e
3
+ metadata.gz: 3a48350597f0c312c6b077ac66648738287dab16
4
+ data.tar.gz: 21a59dc3dcc2e25d80c0e9f07ec4d2c966445052
5
5
  SHA512:
6
- metadata.gz: 368f7c2e87051bda9e401487066df0669f83546a27bcf10215cd4d9369e7248c2ed0f4ec1958a1d582528765804a72e5836052d3cb56b640fb7a574f974de3db
7
- data.tar.gz: 23b7c95b3f92946f54b997aad2ffb7f8e8cebdb89218502119945d6c7ed8175f6ed59b4a956e85623002ddbe7c74e3dcdf6ddbb6b808425e029ff8f4a99412c6
6
+ metadata.gz: 2f8f9ba018aaac555e596c3652a02cba7ed27f6eec40c77b141e042178c20f3ae2361c7475e8f4bb7b348a6edcc3343f61d06b7507188bea5c3d9a80000e972e
7
+ data.tar.gz: bc7ae317b92a8f64bc0fc1192861ceffdde2c25da4ef0c536db829f545b353cdc5a80ecd324ff4dbd51c5c323fae9ebdb4fee69ac984025e15aaf67d5d5b9eee
@@ -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?
@@ -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, {:file => attrs[:file]}, MLS.headers)
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
@@ -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 = '0.9.8'
6
+ s.version = '0.9.9'
7
7
  s.authors = ["James R. Bracy", "Jon Bracy"]
8
8
  s.email = ["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: 0.9.8
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-25 00:00:00.000000000 Z
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.7
276
+ rubygems_version: 2.0.3
277
277
  signing_key:
278
278
  specification_version: 4
279
279
  summary: 42Floors MLS Client