Skip to content

Commit

Permalink
Change Inspec to InSpec where appropriate (#3494)
Browse files Browse the repository at this point in the history
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
  • Loading branch information
jerryaldrichiii authored and clintoncwolfe committed Oct 15, 2018
1 parent 8b4724d commit 0b0a0a4
Show file tree
Hide file tree
Showing 35 changed files with 81 additions and 77 deletions.
4 changes: 2 additions & 2 deletions GITHUB_LABELS.md
@@ -1,4 +1,4 @@
# Inspec Project GitHub Labeling Policies
# InSpec Project GitHub Labeling Policies

## Stakes

Expand All @@ -24,7 +24,7 @@ The colors don't mean anything at this point; we've generally just accepted the

Currently, we have one anti-goal:

* Do not indicate priority or timeline information via labelling. That's high-stakes, and quickly becomes out of date. The Inspec team internally tracks its Chef, Inc. priorities; all other issues may be addressed on an as-needed, FOSS basis.
* Do not indicate priority or timeline information via labelling. That's high-stakes, and quickly becomes out of date. The InSpec team internally tracks its Chef, Inc. priorities; all other issues may be addressed on an as-needed, FOSS basis.

### For Machines

Expand Down
4 changes: 2 additions & 2 deletions docs/dev/integration-testing.md
Expand Up @@ -2,7 +2,7 @@

## Introduction

Inspec uses Test Kitchen for its integration testing. Our current testing uses Docker as our backend. You should install and have Docker running befor you run any tests.
InSpec uses Test Kitchen for its integration testing. Our current testing uses Docker as our backend. You should install and have Docker running befor you run any tests.

### How to run specific integrations

Expand All @@ -17,7 +17,7 @@ Example:
bundle exec rake test:integration[default-ubuntu-1604]
```

# Inspec Integrations
# InSpec Integrations

### Test Kitchen

Expand Down
6 changes: 3 additions & 3 deletions docs/dev/plugins.md
Expand Up @@ -256,7 +256,7 @@ module InspecPlugins::Sweeten
end
```

The Inspec plugin v2 system promises the following:
The InSpec plugin v2 system promises the following:

* The superclass will be an (indirect) subclass of Thor
* The plugin system will handle registering the subcommand with Thor for you
Expand All @@ -266,7 +266,7 @@ The Inspec plugin v2 system promises the following:

Within your `cli.rb`, you need to do two things:

* Inform Inspec of your subcommand's usage and description, so the `help` commands will work properly
* Inform InSpec of your subcommand's usage and description, so the `help` commands will work properly
* Implement your subcommands and options using the Thor DSL

See also: [Thor homepage](http://whatisthor.com/) and [Thor docs](https://www.rubydoc.info/github/wycats/thor/Thor).
Expand Down Expand Up @@ -320,4 +320,4 @@ no_command do
@bevvy
end
end
```
```
2 changes: 1 addition & 1 deletion docs/resources/aws_security_group.md.erb
Expand Up @@ -222,7 +222,7 @@ A Number totalling the number of individual rules defined - It is a sum of the c

A String in the format 'vpc-' followed by 8 hexadecimal characters reflecting VPC that contains the Security Group.

# Inspec the VPC ID of a particular Group
# Inspect the VPC ID of a particular Group
describe aws_security_group('sg-12345678') do
its('vpc_id') { should cmp 'vpc-12345678' }
end
Expand Down
6 changes: 3 additions & 3 deletions docs/resources/azure_generic_resource.md.erb
Expand Up @@ -6,7 +6,7 @@ title: About the azure_generic_resource Resource

<p class="warning">This resource is deprecated and should not be used. It will be removed in InSpec 3.0.</p>

Use the `azure_generic_resource` InSpec audit resource to test any valid Azure Resource. This is very useful if you need to test something that we do not yet have a specific Inspec resource for.
Use the `azure_generic_resource` InSpec audit resource to test any valid Azure Resource. This is very useful if you need to test something that we do not yet have a specific InSpec resource for.

## Availability

Expand Down Expand Up @@ -98,7 +98,7 @@ When the options have been set as well as the environment variables, the environ

The properties that can be tested are entirely dependent on the Azure Resource that is under scrutiny. That means the properties vary. The best way to see what is available please use the [Azure Resources Portal](https://resources.azure.com) to select the resource you are interested in and see what can be tested.

This resource allows you to test _any_ valid Azure Resource. The trade off for this is that the language to check each item is not as natural as it would be for a native Inspec resource.
This resource allows you to test _any_ valid Azure Resource. The trade off for this is that the language to check each item is not as natural as it would be for a native InSpec resource.

<br>

Expand Down Expand Up @@ -180,4 +180,4 @@ This InSpec audit resource has the following special matchers. For a full list o

Please see the integration tests for in depth examples of how this resource can be used.

[Inspec Integration Tests for Azure Generic Resources](https://github.com/chef/inspec/tree/master/test/integration/azure/verify/controls)
[InSpec Integration Tests for Azure Generic Resources](https://github.com/chef/inspec/tree/master/test/integration/azure/verify/controls)
2 changes: 1 addition & 1 deletion docs/resources/azure_virtual_machine.md.erb
Expand Up @@ -262,7 +262,7 @@ If boot diagnostics are enabled for the machine they will be saved in a storage

There are a number of built in comparison operators that are available to test the result with an expected value.

For information on all that are available please refer to the [Inspec Matchers Reference](https://www.inspec.io/docs/reference/matchers/) page.
For information on all that are available please refer to the [InSpec Matchers Reference](https://www.inspec.io/docs/reference/matchers/) page.

### boot\_diagnostics?

Expand Down
12 changes: 6 additions & 6 deletions docs/resources/registry_key.md.erb
Expand Up @@ -170,24 +170,24 @@ Any name with a dot will not work as expected: <code>its('explorer.exe') { shoul
# ...or provide the name in an array
its(['explorer.exe']) { should eq 'test' }

The latter workaround may be preferable because upon failure, Inspec will present the expected and actual values:
The latter workaround may be preferable because upon failure, InSpec will present the expected and actual values:

inspec> describe registry_key('HKEY_USERS\S-1-5-20\Software\Policies\Microsoft\Windows\Control Panel\Desktop') do
inspec> its(["SCRNSAVE.EXE"]) { should eq "FlyingToasters.scr" }
inspec> end

Profile: inspec-shell
Version: (not specified)

Registry Key HKEY_USERS\S-1-5-20\Software\Policies\Microsoft\Windows\Control Panel\Desktop
× ["SCRNSAVE.EXE"] should eq "FlyingToasters.scr"

expected: "FlyingToasters.scr"
got: "scrnsave.scr"

(compared using ==)


Test Summary: 0 successful, 1 failure, 0 skipped

`have_property_value` only presents a false assertion:
Expand Down
2 changes: 1 addition & 1 deletion examples/profile/controls/gordon.rb
Expand Up @@ -17,7 +17,7 @@
tag 'gordon'
ref 'Gordon Requirements 1.0', uri: 'http://...'

# Test using the custom gordon_config Inspec resource
# Test using the custom gordon_config InSpec resource
# Find the resource content here: ../libraries/
describe gordon_config do
it { should exist }
Expand Down
2 changes: 1 addition & 1 deletion lib/bundles/inspec-supermarket/cli.rb
Expand Up @@ -69,6 +69,6 @@ def info(profile)
end
end

# register the subcommand to Inspec CLI registry
# register the subcommand to InSpec CLI registry
Inspec::Plugins::CLI.add_subcommand(SupermarketCLI, 'supermarket', 'supermarket SUBCOMMAND ...', 'Supermarket commands', {})
end
2 changes: 1 addition & 1 deletion lib/inspec/cli.rb
Expand Up @@ -305,7 +305,7 @@ def run_command(opts)
ctl = Inspec::PluginCtl.new
ctl.list.each { |x| ctl.load(x) }

# load v1 CLI plugins before the Inspec CLI has been started
# load v1 CLI plugins before the InSpec CLI has been started
Inspec::Plugins::CLI.subcommands.each { |_subcommand, params|
Inspec::InspecCLI.register(
params[:klass],
Expand Down
2 changes: 1 addition & 1 deletion lib/inspec/secrets/yaml.rb
Expand Up @@ -24,7 +24,7 @@ def initialize(target)
@attributes = nil
end
rescue => e
raise "Error reading Inspec attributes: #{e}"
raise "Error reading InSpec attributes: #{e}"
end
end
end
4 changes: 2 additions & 2 deletions lib/plugins/inspec-artifact/lib/inspec-artifact/base.rb
Expand Up @@ -87,7 +87,7 @@ def read_profile_metadata(path_to_profile)
p = Pathname.new(path_to_profile)
p = p.join('inspec.yml')
if not p.exist?
raise "#{path_to_profile} doesn't appear to be a valid Inspec profile"
raise "#{path_to_profile} doesn't appear to be a valid InSpec profile"
end
yaml = YAML.load_file(p.to_s)
yaml = yaml.to_hash
Expand All @@ -101,7 +101,7 @@ def read_profile_metadata(path_to_profile)
end
rescue => e
# rewrap it and pass it up to the CLI
raise "Error reading Inspec profile metadata: #{e}"
raise "Error reading InSpec profile metadata: #{e}"
end

yaml
Expand Down
6 changes: 3 additions & 3 deletions lib/plugins/inspec-artifact/lib/inspec-artifact/cli.rb
Expand Up @@ -12,7 +12,7 @@
#
#
# .IAF file format
# .iaf = "Inspec Artifact File", easy to rename if you'd like something more appropriate.
# .iaf = "InSpec Artifact File", easy to rename if you'd like something more appropriate.
# The iaf file wraps a binary artifact with some metadata. The first implementation
# looks like this:
#
Expand Down Expand Up @@ -62,8 +62,8 @@
# private keys. We should establish a common key directory (similar to /hab/cache/keys
# or ~/.hab/cache/keys in Habitat).
#
# Extracting artifacts outside of Inspec
# As in Habitat, the artifact format for Inspec allows the use of common
# Extracting artifacts outside of InSpec
# As in Habitat, the artifact format for InSpec allows the use of common
# Unix tools to read the header and body of an artifact.
# To extract the header from a .iaf:
# sed '/^$/q' foo.iaf
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/inspec-compliance/lib/inspec-compliance/cli.rb
Expand Up @@ -260,7 +260,7 @@ def loggedin(config)
end
end

# register the subcommand to Inspec CLI registry
# register the subcommand to InSpec CLI registry
# Inspec::Plugins::CLI.add_subcommand(InspecPlugins::ComplianceCLI, 'compliance', 'compliance SUBCOMMAND ...', 'Chef InspecPlugins::Compliance commands', {})
end
end
2 changes: 1 addition & 1 deletion lib/resources/aws/aws_iam_user.rb
Expand Up @@ -97,7 +97,7 @@ def fetch_from_api
mfa_info = backend.list_mfa_devices(user_name: username)
@has_mfa_enabled = !mfa_info.mfa_devices.empty?

# TODO: consider returning Inspec AwsIamAccessKey objects
# TODO: consider returning InSpec AwsIamAccessKey objects
@access_keys = backend.list_access_keys(user_name: username).access_key_metadata
# If the above call fails, we get nil here; but we promise access_keys will be an array.
@access_keys ||= []
Expand Down
2 changes: 1 addition & 1 deletion lib/resources/azure/azure_generic_resource.rb
Expand Up @@ -8,7 +8,7 @@ class AzureGenericResource < AzureResourceBase
name 'azure_generic_resource'

desc '
Inspec Resource to interrogate any Resource type in Azure
InSpec Resource to interrogate any Resource type in Azure
'

supports platform: 'azure'
Expand Down
2 changes: 1 addition & 1 deletion lib/resources/azure/azure_resource_group.rb
Expand Up @@ -7,7 +7,7 @@ class AzureResourceGroup < AzureResourceBase
name 'azure_resource_group'

desc '
Inspec Resource to get metadata about a specific Resource Group
InSpec Resource to get metadata about a specific Resource Group
'

supports platform: 'azure'
Expand Down
8 changes: 4 additions & 4 deletions lib/resources/azure/azure_virtual_machine.rb
Expand Up @@ -7,7 +7,7 @@ class AzureVirtualMachine < AzureResourceBase
name 'azure_virtual_machine'

desc '
Inspec Resource to test Azure Virtual Machines
InSpec Resource to test Azure Virtual Machines
'

supports platform: 'azure'
Expand Down Expand Up @@ -122,7 +122,7 @@ def data_disk_count
#
# This allows the use of
# it { should have_password_authentication }
# within the Inspec profile
# within the InSpec profile
#
# @return boolean
def has_password_authentication?
Expand All @@ -146,7 +146,7 @@ def password_authentication?
#
# This allows the use of
# it { should have_custom_data }
# within the Inspec Profile
# within the InSpec Profile
#
# @return boolean
def has_custom_data?
Expand All @@ -168,7 +168,7 @@ def custom_data?
#
# This allows the use of
# it { should have_ssh_keys }
# within the Inspec Profile
# within the InSpec Profile
#
# @return boolean
def has_ssh_keys?
Expand Down
2 changes: 1 addition & 1 deletion lib/resources/azure/azure_virtual_machine_data_disk.rb
Expand Up @@ -8,7 +8,7 @@ class AzureVirtualMachineDataDisk < AzureResourceBase
name 'azure_virtual_machine_data_disk'

desc '
Inspec Resource to ensure that the data disks attached to a machine are correct
InSpec Resource to ensure that the data disks attached to a machine are correct
'

supports platform: 'azure'
Expand Down
2 changes: 1 addition & 1 deletion lib/resources/chocolatey_package.rb
Expand Up @@ -6,7 +6,7 @@ module Inspec::Resources
class ChocoPkg < Inspec.resource(1)
name 'chocolatey_package'
supports platform: 'windows'
desc 'Use the chocolatey_package Inspec audit resource to test if the named package and/or package version is installed on the system.'
desc 'Use the chocolatey_package InSpec audit resource to test if the named package and/or package version is installed on the system.'
example <<-EOH
describe chocolatey_package('git') do
it { should be_installed }
Expand Down
2 changes: 1 addition & 1 deletion test/functional/inspec_exec_json_test.rb
Expand Up @@ -73,7 +73,7 @@
"license" => "Apache-2.0",
"summary" => "Demonstrates the use of InSpec Compliance Profile",
"version" => "1.0.0",
"sha256" => "9ce86873d1e0c450ec739883dfe39828b481697f573304ad24c835885085b132",
"sha256" => "7acce309d89d995a908fcd1c7daaaae65954d252d4de1b90ae52416b4e67d2f3",
"supports" => [{"platform-family" => "unix"}, {"platform-family"=>"windows"}],
"attributes" => []
})
Expand Down
4 changes: 2 additions & 2 deletions test/integration/azure/build/azure.tf
Expand Up @@ -40,7 +40,7 @@ resource "azurerm_resource_group" "rg" {
location = "${var.location}"

tags {
CreatedBy = "Inspec Azure Integration Tests"
CreatedBy = "InSpec Azure Integration Tests"
}
}

Expand Down Expand Up @@ -183,7 +183,7 @@ resource "azurerm_virtual_machine" "vm_linux_internal" {
disable_password_authentication = false
}

# Add boot diagnostics to the machine. These will be added to the
# Add boot diagnostics to the machine. These will be added to the
# created storage acccount
boot_diagnostics {
enabled = true
Expand Down
4 changes: 2 additions & 2 deletions test/integration/azure/verify/controls/generic_resources.rb
Expand Up @@ -21,6 +21,6 @@
it { should have_tags }
its('tag_count') { should be 1 }
its('tags') { should include 'CreatedBy' }
its('CreatedBy_tag') { should cmp 'Inspec Azure Integration Tests' }
its('CreatedBy_tag') { should cmp 'InSpec Azure Integration Tests' }
end
end
end
2 changes: 1 addition & 1 deletion test/integration/azure/verify/controls/resource_group.rb
Expand Up @@ -19,7 +19,7 @@
it { should have_tags }
its('tag_count') { should be 1 }
its('tags') { should include 'CreatedBy' }
its('CreatedBy_tag') { should cmp 'Inspec Azure Integration Tests' }
its('CreatedBy_tag') { should cmp 'InSpec Azure Integration Tests' }

# How many resources are in the resource group in total
its('total') { should eq 13 }
Expand Down
Expand Up @@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
Gem::Specification.new do |spec|
spec.name = "train-test-fixture"
spec.version = '0.1.0'
spec.authors = ["Inspec core engineering team"]
spec.authors = ["InSpec core engineering team"]
spec.email = ["hello@chef.io"]
spec.license = 'Apache-2.0'

Expand Down
Expand Up @@ -7,7 +7,7 @@ Gem::Specification.new do |s|

s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
s.require_paths = ["lib".freeze]
s.authors = ["Inspec core engineering team".freeze]
s.authors = ["InSpec core engineering team".freeze]
s.date = "2018-09-26"
s.description = "Train plugin used in testing Train's plugin loader and InSpec's plugin manager.\nThis plugin does things that a normal plugin should not. Do not use it as an\nexample or as a starting point for plugin of your own. For that, please see\nhttps://github.com/inspec/train/tree/master/examples/plugins\n".freeze
s.email = ["hello@chef.io".freeze]
Expand Down
Expand Up @@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
Gem::Specification.new do |spec|
spec.name = "train-test-fixture"
spec.version = '0.1.0'
spec.authors = ["Inspec core engineering team"]
spec.authors = ["InSpec core engineering team"]
spec.email = ["hello@chef.io"]
spec.license = 'Apache-2.0'

Expand Down
Expand Up @@ -7,7 +7,7 @@ Gem::Specification.new do |s|

s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
s.require_paths = ["lib".freeze]
s.authors = ["Inspec core engineering team".freeze]
s.authors = ["InSpec core engineering team".freeze]
s.date = "2018-09-26"
s.description = "Train plugin used in testing Train's plugin loader and InSpec's plugin manager.\nThis plugin does things that a normal plugin should not. Do not use it as an\nexample or as a starting point for plugin of your own. For that, please see\nhttps://github.com/inspec/train/tree/master/examples/plugins\n".freeze
s.email = ["hello@chef.io".freeze]
Expand Down
Expand Up @@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
Gem::Specification.new do |spec|
spec.name = "train-test-fixture"
spec.version = '0.1.0'
spec.authors = ["Inspec core engineering team"]
spec.authors = ["InSpec core engineering team"]
spec.email = ["hello@chef.io"]
spec.license = 'Apache-2.0'

Expand Down
Expand Up @@ -7,7 +7,7 @@ Gem::Specification.new do |s|

s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
s.require_paths = ["lib".freeze]
s.authors = ["Inspec core engineering team".freeze]
s.authors = ["InSpec core engineering team".freeze]
s.date = "2018-09-26"
s.description = "Train plugin used in testing Train's plugin loader and InSpec's plugin manager.\nThis plugin does things that a normal plugin should not. Do not use it as an\nexample or as a starting point for plugin of your own. For that, please see\nhttps://github.com/inspec/train/tree/master/examples/plugins\n".freeze
s.email = ["hello@chef.io".freeze]
Expand Down

0 comments on commit 0b0a0a4

Please sign in to comment.