-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixing rails4 compatibility #69
base: master
Are you sure you want to change the base?
Conversation
oh, didn't take care of the .travis configuration. will try to fix it soon (and add rails4) |
|
||
# wrapper around ActionDispatch::Session::ActiveRecordStore | ||
# as ActiveRecord::SessionStore.session_class doesn't exist in rails4 | ||
module ActiveRecord |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to be working as intended? Unless I'm missing something.
NoMethodError - undefined method `session_class' for ActiveRecord::SessionStore:Module:
() Users/altonymous/.rvm/gems/ruby-2.0.0-p353@client/bundler/gems/rubycas-client-f1b17063b824/lib/casclient/tickets/storage.rb:32:in `get_session_for_service_ticket'
() Users/altonymous/.rvm/gems/ruby-2.0.0-p353@client/bundler/gems/rubycas-client-f1b17063b824/lib/casclient/tickets/storage.rb:13:in `process_single_sign_out'
() Users/altonymous/.rvm/gems/ruby-2.0.0-p353@client/bundler/gems/rubycas-client-f1b17063b824/lib/casclient/frameworks/rails/filter.rb:300:in `single_sign_out'
() Users/altonymous/.rvm/gems/ruby-2.0.0-p353@client/bundler/gems/rubycas-client-f1b17063b824/lib/casclient/frameworks/rails/filter.rb:28:in `filter'
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 |
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? |
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. |
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.) |
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! |
Thanks @mp-jgoetzinger, it works great for Rails 4.1. Exactly what I needed! @cthielen, your fork works great too. @lutinwood, you need to use @mp-jgoetzinger's commits to use this gem with Rails 4. You can do that by adding this line |
Since 4.1 has been released, is there any plans on merging this into master and releasing an updated gem? |
"mp-dhorsak/rubycas-client" seems to be removed. Any solutions for rails 4.1 apps ? |
@romainbutteaud Thanks for your reply. Finally, I added
And this in my application_controller :
I use Rails 4.1.2, It seems to work. |
Are there any plans to release a version of this gem that works under Rails 4? Is this gem still actively maintained/supported? |
I'm not actively involved in the gem anymore, but from what I occasionally On Sat, Feb 21, 2015 at 1:02 PM, Jonathan Rochkind <[email protected]
|
environment.rbCASClient::Frameworks::Rails::Filter.configure( |
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.