mls 0.12.3 → 0.12.4

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: 66ec256727476fe5e51e306454639d2e77b9e6f8
4
- data.tar.gz: 4ab86cb46f45c405d0046fcb4f563a36f315161e
3
+ metadata.gz: b3a299bb186a2044f44d952d319b70766106e8cb
4
+ data.tar.gz: 2de2292b439c35b7b2140d914bc36aff23699106
5
5
  SHA512:
6
- metadata.gz: fbdbd4337e1b4a47ac8083c8434c3405bf9733063d4abfe51cd81b6052525f58d2c3efc36baf0828b584f526934e9c3fb65a1a5a0c6381e5cf7063846b27676a
7
- data.tar.gz: a920c1ec7b6495de58de0cc3792d49a75f8137191bd3ab1a981834046945c47a68c89e4ae6113e66a6ee10b0ee8ce04ac166f0f39ef8c6f69fe5d440005630f4
6
+ metadata.gz: da37aeb42288356c8fb36a078fd39d59eb092819148059a2b847abce7fbb76016053f89bd42cfaae53d1e87d93a6d12e5d8224daf2201c8358bb6f8f6a179f4d
7
+ data.tar.gz: c7d8e6c0cc237d63d0d1e71cb5e50736607442830371e1995eceb5ae89009fe5484e8140690b0f43995984ba781992ae71725b8dc0b9f4dab6a3f4512175ffb6
@@ -140,14 +140,15 @@ class MLS::Account < MLS::Resource
140
140
  nil
141
141
  end
142
142
 
143
- def reset_password!(email)
144
- MLS.put('/account/reset_password', {:email => email}, 400, 404) do |response, code|
145
- code == 200
143
+ # URL is currently required to not have any query params in it
144
+ def reset_password!(email, url)
145
+ MLS.post('/account/password', {:email => email, :url => url}, 400, 404) do |response, code|
146
+ code == 204
146
147
  end
147
148
  end
148
149
 
149
- def update_password!(params_hash)
150
- MLS.put('/account/update_password', params_hash, 400) do |response, code|
150
+ def update_password!(token, password, password_confirmation)
151
+ MLS.put('/account/password', {:token => token, :password => password, :password_confirmation => password_confirmation}, 400) do |response, code|
151
152
  MLS::Account::Parser.parse(response.body)
152
153
  end
153
154
  end
@@ -157,6 +158,11 @@ class MLS::Account < MLS::Resource
157
158
  MLS::Account::Parser.parse(response.body)
158
159
  end
159
160
 
161
+ def where(terms)
162
+ response = MLS.get('/accounts', :query => terms)
163
+ MLS::Account::Parser.parse_collection(response.body)
164
+ end
165
+
160
166
  end
161
167
 
162
168
  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.12.3'
6
+ s.version = '0.12.4'
7
7
  s.authors = ["James R. Bracy", "Jon Bracy"]
8
8
  s.email = ["james@42floors.com"]
9
9
  s.homepage = "http://mls.42floors.com"
@@ -30,6 +30,7 @@ Gem::Specification.new do |s|
30
30
 
31
31
  # Runtime
32
32
  s.add_runtime_dependency 'activesupport'
33
+ # the gem provides factories, so this is required as a runtime dependency
33
34
  s.add_runtime_dependency 'factory_girl'
34
35
  s.add_runtime_dependency 'yajl-ruby'
35
36
  s.add_runtime_dependency 'rest-client'
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.3
4
+ version: 0.12.4
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-14 00:00:00.000000000 Z
12
+ date: 2014-01-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake