inspec 0.9.2 → 0.9.3

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.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +272 -49
  3. data/Gemfile +1 -0
  4. data/README.md +9 -0
  5. data/Rakefile +12 -0
  6. data/docs/resources.rst +56 -56
  7. data/examples/test-kitchen/test/integration/default/web_spec.rb +1 -1
  8. data/inspec.gemspec +8 -3
  9. data/lib/inspec/profile_context.rb +2 -1
  10. data/lib/inspec/runner.rb +8 -0
  11. data/lib/inspec/shell.rb +2 -2
  12. data/lib/inspec/version.rb +1 -1
  13. data/lib/resources/command.rb +2 -0
  14. data/lib/resources/os_env.rb +38 -6
  15. data/lib/resources/port.rb +16 -4
  16. data/lib/resources/registry_key.rb +113 -17
  17. data/lib/resources/script.rb +1 -3
  18. data/lib/resources/security_policy.rb +1 -1
  19. data/lib/resources/service.rb +21 -15
  20. data/lib/utils/simpleconfig.rb +1 -1
  21. data/test/helper.rb +4 -2
  22. data/test/integration/cookbooks/os_prepare/recipes/default.rb +2 -0
  23. data/test/integration/cookbooks/os_prepare/recipes/file.rb +16 -12
  24. data/test/integration/cookbooks/os_prepare/recipes/registry_key.rb +69 -0
  25. data/test/integration/cookbooks/os_prepare/recipes/service.rb +12 -0
  26. data/test/integration/{default → test/integration/default}/_debug_spec.rb +0 -0
  27. data/test/integration/{default → test/integration/default}/apt_spec.rb +0 -0
  28. data/test/integration/{default → test/integration/default}/file_spec.rb +0 -0
  29. data/test/integration/{default → test/integration/default}/group_spec.rb +0 -0
  30. data/test/integration/{default → test/integration/default}/kernel_module_spec.rb +0 -0
  31. data/test/integration/{default → test/integration/default}/kernel_parameter_spec.rb +0 -0
  32. data/test/integration/{default → test/integration/default}/package_spec.rb +0 -0
  33. data/test/integration/test/integration/default/port_spec.rb +9 -0
  34. data/test/integration/test/integration/default/registry_key_spec.rb +53 -0
  35. data/test/integration/{default → test/integration/default}/service_spec.rb +14 -1
  36. data/test/integration/test/integration/default/user_spec.rb +62 -0
  37. data/test/unit/mock/cmd/$env-PATH +1 -0
  38. data/test/unit/mock/cmd/env +1 -0
  39. data/test/unit/mock/cmd/reg_schedule +6 -1
  40. data/test/unit/profile_context_test.rb +14 -3
  41. data/test/unit/resources/os_env_test.rb +6 -1
  42. data/test/unit/resources/registry_key_test.rb +2 -3
  43. metadata +32 -22
  44. data/test/integration/default/user_spec.rb +0 -44
  45. data/test/unit/mock/cmd/PATH +0 -1
@@ -1,44 +0,0 @@
1
- # encoding: utf-8
2
-
3
- # root test
4
- if ['centos', 'fedora', 'opensuse', 'debian', 'ubuntu'].include?(os[:family])
5
-
6
- userinfo = {
7
- name: 'root',
8
- group: 'root',
9
- uid: 0,
10
- gid: 0,
11
- groups: ["root"],
12
- home: '/root',
13
- shell: '/bin/bash',
14
- }
15
-
16
- # different groupset for centos 5
17
- userinfo[:groups] = ["root", "bin", "daemon", "sys", "adm", "disk", "wheel"] if os[:release].to_i == 5
18
-
19
- elsif ['freebsd'].include?(os[:family])
20
-
21
- userinfo = {
22
- name: 'root',
23
- group: 'wheel',
24
- uid: 0,
25
- gid: 0,
26
- groups: ["wheel", "operator"],
27
- home: '/root',
28
- shell: '/bin/csh',
29
- }
30
-
31
- else
32
- userinfo = {}
33
- end
34
-
35
- describe user(userinfo[:name]) do
36
- it { should exist }
37
- it { should belong_to_group userinfo[:group] }
38
- its('uid') { should eq userinfo[:uid] }
39
- its('gid') { should eq userinfo[:gid] }
40
- its('group') { should eq userinfo[:group] }
41
- its('groups') { should eq userinfo[:groups] }
42
- its('home') { should eq userinfo[:home] }
43
- its('shell') { should eq userinfo[:shell] }
44
- end
@@ -1 +0,0 @@
1
- /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin