mls 0.3.0 → 0.3.1
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 +4 -4
- data/lib/mls/models/account.rb +16 -16
- 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: a9e1660f55fc1a27207e279f020e4a4a6c0903a0
|
4
|
+
data.tar.gz: 38a7e7fb7a0541d2fc796629e394a75ae12e026f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe46a32d0c94cac26409a4b5105da11abcf8f10287f47fc62791a63fefa3bc6357e6aaa339496e561cd881415cc6202ff6aaf277e0451fb94ef102bfeae9d547
|
7
|
+
data.tar.gz: c4805f23ff4ef7fd5618baf2e44ec90fb07bbe887dc88c2f75ff05f07221493ea0cce65a537f9ed5fe3b3dad0dedf6c065276403e803336c0902e310d255ff6c
|
data/lib/mls/models/account.rb
CHANGED
@@ -1,28 +1,28 @@
|
|
1
1
|
class MLS::Account < MLS::Resource
|
2
2
|
|
3
|
-
property :id, Fixnum
|
3
|
+
property :id, Fixnum, :serialize => false
|
4
4
|
property :type, String, :default => 'Account'
|
5
|
-
property :name, String
|
6
|
-
property :title, String
|
7
|
-
property :email, String
|
5
|
+
property :name, String, :serialize => :if_present
|
6
|
+
property :title, String, :serialize => :if_present
|
7
|
+
property :email, String, :serialize => :if_present
|
8
8
|
property :password, String, :serialize => :if_present
|
9
9
|
property :password_confirmation, String, :serialize => :if_present
|
10
10
|
property :perishable_token, String, :serialize => false
|
11
11
|
property :perishable_token_set_at, String, :serialize => false
|
12
12
|
property :ghost, Boolean, :serialize => false, :default => false
|
13
13
|
|
14
|
-
property :phone, String
|
14
|
+
property :phone, String, :serialize => :if_present
|
15
15
|
property :system_phone, String, :serialize => false
|
16
|
-
property :company, String
|
17
|
-
property :license, String
|
18
|
-
property :linkedin, String
|
19
|
-
property :twitter, String
|
20
|
-
property :facebook, String
|
21
|
-
property :web, String
|
16
|
+
property :company, String, :serialize => :if_present
|
17
|
+
property :license, String, :serialize => :if_present
|
18
|
+
property :linkedin, String, :serialize => :if_present
|
19
|
+
property :twitter, String, :serialize => :if_present
|
20
|
+
property :facebook, String, :serialize => :if_present
|
21
|
+
property :web, String, :serialize => :if_present
|
22
22
|
|
23
|
-
property :city, String
|
24
|
-
property :state, String
|
25
|
-
property :country, String
|
23
|
+
property :city, String, :serialize => :if_present
|
24
|
+
property :state, String, :serialize => :if_present
|
25
|
+
property :country, String, :serialize => :if_present
|
26
26
|
|
27
27
|
property :created_at, DateTime, :serialize => :false
|
28
28
|
property :updated_at, DateTime, :serialize => :false
|
@@ -36,7 +36,7 @@ class MLS::Account < MLS::Resource
|
|
36
36
|
attr_writer :favorites
|
37
37
|
|
38
38
|
def update
|
39
|
-
MLS.put('/account', to_hash, 400) do |response, code|
|
39
|
+
MLS.put('/account', {:account => to_hash}, 400) do |response, code|
|
40
40
|
MLS::Account::Parser.update(self, response.body)
|
41
41
|
code == 200
|
42
42
|
end
|
@@ -46,7 +46,7 @@ class MLS::Account < MLS::Resource
|
|
46
46
|
# are any errors. @persisted will also be set to +true+ if the Account was
|
47
47
|
# succesfully created
|
48
48
|
def create
|
49
|
-
MLS.post('/account', to_hash, 400) do |response, code|
|
49
|
+
MLS.post('/account', {:account => to_hash}, 400) do |response, code|
|
50
50
|
raise MLS::Exception::UnexpectedResponse if ![201, 400].include?(code)
|
51
51
|
MLS::Account::Parser.update(self, response.body)
|
52
52
|
@persisted = true
|
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.3.
|
4
|
+
version: 0.3.1
|
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-05-
|
12
|
+
date: 2013-05-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|