<commit_before>OmniAuth.config.logger = Rails.logger

module OmniAuth
  module Strategies
    autoload :Fluenta, 'fluenta_strategy'
  end
end

Devise.setup do |config|
  if rconfig = Rails.configuration.jobsworth.omniauth
    app_id  = rconfig.fluenta.app_id
    secret  = rconfig.fluenta.secret
    site    = rconfig.fluenta.site

    config.omniauth :fluenta, app_id, secret, client_options: {site: site}
  end
end
<commit_msg>Prevent devise to override the custom omniauth paths<commit_after>OmniAuth.config.logger = Rails.logger

module OmniAuth
  module Strategies
    autoload :Fluenta, 'fluenta_strategy'
  end
end

Devise.setup do |config|
  if rconfig = Rails.configuration.jobsworth.omniauth
    app_id  = rconfig.fluenta.app_id
    secret  = rconfig.fluenta.secret
    site    = rconfig.fluenta.site

    # TODO This is a HACK to prevent devise to override the custom omniauth
    # paths
    config.omniauth :fluenta, app_id, secret, client_options: {site: site},
                    request_path:  "#{ENV['RAILS_RELATIVE_URL_ROOT']}/users/auth/fluenta",
                    callback_path: "#{ENV['RAILS_RELATIVE_URL_ROOT']}/users/auth/fluenta/callback"
  end
end

{'fraction_non_alphanumeric': 0.08758503401360544, 'fraction_numerical': 0.0, 'mean_word_length': 3.562015503875969, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '137683', 'n_tokens_mistral': 421, 'n_tokens_neox': 391, 'n_words': 89}