monban 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,4 @@
1
+ == 0.3.0
2
+
3
+ * Fixed bug where password wasn't deleted from session params which would
4
+ cause lookup to fail
@@ -25,8 +25,8 @@ module Monban
25
25
  end
26
26
 
27
27
  def authenticate_session session_params, field_map = nil
28
- user = Monban.lookup(session_params, field_map)
29
28
  password = session_params.delete(Monban.config.user_token_field)
29
+ user = Monban.lookup(session_params, field_map)
30
30
  authenticate(user, password)
31
31
  end
32
32
 
@@ -1,3 +1,3 @@
1
1
  module Monban
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -53,12 +53,11 @@ module Monban
53
53
  end
54
54
 
55
55
  it 'authenticates a session' do
56
- session_params = double()
57
- session_params.should_receive(:delete).with('password').and_return('password')
56
+ session_params = { 'password' => 'password', 'email' => 'a@b.com' }
58
57
  user = double()
59
58
  authentication = double()
60
59
  authentication.should_receive(:perform).and_return(user)
61
- Monban.should_receive(:lookup).with(session_params, nil).and_return(user)
60
+ Monban.should_receive(:lookup).with({'email' => 'a@b.com'}, nil).and_return(user)
62
61
  Authentication.should_receive(:new).with(user, 'password').and_return(authentication)
63
62
  @dummy.authenticate_session(session_params).should == user
64
63
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: monban
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-02-11 00:00:00.000000000 Z
13
+ date: 2013-02-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -164,6 +164,7 @@ extensions: []
164
164
  extra_rdoc_files: []
165
165
  files:
166
166
  - .gitignore
167
+ - CHANGELOG.rdoc
167
168
  - Gemfile
168
169
  - Gemfile.lock
169
170
  - LICENSE.txt