Sha256: deed9eb7007b7b42be8170722f0f3c4bd5ab0f711f33e9da6c3437d25161c290

Contents?: true

Size: 755 Bytes

Versions: 4

Compression:

Stored size: 755 Bytes

Contents

require 'logger'

module CodeClimate
  module TestReporter
    @@configuration = nil

    def self.configure
      @@configuration = Configuration.new

      if block_given?
        yield configuration
      end

      configuration
    end

    def self.configuration
      @@configuration || configure
    end

    class Configuration
      attr_accessor :branch, :logger, :profile, :path_prefix, :gzip_request

      def initialize
        @gzip_request = true
      end

      def logger
        @logger ||= default_logger
      end

      def profile
        @profile ||= "test_frameworks"
      end

      private

      def default_logger
        log = Logger.new($stderr)
        log.level = Logger::INFO

        log
      end
    end

  end
end

Version data entries

4 entries across 2 versions & 2 rubygems

Version Path
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.0/lib/code_climate/test_reporter/configuration.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/codeclimate-test-reporter-0.4.0/lib/code_climate/test_reporter/configuration.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/codeclimate-test-reporter-0.4.0/lib/code_climate/test_reporter/configuration.rb
codeclimate-test-reporter-0.4.0 lib/code_climate/test_reporter/configuration.rb