diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb deleted file mode 100644 index adc6568ce..000000000 --- a/config/initializers/filter_parameter_logging.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Configure parameters to be filtered from the log file. Use this to limit dissemination of -# sensitive information. See the ActiveSupport::ParameterFilter documentation for supported -# notations and behaviors. -Rails.application.config.filter_parameters += [ - :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn -] diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb deleted file mode 100644 index 3860f659e..000000000 --- a/config/initializers/inflections.rb +++ /dev/null @@ -1,16 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new inflection rules using the following format. Inflections -# are locale specific, and you may define rules for as many different -# locales as you wish. All of these examples are active by default: -# ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.plural /^(ox)$/i, "\\1en" -# inflect.singular /^(ox)en/i, "\\1" -# inflect.irregular "person", "people" -# inflect.uncountable %w( fish sheep ) -# end - -# These inflection rules are supported but not enabled by default: -# ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.acronym "RESTful" -# end diff --git a/lib/obs.rb b/lib/obs.rb index 86c62b1e7..4383f3e28 100644 --- a/lib/obs.rb +++ b/lib/obs.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'faraday' - # HTTP OBS client for searches module OBS # Error class for unsupported search terms @@ -120,13 +118,9 @@ def self.configure yield(@configuration) if block_given? self.client = Faraday.new(@configuration.api_host) do |conn| - conn.basic_auth @configuration.api_username, @configuration.api_password - conn.request :url_encoded - conn.response :logger, Rails.logger, headers: false + conn.request :authorization, :basic, @configuration.api_username, @configuration.api_password conn.response :mashify, mash_class: Response - conn.response :raise_error - conn.use FaradayMiddleware::ParseXml, content_type: /\bxml$/ - conn.adapter @configuration.adapter + conn.response :xml conn.headers['User-Agent'] = 'software.o.o' conn.headers['X-Username'] = @configuration.api_username @@ -140,11 +134,7 @@ def self.client # HTTP client configuration wrapper class Configuration - attr_accessor :api_host, :api_username, :api_password, :opensuse_cookie, :adapter - - def initialize - @adapter = Faraday.default_adapter - end + attr_accessor :api_host, :api_username, :api_password, :opensuse_cookie end # Searches for published binaries