inspec 0.9.9 → 0.9.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (306) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +34 -2
  3. data/README.md +5 -1
  4. data/bin/os +23 -0
  5. data/examples/kitchen-ansible/.kitchen/default-centos-71.yml +6 -0
  6. data/examples/kitchen-ansible/.kitchen/default-ubuntu-1204.yml +6 -0
  7. data/examples/kitchen-ansible/.kitchen/default-ubuntu-1404.yml +6 -0
  8. data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  9. data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  10. data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/.vagrant/machines/default/virtualbox/id +1 -0
  11. data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  12. data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/.vagrant/machines/default/virtualbox/private_key +27 -0
  13. data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  14. data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/Vagrantfile +9 -0
  15. data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  16. data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  17. data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/.vagrant/machines/default/virtualbox/id +1 -0
  18. data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  19. data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/.vagrant/machines/default/virtualbox/private_key +27 -0
  20. data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  21. data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/Vagrantfile +9 -0
  22. data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  23. data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  24. data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/.vagrant/machines/default/virtualbox/id +1 -0
  25. data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  26. data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/.vagrant/machines/default/virtualbox/private_key +27 -0
  27. data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  28. data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/Vagrantfile +9 -0
  29. data/examples/kitchen-ansible/.kitchen/logs/default-centos-71.log +4 -0
  30. data/examples/kitchen-ansible/.kitchen/logs/default-ubuntu-1204.log +4 -0
  31. data/examples/kitchen-ansible/.kitchen/logs/default-ubuntu-1404.log +4 -0
  32. data/examples/kitchen-ansible/.kitchen/logs/kitchen.log +8 -0
  33. data/examples/kitchen-ansible/Gemfile.lock +154 -0
  34. data/examples/kitchen-chef/.kitchen/default-centos-71.yml +6 -0
  35. data/examples/kitchen-chef/.kitchen/default-ubuntu-1204.yml +6 -0
  36. data/examples/kitchen-chef/.kitchen/default-ubuntu-1404.yml +6 -0
  37. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  38. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  39. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/id +1 -0
  40. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  41. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/private_key +27 -0
  42. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  43. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/Vagrantfile +9 -0
  44. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  45. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  46. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/id +1 -0
  47. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  48. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/private_key +27 -0
  49. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  50. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/Vagrantfile +9 -0
  51. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  52. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  53. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/id +1 -0
  54. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  55. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/private_key +27 -0
  56. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  57. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/Vagrantfile +9 -0
  58. data/examples/kitchen-chef/.kitchen/logs/default-centos-71.log +4 -0
  59. data/examples/kitchen-chef/.kitchen/logs/default-ubuntu-1204.log +4 -0
  60. data/examples/kitchen-chef/.kitchen/logs/default-ubuntu-1404.log +4 -0
  61. data/examples/kitchen-chef/.kitchen/logs/kitchen.log +8 -0
  62. data/examples/kitchen-chef/Berksfile.lock +11 -0
  63. data/examples/kitchen-chef/Gemfile.lock +223 -0
  64. data/examples/kitchen-puppet/.bundle/config +2 -0
  65. data/examples/kitchen-puppet/.kitchen/logs/default-centos-71.log +5 -0
  66. data/examples/kitchen-puppet/.kitchen/logs/default-ubuntu-1204.log +5 -0
  67. data/examples/kitchen-puppet/.kitchen/logs/default-ubuntu-1404.log +5 -0
  68. data/examples/kitchen-puppet/.kitchen/logs/kitchen.log +5 -0
  69. data/examples/kitchen-puppet/.librarian/puppet/config +2 -0
  70. data/examples/kitchen-puppet/Gemfile.lock +174 -0
  71. data/examples/kitchen-puppet/Puppetfile.lock +2 -0
  72. data/examples/profile/libraries/.DS_Store +0 -0
  73. data/examples/test-kitchen/.kitchen/logs/default-centos-71.log +5 -0
  74. data/examples/test-kitchen/.kitchen/logs/default-ubuntu-1204.log +5 -0
  75. data/examples/test-kitchen/.kitchen/logs/default-ubuntu-1404.log +5 -0
  76. data/examples/test-kitchen/.kitchen/logs/kitchen.log +5 -0
  77. data/examples/test-kitchen/Berksfile.lock +11 -0
  78. data/examples/test-kitchen/Gemfile.lock +233 -0
  79. data/inspec.gemspec +2 -2
  80. data/lib/.DS_Store +0 -0
  81. data/lib/extras/compliance/README.md +15 -0
  82. data/lib/extras/compliance/compliance.rb +245 -0
  83. data/lib/inspec/metadata.rb +3 -1
  84. data/lib/inspec/profile.rb +2 -0
  85. data/lib/inspec/profile_context.rb +34 -63
  86. data/lib/inspec/resource.rb +23 -0
  87. data/lib/inspec/runner.rb +17 -35
  88. data/lib/inspec/runner_mock.rb +31 -0
  89. data/lib/inspec/runner_rspec.rb +94 -0
  90. data/lib/inspec/targets/dir.rb +2 -4
  91. data/lib/inspec/version.rb +1 -1
  92. data/{test/unit/mock/profiles/complete-meta/test/.gitkeep → lib/resources/certificate.rb} +0 -0
  93. data/lib/resources/command.rb +1 -1
  94. data/lib/resources/postgres_session.rb +10 -15
  95. data/{test/unit/mock/profiles/custom-resource/test/.gitkeep → lib/resources/private_key.rb} +0 -0
  96. data/lib/resources/registry_key.rb +10 -6
  97. data/lib/resources/service.rb +232 -63
  98. data/test/chefdk/.gitignore +16 -0
  99. data/test/chefdk/.kitchen.yml +27 -0
  100. data/test/chefdk/Policyfile.rb +16 -0
  101. data/test/chefdk/README.md +4 -0
  102. data/test/chefdk/chefignore +100 -0
  103. data/test/chefdk/metadata.rb +7 -0
  104. data/test/chefdk/recipes/default.rb +5 -0
  105. data/test/chefdk/spec/spec_helper.rb +2 -0
  106. data/test/chefdk/spec/unit/recipes/default_spec.rb +20 -0
  107. data/test/chefdk/test/integration/default/serverspec/default_spec.rb +9 -0
  108. data/test/chefdk/test/integration/helpers/serverspec/spec_helper.rb +8 -0
  109. data/test/docker_run.rb +5 -1
  110. data/test/docker_test.rb +1 -2
  111. data/test/helper.rb +1 -0
  112. data/test/integration/.kitchen/default-aws-linux.yml +4 -0
  113. data/test/integration/.kitchen/default-centos-7.yml +4 -0
  114. data/test/integration/.kitchen/default-debian-8.yml +4 -0
  115. data/test/integration/.kitchen/default-fedora-22.yml +4 -0
  116. data/test/integration/.kitchen/default-redhat-65.yml +4 -0
  117. data/test/integration/.kitchen/default-redhat-71.yml +4 -0
  118. data/test/integration/.kitchen/default-suse-11sp3.yml +4 -0
  119. data/test/integration/.kitchen/default-suse-12.yml +4 -0
  120. data/test/integration/.kitchen/default-ubuntu-1204.yml +3 -0
  121. data/test/integration/.kitchen/default-ubuntu-1404.yml +4 -0
  122. data/test/integration/.kitchen/default-windows-2012.yml +1 -0
  123. data/test/integration/.kitchen/default-windows-2012r2.yml +2 -0
  124. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-67-i386/Vagrantfile +9 -0
  125. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  126. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  127. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/id +1 -0
  128. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  129. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/private_key +27 -0
  130. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  131. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/Vagrantfile +9 -0
  132. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-modernIE-w10-edge/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  133. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-modernIE-w10-edge/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  134. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-modernIE-w10-edge/.vagrant/machines/default/virtualbox/id +1 -0
  135. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-modernIE-w10-edge/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  136. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-modernIE-w10-edge/Vagrantfile +8 -0
  137. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  138. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  139. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/id +1 -0
  140. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  141. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/private_key +27 -0
  142. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  143. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/Vagrantfile +9 -0
  144. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  145. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  146. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/id +1 -0
  147. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  148. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/private_key +27 -0
  149. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  150. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/Vagrantfile +9 -0
  151. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-windows-2012R2-matt/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  152. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-windows-2012R2-matt/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  153. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-windows-2012R2-matt/.vagrant/machines/default/virtualbox/id +1 -0
  154. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-windows-2012R2-matt/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  155. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-windows-2012R2-matt/Vagrantfile +8 -0
  156. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-new-ubuntu-1404/Vagrantfile +9 -0
  157. data/test/{unit/mock/profiles/empty/metadata.rb → integration/.kitchen/logs/default-aws-linux.log} +0 -0
  158. data/test/integration/.kitchen/logs/default-centos-511-i386.log +2 -0
  159. data/test/integration/.kitchen/logs/default-centos-511.log +2 -0
  160. data/test/integration/.kitchen/logs/default-centos-67-i386.log +2 -0
  161. data/test/integration/.kitchen/logs/default-centos-67.log +2 -0
  162. data/test/integration/.kitchen/logs/default-centos-7.log +0 -0
  163. data/test/integration/.kitchen/logs/default-centos-71.log +2 -0
  164. data/test/integration/.kitchen/logs/default-debian-6010-i386.log +2 -0
  165. data/test/integration/.kitchen/logs/default-debian-6010.log +2 -0
  166. data/test/integration/.kitchen/logs/default-debian-78-i386.log +2 -0
  167. data/test/integration/.kitchen/logs/default-debian-78.log +2 -0
  168. data/test/integration/.kitchen/logs/default-debian-8.log +0 -0
  169. data/test/integration/.kitchen/logs/default-debian-81-i386.log +2 -0
  170. data/test/integration/.kitchen/logs/default-debian-81.log +2 -0
  171. data/test/integration/.kitchen/logs/default-fedora-21-i386.log +2 -0
  172. data/test/integration/.kitchen/logs/default-fedora-21.log +2 -0
  173. data/test/integration/.kitchen/logs/default-fedora-22.log +0 -0
  174. data/test/integration/.kitchen/logs/default-freebsd-102.log +2 -0
  175. data/test/integration/.kitchen/logs/default-freebsd-93.log +2 -0
  176. data/test/integration/.kitchen/logs/default-mint-172-cinnamon.log +2 -0
  177. data/test/integration/.kitchen/logs/default-modernIE-w10-edge.log +2 -0
  178. data/test/integration/.kitchen/logs/default-modernIE-w7-ie11.log +2 -0
  179. data/test/integration/.kitchen/logs/default-modernIE-w81-ie11.log +2 -0
  180. data/test/integration/.kitchen/logs/default-opensuse-132-i386.log +2 -0
  181. data/test/integration/.kitchen/logs/default-opensuse-132-x86-64.log +2 -0
  182. data/test/integration/.kitchen/logs/default-opentable-win-2008r2-standard-amd64-nocm.log +0 -0
  183. data/test/integration/.kitchen/logs/default-opentable-win-2012r2-standard-amd64-nocm.log +0 -0
  184. data/test/integration/.kitchen/logs/default-redhat-65.log +0 -0
  185. data/test/integration/.kitchen/logs/default-redhat-71.log +0 -0
  186. data/test/integration/.kitchen/logs/default-suse-11sp3.log +0 -0
  187. data/test/integration/.kitchen/logs/default-suse-12.log +0 -0
  188. data/test/integration/.kitchen/logs/default-ubuntu-1004-i386.log +2 -0
  189. data/test/integration/.kitchen/logs/default-ubuntu-1004.log +2 -0
  190. data/test/integration/.kitchen/logs/default-ubuntu-1204-i386.log +2 -0
  191. data/test/integration/.kitchen/logs/default-ubuntu-1204.log +0 -0
  192. data/test/integration/.kitchen/logs/default-ubuntu-1404-i386.log +2 -0
  193. data/test/integration/.kitchen/logs/default-ubuntu-1404.log +0 -0
  194. data/test/integration/.kitchen/logs/default-ubuntu-1510.log +0 -0
  195. data/test/integration/.kitchen/logs/default-windows-2008-opentable.log +2 -0
  196. data/test/integration/.kitchen/logs/default-windows-2008.log +0 -0
  197. data/test/integration/.kitchen/logs/default-windows-2012.log +0 -0
  198. data/test/integration/.kitchen/logs/default-windows-2012R2-matt.log +2 -0
  199. data/test/integration/.kitchen/logs/default-windows-2012r2-opentable.log +2 -0
  200. data/test/integration/.kitchen/logs/default-windows-2012r2.log +41 -0
  201. data/test/integration/.kitchen/logs/kitchen.log +0 -0
  202. data/test/integration/.kitchen/logs/new-centos-511-i386.log +0 -0
  203. data/test/integration/.kitchen/logs/new-centos-511.log +0 -0
  204. data/test/integration/.kitchen/logs/new-centos-67-i386.log +0 -0
  205. data/test/integration/.kitchen/logs/new-centos-67.log +0 -0
  206. data/test/integration/.kitchen/logs/new-centos-71.log +0 -0
  207. data/test/integration/.kitchen/logs/new-debian-6010-i386.log +0 -0
  208. data/test/integration/.kitchen/logs/new-debian-6010.log +0 -0
  209. data/test/integration/.kitchen/logs/new-debian-78-i386.log +0 -0
  210. data/test/integration/.kitchen/logs/new-debian-78.log +0 -0
  211. data/test/integration/.kitchen/logs/new-debian-81-i386.log +0 -0
  212. data/test/integration/.kitchen/logs/new-debian-81.log +0 -0
  213. data/test/integration/.kitchen/logs/new-fedora-21-i386.log +0 -0
  214. data/test/integration/.kitchen/logs/new-fedora-21.log +0 -0
  215. data/test/integration/.kitchen/logs/new-fedora-22.log +0 -0
  216. data/test/integration/.kitchen/logs/new-freebsd-102.log +0 -0
  217. data/test/integration/.kitchen/logs/new-freebsd-93.log +0 -0
  218. data/test/integration/.kitchen/logs/new-opensuse-132-i386.log +0 -0
  219. data/test/integration/.kitchen/logs/new-opensuse-132-x86-64.log +0 -0
  220. data/test/integration/.kitchen/logs/new-ubuntu-1004-i386.log +0 -0
  221. data/test/integration/.kitchen/logs/new-ubuntu-1004.log +0 -0
  222. data/test/integration/.kitchen/logs/new-ubuntu-1204-i386.log +0 -0
  223. data/test/integration/.kitchen/logs/new-ubuntu-1204.log +0 -0
  224. data/test/integration/.kitchen/logs/new-ubuntu-1404-i386.log +0 -0
  225. data/test/integration/.kitchen/logs/new-ubuntu-1404.log +3 -0
  226. data/test/integration/.kitchen/logs/test-centos-511-i386.log +0 -0
  227. data/test/integration/.kitchen/logs/test-centos-511.log +0 -0
  228. data/test/integration/.kitchen/logs/test-centos-67-i386.log +0 -0
  229. data/test/integration/.kitchen/logs/test-centos-67.log +0 -0
  230. data/test/integration/.kitchen/logs/test-centos-71.log +0 -0
  231. data/test/integration/.kitchen/logs/test-debian-6010-i386.log +0 -0
  232. data/test/integration/.kitchen/logs/test-debian-6010.log +0 -0
  233. data/test/integration/.kitchen/logs/test-debian-78-i386.log +0 -0
  234. data/test/integration/.kitchen/logs/test-debian-78.log +0 -0
  235. data/test/integration/.kitchen/logs/test-debian-81-i386.log +0 -0
  236. data/test/integration/.kitchen/logs/test-debian-81.log +0 -0
  237. data/test/integration/.kitchen/logs/test-fedora-21-i386.log +0 -0
  238. data/test/integration/.kitchen/logs/test-fedora-21.log +0 -0
  239. data/test/integration/.kitchen/logs/test-fedora-22.log +0 -0
  240. data/test/integration/.kitchen/logs/test-freebsd-102.log +0 -0
  241. data/test/integration/.kitchen/logs/test-freebsd-93.log +0 -0
  242. data/test/integration/.kitchen/logs/test-opensuse-132-i386.log +0 -0
  243. data/test/integration/.kitchen/logs/test-opensuse-132-x86-64.log +0 -0
  244. data/test/integration/.kitchen/logs/test-ubuntu-1004-i386.log +0 -0
  245. data/test/integration/.kitchen/logs/test-ubuntu-1004.log +0 -0
  246. data/test/integration/.kitchen/logs/test-ubuntu-1204-i386.log +0 -0
  247. data/test/integration/.kitchen/logs/test-ubuntu-1204.log +0 -0
  248. data/test/integration/.kitchen/logs/test-ubuntu-1404-i386.log +0 -0
  249. data/test/integration/.kitchen/logs/test-ubuntu-1404.log +0 -0
  250. data/test/integration/.kitchen/new-ubuntu-1404.yml +1 -0
  251. data/test/integration/Berksfile +1 -0
  252. data/test/integration/Berksfile.lock +27 -0
  253. data/test/integration/TODO.md +15 -0
  254. data/test/integration/cookbooks/os_prepare/files/empty.iso +0 -0
  255. data/test/integration/cookbooks/os_prepare/metadata.rb +2 -0
  256. data/test/integration/cookbooks/os_prepare/recipes/_runit_service_centos.rb +34 -0
  257. data/test/integration/cookbooks/os_prepare/recipes/default.rb +1 -0
  258. data/test/integration/cookbooks/os_prepare/recipes/mount.rb +5 -5
  259. data/test/integration/cookbooks/os_prepare/recipes/postgres.rb +12 -0
  260. data/test/integration/cookbooks/os_prepare/recipes/service.rb +6 -2
  261. data/test/integration/cookbooks/os_prepare/templates/default/sv-default-svlog-run.erb +3 -0
  262. data/test/integration/test/.DS_Store +0 -0
  263. data/test/integration/test/integration/.DS_Store +0 -0
  264. data/test/integration/test/integration/default/.DS_Store +0 -0
  265. data/test/integration/test/integration/default/certificate_spec.rb +7 -0
  266. data/test/integration/test/integration/default/file_spec.rb +2 -2
  267. data/test/integration/test/integration/default/mount_spec.rb +1 -1
  268. data/test/integration/test/integration/default/postgres_session_spec.rb +9 -0
  269. data/test/integration/test/integration/default/service_spec.rb +34 -0
  270. data/test/mac/service_spec.rb +5 -0
  271. data/test/serverspec/.kitchen.yml +18 -0
  272. data/test/serverspec/.kitchen/default-ubuntu-1404.yml +6 -0
  273. data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  274. data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  275. data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/id +1 -0
  276. data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  277. data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/private_key +27 -0
  278. data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  279. data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/Vagrantfile +9 -0
  280. data/test/serverspec/.kitchen/logs/default-ubuntu-1404.log +2 -0
  281. data/test/serverspec/.kitchen/logs/kitchen.log +3 -0
  282. data/test/serverspec/Berksfile +3 -0
  283. data/test/serverspec/Berksfile.lock +5 -0
  284. data/test/serverspec/TODO.md +2 -0
  285. data/test/serverspec/test/integration/default/serverspec/os_spec.rb +25 -0
  286. data/test/serverspec/test/integration/default/serverspec/spec_helper.rb +48 -0
  287. data/test/serverspec/test/integration/default/serverspec/sysctl_spec.rb +37 -0
  288. data/test/unit/metadata_test.rb +13 -1
  289. data/test/unit/mock/profiles/complete-metadata/inspec.yml +7 -0
  290. data/test/unit/mock/profiles/empty-metadata/inspec.yml +0 -0
  291. data/test/unit/mock/profiles/{complete-meta → legacy-complete-metadata}/metadata.rb +0 -0
  292. data/test/unit/mock/profiles/legacy-complete-metadata/test/.gitkeep +0 -0
  293. data/test/unit/mock/profiles/legacy-empty-metadata/controls/.gitkeep +0 -0
  294. data/test/unit/mock/profiles/legacy-empty-metadata/metadata.rb +0 -0
  295. data/test/unit/mock/profiles/{metadata → legacy-simple-metadata}/metadata.rb +0 -0
  296. data/test/unit/mock/profiles/legacy-simple-metadata/test/.gitkeep +0 -0
  297. data/test/unit/mock/profiles/simple-metadata/inspec.yml +1 -0
  298. data/test/unit/profile_test.rb +82 -31
  299. data/test/unit/resources/service_test.rb +67 -3
  300. metadata +466 -23
  301. data/examples/resource/controls/tiny.rb +0 -3
  302. data/examples/resource/inspec.yml +0 -10
  303. data/examples/resource/libraries/tiny.rb +0 -3
  304. data/lib/inspec/targets/url.rb.orig +0 -87
  305. data/test/unit/mock/profiles/custom-resource/libraries/resource.rb +0 -3
  306. data/test/unit/mock/profiles/custom-resource/metadata.rb +0 -7
