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
  PATH
2
2
  remote: .
3
3
  specs:
4
- monban (0.0.3)
4
+ monban (0.0.4)
5
5
  bcrypt-ruby
6
6
  rails
7
7
  warden
@@ -1,4 +1,6 @@
1
1
  class SessionsController < ApplicationController
2
+ respond_to :html
3
+
2
4
  def new
3
5
  end
4
6
 
@@ -1,7 +1,7 @@
1
1
  module Monban
2
2
  class SignUp
3
3
  def initialize user_params
4
- unencrypted_token = user_params.slice(token_field)
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
@@ -1,3 +1,3 @@
1
1
  module Monban
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -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: 'email@example.com', password: 'password' }
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
- args.should have_key(:password_digest)
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
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-19 00:00:00.000000000 Z
13
+ date: 2013-02-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails