authem 1.2.0 → 1.3.0

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: c3646171f30266e642adb08a68757e316615fb89
4
- data.tar.gz: 5fc83cca465109e6d677b1aa18899ee0eba21dbc
3
+ metadata.gz: 4765b564d8e774dc0d83e5c841f55d3af7e9a86e
4
+ data.tar.gz: 182578f7f5d5f1ee61c9226d9bd7cf6519c43a8d
5
5
  SHA512:
6
- metadata.gz: 1d6a97270123f9e64a680a426ae9b9578f53bde413f89ec9c7eb37c9fa28229c5c7efa4e4faa34479a6e8edf3b50658ca581f272263d55b97eac1ad26100ebc0
7
- data.tar.gz: 6ac194d7e261dc8151f2d2fc69ed6ff34129e6c3465a001dc6910bd1b763d7d78d610fa842ccd5ec5ae1aeb1f2daa864a6c2739a82e22bad3efacf84679486e4
6
+ metadata.gz: a6d7b862cdff6b1ff28ebb0923c794de9554364b6158581cd95e3ff77f4986d3b459c7a57354876a00dfeb98ac7c657050253e7374370eb9f3f7c5ba3670ba25
7
+ data.tar.gz: 5d37428e8e35871a71b9db9dd79a345875179e641e24b1ca6a759edb0af32337345a30455a1eeb649590557df9ca1892ea73ffd86891dbc4620ba78b16f4a178
@@ -2,12 +2,20 @@ module Authem
2
2
  module Config
3
3
  extend self
4
4
 
5
- attr_accessor :user_class, :sign_in_path
5
+ attr_accessor :sign_in_path
6
6
 
7
7
  Authem::Config.sign_in_path ||= :sign_in
8
8
 
9
9
  def configure
10
10
  yield self
11
11
  end
12
+
13
+ def user_class
14
+ @user_class.constantize
15
+ end
16
+
17
+ def user_class=(user_class)
18
+ @user_class = user_class.to_s
19
+ end
12
20
  end
13
21
  end
@@ -6,5 +6,16 @@ module Authem::User
6
6
  Authem::Config.user_class = self
7
7
 
8
8
  has_secure_password
9
+
10
+ alias_method :original_authenticate, :authenticate
11
+
12
+ def authenticate(password)
13
+ if password.present?
14
+ original_authenticate(password)
15
+ else
16
+ false
17
+ end
18
+ end
9
19
  end
20
+
10
21
  end
@@ -1,3 +1,3 @@
1
1
  module Authem
2
- VERSION = '1.2.0'
2
+ VERSION = '1.3.0'
3
3
  end
@@ -6,7 +6,7 @@ module Authem
6
6
  argument :model_name, type: :string, default: "user"
7
7
 
8
8
  def generate_model
9
- generate("model #{model_name} email:string, password_digest:string, reset_password_token:string, session_token:string")
9
+ generate("model #{model_name} email:string password_digest:string reset_password_token:string session_token:string remember_token:string")
10
10
  end
11
11
 
12
12
  def update_model_to_include_authem
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authem
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Elliott
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-25 00:00:00.000000000 Z
11
+ date: 2013-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -156,7 +156,8 @@ files:
156
156
  - README.markdown
157
157
  - Rakefile
158
158
  homepage: https://github.com/paulelliott/authem
159
- licenses: []
159
+ licenses:
160
+ - WTFPL
160
161
  metadata: {}
161
162
  post_install_message:
162
163
  rdoc_options: []
@@ -174,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
175
  version: '0'
175
176
  requirements: []
176
177
  rubyforge_project:
177
- rubygems_version: 2.0.3
178
+ rubygems_version: 2.1.3
178
179
  signing_key:
179
180
  specification_version: 4
180
181
  summary: Authem authenticates them by email