OpenIdAuth
So, I applied patch(Ticket#10604) and they works well.
Install gem ruby-openi
d(2.0.4) 1 gem install ruby-openi
d Install plugin
1 $ ./script/p
lugin install http://svn .rubyonrai ls.org/rai ls/plugins /open_id_a uthenticat ion/ Apply patch
Get a patch and save as
ticket1060
4.diff
http://dev.rubyonrai ls.org/tic ket/10604 Move diff file to plugin root
1 #{RAILS_ROOT
}/vendor/pl ugins/open _id_authen tication/t icket10604 .diff Move to plugin root and do patch command
1 $ patch -p1 < ticket1060
4.diff 2 patching file init.rb 3 Hunk #1 FAILED at 1. 4 1 out of 1 hunk FAILED -- saving rejects to file init.rb.re j 5 patching file lib/genera tors/open_ id_authent ication_ta bles/open_ id_authent ication_ta bles_gener ator.rb 6 patching file lib/genera tors/open_ id_authent ication_ta bles/templ ates/migra tion.rb 7 patching file lib/open_i d_authenti cation.rb 8 Hunk #5 succeeded at 69 with fuzz 1 (offset -2 lines). 9 Hunk #6 succeeded at 88 (offset -2 lines). 10 Hunk #7 succeeded at 152 (offset -2 lines). 11 patching file lib/open_i d_authenti cation/ass ociation.r b 12 patching file lib/open_i d_authenti cation/db_ store.rb 13 patching file lib/open_i d_authenti cation/non ce.rb 14 patching file lib/open_i d_authenti cation/set ting.rb 15 patching file tasks/open _id_authen tication_t asks.rake 16 patching file test/norma lize_test. rb 17 patching file test/open_ id_authent ication_te st.rb 18 patching file test/statu s_test.rb
Do some work in README
Creating tables
1 rake open_id_au
thenticati on:db:crea te Add some routes
1 #config/rou
tes.rb 2 map.open_id_co mplete 'session', :controller => "sessions", :action => "create", :requiremen ts => { :method => :get } 3 map.resource :session Generate SessionsCo
ntroller, and create vews/sessi ons/new.ht ml.erb
Tip:NOT to use sample code in agilewebdevelopment. com. Use sample code in README. 1 def open_id_au
thenticati on 2 authentica te_with_op en_id do |result, identity_u rl| 3 if result.successful ? && @current_us er = @account.users.find_by_id entity_url (identity_u rl) 4 successful _login 5 else 6 failed_log in(result.message || "Sorry, no user by that identity URL exists (#{identity_u rl})") 7 end 8 end 9 end
Ommit version of ruby-openi
d 1 #open_id_au
thenticati on/init.rb 2 begin 3 # gem 'ruby-openi d', '=1.1.4' 4 gem 'ruby-openi d'
posted by
hibi
on Wed 27 Feb 2008
at 16:23
with
2 comments