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 +4 -4
- data/lib/mls/models/account.rb +5 -9
- data/lib/mls/models/property.rb +1 -1
- data/lib/rdoc/generator/template/42floors/file.rhtml +1 -1
- data/mls.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66ec256727476fe5e51e306454639d2e77b9e6f8
|
4
|
+
data.tar.gz: 4ab86cb46f45c405d0046fcb4f563a36f315161e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbdbd4337e1b4a47ac8083c8434c3405bf9733063d4abfe51cd81b6052525f58d2c3efc36baf0828b584f526934e9c3fb65a1a5a0c6381e5cf7063846b27676a
|
7
|
+
data.tar.gz: a920c1ec7b6495de58de0cc3792d49a75f8137191bd3ab1a981834046945c47a68c89e4ae6113e66a6ee10b0ee8ce04ac166f0f39ef8c6f69fe5d440005630f4
|
data/lib/mls/models/account.rb
CHANGED
@@ -44,7 +44,8 @@ class MLS::Account < MLS::Resource
|
|
44
44
|
attr_writer :favorites
|
45
45
|
|
46
46
|
def update
|
47
|
-
|
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('/
|
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
|
155
|
-
response = MLS.get(
|
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
|
|
data/lib/mls/models/property.rb
CHANGED
@@ -9,7 +9,7 @@ class MLS::Property < MLS::Resource
|
|
9
9
|
|
10
10
|
attribute :description, String
|
11
11
|
attribute :neighborhood, String
|
12
|
-
attribute :
|
12
|
+
attribute :constructed, Fixnum
|
13
13
|
attribute :size, Fixnum
|
14
14
|
attribute :floors, Fixnum
|
15
15
|
attribute :leed_certification, String
|
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.12.
|
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-
|
12
|
+
date: 2014-01-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|