inspec 0.19.3 → 0.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +5 -13
  2. data/.rubocop.yml +1 -1
  3. data/CHANGELOG.md +30 -2
  4. data/inspec.gemspec +1 -1
  5. data/lib/bundles/inspec-compliance.rb +1 -0
  6. data/lib/bundles/inspec-compliance/.kitchen.yml +21 -0
  7. data/lib/bundles/inspec-compliance/README.md +24 -0
  8. data/lib/bundles/inspec-compliance/bootstrap.sh +37 -0
  9. data/lib/bundles/inspec-compliance/cli.rb +2 -2
  10. data/lib/bundles/inspec-compliance/support.rb +36 -0
  11. data/lib/bundles/inspec-compliance/target.rb +3 -5
  12. data/lib/bundles/inspec-compliance/test/integration/default/cli.rb +56 -0
  13. data/lib/fetchers/url.rb +7 -2
  14. data/lib/inspec/backend.rb +1 -1
  15. data/lib/inspec/cli.rb +13 -13
  16. data/lib/inspec/plugins/fetcher.rb +1 -0
  17. data/lib/inspec/version.rb +1 -1
  18. data/lib/resources/file.rb +11 -23
  19. data/lib/resources/os.rb +10 -1
  20. data/lib/resources/package.rb +16 -0
  21. data/lib/resources/user.rb +14 -0
  22. data/lib/resources/xinetd.rb +39 -94
  23. data/lib/utils/filter.rb +184 -0
  24. data/lib/utils/hash_map.rb +37 -0
  25. data/test/functional/inspec_test.rb +23 -0
  26. data/test/helper.rb +5 -0
  27. data/test/resource/file_test.rb +3 -1
  28. data/test/unit/{fetchers.rb → fetchers_test.rb} +1 -0
  29. data/test/unit/mock/cmd/logins-x +4 -0
  30. data/test/unit/mock/cmd/swlist-l-product +1 -0
  31. data/test/unit/mock/profiles/resource-tiny/inspec.yml +10 -0
  32. data/test/unit/mock/profiles/resource-tiny/libraries/resource.rb +3 -0
  33. data/test/unit/resources/file_test.rb +21 -0
  34. data/test/unit/resources/package_test.rb +9 -0
  35. data/test/unit/resources/user_test.rb +6 -0
  36. data/test/unit/resources/xinetd_test.rb +3 -3
  37. data/test/unit/utils/filter_table_test.rb +125 -0
  38. metadata +46 -31
  39. data/lib/utils/detect.rb +0 -15
data/lib/utils/detect.rb DELETED
@@ -1,15 +0,0 @@
1
- # encoding: utf-8
2
- # Copyright 2015, Vulcano Security GmbH
3
- # author: Christoph Hartmann
4
- # author: Dominik Richter
5
- # Tiny test file to return OS info of the tested node
6
-
7
- # print OS detection infos
8
- conf = {
9
- name: os[:name],
10
- family: os[:family],
11
- release: os[:release],
12
- arch: os[:arch],
13
- }
14
- puts JSON.dump(conf)
15
- exit 0