<commit_before>module ActionDispatch::Routing
  class Mapper
    # Includes mount_opro_oauth method for routes. This method is responsible to
    # generate all needed routes for oauth
    def mount_opro_oauth(options = {})
      skip_routes = options[:except].is_a?(Array) ? options[:except] : [options[:except]]
      controllers = options[:controllers] || {}

      match 'oauth/new'          => 'opro/oauth/auth#new',          :as => 'oauth_new'
      match 'oauth/authorize'    => 'opro/oauth/auth#create',       :as => 'oauth_authorize'
      match 'oauth/token'        => 'opro/oauth/token#create',      :as => 'oauth_token'

      unless skip_routes.include?(:client_apps)
        oauth_client_apps = controllers[:oauth_client_apps]||'opro/oauth/client_app'
        resources :oauth_client_apps, :controller => oauth_client_apps
      end
      unless skip_routes.include?(:docs)
        oauth_docs = controllers[:oauth_docs]||'opro/oauth/docs'
        resources :oauth_docs,        :controller => oauth_docs, :only => [:index, :show]
      end
      unless skip_routes.include?(:tests)
        oauth_tests = controllers[:oauth_tests]      ||'opro/oauth/tests'
        resources :oauth_tests,       :controller => oauth_tests, :only => [:index, :show, :create, :destroy]
      end
    end
  end
end
<commit_msg>whitespace<commit_after>module ActionDispatch::Routing
  class Mapper
    # Includes mount_opro_oauth method for routes. This method is responsible to
    # generate all needed routes for oauth
    def mount_opro_oauth(options = {})
      skip_routes = options[:except].is_a?(Array) ? options[:except] : [options[:except]]
      controllers = options[:controllers] || {}

      match 'oauth/new'          => 'opro/oauth/auth#new',          :as => 'oauth_new'
      match 'oauth/authorize'    => 'opro/oauth/auth#create',       :as => 'oauth_authorize'
      match 'oauth/token'        => 'opro/oauth/token#create',      :as => 'oauth_token'

      unless skip_routes.include?(:client_apps)
        oauth_client_apps = controllers[:oauth_client_apps] ||'opro/oauth/client_app'
        resources :oauth_client_apps, :controller => oauth_client_apps
      end
      unless skip_routes.include?(:docs)
        oauth_docs = controllers[:oauth_docs] ||'opro/oauth/docs'
        resources :oauth_docs,        :controller => oauth_docs, :only => [:index, :show]
      end
      unless skip_routes.include?(:tests)
        oauth_tests = controllers[:oauth_tests] ||'opro/oauth/tests'
        resources :oauth_tests,       :controller => oauth_tests, :only => [:index, :show, :create, :destroy]
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.128419452887538, 'fraction_numerical': 0.0, 'mean_word_length': 3.139937106918239, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 25, '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': '323013', 'n_tokens_mistral': 846, 'n_tokens_neox': 833, 'n_words': 166}