mls 0.12.2 → 0.12.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 94ae9b0466390102ddb165448579642eb84b85a8
4
- data.tar.gz: 0d514df88957d22334c472147302287f7532bda1
3
+ metadata.gz: 66ec256727476fe5e51e306454639d2e77b9e6f8
4
+ data.tar.gz: 4ab86cb46f45c405d0046fcb4f563a36f315161e
5
5
  SHA512:
6
- metadata.gz: db9c311002ff09b6957acebc2672bd354b76fc707c32f544e50eff920ef28e8c5779f780ddbd15d05467851fef9a315d0ff2ad7329494a1959984a46406aae2b
7
- data.tar.gz: fb4877c27920ee3f34d15d254bcd3a24ba69c1275030a88a0a919b002628bfaf9fc92711ccc943c2981df4c98886250f1a0d387cbb320569d1f18eb9d311a354
6
+ metadata.gz: fbdbd4337e1b4a47ac8083c8434c3405bf9733063d4abfe51cd81b6052525f58d2c3efc36baf0828b584f526934e9c3fb65a1a5a0c6381e5cf7063846b27676a
7
+ data.tar.gz: a920c1ec7b6495de58de0cc3792d49a75f8137191bd3ab1a981834046945c47a68c89e4ae6113e66a6ee10b0ee8ce04ac166f0f39ef8c6f69fe5d440005630f4
@@ -44,7 +44,8 @@ class MLS::Account < MLS::Resource
44
44
  attr_writer :favorites
45
45
 
46
46
  def update
47
- MLS.put('/account', {:account => to_hash}, 400) do |response, code|
47
+ raise "cannot update account without id" unless id
48
+ MLS.put("/accounts/#{id}", { :account => to_hash}, 400) do |response, code|
48
49
  MLS::Account::Parser.update(self, response.body)
49
50
  code == 200
50
51
  end
@@ -54,7 +55,7 @@ class MLS::Account < MLS::Resource
54
55
  # are any errors. @persisted will also be set to +true+ if the Account was
55
56
  # succesfully created
56
57
  def create
57
- MLS.post('/account', {:account => to_hash}, 400) do |response, code|
58
+ MLS.post('/accounts', {:account => to_hash}, 400) do |response, code|
58
59
  raise MLS::Exception::UnexpectedResponse if ![201, 400].include?(code)
59
60
  MLS::Account::Parser.update(self, response.body)
60
61
  @persisted = true
@@ -151,13 +152,8 @@ class MLS::Account < MLS::Resource
151
152
  end
152
153
  end
153
154
 
154
- def search(terms)
155
- response = MLS.get('/account/search', :query => terms)
156
- MLS::Account::Parser.parse_collection(response.body)
157
- end
158
-
159
- def find(id)
160
- response = MLS.get("/account/find", :id => id)
155
+ def find(id, includes=[])
156
+ response = MLS.get("/accounts/#{id}", :include => includes)
161
157
  MLS::Account::Parser.parse(response.body)
162
158
  end
163
159
 
@@ -9,7 +9,7 @@ class MLS::Property < MLS::Resource
9
9
 
10
10
  attribute :description, String
11
11
  attribute :neighborhood, String
12
- attribute :contructed, Fixnum
12
+ attribute :constructed, Fixnum
13
13
  attribute :size, Fixnum
14
14
  attribute :floors, Fixnum
15
15
  attribute :leed_certification, String
@@ -32,4 +32,4 @@
32
32
  <%= include_template '_context.rhtml', {:context => file, :rel_prefix => rel_prefix} %>
33
33
  </div>
34
34
  </body>
35
- </html>
35
+ </html>
@@ -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.12.2'
6
+ s.version = '0.12.3'
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.12.2
4
+ version: 0.12.3
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: 2014-01-15 00:00:00.000000000 Z
12
+ date: 2014-01-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake