public
Description: Droping user authentication for merb
Clone URL: git://github.com/BrianTheCoder/can_has_auth.git
Search Repo:
tweaks
William Smith (author)
Mon May 12 05:41:10 -0700 2008
commit  24a9a4b4a5e8f2db90eb493add75f7c444030e88
tree    763cfc069466cf5319c01feb9f0cedf68ea0a241
parent  9f1d89e4ac6b2550b472d8e79cd73d4944758591
...
1
2
3
4
5
 
 
 
 
6
7
...
1
 
 
 
 
2
3
4
5
6
7
0
@@ -1,6 +1,6 @@
0
 <% form_tag :action => url(:password,:id=>@user.id), :method => :put do -%>
0
- <p><%= password_field :name => 'old_password', :class => 'title', :label => "Old Password" %></p>
0
- <p><%= password_field :name => 'user[password]', :class => 'title', :label => "Password" %></p>
0
- <p><%= password_field :name => 'user[password_confirmation]', :class => 'title', :label => "Confirm Password" %></p>
0
- <p><%= submit_button "Change Password" %></p>
0
+ <p><%= password_field :name => 'old_password', :class => 'title', :label => "Old Password" %></p>
0
+ <p><%= password_field :name => 'user[password]', :class => 'title', :label => "Password" %></p>
0
+ <p><%= password_field :name => 'user[password_confirmation]', :class => 'title', :label => "Confirm Password" %></p>
0
+ <p><%= submit_button "Change Password" %></p>
0
 <% end -%>
0
\ No newline at end of file
...
1
2
3
4
 
 
5
6
...
1
 
 
 
2
3
4
5
0
@@ -1,5 +1,4 @@
0
 <% form_tag :action => url(:password) do %>
0
- Email<br />
0
- <%= text_field :name => "email", :size => 50, :class => 'title' %><br />
0
- <p><button type="submit" class="button">Request Password</button></p>
0
+ <p><%= text_field :name => "email", :size => 50, :class => 'title', :label => "Email" %></p>
0
+ <p><%= submit_button "Reset Password" %></p>
0
 <% end %>
0
\ No newline at end of file
...
1
2
3
4
 
 
 
5
6
...
1
 
 
 
2
3
4
5
6
0
@@ -1,5 +1,5 @@
0
 <% form_tag :action => url(:password,:id=>@user.id), :method => :put do -%>
0
- <p><%= password_field :name => 'user[password]', :class => 'title', :label => "Password" %></p>
0
- <p><%= password_field :name => 'user[password_confirmation]', :class => 'title', :label => "Confirm Password" %></p>
0
- <p><%= submit_button "Change Password" %></p>
0
+ <p><%= password_field :name => 'user[password]', :class => 'title', :label => "Password" %></p>
0
+ <p><%= password_field :name => 'user[password_confirmation]', :class => 'title', :label => "Confirm Password" %></p>
0
+ <p><%= submit_button "Change Password" %></p>
0
 <% end -%>
0
\ No newline at end of file
...
1
2
3
4
5
6
7
8
9
10
11
12
13
 
 
 
 
 
 
14
15
...
1
 
 
 
 
 
 
 
 
 
 
 
 
2
3
4
5
6
7
8
9
0
@@ -1,14 +1,8 @@
0
 <% form_tag :action => url(:login) do -%>
0
-<p><label for="login">Login</label><br/>
0
-<%= text_field :name => "login" %></p>
0
-
0
-<p><label for="password">Password</label><br/>
0
-<%= password_field :name => "password" %></p>
0
-
0
-<!-- Uncomment this if you want this functionality
0
-<p><label for="remember_me">Remember me:</label>
0
-<%= checkbox_field :name => 'remember_me' %></p>
0
--->
0
-
0
-<p><%= submit_button 'Log in' %></p>
0
+ <p><%= text_field :name => "login", :label => "Login" %></p>
0
+ <p><%= password_field :name => "password", :label => "Password" %></p>
0
+ <!-- Uncomment this if you want this functionality
0
+ <p><%= checkbox_field :name => 'remember_me', :label => "Remember Me" %></p>
0
+ -->
0
+ <p><%= submit_button 'Log in' %></p>
0
 <% end -%>
0
\ No newline at end of file
...
1
2
3
 
4
5
6
...
1
 
 
2
3
4
5
0
@@ -1,5 +1,4 @@
0
 <% form_tag :action=> url(:user_activation) do %>
0
-<p><%= text_field :name => "activation_code", :value => params[:activation_code], :size=>50, :class => 'title',:label => "Activation Code" %>
0
-</p>
0
+<p><%= text_field :name => "activation_code", :value => params[:activation_code], :size=>50, :class => 'title',:label => "Activation Code" %></p>
0
 <p><%= submit_button "Sign up" %></p>
0
 <% end -%>
0
\ No newline at end of file
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 
 
 
 
 
18
19
...
1
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
4
5
6
7
8
9
0
@@ -1,18 +1,8 @@
0
 <%= error_messages_for @user %>
0
 <% form_for @user, :action => url(:users) do %>
0
- <p>
0
- <%= text_control :login, :label => "Login" %>
0
- </p>
0
- <p>
0
- <%= text_control :email, :label => "Email" %>
0
- </p>
0
- <p>
0
- <%= password_control :password, :label => "Password" %>
0
- </p>
0
- <p>
0
- <%= password_control :password_confirmation, :label => "Password Confirmation" %>
0
- </p>
0
- <p>
0
- <%= submit_button "Sign up" %>
0
- </p>
0
+ <p><%= text_control :login, :label => "Login" %></p>
0
+ <p><%= text_control :email, :label => "Email" %></p>
0
+ <p><%= password_control :password, :label => "Password" %></p>
0
+ <p><%= password_control :password_confirmation, :label => "Password Confirmation" %></p>
0
+ <p><%= submit_button "Sign up" %></p>
0
 <% end %>
0
\ No newline at end of file
...
4781
4782
4783
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
0
@@ -4781,3 +4781,152 @@
0
  ~ activation was not sent because nothing was rendered for it
0
  ~ Redirecting to: /
0
  ~ {:action_time=>0.00916, :before_filters_time=>8.0e-06, :after_filters_time=>9.0e-06}
0
+ ~ Filter login_required was not found in your filter chain.
0
+ ~ Filter login_required was not found in your filter chain.
0
+ ~ Using in-memory sessions; sessions will be lost whenever the server stops.
0
+ ~ Cookie set: _session_id => 590f27d0a40f8a679c2d3a9168708963 -- {"path"=>"/"}
0
+ ~ {:action_time=>0.00442, :before_filters_time=>1.8e-05, :after_filters_time=>1.0e-05}
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/signup.html.*
0
+ ~ signup was not sent because nothing was rendered for it
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/activation.html.*
0
+ ~ activation was not sent because nothing was rendered for it
0
+ ~ Cookie set: _session_id => 33f9ac89c76d13efa40e0d2a7958c55b -- {"path"=>"/"}
0
+ ~ Redirecting to: /login
0
+ ~ {:action_time=>0.010652, :before_filters_time=>2.0e-05, :after_filters_time=>1.2e-05}
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/signup.html.*
0
+ ~ signup was not sent because nothing was rendered for it
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/activation.html.*
0
+ ~ activation was not sent because nothing was rendered for it
0
+ ~ Cookie set: _session_id => 53ccd51212008828a24a21b86b9175c2 -- {"path"=>"/"}
0
+ ~ Redirecting to: /login
0
+ ~ {:action_time=>0.001236, :before_filters_time=>2.6e-05, :after_filters_time=>9.0e-06}
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/signup.html.*
0
+ ~ signup was not sent because nothing was rendered for it
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/activation.html.*
0
+ ~ activation was not sent because nothing was rendered for it
0
+ ~ Cookie set: _session_id => 23670be5c0f53ead0e668c579a765207 -- {"path"=>"/"}
0
+ ~ Redirecting to: /login
0
+ ~ {:action_time=>0.001078, :after_filters_time=>9.0e-06}
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/signup.html.*
0
+ ~ signup was not sent because nothing was rendered for it
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/activation.html.*
0
+ ~ activation was not sent because nothing was rendered for it
0
+ ~ Cookie set: _session_id => 91fe3d7525e1a042c52648b24e61eef7 -- {"path"=>"/"}
0
+ ~ {:action_time=>0.002316, :before_filters_time=>7.3e-05, :after_filters_time=>1.1e-05}
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/signup.html.*
0
+ ~ signup was not sent because nothing was rendered for it
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/activation.html.*
0
+ ~ activation was not sent because nothing was rendered for it
0
+ ~ Cookie set: _session_id => 271758d70edab3ef6c51036f01a4ebcc -- {"path"=>"/"}
0
+ ~ Redirecting to: /
0
+ ~ {:action_time=>0.010045, :before_filters_time=>7.1e-05, :after_filters_time=>1.9e-05}
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/signup.html.*
0
+ ~ signup was not sent because nothing was rendered for it
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/activation.html.*
0
+ ~ activation was not sent because nothing was rendered for it
0
+ ~ Cookie set: _session_id => b857b974ac953e9d11e1410d5cf7d363 -- {"path"=>"/"}
0
+ ~ Redirecting to: /
0
+ ~ {:action_time=>0.008139, :before_filters_time=>7.1e-05, :after_filters_time=>1.4e-05}
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/signup.html.*
0
+ ~ signup was not sent because nothing was rendered for it
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/activation.html.*
0
+ ~ activation was not sent because nothing was rendered for it
0
+ ~ Cookie set: _session_id => 92ee6d5e6fea629b7e387ffa87e5f7f2 -- {"path"=>"/"}
0
+ ~ Redirecting to: /password/edit
0
+ ~ {:action_time=>0.003745, :before_filters_time=>7.9e-05, :after_filters_time=>1.1e-05}
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/signup.html.*
0
+ ~ signup was not sent because nothing was rendered for it
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/activation.html.*
0
+ ~ activation was not sent because nothing was rendered for it
0
+ ~ Cookie set: _session_id => 480b0ece24a3ad54f500e1ad6d8664e9 -- {"path"=>"/"}
0
+ ~ Redirecting to: /password/edit
0
+ ~ {:action_time=>0.003655, :before_filters_time=>7.6e-05, :after_filters_time=>1.1e-05}
0
+ ~ Cookie set: _session_id => a435f94a617ed4ebc42a1db66d2eec33 -- {"path"=>"/"}
0
+ ~ Redirecting to: /
0
+ ~ {:action_time=>0.00119, :before_filters_time=>2.1e-05, :after_filters_time=>1.0e-05}
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/signup.html.*
0
+ ~ signup was not sent because nothing was rendered for it
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/activation.html.*
0
+ ~ activation was not sent because nothing was rendered for it
0
+ ~ Cookie set: _session_id => 878f7d4c169414d5d6ba04a7fd82ec91 -- {"path"=>"/"}
0
+ ~ {:action_time=>0.004985, :before_filters_time=>1.4e-05, :after_filters_time=>9.0e-06}
0
+ ~ Cookie set: _session_id => 6d05187bbf65985ea3e18b5c53e884d6 -- {"path"=>"/"}
0
+ ~ {:action_time=>0.002404, :before_filters_time=>1.2e-05, :after_filters_time=>1.0e-05}
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/signup.html.*
0
+ ~ signup was not sent because nothing was rendered for it
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/activation.html.*
0
+ ~ activation was not sent because nothing was rendered for it
0
+ ~ Cookie set: _session_id => df7a8ef2fa63498bb746e6323f8b5d57 -- {"path"=>"/"}
0
+ ~ Redirecting to: /
0
+ ~ {:action_time=>0.003616, :before_filters_time=>1.3e-05, :after_filters_time=>1.1e-05}
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/signup.html.*
0
+ ~ signup was not sent because nothing was rendered for it
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/activation.html.*
0
+ ~ activation was not sent because nothing was rendered for it
0
+ ~ Cookie set: _session_id => 98a78f8a0bad5a9038a31d464fbd8cbe -- {"path"=>"/"}
0
+ ~ {:action_time=>0.00517, :before_filters_time=>1.0e-05, :after_filters_time=>9.0e-06}
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/signup.html.*
0
+ ~ signup was not sent because nothing was rendered for it
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/activation.html.*
0
+ ~ activation was not sent because nothing was rendered for it
0
+ ~ Cookie set: _session_id => cc6b1ad94e6ab946a4cf6116aea564f1 -- {"path"=>"/"}
0
+ ~ Cookie set: auth_token => 39db63ee7634035b89cea50f2361f7863edbe5cc -- {"expires"=>"Mon, 26-May-2008 12:39:53 GMT", "path"=>"/"}
0
+ ~ Redirecting to: /
0
+ ~ {:action_time=>0.008339, :before_filters_time=>1.0e-05, :after_filters_time=>1.4e-05}
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/signup.html.*
0
+ ~ signup was not sent because nothing was rendered for it
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/activation.html.*
0
+ ~ activation was not sent because nothing was rendered for it
0
+ ~ Cookie set: _session_id => 2f6cf79e8c46f75b85d7913fa05a7ef3 -- {"path"=>"/"}
0
+ ~ Redirecting to: /
0
+ ~ {:action_time=>0.003794, :before_filters_time=>1.0e-05, :after_filters_time=>1.1e-05}
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/signup.html.*
0
+ ~ signup was not sent because nothing was rendered for it
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/activation.html.*
0
+ ~ activation was not sent because nothing was rendered for it
0
+ ~ Cookie set: _session_id => eca065f93531cdfbcaefa58a2343786c -- {"path"=>"/"}
0
+ ~ {:action_time=>0.002206, :before_filters_time=>1.2e-05, :after_filters_time=>1.0e-05}
0
+ ~ Cookie set: auth_token => 1dfe13580c2a3b5abbb7f088ce90339e10c6ace8 -- {"expires"=>"Mon, 26-May-2008 12:39:54 GMT", "path"=>"/"}
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/signup.html.*
0
+ ~ signup was not sent because nothing was rendered for it
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/activation.html.*
0
+ ~ activation was not sent because nothing was rendered for it
0
+ ~ Cookie set: _session_id => 6e62d77203ab0186a503d6451dd71bb5 -- {"path"=>"/"}
0
+ ~ Cookie deleted: auth_token => nil
0
+ ~ Redirecting to: /
0
+ ~ {:action_time=>0.000491, :before_filters_time=>1.3e-05, :after_filters_time=>9.0e-06}
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/signup.html.*
0
+ ~ signup was not sent because nothing was rendered for it
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/activation.html.*
0
+ ~ activation was not sent because nothing was rendered for it
0
+ ~ Cookie set: _session_id => bd0e6e93882bc3c787d95f0b19212416 -- {"path"=>"/"}
0
+ ~ Cookie deleted: auth_token => nil
0
+ ~ Redirecting to: /
0
+ ~ {:action_time=>0.000384, :before_filters_time=>9.0e-06, :after_filters_time=>8.0e-06}
0
+ ~ Cookie set: _session_id => 775a39ef144827da4c3ca0f5fe83d1ed -- {"path"=>"/"}
0
+ ~ {:action_time=>0.003081, :before_filters_time=>1.3e-05, :after_filters_time=>1.0e-05}
0
+ ~ Cookie set: _session_id => ccd51b2b65e42d998831fd19026493da -- {"path"=>"/"}
0
+ ~ Cookie deleted: auth_token => nil
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/signup.html.*
0
+ ~ signup was not sent because nothing was rendered for it
0
+ ~ Redirecting to: /
0
+ ~ {:action_time=>0.006828, :before_filters_time=>1.5e-05, :after_filters_time=>1.2e-05}
0
+ ~ Cookie set: _session_id => 284f63d76f32553ec89079ff2848b9a7 -- {"path"=>"/"}
0
+ ~ {:action_time=>0.002795, :before_filters_time=>1.5e-05, :after_filters_time=>1.0e-05}
0
+ ~ Cookie set: _session_id => c1600f482ce5f3e9ec4f3a64b81f57b4 -- {"path"=>"/"}
0
+ ~ Cookie deleted: auth_token => nil
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/signup.html.*
0
+ ~ signup was not sent because nothing was rendered for it
0
+ ~ Redirecting to: /
0
+ ~ {:action_time=>0.006992, :before_filters_time=>1.0e-05, :after_filters_time=>1.2e-05}
0
+ ~ Cookie set: _session_id => 70bfbd394b6f943ebb5469f27d1934dd -- {"path"=>"/"}
0
+ ~ No template found at /Users/williamsmith/code/gems/can_has_auth/app/mailers/views/user_mailer/activation.html.*
0
+ ~ activation was not sent because nothing was rendered for it
0
+ ~ Redirecting to: /
0
+ ~ {:action_time=>0.008231, :before_filters_time=>9.0e-06, :after_filters_time=>1.1e-05}
0
+ ~ Filter login_required was not found in your filter chain.
0
+ ~ Filter login_required was not found in your filter chain.
0
+ ~ Using in-memory sessions; sessions will be lost whenever the server stops.
0
+ ~ Filter login_required was not found in your filter chain.
0
+ ~ Filter login_required was not found in your filter chain.
0
+ ~ Using in-memory sessions; sessions will be lost whenever the server stops.
...
101
102
103
104
 
105
106
107
...
112
113
114
115
 
116
117
118
...
125
126
127
128
 
129
130
131
...
283
284
285
286
 
287
288
289
...
101
102
103
 
104
105
106
107
...
112
113
114
 
115
116
117
118
...
125
126
127
 
128
129
130
131
...
283
284
285
 
286
287
288
289
0
@@ -101,7 +101,7 @@ describe User do
0
   it "should send a please activate email" do
0
     user = User.new(valid_user_hash)
0
     UserMailer.should_receive(:dispatch_and_deliver) do |action, mail_args, mailer_params|
0
- action.should == :signup_notification
0
+ action.should == :signup
0
       [:from, :to, :subject].each{ |f| mail_args.keys.should include(f)}
0
       mail_args[:to].should == user.email
0
       mailer_params[:user].should == user
0
@@ -112,7 +112,7 @@ describe User do
0
   it "should not send a please activate email when updating" do
0
     user = User.new(valid_user_hash)
0
     user.save
0
- UserMailer.should_not_receive(:signup_notification)
0
+ UserMailer.should_not_receive(:signup)
0
     user.login = "not in the valid hash for login"
0
     user.save
0
   end
0
@@ -125,7 +125,7 @@ describe User, "the password fields for User" do
0
   before(:each) do
0
     User.auto_migrate!
0
     @user = User.new( valid_user_hash )
0
- UserMailer.stub!(:activation_notification).and_return(true)
0
+ UserMailer.stub!(:activation).and_return(true)
0
   end
0
   
0
   it "should respond to password" do
0
@@ -283,7 +283,7 @@ describe User, "activation" do
0
   it "should send out a welcome email to confirm that the account is activated" do
0
     @user.save
0
     UserMailer.should_receive(:dispatch_and_deliver) do |action, mail_args, mailer_params|
0
- action.should == :activation_notification
0
+ action.should == :activation
0
       mail_args.keys.should include(:from)
0
       mail_args.keys.should include(:to)
0
       mail_args.keys.should include(:subject)

Comments

    No one has commented yet.