Sha256: 800125082a1374d9a6cfc33365e47e76e8610d2d693fb65344252d2024e99ffb

Contents?: true

Size: 794 Bytes

Versions: 97

Compression:

Stored size: 794 Bytes

Contents

module CC
  class Config
    module Validation
      class PrepareValidator
        include HashValidations

        attr_reader :errors, :warnings

        def initialize(data)
          @data = data

          @errors = []
          @warnings = []

          validate
        end

        private

        attr_reader :data

        def validate
          return unless validate_key_type("fetch", Array)

          data.fetch("fetch", []).each do |fetch_data|
            validator = FetchValidator.new(fetch_data)
            validator.errors.each do |msg|
              errors << msg
            end
            validator.warnings.each do |msg|
              warnings << msg
            end
          end

          warn_unrecognized_keys(%w[fetch])
        end
      end
    end
  end
end

Version data entries

97 entries across 97 versions & 2 rubygems

Version Path
codeclimate-fede-0.85.38 lib/cc/config/validation/prepare_validator.rb
codeclimate-fede-0.85.37 lib/cc/config/validation/prepare_validator.rb
codeclimate-fede-0.85.36 lib/cc/config/validation/prepare_validator.rb
codeclimate-fede-0.85.35 lib/cc/config/validation/prepare_validator.rb
codeclimate-fede-0.85.33 lib/cc/config/validation/prepare_validator.rb
codeclimate-fede-0.85.32 lib/cc/config/validation/prepare_validator.rb
codeclimate-fede-0.85.31 lib/cc/config/validation/prepare_validator.rb
codeclimate-fede-0.85.30 lib/cc/config/validation/prepare_validator.rb
codeclimate-fede-0.85.21 lib/cc/config/validation/prepare_validator.rb
codeclimate-fede-0.85.24 lib/cc/config/validation/prepare_validator.rb
codeclimate-fede-0.85.23 lib/cc/config/validation/prepare_validator.rb
codeclimate-0.85.23 lib/cc/config/validation/prepare_validator.rb
codeclimate-0.85.22 lib/cc/config/validation/prepare_validator.rb
codeclimate-0.85.21 lib/cc/config/validation/prepare_validator.rb
codeclimate-0.85.19 lib/cc/config/validation/prepare_validator.rb
codeclimate-0.85.18 lib/cc/config/validation/prepare_validator.rb
codeclimate-0.85.17 lib/cc/config/validation/prepare_validator.rb
codeclimate-0.85.15 lib/cc/config/validation/prepare_validator.rb
codeclimate-0.85.14 lib/cc/config/validation/prepare_validator.rb
codeclimate-0.85.13 lib/cc/config/validation/prepare_validator.rb