sorcery 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sorcery might be problematic. Click here for more details.
- data/README.rdoc +1 -1
- data/VERSION +1 -1
- data/lib/generators/sorcery/install_generator.rb +1 -1
- data/lib/sorcery/model/adapters/mongoid.rb +2 -0
- data/sorcery.gemspec +1 -1
- data/spec/Gemfile.lock +1 -1
- data/spec/rails3/Gemfile.lock +1 -1
- data/spec/rails3_mongo_mapper/Gemfile.lock +1 -1
- data/spec/rails3_mongoid/Gemfile.lock +1 -1
- data/spec/rails3_mongoid/script/rails +0 -0
- data/spec/rails3_mongoid/spec/controller_spec.rb +11 -0
- metadata +1 -1
data/README.rdoc
CHANGED
@@ -28,7 +28,7 @@ Railscast: http://railscasts.com/episodes/283-authentication-with-sorcery
|
|
28
28
|
|
29
29
|
Example Rails 3 app using sorcery: https://github.com/NoamB/sorcery-example-app
|
30
30
|
|
31
|
-
Documentation: http://rubydoc.info/gems/sorcery/0.7.
|
31
|
+
Documentation: http://rubydoc.info/gems/sorcery/0.7.2/frames
|
32
32
|
|
33
33
|
Check out the tutorials in the github wiki!
|
34
34
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.2
|
@@ -33,7 +33,7 @@ module Sorcery
|
|
33
33
|
# Generate the model and add 'authenticates_with_sorcery!' unless you passed --migrations
|
34
34
|
unless options[:migrations]
|
35
35
|
generate "model #{model_class_name} --skip-migration"
|
36
|
-
insert_into_file "app/models/#{model_class_name}.rb", " authenticates_with_sorcery!\n", :after => "class #{model_class_name} < ActiveRecord::Base\n"
|
36
|
+
insert_into_file "app/models/#{model_class_name.downcase}.rb", " authenticates_with_sorcery!\n", :after => "class #{model_class_name} < ActiveRecord::Base\n"
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
data/sorcery.gemspec
CHANGED
data/spec/Gemfile.lock
CHANGED
data/spec/rails3/Gemfile.lock
CHANGED
File without changes
|
@@ -94,6 +94,17 @@ describe ApplicationController do
|
|
94
94
|
end
|
95
95
|
|
96
96
|
specify { should respond_to(:require_login) }
|
97
|
+
|
98
|
+
it "should call the configured 'not_authenticated_action' when session[:user_id] isn't found" do
|
99
|
+
# If someone passes in a bogus user_id than no big deal, but if a user is deleted
|
100
|
+
# and there is still an active session out there for him this causes problems.
|
101
|
+
user = User.create(:email => 'test@example.com', :password => 'password')
|
102
|
+
session[:user_id] = user.id
|
103
|
+
user.destroy
|
104
|
+
sorcery_controller_property_set(:not_authenticated_action, :test_not_authenticated_action)
|
105
|
+
get :test_logout
|
106
|
+
response.body.should == "test_not_authenticated_action"
|
107
|
+
end
|
97
108
|
|
98
109
|
it "should call the configured 'not_authenticated_action' when authenticate before_filter fails" do
|
99
110
|
session[:user_id] = nil
|