Skip to content
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

Ensure Rails responds to logger #426

Merged

Conversation

tily
Copy link
Contributor

@tily tily commented Dec 11, 2017

Summary

  • Rails module will not always respond to logger
  • OneLogin::RubySaml::Logging#logger should check if Rails redponds to logger before calling it

How to reproduce

$ cat Gemfile
source 'https://rubygems.org'
gem 'omniauth-saml'
gem 'kaminari-sinatra'

$ cat test.rb 
Bundler.require
logging = OneLogin::RubySaml::Logging
logging.logger

$ bundle install
$ bundle exec ruby test.rb
/usr/local/bundle/gems/ruby-saml-1.6.0/lib/onelogin/ruby-saml/logging.rb:10:in `logger': undefined method `logger' for Rails:Module (NoMethodError)
        from test.rb:3:in `<main>'

@pitbulk pitbulk merged commit 8bca922 into SAML-Toolkits:master Dec 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants