module OmniAuth
Constants
- VERSION
Public Class Methods
config()
click to toggle source
# File lib/omniauth.rb, line 130 def self.config Configuration.instance end
configure() { |config| ... }
click to toggle source
# File lib/omniauth.rb, line 134 def self.configure yield config end
logger()
click to toggle source
# File lib/omniauth.rb, line 138 def self.logger config.logger end
mock_auth_for(provider)
click to toggle source
# File lib/omniauth.rb, line 142 def self.mock_auth_for(provider) config.mock_auth[provider.to_sym] || config.mock_auth[:default] end
strategies()
click to toggle source
# File lib/omniauth.rb, line 20 def self.strategies @strategies ||= [] end
Public Instance Methods
camelize(word, first_letter_in_uppercase = true)
click to toggle source
# File lib/omniauth.rb, line 168 def camelize(word, first_letter_in_uppercase = true) return OmniAuth.config.camelizations[word.to_s] if OmniAuth.config.camelizations[word.to_s] if first_letter_in_uppercase word.to_s.gsub(%r{/(.?)}) { '::' + Regexp.last_match[1].upcase }.gsub(/(^|_)(.)/) { Regexp.last_match[2].upcase } else camelize(word).tap { |w| w[0] = w[0].downcase } end end
deep_merge(hash, other_hash)
click to toggle source
# File lib/omniauth.rb, line 153 def deep_merge(hash, other_hash) target = hash.dup other_hash.each_key do |key| if other_hash[key].is_a?(::Hash) && hash[key].is_a?(::Hash) target[key] = deep_merge(target[key], other_hash[key]) next end target[key] = other_hash[key] end target end