Sha256: 48f99ac42f9676e295ca0262ea22429661dc7b8513663944f9e16e1c30209439

Contents?: true

Size: 549 Bytes

Versions: 6

Compression:

Stored size: 549 Bytes

Contents

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

module Fetchers
  class Mock < Inspec.fetcher(1)
    name 'mock'
    priority 0

    def self.resolve(target)
      return nil unless target.is_a? Hash
      new(target)
    end

    def initialize(data)
      @data = data
    end

    def fetch(_path)
      archive_path
    end

    def archive_path
      { mock: @data }
    end

    def resolved_source
      { mock_fetcher: true }
    end

    def cache_key
      ''
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

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