module OmniAuth::Utils

def camelize(word, first_letter_in_uppercase = true)

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

def deep_merge(hash, other_hash)

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

def form_css

def form_css
  "<style type='text/css'>#{OmniAuth.config.form_css}</style>"
end