@@ -0,0 +1,16 @@
1
+ .vagrant
2
+ Berksfile.lock
3
+ *~
4
+ *#
5
+ .#*
6
+ \#*#
7
+ .*.sw[a-z]
8
+ *.un~
9
+
10
+ # Bundler
11
+ Gemfile.lock
12
+ bin/*
13
+ .bundle/*
14
+
15
+ .kitchen/
16
+ .kitchen.local.yml
@@ -0,0 +1,27 @@
1
+ ---
2
+ driver:
3
+ name: vagrant
4
+
5
+ ## The forwarded_port port feature lets you connect to ports on the VM guest via
6
+ ## localhost on the host.
7
+ ## see also: https://docs.vagrantup.com/v2/networking/forwarded_ports.html
8
+
9
+ # network:
10
+ # - ["forwarded_port", {guest: 80, host: 8080}]
11
+
12
+ provisioner:
13
+ name: policyfile_zero
14
+
15
+ ## require_chef_omnibus specifies a specific chef version to install. You can
16
+ ## also set this to `true` to always use the latest version.
17
+ ## see also: https://docs.chef.io/config_yml_kitchen.html
18
+
19
+ # require_chef_omnibus: 12.5.0
20
+
21
+ platforms:
22
+ - name: ubuntu-14.04
23
+ - name: centos-7.1
24
+
25
+ suites:
26
+ - name: default
27
+ attributes:
@@ -0,0 +1,16 @@
1
+ # Policyfile.rb - Describe how you want Chef to build your system.
2
+ #
3
+ # For more information on the Policyfile feature, visit
4
+ # https://github.com/opscode/chef-dk/blob/master/POLICYFILE_README.md
5
+
6
+ # A name that describes what the system you're building with Chef does.
7
+ name "chefdk"
8
+
9
+ # Where to find external cookbooks:
10
+ default_source :supermarket
11
+
12
+ # run_list: chef-client will run these recipes in the order specified.
13
+ run_list "chefdk::default"
14
+
15
+ # Specify a custom source for a single cookbook:
16
+ cookbook "chefdk", path: "."
@@ -0,0 +1,4 @@
1
+ # chefdk
2
+
3
+ TODO: Enter the cookbook description here.
4
+
@@ -0,0 +1,100 @@
1
+ # Put files/directories that should be ignored in this file when uploading
2
+ # or sharing to the community site.
3
+ # Lines that start with '# ' are comments.
4
+
5
+ # OS generated files #
6
+ ######################
7
+ .DS_Store
8
+ Icon?
9
+ nohup.out
10
+ ehthumbs.db
11
+ Thumbs.db
12
+
13
+ # SASS #
14
+ ########
15
+ .sass-cache
16
+
17
+ # EDITORS #
18
+ ###########
19
+ \#*
20
+ .#*
21
+ *~
22
+ *.sw[a-z]
23
+ *.bak
24
+ REVISION
25
+ TAGS*
26
+ tmtags
27
+ *_flymake.*
28
+ *_flymake
29
+ *.tmproj
30
+ .project
31
+ .settings
32
+ mkmf.log
33
+
34
+ ## COMPILED ##
35
+ ##############
36
+ a.out
37
+ *.o
38
+ *.pyc
39
+ *.so
40
+ *.com
41
+ *.class
42
+ *.dll
43
+ *.exe
44
+ */rdoc/
45
+
46
+ # Testing #
47
+ ###########
48
+ .watchr
49
+ .rspec
50
+ spec/*
51
+ spec/fixtures/*
52
+ test/*
53
+ features/*
54
+ examples/*
55
+ Guardfile
56
+ Procfile
57
+ .kitchen*
58
+ .rubocop.yml
59
+
60
+ # SCM #
61
+ #######
62
+ .git
63
+ */.git
64
+ .gitignore
65
+ .gitmodules
66
+ .gitconfig
67
+ .gitattributes
68
+ .svn
69
+ */.bzr/*
70
+ */.hg/*
71
+ */.svn/*
72
+
73
+ # Berkshelf #
74
+ #############
75
+ Berksfile
76
+ Berksfile.lock
77
+ cookbooks/*
78
+ tmp
79
+
80
+ # Cookbooks #
81
+ #############
82
+ CONTRIBUTING*
83
+ CHANGELOG*
84
+ TESTING*
85
+
86
+ # Strainer #
87
+ ############
88
+ Colanderfile
89
+ Strainerfile
90
+ .colander
91
+ .strainer
92
+
93
+ # Vagrant #
94
+ ###########
95
+ .vagrant
96
+ Vagrantfile
97
+
98
+ # Travis #
99
+ ##########
100
+ .travis.yml
@@ -0,0 +1,7 @@
1
+ name 'chefdk'
2
+ maintainer 'The Authors'
3
+ maintainer_email 'you@example.com'
4
+ license 'all_rights'
5
+ description 'Installs/Configures chefdk'
6
+ long_description 'Installs/Configures chefdk'
7
+ version '0.1.0'
@@ -0,0 +1,5 @@
1
+ #
2
+ # Cookbook Name:: chefdk
3
+ # Recipe:: default
4
+ #
5
+ # Copyright (c) 2015 The Authors, All Rights Reserved.
@@ -0,0 +1,2 @@
1
+ require 'chefspec'
2
+ require 'chefspec/berkshelf'
@@ -0,0 +1,20 @@
1
+ #
2
+ # Cookbook Name:: chefdk
3
+ # Spec:: default
4
+ #
5
+ # Copyright (c) 2015 The Authors, All Rights Reserved.
6
+
7
+ require 'spec_helper'
8
+
9
+ describe 'chefdk::default' do
10
+ context 'When all attributes are default, on an unspecified platform' do
11
+ let(:chef_run) do
12
+ runner = ChefSpec::ServerRunner.new
13
+ runner.converge(described_recipe)
14
+ end
15
+
16
+ it 'converges successfully' do
17
+ expect { chef_run }.to_not raise_error
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,9 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'chefdk::default' do
4
+ # Serverspec examples can be found at
5
+ # http://serverspec.org/resource_types.html
6
+ it 'does something' do
7
+ skip 'Replace this with meaningful tests'
8
+ end
9
+ end
@@ -0,0 +1,8 @@
1
+ require 'serverspec'
2
+
3
+ if (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM).nil?
4
+ set :backend, :exec
5
+ else
6
+ set :backend, :cmd
7
+ set :os, family: 'windows'
8
+ end
data/test/docker_run.rb CHANGED
@@ -52,7 +52,11 @@ class DockerRunner
52
52
  res = block.call(name, container)
53
53
  # special rescue block to handle not implemented error
54
54
  rescue NotImplementedError => err
55
- raise err.message
55
+ stop_container(container)
56
+ raise err.message + "\n" + err.backtrace.join("\n")
57
+ rescue StandardError => err
58
+ stop_container(container)
59
+ raise err.message + "\n" + err.backtrace.join("\n")
56
60
  end
57
61
  # always stop the container
58
62
  stop_container(container)
data/test/docker_test.rb CHANGED
@@ -43,8 +43,7 @@ class DockerTester
43
43
  opts = { 'target' => "docker://#{container.id}" }
44
44
  runner = Inspec::Runner.new(opts)
45
45
  runner.add_tests(@tests)
46
- tests = runner.tests.ordered_example_groups
47
- tests.map { |g| g.run(report) }
46
+ runner.tests.map { |g| g.run(report) }
48
47
  end
49
48
  end
50
49
 
data/test/helper.rb CHANGED
@@ -151,6 +151,7 @@ class MockLoader
151
151
  'initctl show-config ssh' => cmd.call('initctl-show-config-ssh'),
152
152
  # show ssh service Centos 7
153
153
  'systemctl show --all sshd' => cmd.call('systemctl-show-all-sshd'),
154
+ '/path/to/systemctl show --all sshd' => cmd.call('systemctl-show-all-sshd'),
154
155
  # services on macos
155
156
  'launchctl list' => cmd.call('launchctl-list'),
156
157
  # services on freebsd 10
@@ -0,0 +1,4 @@
1
+ ---
2
+ server_id: i-645bddd8
3
+ hostname: ec2-52-29-45-159.eu-central-1.compute.amazonaws.com
4
+ last_action: converge
@@ -0,0 +1,4 @@
1
+ ---
2
+ server_id: i-cd5adc71
3
+ hostname: ec2-52-58-14-5.eu-central-1.compute.amazonaws.com
4
+ last_action: setup
@@ -0,0 +1,4 @@
1
+ ---
2
+ server_id: i-fb58de47
3
+ hostname: ec2-52-29-199-226.eu-central-1.compute.amazonaws.com
4
+ last_action: setup
@@ -0,0 +1,4 @@
1
+ ---
2
+ server_id: i-565bddea
3
+ hostname: ec2-52-29-81-120.eu-central-1.compute.amazonaws.com
4
+ last_action: converge
@@ -0,0 +1,4 @@
1
+ ---
2
+ server_id: i-bc5bdd00
3
+ hostname: ec2-52-29-169-254.eu-central-1.compute.amazonaws.com
4
+ last_action: converge
@@ -0,0 +1,4 @@
1
+ ---
2
+ server_id: i-f558de49
3
+ hostname: ec2-52-58-13-178.eu-central-1.compute.amazonaws.com
4
+ last_action: converge
@@ -0,0 +1,4 @@
1
+ ---
2
+ server_id: i-615bdddd
3
+ hostname: ec2-52-58-17-235.eu-central-1.compute.amazonaws.com
4
+ last_action: converge
@@ -0,0 +1,4 @@
1
+ ---
2
+ server_id: i-ad59df11
3
+ hostname: ec2-52-28-162-79.eu-central-1.compute.amazonaws.com
4
+ last_action: converge
@@ -0,0 +1,3 @@
1
+ ---
2
+ server_id: i-6258dede
3
+ hostname: ''
@@ -0,0 +1,4 @@
1
+ ---
2
+ server_id: i-395bdd85
3
+ hostname: ec2-52-28-206-244.eu-central-1.compute.amazonaws.com
4
+ last_action: converge
@@ -0,0 +1,2 @@
1
+ ---
2
+ username: administrator
@@ -0,0 +1,9 @@
1
+ Vagrant.configure("2") do |c|
2
+ c.berkshelf.enabled = false if Vagrant.has_plugin?("vagrant-berkshelf")
3
+ c.vm.box = "opscode-centos-6.7-i386"
4
+ c.vm.box_url = "https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.7-i386_chef-provisionerless.box"
5
+ c.vm.hostname = "default-centos-67-i386"
6
+ c.vm.synced_folder ".", "/vagrant", disabled: true
7
+ c.vm.provider :virtualbox do |p|
8
+ end
9
+ end
@@ -0,0 +1,27 @@
1
+ -----BEGIN RSA PRIVATE KEY-----
2
+ MIIEogIBAAKCAQEAwLGEO0LYDlsK9XekX6zmTVq0Elm/NwUtKQ7rFcBtGXzdpee0
3
+ XyhnpgnEIVL1MYL3gu3xxqNUKCrcoM1PPw8cZZqI9rT/GEEoy708wAkBbkLD81D8
4
+ ABUJ7SyP24Gj8sewuTkppkgFvYwM5yIqyP8WjCnCGr4KRUC1HCAH1U+9LJfaaarW
5
+ a5EJVDbfsrz9YoUG1fLm1nSReECFtgl7z1ZYdamjl1nd3m+OFJ5I9TRs38VEP0qg
6
+ L6XhdCyYwLqKhcF3pGF/CXkuBmlv4p722PAa/dL3RhoE2pAHAbncPuzySY/KQgLo
7
+ lsLN48LVpSBcwhXzZeyzsnr7XcsyP1s6V6ntfQIDAQABAoIBAEStgFGWy2aicE94
8
+ qu8mspaTY2a+8fXsNGJT3NnN0ZSp+l2tLY5U2kxFYs/1v0o8QXc601dW0yHV1PjC
9
+ 9CGngxl7cKFtdRXx81ZaRhKzovzncut/y7FDzlvn7AXyOLrJDWWWyA9p0BH0noyq
10
+ ktE8iY6/O11IqmRwYZx6lhAi8Wu4vQ4ytVQhv15qNubka65RR9ylq0+dTPV4OIoW
11
+ H9tASvvTh3vb/zpBcBKvX4x9n6F9I2Vf0GgXwA+2E+/1frnatYqU8VjgXsc4D0yC
12
+ pWQyumGrytS6/jBnd64laqnvT1QFitaWob08WPHWYnXiBr0mlHGRpl5iz6l3sJKV
13
+ 6a3LX8kCgYEA7J8jpd/ONFuPQDTrPQQJ7coDL0Dmxu5ihUVDgT/FfAz4OM9KF+ej
14
+ ptiDbl/UrSZQm1GcT3CwLOevgPcsK7rTBFOBwRxvi9Wf3I6g4QozeXcPEcZWmDAn
15
+ u+Lg6fMceKu8lwbTBLLqf02wk2IJkXgixXJJ6khxRy0qPujgQqERjbsCgYEA0Hln
16
+ 6lmTOlN+mMs5pPu43ZRNy//QVUKBdOsZjyOnU3mydHRr+j1e3wN4csX6odBU2D9X
17
+ JKqd2Xep1biTGPEZjRnqgVeGzHpoDJTgGaJevhr2WZ+zySEmbIInTOtS/jGvhwG9
18
+ y23Zr5nIeVJGJ91eBT7GidjDYo7YvFabRjuXoicCgYAqR20ZMFop5Mo90LbPmi8j
19
+ +9qB0PjrRqD36x5as8hXmAGqNO+qQctt/nXNfPYFUjlI51Yko5/3BhbH1mJgFeuq
20
+ dDlVBf2wYKVFxX5dd3MnGuzoYiYK31/aJHnHk5bcwOLboW6HAmkAAiOw0e2fvnWI
21
+ DhnC8Nq8uwc3YmjfvuPiDQKBgDJFBCy7WsgWuBEp+AVzeXlcuIG3dsoIVmUWB7y/
22
+ USrMzp5MMHlP8R9/m7y5Rp1cOglHBMFfrt5wf3B8qGO8R3gBxs1XiLan0Y0vHPax
23
+ c30NzVeBLf4S00wY+lcO651F59h7MAPswjAYugGfODGGrJRBNeipbzvFzDdl/t0p
24
+ o3/DAoGAPM0tH/0E71pE3X2DGIAxgcma/waVurPGxw9+QqgksQW3+tkCg2EYuN8V
25
+ dAKKa9aI739+1Em3S0Cr4dfSon8zyEBpyZhxlpY+/KypzrQgTEYS/l8u4Vdk0L74
26
+ wL55wMiM0la2sLqUtgFF5zqSGCg7LLWNMc6owmlG5RZrneDjams=
27
+ -----END RSA PRIVATE KEY-----
@@ -0,0 +1,9 @@
1
+ Vagrant.configure("2") do |c|
2
+ c.berkshelf.enabled = false if Vagrant.has_plugin?("vagrant-berkshelf")
3
+ c.vm.box = "opscode-fedora-22"
4
+ c.vm.box_url = "https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_fedora-22_chef-provisionerless.box"
5
+ c.vm.hostname = "default-fedora-22"
6
+ c.vm.synced_folder ".", "/vagrant", disabled: true
7
+ c.vm.provider :virtualbox do |p|
8
+ end
9
+ end
@@ -0,0 +1,8 @@
1
+ Vagrant.configure("2") do |c|
2
+ c.berkshelf.enabled = false if Vagrant.has_plugin?("vagrant-berkshelf")
3
+ c.vm.box = "modernIE/w10-edge"
4
+ c.vm.hostname = "default-modernIE-w10-edge"
5
+ c.vm.synced_folder ".", "/vagrant", disabled: true
6
+ c.vm.provider :virtualbox do |p|
7
+ end
8
+ end