user_authentication 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/app/models/user.rb CHANGED
@@ -6,3 +6,6 @@ class User < ActiveRecord::Base
6
6
  before_validation { |user| user.password = Random.password if user.password.nil? }
7
7
  validates_presence_of :email
8
8
  end
9
+
10
+ app_model = File.join Rails.root, 'app/models/user.rb'
11
+ require app_model if File.exists? app_model
@@ -1,3 +1,3 @@
1
1
  module UserAuthentication
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: user_authentication
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:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-13 00:00:00.000000000 Z
12
+ date: 2012-10-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -165,15 +165,12 @@ files:
165
165
  - app/controllers/application_controller.rb
166
166
  - app/controllers/users_controller.rb
167
167
  - app/models/user.rb
168
- - app/models/user.rb~
169
168
  - app/views/users/_login.html.erb
170
169
  - config/routes.rb
171
170
  - db/migrate/20121009010000_create_users.rb
172
171
  - lib/random.rb
173
- - lib/random.rb~
174
172
  - lib/tasks/user_authentication_tasks.rake
175
173
  - lib/user_authentication/version.rb
176
- - lib/user_authentication/version.rb~
177
174
  - lib/user_authentication.rb
178
175
  - MIT-LICENSE
179
176
  - Rakefile
data/app/models/user.rb~ DELETED
@@ -1,8 +0,0 @@
1
- require File.expand_path('../../../lib/random', __FILE__)
2
-
3
- class User < ActiveRecord::Base
4
- has_secure_password
5
-
6
- before_validation { |user| user.password = random_password if user.password.nil? }
7
- validates_presence_of :email
8
- end
data/lib/random.rb~ DELETED
@@ -1,8 +0,0 @@
1
- class Random
2
- def self.password
3
- chars = ("A".."Z").to_a + ("a".."z").to_a + ("0".."9").to_a
4
- password = (1..32).map { chars.sample }.join("")
5
- puts "Returning: #{password}"
6
- password
7
- end
8
- end
@@ -1,3 +0,0 @@
1
- module UserAuthentication
2
- VERSION = "0.0.3"
3
- end