user_authentication 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2012 YOURNAME
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env rake
2
+ begin
3
+ require 'bundler/setup'
4
+ rescue LoadError
5
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
+ end
7
+ begin
8
+ require 'rdoc/task'
9
+ rescue LoadError
10
+ require 'rdoc/rdoc'
11
+ require 'rake/rdoctask'
12
+ RDoc::Task = Rake::RDocTask
13
+ end
14
+
15
+ RDoc::Task.new(:rdoc) do |rdoc|
16
+ rdoc.rdoc_dir = 'rdoc'
17
+ rdoc.title = 'UserAuthentication'
18
+ rdoc.options << '--line-numbers'
19
+ rdoc.rdoc_files.include('README.rdoc')
20
+ rdoc.rdoc_files.include('lib/**/*.rb')
21
+ end
22
+
23
+
24
+
25
+
26
+ Bundler::GemHelper.install_tasks
27
+
@@ -6,7 +6,6 @@ class ApplicationController < ActionController::Base
6
6
  def authorize
7
7
  # Not using skip before_filter, since main app could inadvertantly override that.
8
8
  # For example, it could have required the filter in its application_controller.
9
-
10
9
  return true if params[:controller] == 'users' && params[:action] == 'login'
11
10
 
12
11
  if current_user.nil?
@@ -26,3 +25,5 @@ class ApplicationController < ActionController::Base
26
25
 
27
26
  helper_method :current_user
28
27
  end
28
+
29
+ require File.join Rails.root, 'app/controllers/application_controller'
@@ -1,6 +1,4 @@
1
1
  class UsersController < ApplicationController
2
- skip_before_filter :authorize, :only => [:login]
3
-
4
2
  def login
5
3
  user = User.find_by_email params[:email]
6
4
  if user && user.authenticate(params[:password])
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :user_authentication do
3
+ # # Task goes here
4
+ # end
@@ -4,7 +4,7 @@ module UserAuthentication
4
4
 
5
5
  initializer 'user_authentication_engine.app_controller' do |app|
6
6
  ActiveSupport.on_load(:action_controller) do
7
- require File.expand_path('../../app/controllers/user_authentication_application_controller', __FILE__)
7
+ require File.expand_path('../../app/controllers/application_controller', __FILE__)
8
8
  end
9
9
  end
10
10
  end
@@ -0,0 +1,3 @@
1
+ module UserAuthentication
2
+ VERSION = "0.0.2"
3
+ end
@@ -0,0 +1,3 @@
1
+ module UserAuthentication
2
+ VERSION = "0.0.1"
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.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,20 +9,154 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-09 00:00:00.000000000 Z
13
- dependencies: []
14
- description:
15
- email: sujoyg@gmail.com
12
+ date: 2012-10-11 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 3.2.8
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 3.2.8
30
+ - !ruby/object:Gem::Dependency
31
+ name: bcrypt-ruby
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: sqlite3
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: rspec-rails
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ name: factory_girl_rails
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ~>
84
+ - !ruby/object:Gem::Version
85
+ version: '4.0'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: '4.0'
94
+ - !ruby/object:Gem::Dependency
95
+ name: rspec_attribute_matchers
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ~>
100
+ - !ruby/object:Gem::Version
101
+ version: 0.0.4
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: 0.0.4
110
+ - !ruby/object:Gem::Dependency
111
+ name: rspec_random
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ~>
116
+ - !ruby/object:Gem::Version
117
+ version: 0.0.1
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ~>
124
+ - !ruby/object:Gem::Version
125
+ version: 0.0.1
126
+ - !ruby/object:Gem::Dependency
127
+ name: specstar-controllers
128
+ requirement: !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - ~>
132
+ - !ruby/object:Gem::Version
133
+ version: 0.0.1
134
+ type: :development
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ~>
140
+ - !ruby/object:Gem::Version
141
+ version: 0.0.1
142
+ description: A rails engine for email and password based user authentication.
143
+ email:
144
+ - sujoyg@gmail.com
16
145
  executables: []
17
146
  extensions: []
18
147
  extra_rdoc_files: []
19
148
  files:
20
- - app/controllers/user_authentication_application_controller.rb
149
+ - app/controllers/application_controller.rb
21
150
  - app/controllers/users_controller.rb
22
151
  - app/models/user.rb
23
152
  - config/routes.rb
24
153
  - db/migrate/20121009010000_create_users.rb
154
+ - lib/tasks/user_authentication_tasks.rake
155
+ - lib/user_authentication/version.rb
156
+ - lib/user_authentication/version.rb~
25
157
  - lib/user_authentication.rb
158
+ - MIT-LICENSE
159
+ - Rakefile
26
160
  homepage: http://github.com/sujoyg/user_authentication
27
161
  licenses: []
28
162
  post_install_message:
@@ -46,5 +180,5 @@ rubyforge_project:
46
180
  rubygems_version: 1.8.24
47
181
  signing_key:
48
182
  specification_version: 3
49
- summary: A rails engine for adding users and authentication to rails applications.
183
+ summary: A rails engine for email and password based user authentication.
50
184
  test_files: []