user_authentication 1.0.0 → 1.1.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: da8dbd2230f17960165977d6aaca13e89a256600
4
- data.tar.gz: f1d36aa9488718d692f7772beace69cb5317743d
3
+ metadata.gz: 66bc3426a5ae74be5cac2e2469cddace55db69da
4
+ data.tar.gz: f78a03660b62ea4eb14ca4fe7481004fe4d18885
5
5
  SHA512:
6
- metadata.gz: 01b9ca989f7e335fb1bd2a604cb2d35527d666bd1fcaeba0dae71dab09f591d070e79198b10a96da6ce932f654cd2b576f30d5b8c3f6b8b756adba07fa207428
7
- data.tar.gz: 6cd2e8a009b7615ed7ef97be04c032ef5ebebcd5185f858c3f2e16ff0c2384e9c8e3ffd960efc769869a4399d41a3be380d576968a4164a78bb6a4174b8b60fb
6
+ metadata.gz: 20e69008688ba3b3828e3cb07c03a6b62843d7c31b0ff7f5ce8c2e976502288a5af2d7655a81bf389dc701aee3d6e35708bc3d7ac7a142216445c872c3aa0580
7
+ data.tar.gz: 4178aaa68dba5325d7b63c5dd1c28420a0d256c946d6831b7cb39b66b43e5593587f2228d8ecccf774f3b023d9df82ad1cd3dd18bd0f16f956b376fb94aba483
@@ -3,7 +3,6 @@ require File.expand_path('../../../lib/random', __FILE__)
3
3
  class Account < ActiveRecord::Base
4
4
  has_secure_password
5
5
 
6
- before_validation { |account| account.password = Random.password if account.password.nil? }
7
6
  validates :email, presence: true, uniqueness: true, email: true
8
7
  end
9
8
 
@@ -0,0 +1,11 @@
1
+ require File.expand_path('../../../lib/random', __FILE__)
2
+
3
+ class Account < ActiveRecord::Base
4
+ has_secure_password
5
+
6
+ before_validation { |account| account.password = Random.password if account.password.nil? }
7
+ validates :email, presence: true, uniqueness: true, email: true
8
+ end
9
+
10
+ app_model = File.join Rails.root, 'app/models/account.rb'
11
+ require app_model if File.exists? app_model
@@ -1,3 +1,3 @@
1
1
  module UserAuthentication
2
- VERSION = '1.0.0'
2
+ VERSION = '1.1.0'
3
3
  end
@@ -0,0 +1,3 @@
1
+ module UserAuthentication
2
+ VERSION = '1.0.0'
3
+ end
@@ -0,0 +1,16 @@
1
+ module UserAuthentication
2
+ class Engine < Rails::Engine
3
+ engine_name 'user_authentication'
4
+
5
+ initializer 'user_authentication_engine.app_controller' do |app|
6
+ ActiveSupport.on_load(:action_controller) do
7
+ require File.expand_path('../../app/controllers/application_controller', __FILE__)
8
+ require File.expand_path('../../app/helpers/application_helper', __FILE__)
9
+ end
10
+ end
11
+
12
+ config.after_initialize do
13
+ require File.expand_path('../../app/models/account', __FILE__)
14
+ end
15
+ end
16
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: user_authentication
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sujoy Gupta
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-27 00:00:00.000000000 Z
11
+ date: 2015-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -149,6 +149,7 @@ files:
149
149
  - app/controllers/application_controller.rb
150
150
  - app/helpers/application_helper.rb
151
151
  - app/models/account.rb
152
+ - app/models/account.rb~
152
153
  - app/validators/email_validator.rb
153
154
  - app/views/accounts/login.html.erb
154
155
  - app/views/accounts/signup.html.erb
@@ -159,7 +160,9 @@ files:
159
160
  - lib/random.rb
160
161
  - lib/tasks/user_authentication_tasks.rake
161
162
  - lib/user_authentication.rb
163
+ - lib/user_authentication.rb~
162
164
  - lib/user_authentication/version.rb
165
+ - lib/user_authentication/version.rb~
163
166
  homepage: http://github.com/sujoyg/user_authentication
164
167
  licenses:
165
168
  - MIT
@@ -180,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
180
183
  version: '0'
181
184
  requirements: []
182
185
  rubyforge_project:
183
- rubygems_version: 2.2.2
186
+ rubygems_version: 2.4.6
184
187
  signing_key:
185
188
  specification_version: 4
186
189
  summary: A rails engine for email and password based account authentication.