Module: Inspec

Defined in:
lib/inspec/runner.rb,
lib/inspec/log.rb,
lib/inspec/rule.rb,
lib/inspec/shell.rb,
lib/inspec/expect.rb,
lib/inspec/backend.rb,
lib/inspec/fetcher.rb,
lib/inspec/objects.rb,
lib/inspec/plugins.rb,
lib/inspec/profile.rb,
lib/inspec/version.rb,
lib/utils/base_cli.rb,
lib/inspec/describe.rb,
lib/inspec/metadata.rb,
lib/inspec/resource.rb,
lib/inspec/plugins/cli.rb,
lib/inspec/runner_mock.rb,
lib/inspec/objects/list.rb,
lib/inspec/objects/test.rb,
lib/inspec/runner_rspec.rb,
lib/inspec/objects/value.rb,
lib/inspec/source_reader.rb,
lib/inspec/objects/control.rb,
lib/inspec/objects/or_test.rb,
lib/inspec/plugins/fetcher.rb,
lib/inspec/profile_context.rb,
lib/inspec/plugins/resource.rb,
lib/inspec/objects/each_loop.rb,
lib/inspec/objects/ruby_helper.rb,
lib/inspec/plugins/source_reader.rb

Overview

There be dragons!! Or borgs, or something… This file and all its contents cannot be unit-tested. both test-suits collide and disable all unit tests that have been added.

Defined Under Namespace

Modules: Archive, Backend, DSL, Plugins, Resources, RubyHelper Classes: BaseCLI, Control, DescribeBase, EachLoop, Expect, InspecCLI, List, Log, Metadata, NoSummaryFormatter, OrTest, PluginCtl, Profile, ProfileContext, RSpecReporter, Resource, Rule, Runner, RunnerMock, RunnerRspec, Shell, SourceReaderRegistry, Test, Value

Constant Summary collapse

Fetcher =
PluginRegistry.new
VERSION =
'0.22.1'.freeze
SourceReader =
SourceReaderRegistry.new

Class Method Summary collapse

Class Method Details

.fetcher(version) ⇒ Object



11
12
13
14
15
16
# File 'lib/inspec/fetcher.rb', line 11

def self.fetcher(version)
  if version != 1
    fail 'Only fetcher version 1 is supported!'
  end
  Inspec::Plugins::Fetcher
end

.resource(version) ⇒ Resource

Retrieve the base class for creating a new resource. Create classes that inherit from this class.

Parameters:

  • version (int)

    the resource version to use

Returns:

  • (Resource)

    base class for creating a new resource



43
44
45
46
47
48
# File 'lib/inspec/resource.rb', line 43

def self.resource(version)
  if version != 1
    fail 'Only resource version 1 is supported!'
  end
  Inspec::Plugins::Resource
end

.source_reader(version) ⇒ Object



23
24
25
26
27
28
# File 'lib/inspec/source_reader.rb', line 23

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