kenn-userify 0.1.2 → 0.1.3

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.
Files changed (3) hide show
  1. data/Rakefile +1 -1
  2. data/lib/userify/user.rb +3 -0
  3. metadata +1 -1
data/Rakefile CHANGED
@@ -35,7 +35,7 @@ task :default => ['test:all', 'test:features']
35
35
 
36
36
  gem_spec = Gem::Specification.new do |gem_spec|
37
37
  gem_spec.name = "userify"
38
- gem_spec.version = "0.1.2"
38
+ gem_spec.version = "0.1.3"
39
39
  gem_spec.summary = "Super simple authentication system for Rails, using username, email and password."
40
40
  gem_spec.email = "kenn.ejima <at> gmail.com"
41
41
  gem_spec.homepage = "http://github.com/kenn/userify"
data/lib/userify/user.rb CHANGED
@@ -16,11 +16,14 @@ module Userify
16
16
  before_validation :normalize_email
17
17
 
18
18
  validates_presence_of :username
19
+ validates_length_of :username, :maximum => columns_hash['username'].limit
19
20
  validates_uniqueness_of :username
20
21
  validates_presence_of :email
22
+ validates_length_of :email, :maximum => columns_hash['email'].limit
21
23
  validates_uniqueness_of :email, :case_sensitive => false
22
24
  validates_format_of :email, :with => /.+@.+\..+/
23
25
  validates_presence_of :password, :if => :password_required?
26
+ validates_length_of :fullname, :maximum => columns_hash['fullname'].limit
24
27
 
25
28
  before_save :initialize_salt, :encrypt_password, :initialize_token
26
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kenn-userify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenn Ejima