rubycas / rubycas-client

Ruby client for Yale's Central Authentication Service protocol -- an open source enterprise single sign on system for web applications.
http://code.google.com/p/rubycas-client/
Other
332 stars 217 forks source link

fixing rails4 compatibility #69

Open mp-jgoetzinger opened 11 years ago

mp-jgoetzinger commented 11 years ago

hey, as i needed to extend the client a bit and we're working on rails4 i first had to get the specs passing. these are the changes i made. i also had to bump the database_cleaner version to 1.0.1 (which is working with rails4 but all versions > 1.1 currently don't work with sqlite).

i'm going to open another PR for the extension i made to the client. then you can decide if this would be useful for other people as well.

cheers, johannes.

mp-jgoetzinger commented 11 years ago

oh, didn't take care of the .travis configuration. will try to fix it soon (and add rails4)

mp-jgoetzinger commented 10 years ago

oh, almost forgot about that pull request.. sorry for the late answer. as far as i can remember, in rails4 this has been separated into it's own gem as you can see here https://github.com/mp-dhorsak/rubycas-client/blob/f1b17063b824565fef6a6c6259ad484885847042/Appraisals#L19

cheers

cthielen commented 10 years ago

I did my own work fixing up for Rails 4.1 compatibility and this pull request is more or less what I ended up having to do.

activerecord-session_store is required for Rails 4.x compatibility, that feature has been removed from Rails. It works fine in 4.0 and 4.1 but is technically deprecated so supporting single sign out via some other method would be a good idea.

Is there any reason it hasn't been merged?

cthielen commented 10 years ago

I also had to change the ServiceTicketAwareSession class in active_record_ticket_store.rb to use data["service_ticket"], not data[:service_ticket]. Not sure why.

cthielen commented 10 years ago

The documentation is either out-of-date for Rails 4.x or out-of-date generally.

In order to use single sign out you must not only specify enable_single_sign_out but also set :ticket_store => :active_record_ticket_store. One must also create a service_ticket column. None of this is mentioned in the docs!

(Note, I'm putting this here as perhaps the ticket_store requirement only applies to the Rails 4 case, which uses the activerecord-session_store gem, but perhaps not.)

lutinwood commented 10 years ago

Hi ,

Sorry I get lost ! how are we supose to install plugin in rails 4 ?

in rails 3 .X : rails plugin install https://github.com/rubycas/rubycas-client.git.

thanks for any help!

romainbutteaud commented 10 years ago

Thanks @mp-jgoetzinger, it works great for Rails 4.1. Exactly what I needed! @cthielen, your fork works great too. +1 to merge this or @cthielen's.

@lutinwood, you need to use @mp-jgoetzinger's commits to use this gem with Rails 4. You can do that by adding this line gem 'rubycas-client', :git => "https://github.com/mp-dhorsak/rubycas-client" in your Gemfile.

ipstatic commented 10 years ago

Since 4.1 has been released, is there any plans on merging this into master and releasing an updated gem?

romainbutteaud commented 10 years ago

+1 @brodock, @soupmatt, @zuk any updates?

rivsc commented 10 years ago

"mp-dhorsak/rubycas-client" seems to be removed. Any solutions for rails 4.1 apps ?

romainbutteaud commented 10 years ago

@rivsc I made my own fork out of @cthielen that works with Rails 4.1. https://github.com/RomainButteaud/rubycas-client

rivsc commented 10 years ago

@RomainButteaud Thanks for your reply. Finally, I added

gem 'rubycas-client', :git => 'git://github.com/rubycas/rubycas-client.git'

And this in my application_controller :

before_action CASClient::Frameworks::Rails::Filter

I use Rails 4.1.2, It seems to work.

jrochkind commented 9 years ago

Are there any plans to release a version of this gem that works under Rails 4? Is this gem still actively maintained/supported?

zuk commented 9 years ago

I'm not actively involved in the gem anymore, but from what I occasionally see on GitHub and on this mailing list, a number of people are keeping it going. Not sure what the plans are for Rails 4, but hopefully someone else will chime in.

On Sat, Feb 21, 2015 at 1:02 PM, Jonathan Rochkind <notifications@github.com

wrote:

Are there any plans to release a version of this gem that works under Rails 4? Is this gem still actively maintained/supported?

— Reply to this email directly or view it on GitHub https://github.com/rubycas/rubycas-client/pull/69#issuecomment-75383738.

akshaysn1991 commented 7 years ago

environment.rb

CASClient::Frameworks::Rails::Filter.configure( :cas_base_url => "http://localhost:8888/", :enable_single_sign_out => true, :ticket_store => :active_record_ticket_store ) these are my settings. registrations, login are working fine. But I am getting below error when i am signing out. any help would be appreciated NoMethodError (undefined method `ticket_store' for #):