inspec-containerd-docs 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 8317beeaf0e084478957e42680e112d0aaef220c7a728498798411a1acd51928
4
+ data.tar.gz: 015f3c3cb7948affd4d9a0924dd73b53d7a80bcd0c0d881fc5ef5ffb401bf3fc
5
+ SHA512:
6
+ metadata.gz: a3c32082172b61884e623a598e75de33fdb9c04ea39fdd4a4c5da9f37eba112d453e1d97471706d1ef8320b6276b4d2276671663865a6acf8564a6474902192a
7
+ data.tar.gz: d26d4949e246325c7a179365ec402dc5670ad0e7b2c3595a016a0b6206604e8f5121dead52414c929938bedd609d25048106a3a3cb3a6b37b33dac40de876f1d
data/Gemfile ADDED
@@ -0,0 +1,15 @@
1
+ # encoding: utf-8
2
+ source "https://rubygems.org"
3
+
4
+ gemspec
5
+
6
+ gem "inspec-bin"
7
+
8
+ group :development do
9
+ gem "chefstyle", "0.13.0"
10
+ gem "m"
11
+ gem "bundler"
12
+ gem "minitest"
13
+ gem "rake"
14
+ gem "rubocop"
15
+ end
data/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # inspec-containerd-docs
2
+
3
+ InSpec plugin to retrieve Test Kitchen data as inputs.
4
+
5
+ ## Use Case
6
+
7
+ In some cases you want to get info about the Test Kitchen environment that
8
+ your InSpec verifier is running in. This plugin offers some insight into
9
+ instance name, platform name and suite name.
10
+
11
+ ## Installation
12
+
13
+ Simply execute `inspec plugin install inspec-containerd-docs`, which will get
14
+ the plugin from RubyGems and install/register it with InSpec.
15
+
16
+ You can verify successful installation via `inspec plugin list`
17
+
18
+ ## Usage
19
+
20
+ You have three input names available:
21
+ - KITCHEN_INSTANCE_NAME ('default-amazon2')
22
+ - KITCHEN_SUITE_NAME ('default')
23
+ - KITCHEN_PLATFORM_NAME ('amazon2')
24
+
25
+ Use them in your InSpec tests like this:
26
+
27
+ ```ruby
28
+ instance_name = input('KITCHEN_INSTANCE_NAME')
29
+
30
+ describe file("/etc/#{instance_name}") do
31
+ it { should exist }
32
+ end
33
+ ```
@@ -0,0 +1,39 @@
1
+ # coding: utf-8
2
+
3
+ # As plugins are usually packaged and distributed as a RubyGem,
4
+ # we have to provide a .gemspec file, which controls the gembuild
5
+ # and publish process. This is a fairly generic gemspec.
6
+
7
+ # It is traditional in a gemspec to dynamically load the current version
8
+ # from a file in the source tree. The next three lines make that happen.
9
+ lib = File.expand_path("../lib", __FILE__)
10
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
11
+ require "inspec-containerd-docs/version"
12
+
13
+ Gem::Specification.new do |spec|
14
+ # Importantly, all InSpec plugins must be prefixed with `inspec-` (most
15
+ # plugins) or `train-` (plugins which add new connectivity features).
16
+ spec.name = "inspec-containerd-docs"
17
+
18
+ # It is polite to namespace your plugin under InspecPlugins::YourPluginInCamelCase
19
+ spec.version = InspecPlugins::ContainerdDocs::VERSION
20
+ spec.authors = ["Ian Brinkerhoff"]
21
+ spec.email = ["ianbrink10@gmail.com"]
22
+ spec.summary = "InSpec plugin"
23
+ spec.description = "Containerd Support"
24
+ spec.homepage = "https://github.com/tecracer-theinen/inspec-containerd-docs"
25
+ spec.license = "Apache-2.0"
26
+
27
+ # Though complicated-looking, this is pretty standard for a gemspec.
28
+ # It just filters what will actually be packaged in the gem (leaving
29
+ # out tests, etc)
30
+ spec.files = %w{
31
+ README.md inspec-containerd-docs.gemspec Gemfile
32
+ } + Dir.glob(
33
+ "lib/**/*", File::FNM_DOTMATCH
34
+ ).reject { |f| File.directory?(f) }
35
+ spec.require_paths = ["lib"]
36
+
37
+ spec.add_development_dependency "bump", "~> 0.8"
38
+ spec.add_development_dependency "minitest", "~> 5.11"
39
+ end
@@ -0,0 +1,9 @@
1
+ # lib/inspec-containerd-docs/cli.rb
2
+
3
+ module InspecPlugin::ContainerdDocs
4
+ # Class name doesn't matter, but this is a reasonable default name
5
+ class CliCommand < Inspec.plugin(2, :cli_command) # Note two-arg form
6
+ # Implement API or use DSL as dictated by cli_command plugin type
7
+ # ...
8
+ end
9
+ end
@@ -0,0 +1,25 @@
1
+ # encoding: UTF-8
2
+
3
+ # Plugin Definition file
4
+ # The purpose of this file is to declare to InSpec what plugin_types (capabilities)
5
+ # are included in this plugin, and provide hooks that will load them as needed.
6
+
7
+ # It is important that this file load successfully and *quickly*.
8
+ # Your plugin's functionality may never be used on this InSpec run; so we keep things
9
+ # fast and light by only loading heavy things when they are needed.
10
+
11
+ require "inspec-containerd-docs/version"
12
+ module InspecPlugins
13
+ module ContainerdDocs
14
+ class Plugin < ::Inspec.plugin(2)
15
+ # Internal machine name of the plugin. InSpec will use this in errors, etc.
16
+ plugin_name :'inspec-containerd-docs'
17
+
18
+ # Define an Input plugin type.
19
+ cli_command :'containerd' do
20
+ require_relative 'cli'
21
+ InspecPlugins::ContainerdDocs::CliCommand
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,10 @@
1
+ # encoding: UTF-8
2
+
3
+ # This file simply makes it easier for CI engines to update
4
+ # the version stamp, and provide a clean way for the gemspec
5
+ # to learn the current version.
6
+ module InspecPlugins
7
+ module ContainerdDocs
8
+ VERSION = "0.1.0".freeze
9
+ end
10
+ end
@@ -0,0 +1,4 @@
1
+ libdir = File.dirname(__FILE__)
2
+ $LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
3
+
4
+ require "inspec-containerd-docs/plugin"
metadata ADDED
@@ -0,0 +1,78 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: inspec-containerd-docs
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Ian Brinkerhoff
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-10-18 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bump
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.8'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.8'
27
+ - !ruby/object:Gem::Dependency
28
+ name: minitest
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '5.11'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '5.11'
41
+ description: Containerd Support
42
+ email:
43
+ - ianbrink10@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - Gemfile
49
+ - README.md
50
+ - inspec-containerd-docs.gemspec
51
+ - lib/inspec-containerd-docs.rb
52
+ - lib/inspec-containerd-docs/cli.rb
53
+ - lib/inspec-containerd-docs/plugin.rb
54
+ - lib/inspec-containerd-docs/version.rb
55
+ homepage: https://github.com/tecracer-theinen/inspec-containerd-docs
56
+ licenses:
57
+ - Apache-2.0
58
+ metadata: {}
59
+ post_install_message:
60
+ rdoc_options: []
61
+ require_paths:
62
+ - lib
63
+ required_ruby_version: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ required_rubygems_version: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: '0'
73
+ requirements: []
74
+ rubygems_version: 3.3.26
75
+ signing_key:
76
+ specification_version: 4
77
+ summary: InSpec plugin
78
+ test_files: []