protected 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -74,8 +74,8 @@ module Protected
74
74
 
75
75
  has_many :old_passwords, :as => :password_archivable, :dependent => :destroy
76
76
 
77
- validates :first_name, :presence => true, :format => { :with => /^[a-zA-Z0-9_\s\-.]+$/ }
78
- validates :last_name, :presence => true, :format => { :with => /^[a-zA-Z0-9_\s\-.]+$/ }, :uniqueness => { :scope => :first_name, :message => "has alredy been taken by another user with the same first name" }
77
+ validates :first_name, :format => { :with => /^[a-zA-Z0-9_\s\-.]+$/, :allow_nil => true }
78
+ validates :last_name, :format => { :with => /^[a-zA-Z0-9_\s\-.]+$/, :allow_nil => true }
79
79
  validate :validate_password_strength, :if => lambda{new_record? || (not password.blank?)}
80
80
  validates :login, :unchangeable => true, :presence => true, :login_format => true, :uniqueness => { :case_sensitive => false }, :length => { :maximum => 64, :minimum => 6 }
81
81
  validates :email, :unchangeable => true
@@ -1,3 +1,3 @@
1
1
  module Protected
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protected
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
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: 2012-05-23 00:00:00.000000000 Z
13
+ date: 2012-05-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rack
@@ -395,7 +395,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
395
395
  version: '0'
396
396
  segments:
397
397
  - 0
398
- hash: -1272936797958317662
398
+ hash: -3535862132339009574
399
399
  required_rubygems_version: !ruby/object:Gem::Requirement
400
400
  none: false
401
401
  requirements:
@@ -404,7 +404,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
404
404
  version: '0'
405
405
  segments:
406
406
  - 0
407
- hash: -1272936797958317662
407
+ hash: -3535862132339009574
408
408
  requirements: []
409
409
  rubyforge_project:
410
410
  rubygems_version: 1.8.21