inspec 0.9.9 → 0.9.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +34 -2
- data/README.md +5 -1
- data/bin/os +23 -0
- data/examples/kitchen-ansible/.kitchen/default-centos-71.yml +6 -0
- data/examples/kitchen-ansible/.kitchen/default-ubuntu-1204.yml +6 -0
- data/examples/kitchen-ansible/.kitchen/default-ubuntu-1404.yml +6 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/.vagrant/machines/default/virtualbox/id +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/Vagrantfile +9 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/.vagrant/machines/default/virtualbox/id +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/Vagrantfile +9 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/.vagrant/machines/default/virtualbox/id +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/Vagrantfile +9 -0
- data/examples/kitchen-ansible/.kitchen/logs/default-centos-71.log +4 -0
- data/examples/kitchen-ansible/.kitchen/logs/default-ubuntu-1204.log +4 -0
- data/examples/kitchen-ansible/.kitchen/logs/default-ubuntu-1404.log +4 -0
- data/examples/kitchen-ansible/.kitchen/logs/kitchen.log +8 -0
- data/examples/kitchen-ansible/Gemfile.lock +154 -0
- data/examples/kitchen-chef/.kitchen/default-centos-71.yml +6 -0
- data/examples/kitchen-chef/.kitchen/default-ubuntu-1204.yml +6 -0
- data/examples/kitchen-chef/.kitchen/default-ubuntu-1404.yml +6 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/id +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/Vagrantfile +9 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/id +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/Vagrantfile +9 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/id +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/Vagrantfile +9 -0
- data/examples/kitchen-chef/.kitchen/logs/default-centos-71.log +4 -0
- data/examples/kitchen-chef/.kitchen/logs/default-ubuntu-1204.log +4 -0
- data/examples/kitchen-chef/.kitchen/logs/default-ubuntu-1404.log +4 -0
- data/examples/kitchen-chef/.kitchen/logs/kitchen.log +8 -0
- data/examples/kitchen-chef/Berksfile.lock +11 -0
- data/examples/kitchen-chef/Gemfile.lock +223 -0
- data/examples/kitchen-puppet/.bundle/config +2 -0
- data/examples/kitchen-puppet/.kitchen/logs/default-centos-71.log +5 -0
- data/examples/kitchen-puppet/.kitchen/logs/default-ubuntu-1204.log +5 -0
- data/examples/kitchen-puppet/.kitchen/logs/default-ubuntu-1404.log +5 -0
- data/examples/kitchen-puppet/.kitchen/logs/kitchen.log +5 -0
- data/examples/kitchen-puppet/.librarian/puppet/config +2 -0
- data/examples/kitchen-puppet/Gemfile.lock +174 -0
- data/examples/kitchen-puppet/Puppetfile.lock +2 -0
- data/examples/profile/libraries/.DS_Store +0 -0
- data/examples/test-kitchen/.kitchen/logs/default-centos-71.log +5 -0
- data/examples/test-kitchen/.kitchen/logs/default-ubuntu-1204.log +5 -0
- data/examples/test-kitchen/.kitchen/logs/default-ubuntu-1404.log +5 -0
- data/examples/test-kitchen/.kitchen/logs/kitchen.log +5 -0
- data/examples/test-kitchen/Berksfile.lock +11 -0
- data/examples/test-kitchen/Gemfile.lock +233 -0
- data/inspec.gemspec +2 -2
- data/lib/.DS_Store +0 -0
- data/lib/extras/compliance/README.md +15 -0
- data/lib/extras/compliance/compliance.rb +245 -0
- data/lib/inspec/metadata.rb +3 -1
- data/lib/inspec/profile.rb +2 -0
- data/lib/inspec/profile_context.rb +34 -63
- data/lib/inspec/resource.rb +23 -0
- data/lib/inspec/runner.rb +17 -35
- data/lib/inspec/runner_mock.rb +31 -0
- data/lib/inspec/runner_rspec.rb +94 -0
- data/lib/inspec/targets/dir.rb +2 -4
- data/lib/inspec/version.rb +1 -1
- data/{test/unit/mock/profiles/complete-meta/test/.gitkeep → lib/resources/certificate.rb} +0 -0
- data/lib/resources/command.rb +1 -1
- data/lib/resources/postgres_session.rb +10 -15
- data/{test/unit/mock/profiles/custom-resource/test/.gitkeep → lib/resources/private_key.rb} +0 -0
- data/lib/resources/registry_key.rb +10 -6
- data/lib/resources/service.rb +232 -63
- data/test/chefdk/.gitignore +16 -0
- data/test/chefdk/.kitchen.yml +27 -0
- data/test/chefdk/Policyfile.rb +16 -0
- data/test/chefdk/README.md +4 -0
- data/test/chefdk/chefignore +100 -0
- data/test/chefdk/metadata.rb +7 -0
- data/test/chefdk/recipes/default.rb +5 -0
- data/test/chefdk/spec/spec_helper.rb +2 -0
- data/test/chefdk/spec/unit/recipes/default_spec.rb +20 -0
- data/test/chefdk/test/integration/default/serverspec/default_spec.rb +9 -0
- data/test/chefdk/test/integration/helpers/serverspec/spec_helper.rb +8 -0
- data/test/docker_run.rb +5 -1
- data/test/docker_test.rb +1 -2
- data/test/helper.rb +1 -0
- data/test/integration/.kitchen/default-aws-linux.yml +4 -0
- data/test/integration/.kitchen/default-centos-7.yml +4 -0
- data/test/integration/.kitchen/default-debian-8.yml +4 -0
- data/test/integration/.kitchen/default-fedora-22.yml +4 -0
- data/test/integration/.kitchen/default-redhat-65.yml +4 -0
- data/test/integration/.kitchen/default-redhat-71.yml +4 -0
- data/test/integration/.kitchen/default-suse-11sp3.yml +4 -0
- data/test/integration/.kitchen/default-suse-12.yml +4 -0
- data/test/integration/.kitchen/default-ubuntu-1204.yml +3 -0
- data/test/integration/.kitchen/default-ubuntu-1404.yml +4 -0
- data/test/integration/.kitchen/default-windows-2012.yml +1 -0
- data/test/integration/.kitchen/default-windows-2012r2.yml +2 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-67-i386/Vagrantfile +9 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/Vagrantfile +9 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-modernIE-w10-edge/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-modernIE-w10-edge/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-modernIE-w10-edge/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-modernIE-w10-edge/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-modernIE-w10-edge/Vagrantfile +8 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/Vagrantfile +9 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/Vagrantfile +9 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-windows-2012R2-matt/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-windows-2012R2-matt/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-windows-2012R2-matt/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-windows-2012R2-matt/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-windows-2012R2-matt/Vagrantfile +8 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-new-ubuntu-1404/Vagrantfile +9 -0
- data/test/{unit/mock/profiles/empty/metadata.rb → integration/.kitchen/logs/default-aws-linux.log} +0 -0
- data/test/integration/.kitchen/logs/default-centos-511-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-centos-511.log +2 -0
- data/test/integration/.kitchen/logs/default-centos-67-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-centos-67.log +2 -0
- data/test/integration/.kitchen/logs/default-centos-7.log +0 -0
- data/test/integration/.kitchen/logs/default-centos-71.log +2 -0
- data/test/integration/.kitchen/logs/default-debian-6010-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-debian-6010.log +2 -0
- data/test/integration/.kitchen/logs/default-debian-78-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-debian-78.log +2 -0
- data/test/integration/.kitchen/logs/default-debian-8.log +0 -0
- data/test/integration/.kitchen/logs/default-debian-81-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-debian-81.log +2 -0
- data/test/integration/.kitchen/logs/default-fedora-21-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-fedora-21.log +2 -0
- data/test/integration/.kitchen/logs/default-fedora-22.log +0 -0
- data/test/integration/.kitchen/logs/default-freebsd-102.log +2 -0
- data/test/integration/.kitchen/logs/default-freebsd-93.log +2 -0
- data/test/integration/.kitchen/logs/default-mint-172-cinnamon.log +2 -0
- data/test/integration/.kitchen/logs/default-modernIE-w10-edge.log +2 -0
- data/test/integration/.kitchen/logs/default-modernIE-w7-ie11.log +2 -0
- data/test/integration/.kitchen/logs/default-modernIE-w81-ie11.log +2 -0
- data/test/integration/.kitchen/logs/default-opensuse-132-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-opensuse-132-x86-64.log +2 -0
- data/test/integration/.kitchen/logs/default-opentable-win-2008r2-standard-amd64-nocm.log +0 -0
- data/test/integration/.kitchen/logs/default-opentable-win-2012r2-standard-amd64-nocm.log +0 -0
- data/test/integration/.kitchen/logs/default-redhat-65.log +0 -0
- data/test/integration/.kitchen/logs/default-redhat-71.log +0 -0
- data/test/integration/.kitchen/logs/default-suse-11sp3.log +0 -0
- data/test/integration/.kitchen/logs/default-suse-12.log +0 -0
- data/test/integration/.kitchen/logs/default-ubuntu-1004-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-ubuntu-1004.log +2 -0
- data/test/integration/.kitchen/logs/default-ubuntu-1204-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-ubuntu-1204.log +0 -0
- data/test/integration/.kitchen/logs/default-ubuntu-1404-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-ubuntu-1404.log +0 -0
- data/test/integration/.kitchen/logs/default-ubuntu-1510.log +0 -0
- data/test/integration/.kitchen/logs/default-windows-2008-opentable.log +2 -0
- data/test/integration/.kitchen/logs/default-windows-2008.log +0 -0
- data/test/integration/.kitchen/logs/default-windows-2012.log +0 -0
- data/test/integration/.kitchen/logs/default-windows-2012R2-matt.log +2 -0
- data/test/integration/.kitchen/logs/default-windows-2012r2-opentable.log +2 -0
- data/test/integration/.kitchen/logs/default-windows-2012r2.log +41 -0
- data/test/integration/.kitchen/logs/kitchen.log +0 -0
- data/test/integration/.kitchen/logs/new-centos-511-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-centos-511.log +0 -0
- data/test/integration/.kitchen/logs/new-centos-67-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-centos-67.log +0 -0
- data/test/integration/.kitchen/logs/new-centos-71.log +0 -0
- data/test/integration/.kitchen/logs/new-debian-6010-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-debian-6010.log +0 -0
- data/test/integration/.kitchen/logs/new-debian-78-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-debian-78.log +0 -0
- data/test/integration/.kitchen/logs/new-debian-81-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-debian-81.log +0 -0
- data/test/integration/.kitchen/logs/new-fedora-21-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-fedora-21.log +0 -0
- data/test/integration/.kitchen/logs/new-fedora-22.log +0 -0
- data/test/integration/.kitchen/logs/new-freebsd-102.log +0 -0
- data/test/integration/.kitchen/logs/new-freebsd-93.log +0 -0
- data/test/integration/.kitchen/logs/new-opensuse-132-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-opensuse-132-x86-64.log +0 -0
- data/test/integration/.kitchen/logs/new-ubuntu-1004-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-ubuntu-1004.log +0 -0
- data/test/integration/.kitchen/logs/new-ubuntu-1204-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-ubuntu-1204.log +0 -0
- data/test/integration/.kitchen/logs/new-ubuntu-1404-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-ubuntu-1404.log +3 -0
- data/test/integration/.kitchen/logs/test-centos-511-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-centos-511.log +0 -0
- data/test/integration/.kitchen/logs/test-centos-67-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-centos-67.log +0 -0
- data/test/integration/.kitchen/logs/test-centos-71.log +0 -0
- data/test/integration/.kitchen/logs/test-debian-6010-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-debian-6010.log +0 -0
- data/test/integration/.kitchen/logs/test-debian-78-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-debian-78.log +0 -0
- data/test/integration/.kitchen/logs/test-debian-81-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-debian-81.log +0 -0
- data/test/integration/.kitchen/logs/test-fedora-21-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-fedora-21.log +0 -0
- data/test/integration/.kitchen/logs/test-fedora-22.log +0 -0
- data/test/integration/.kitchen/logs/test-freebsd-102.log +0 -0
- data/test/integration/.kitchen/logs/test-freebsd-93.log +0 -0
- data/test/integration/.kitchen/logs/test-opensuse-132-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-opensuse-132-x86-64.log +0 -0
- data/test/integration/.kitchen/logs/test-ubuntu-1004-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-ubuntu-1004.log +0 -0
- data/test/integration/.kitchen/logs/test-ubuntu-1204-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-ubuntu-1204.log +0 -0
- data/test/integration/.kitchen/logs/test-ubuntu-1404-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-ubuntu-1404.log +0 -0
- data/test/integration/.kitchen/new-ubuntu-1404.yml +1 -0
- data/test/integration/Berksfile +1 -0
- data/test/integration/Berksfile.lock +27 -0
- data/test/integration/TODO.md +15 -0
- data/test/integration/cookbooks/os_prepare/files/empty.iso +0 -0
- data/test/integration/cookbooks/os_prepare/metadata.rb +2 -0
- data/test/integration/cookbooks/os_prepare/recipes/_runit_service_centos.rb +34 -0
- data/test/integration/cookbooks/os_prepare/recipes/default.rb +1 -0
- data/test/integration/cookbooks/os_prepare/recipes/mount.rb +5 -5
- data/test/integration/cookbooks/os_prepare/recipes/postgres.rb +12 -0
- data/test/integration/cookbooks/os_prepare/recipes/service.rb +6 -2
- data/test/integration/cookbooks/os_prepare/templates/default/sv-default-svlog-run.erb +3 -0
- data/test/integration/test/.DS_Store +0 -0
- data/test/integration/test/integration/.DS_Store +0 -0
- data/test/integration/test/integration/default/.DS_Store +0 -0
- data/test/integration/test/integration/default/certificate_spec.rb +7 -0
- data/test/integration/test/integration/default/file_spec.rb +2 -2
- data/test/integration/test/integration/default/mount_spec.rb +1 -1
- data/test/integration/test/integration/default/postgres_session_spec.rb +9 -0
- data/test/integration/test/integration/default/service_spec.rb +34 -0
- data/test/mac/service_spec.rb +5 -0
- data/test/serverspec/.kitchen.yml +18 -0
- data/test/serverspec/.kitchen/default-ubuntu-1404.yml +6 -0
- data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/Vagrantfile +9 -0
- data/test/serverspec/.kitchen/logs/default-ubuntu-1404.log +2 -0
- data/test/serverspec/.kitchen/logs/kitchen.log +3 -0
- data/test/serverspec/Berksfile +3 -0
- data/test/serverspec/Berksfile.lock +5 -0
- data/test/serverspec/TODO.md +2 -0
- data/test/serverspec/test/integration/default/serverspec/os_spec.rb +25 -0
- data/test/serverspec/test/integration/default/serverspec/spec_helper.rb +48 -0
- data/test/serverspec/test/integration/default/serverspec/sysctl_spec.rb +37 -0
- data/test/unit/metadata_test.rb +13 -1
- data/test/unit/mock/profiles/complete-metadata/inspec.yml +7 -0
- data/test/unit/mock/profiles/empty-metadata/inspec.yml +0 -0
- data/test/unit/mock/profiles/{complete-meta → legacy-complete-metadata}/metadata.rb +0 -0
- data/test/unit/mock/profiles/legacy-complete-metadata/test/.gitkeep +0 -0
- data/test/unit/mock/profiles/legacy-empty-metadata/controls/.gitkeep +0 -0
- data/test/unit/mock/profiles/legacy-empty-metadata/metadata.rb +0 -0
- data/test/unit/mock/profiles/{metadata → legacy-simple-metadata}/metadata.rb +0 -0
- data/test/unit/mock/profiles/legacy-simple-metadata/test/.gitkeep +0 -0
- data/test/unit/mock/profiles/simple-metadata/inspec.yml +1 -0
- data/test/unit/profile_test.rb +82 -31
- data/test/unit/resources/service_test.rb +67 -3
- metadata +466 -23
- data/examples/resource/controls/tiny.rb +0 -3
- data/examples/resource/inspec.yml +0 -10
- data/examples/resource/libraries/tiny.rb +0 -3
- data/lib/inspec/targets/url.rb.orig +0 -87
- data/test/unit/mock/profiles/custom-resource/libraries/resource.rb +0 -3
- data/test/unit/mock/profiles/custom-resource/metadata.rb +0 -7
@@ -1,10 +0,0 @@
|
|
1
|
-
name: resource
|
2
|
-
title: InSpec Example Resources
|
3
|
-
maintainer: Chef Software, Inc.
|
4
|
-
copyright: Chef Software, Inc.
|
5
|
-
copyright_email: support@chef.io
|
6
|
-
license: Apache 2 license
|
7
|
-
summary: Demonstrates the use of InSpec custom resources
|
8
|
-
version: 1.0.0
|
9
|
-
supports:
|
10
|
-
- linux
|
@@ -1,87 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# author: Dominik Richter
|
3
|
-
# author: Christoph Hartmann
|
4
|
-
|
5
|
-
require 'uri'
|
6
|
-
require 'tempfile'
|
7
|
-
require 'open-uri'
|
8
|
-
require 'inspec/targets/zip'
|
9
|
-
|
10
|
-
module Inspec::Targets
|
11
|
-
class UrlHelper
|
12
|
-
def handles?(target)
|
13
|
-
uri = URI.parse(target)
|
14
|
-
return false if uri.nil? or uri.scheme.nil?
|
15
|
-
%{ http https }.include? uri.scheme
|
16
|
-
end
|
17
|
-
|
18
|
-
def resolve(target, opts = {})
|
19
|
-
# abort if the target does not start with http or https
|
20
|
-
return nil unless target.start_with?('https://', 'http://')
|
21
|
-
|
22
|
-
<<<<<<< a4b7ba89cb8a1c4442908d7a5ca821b2b1617c87
|
23
|
-
# support for github url
|
24
|
-
m = %r{^https?://(www\.)?github\.com/(?<user>[\w-]+)/(?<repo>[\w-]+)(\.git)?$}.match(target)
|
25
|
-
if m
|
26
|
-
url = "https://github.com/#{m[:user]}/#{m[:repo]}/archive/master.tar.gz"
|
27
|
-
else
|
28
|
-
url = target
|
29
|
-
end
|
30
|
-
=======
|
31
|
-
# support for github https url
|
32
|
-
url =
|
33
|
-
if target.start_with? 'https://github.com' and target.end_with? '.git'
|
34
|
-
target.sub(/.git$/, '') + '/archive/master.tar.gz'
|
35
|
-
else
|
36
|
-
target
|
37
|
-
end
|
38
|
-
>>>>>>> lint
|
39
|
-
|
40
|
-
resolve_zip(url, opts)
|
41
|
-
end
|
42
|
-
|
43
|
-
# download url into archive using opts,
|
44
|
-
# returns File object and content-type from HTTP headers
|
45
|
-
def download_archive(url, archive, opts)
|
46
|
-
archive.binmode
|
47
|
-
remote = open(
|
48
|
-
url,
|
49
|
-
http_basic_authentication: [opts['user'] || '', opts['password'] || ''],
|
50
|
-
)
|
51
|
-
|
52
|
-
# download content
|
53
|
-
archive.write(remote.read)
|
54
|
-
archive.rewind
|
55
|
-
archive.close
|
56
|
-
|
57
|
-
[archive, remote.meta['content-type']]
|
58
|
-
end
|
59
|
-
|
60
|
-
def resolve_zip(url, opts)
|
61
|
-
archive, content_type = download_archive(url, Tempfile.new(['inspec-dl-', '.tar.gz']), opts)
|
62
|
-
|
63
|
-
# replace extension with zip if we detected a zip content type
|
64
|
-
if ['application/x-zip-compressed', 'application/zip'].include?(content_type)
|
65
|
-
# rename file for proper detection in DirHelper
|
66
|
-
pn = Pathname.new(archive.path)
|
67
|
-
new_path = pn.dirname.join(pn.basename.to_s.gsub('tar.gz', 'zip'))
|
68
|
-
File.rename(pn.to_s, new_path.to_s)
|
69
|
-
|
70
|
-
content = ZipHelper.new.resolve(new_path)
|
71
|
-
File.unlink(new_path)
|
72
|
-
elsif ['application/x-gzip', 'application/gzip'].include?(content_type)
|
73
|
-
# use tar helper as default (otherwise returns nil)
|
74
|
-
content = TarHelper.new.resolve(archive.path)
|
75
|
-
archive.unlink
|
76
|
-
end
|
77
|
-
|
78
|
-
content
|
79
|
-
end
|
80
|
-
|
81
|
-
def to_s
|
82
|
-
'URL Loader'
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
86
|
-
Inspec::Targets.add_module('url', UrlHelper.new)
|
87
|
-
end
|