authem 1.3.1 → 1.3.2

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: 1ce2fc6c3054966ccdf1026a1f9d51c2a4c081e3
4
- data.tar.gz: b8d36bd9ce4955ed2ae6e9e6b5d0f3e5cbd606a9
3
+ metadata.gz: a905bf16ed174deb71848a2cf685265a4e72116a
4
+ data.tar.gz: 8e729af1aa7f3e12e4d15be66c660f47b07ec1d0
5
5
  SHA512:
6
- metadata.gz: a9b329135add61faaeec150204d9018bc8c8a4426cc3fa986236f28eaf78e4502dc2818fb45417211a94837448068a82a4d8c1ed91a5d522f81dcd3a113e324d
7
- data.tar.gz: eb7067696d4d8573d94f4282537e8a7b5092de116f47fff59b6c534907deaf51e75602076a8d7b8ffa16f08e9ea81f89e5b104388bec728b3001e6a73d2a02f8
6
+ metadata.gz: ab9c8dcca7d5cbcb1366a4f43b4477364d8562f5320e34fb32585f318542902953ef7e074a89e0a531fdc64838024e77d6c929d7834ad547312cca680f6ddee3
7
+ data.tar.gz: 9fa3948903e7916772c9874ae1b4406f2c6eebef6ed555c42de045d85f72765457286dea58e3448f7e1b6fccbf5eb89d6d9abdbe620228528a4bd26ecf2395ae
@@ -4,8 +4,6 @@ module Authem::BaseUser
4
4
  included do
5
5
  validates_uniqueness_of :email
6
6
  validates_format_of :email, with: /\A\S+@\S+\z/
7
- validates_presence_of :password, on: :create
8
- validates_confirmation_of :password
9
7
  end
10
8
 
11
9
  module ClassMethods
@@ -4,6 +4,9 @@ module Authem::SorceryUser
4
4
 
5
5
  included do
6
6
  attr_accessor :password, :password_confirmation
7
+ validates_presence_of :password, on: :create
8
+ validates_presence_of :password_confirmation, if: ->(user) { user.password.present? }
9
+ validates_confirmation_of :password, if: ->(user) { user.password.present? }
7
10
 
8
11
  before_save :encrypt_password
9
12
  end
@@ -1,3 +1,3 @@
1
1
  module Authem
2
- VERSION = '1.3.1'
2
+ VERSION = '1.3.2'
3
3
  end
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.3.1
4
+ version: 1.3.2
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-11-05 00:00:00.000000000 Z
11
+ date: 2013-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -175,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
175
  version: '0'
176
176
  requirements: []
177
177
  rubyforge_project:
178
- rubygems_version: 2.1.3
178
+ rubygems_version: 2.1.11
179
179
  signing_key:
180
180
  specification_version: 4
181
181
  summary: Authem authenticates them by email