authpwn_rails 0.4.5 → 0.4.6
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.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.6
|
data/authpwn_rails.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{authpwn_rails}
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Victor Costan"]
|
12
|
-
s.date = %q{2010-08-
|
12
|
+
s.date = %q{2010-08-16}
|
13
13
|
s.description = %q{Works with Facebook.}
|
14
14
|
s.email = %q{victor@costan.us}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -63,17 +63,17 @@ Gem::Specification.new do |s|
|
|
63
63
|
s.rubygems_version = %q{1.3.7}
|
64
64
|
s.summary = %q{User authentication for Rails 3 applications.}
|
65
65
|
s.test_files = [
|
66
|
-
"test/
|
66
|
+
"test/facebook_token_test.rb",
|
67
|
+
"test/session_controller_api_test.rb",
|
68
|
+
"test/user_test.rb",
|
69
|
+
"test/cookie_controller_test.rb",
|
70
|
+
"test/test_helper.rb",
|
67
71
|
"test/facebook_controller_test.rb",
|
68
|
-
"test/facebook_token_test.rb",
|
69
72
|
"test/helpers/application_controller.rb",
|
70
|
-
"test/helpers/db_setup.rb",
|
71
|
-
"test/helpers/fbgraph.rb",
|
72
73
|
"test/helpers/routes.rb",
|
73
|
-
"test/helpers/
|
74
|
-
"test/
|
75
|
-
"test/
|
76
|
-
"test/user_test.rb"
|
74
|
+
"test/helpers/fbgraph.rb",
|
75
|
+
"test/helpers/db_setup.rb",
|
76
|
+
"test/helpers/view_helpers.rb"
|
77
77
|
]
|
78
78
|
|
79
79
|
if s.respond_to? :specification_version then
|
@@ -1,5 +1,9 @@
|
|
1
1
|
<p>This is a sample login form. You should customize it for your users.</p>
|
2
2
|
|
3
|
+
<% if flash[:notice] %>
|
4
|
+
<p class="notice"><%= flash[:notice] %></p>
|
5
|
+
<% end %>
|
6
|
+
|
3
7
|
<%= form_for User.new, :url => session_path do |f| %>
|
4
8
|
<div class="field">
|
5
9
|
<%= f.label :email, 'Email Address' %><br />
|
@@ -87,8 +87,9 @@ module SessionControllerInstanceMethods
|
|
87
87
|
if current_user
|
88
88
|
format.html { redirect_to session_url }
|
89
89
|
else
|
90
|
-
|
91
|
-
|
90
|
+
format.html do
|
91
|
+
redirect_to new_session_url, :notice => 'Invalid e-mail or password'
|
92
|
+
end
|
92
93
|
end
|
93
94
|
end
|
94
95
|
end
|
@@ -57,16 +57,18 @@ class SessionControllerApiTest < ActionController::TestCase
|
|
57
57
|
|
58
58
|
test "create does not log in with bad password" do
|
59
59
|
post :create, :user => { :email => @user.email, :password => 'fail' }
|
60
|
-
assert_redirected_to
|
60
|
+
assert_redirected_to new_session_url
|
61
61
|
assert_nil assigns(:current_user), 'instance variable'
|
62
62
|
assert_nil session_current_user, 'session'
|
63
|
+
assert_not_nil flash[:notice]
|
63
64
|
end
|
64
65
|
|
65
66
|
test "create does not log in with bad e-mail" do
|
66
67
|
post :create, :user => { :email => 'nobody@gmail.com', :password => 'no' }
|
67
|
-
assert_redirected_to
|
68
|
+
assert_redirected_to new_session_url
|
68
69
|
assert_nil assigns(:current_user), 'instance variable'
|
69
70
|
assert_nil session_current_user, 'session'
|
71
|
+
assert_not_nil flash[:notice]
|
70
72
|
end
|
71
73
|
|
72
74
|
test "logout" do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authpwn_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 6
|
10
|
+
version: 0.4.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Victor Costan
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-08-
|
18
|
+
date: 2010-08-16 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -151,14 +151,14 @@ signing_key:
|
|
151
151
|
specification_version: 3
|
152
152
|
summary: User authentication for Rails 3 applications.
|
153
153
|
test_files:
|
154
|
+
- test/facebook_token_test.rb
|
155
|
+
- test/session_controller_api_test.rb
|
156
|
+
- test/user_test.rb
|
154
157
|
- test/cookie_controller_test.rb
|
158
|
+
- test/test_helper.rb
|
155
159
|
- test/facebook_controller_test.rb
|
156
|
-
- test/facebook_token_test.rb
|
157
160
|
- test/helpers/application_controller.rb
|
158
|
-
- test/helpers/db_setup.rb
|
159
|
-
- test/helpers/fbgraph.rb
|
160
161
|
- test/helpers/routes.rb
|
162
|
+
- test/helpers/fbgraph.rb
|
163
|
+
- test/helpers/db_setup.rb
|
161
164
|
- test/helpers/view_helpers.rb
|
162
|
-
- test/session_controller_api_test.rb
|
163
|
-
- test/test_helper.rb
|
164
|
-
- test/user_test.rb
|