monban 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc
CHANGED
@@ -1,8 +1,12 @@
|
|
1
|
+
== 0.0.5
|
2
|
+
* [FIX] Scaffolded SessionsController should have respond_to.
|
3
|
+
* [FIX] SignUp should get the value instead of slicing.
|
4
|
+
|
1
5
|
== 0.0.4
|
2
|
-
* Cleaned up generated controllers
|
3
|
-
* Use find_by_id instead of find so invalid sessions don't cause apps to crash
|
4
|
-
* Hashes passed in are no longer mutated via delete
|
6
|
+
* Cleaned up generated controllers.
|
7
|
+
* Use find_by_id instead of find so invalid sessions don't cause apps to crash.
|
8
|
+
* Hashes passed in are no longer mutated via delete.
|
5
9
|
|
6
10
|
== 0.0.3
|
7
11
|
|
8
|
-
* Fixed bug where password wasn't deleted from session params which would cause lookup to fail
|
12
|
+
* Fixed bug where password wasn't deleted from session params which would cause lookup to fail.
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Monban
|
2
2
|
class SignUp
|
3
3
|
def initialize user_params
|
4
|
-
unencrypted_token = user_params
|
4
|
+
unencrypted_token = user_params[token_field]
|
5
5
|
token_digest = Monban.encrypt_token(unencrypted_token)
|
6
6
|
@user_params = user_params.except(token_field).merge(token_store_field.to_sym => token_digest)
|
7
7
|
end
|
data/lib/monban/version.rb
CHANGED
@@ -5,11 +5,11 @@ describe Monban::SignUp, '#perform' do
|
|
5
5
|
it 'creates a user with the right parameters' do
|
6
6
|
create = double
|
7
7
|
stub_const('User', create)
|
8
|
-
user_params = { email
|
8
|
+
user_params = { 'email' => 'email@example.com', 'password' => 'password' }
|
9
9
|
|
10
10
|
create.should_receive(:create) do |args|
|
11
11
|
args[:email].should eq(user_params[:email])
|
12
|
-
|
12
|
+
Monban.compare_token(args[:password_digest], 'password').should be_true
|
13
13
|
end
|
14
14
|
|
15
15
|
Monban::SignUp.new(user_params).perform
|
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.
|
4
|
+
version: 0.0.5
|
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-
|
13
|
+
date: 2013-02-22 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|