<commit_before>module Spree
  module Admin
    class AuthenticationMethodsController < ResourceController
<commit_msg>No need to restart the application after configuring or updating an authentication method<commit_after>module Spree
  module Admin
    class AuthenticationMethodsController < ResourceController
      create.after :update_oauth_method
      update.after :update_oauth_method

      private

      def update_oauth_method
        auth_method = params[:authentication_method]
        if auth_method[:active] == "true" && auth_method[:environment] == ::Rails.env
          Devise.setup do |config|
            config.omniauth auth_method[:provider], auth_method[:api_key], auth_method[:api_secret]
          end
        end
      end
{'fraction_non_alphanumeric': 0.0642570281124498, 'fraction_numerical': 0.0, 'mean_word_length': 3.6459627329192545, 'pattern_counts': {'":': 0, '<': 5, '<?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': '677801', 'n_tokens_mistral': 190, 'n_tokens_neox': 186, 'n_words': 50}