Sha256: 888480d6b588472133fe2bfad7a5b6e76b72ee38a8500c722bcf793b41e508b1

Contents?: true

Size: 687 Bytes

Versions: 6

Compression:

Stored size: 687 Bytes

Contents

# encoding: utf-8
# author: Dominik Richter
# author: Christoph Hartmann

require 'inspec/plugins'
require 'utils/plugin_registry'

module Inspec
  # Pre-checking of target resolution. Make sure that SourceReader plugins
  # always receive a fetcher.
  class SourceReaderRegistry < PluginRegistry
    def resolve(target)
      return nil if target.nil?
      super(target)
    end
  end

  SourceReader = SourceReaderRegistry.new

  def self.source_reader(version)
    if version != 1
      raise 'Only source readers version 1 is supported!'
    end
    Inspec::Plugins::SourceReader
  end
end

require 'source_readers/inspec'
require 'source_readers/flat'

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
inspec-2.1.81 lib/inspec/source_reader.rb
inspec-2.1.21 lib/inspec/source_reader.rb
inspec-2.1.10 lib/inspec/source_reader.rb
inspec-2.0.32 lib/inspec/source_reader.rb
inspec-2.0.17 lib/inspec/source_reader.rb
inspec-1.51.15 lib/inspec/source_reader.rb