inspec 1.14.0 → 1.14.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fb888c0cb724974ef7d939097b4f2b035653d6d7
4
- data.tar.gz: 9e7eb4ff65ea768f8fe1782ce998a1c0ed825896
3
+ metadata.gz: 7c359edd56805488af68139d6281b72e60991ee5
4
+ data.tar.gz: c06f8586568f4e29cb9b86f5a0b96b8ef58054f3
5
5
  SHA512:
6
- metadata.gz: cd794bbc14da92dc306a9c7b8faa71a2d4fecd272c95918de9de5e59ac5669e8d93b880684f2263b751a10ff20bc9eb843b06692c00673abba3af22707dba85e
7
- data.tar.gz: a6e46c9012ad7d3a368d90f3f0912c02ab7ca62a90619af69d204f2864b641e22448f32b3679337f231665ca2fda820d490ddcfb7fea2bb71b93c82bd5a51192
6
+ metadata.gz: d3f2d5d72a3e088374e6bd1186453d3d0302827289b10229f0ce736fbf91f3e65c8e5baf6f5cc1856bedf36e97f3f17a37d43a00ac23ac54be4ca3b04abe4c44
7
+ data.tar.gz: a91488295b33e93b04669a29166f32923305361dca7e455a8908787549ee9dbd16ac3f395ed22ad76762ea983a5556c03ee3badd1409f009d2b6c55bf5b50983
data/CHANGELOG.md CHANGED
@@ -1,7 +1,22 @@
1
1
  # Change Log
2
2
 
3
- ## [1.14.0](https://github.com/chef/inspec/tree/1.14.0) (2017-02-09)
4
- [Full Changelog](https://github.com/chef/inspec/compare/v1.13.0...1.14.0)
3
+ ## [1.14.1](https://github.com/chef/inspec/tree/1.14.1) (2017-02-10)
4
+ [Full Changelog](https://github.com/chef/inspec/compare/v1.14.0...1.14.1)
5
+
6
+ **Closed issues:**
7
+
8
+ - go /profiles service modifications [\#1483](https://github.com/chef/inspec/issues/1483)
9
+ - inspec compliance login\* should support a hostname for the SERVER argument [\#1473](https://github.com/chef/inspec/issues/1473)
10
+
11
+ **Merged pull requests:**
12
+
13
+ - Skip packages resource for unsupported OS [\#1484](https://github.com/chef/inspec/pull/1484) ([alexpop](https://github.com/alexpop))
14
+ - add Alex Pop to the list of maintainers [\#1481](https://github.com/chef/inspec/pull/1481) ([arlimus](https://github.com/arlimus))
15
+ - remove Jason Reed from the list of maintainers [\#1480](https://github.com/chef/inspec/pull/1480) ([arlimus](https://github.com/arlimus))
16
+ - Add Adam Leff as a maintainer [\#1479](https://github.com/chef/inspec/pull/1479) ([adamleff](https://github.com/adamleff))
17
+
18
+ ## [v1.14.0](https://github.com/chef/inspec/tree/v1.14.0) (2017-02-08)
19
+ [Full Changelog](https://github.com/chef/inspec/compare/v1.13.0...v1.14.0)
5
20
 
6
21
  **Fixed bugs:**
7
22
 
data/MAINTAINERS.md CHANGED
@@ -27,4 +27,5 @@ To mention the team, use @chef/inspec-maintainers
27
27
  ### Maintainers
28
28
 
29
29
  * [Christoph Hartmann](https://github.com/chris-rock)
30
- * [Jason Reed](https://github.com/jcreedcmu)
30
+ * [Adam Leff](https://github.com/adamleff)
31
+ * [Alex Pop](https://github.com/alexpop)
data/MAINTAINERS.toml CHANGED
@@ -25,7 +25,8 @@ project lead.
25
25
 
26
26
  maintainers = [
27
27
  "chris-rock",
28
- "jcreedcmu"
28
+ "adamleff",
29
+ "alexpop"
29
30
  ]
30
31
 
31
32
  [people]
@@ -37,6 +38,10 @@ project lead.
37
38
  Name = "Christoph Hartmann"
38
39
  GitHub = "chris-rock"
39
40
 
40
- [people.jcreedcmu]
41
- Name = "Jason Reed"
42
- GitHub = "jcreedcmu"
41
+ [people.adamleff]
42
+ Name = "Adam Leff"
43
+ GitHub = "adamleff"
44
+
45
+ [people.alexpop]
46
+ Name = "Alex Pop"
47
+ GitHub = "alexpop"
@@ -4,5 +4,5 @@
4
4
  # author: Christoph Hartmann
5
5
 
6
6
  module Inspec
7
- VERSION = '1.14.0'.freeze
7
+ VERSION = '1.14.1'.freeze
8
8
  end
Binary file
@@ -23,10 +23,14 @@ module Inspec::Resources
23
23
  "
24
24
 
25
25
  def initialize(pattern)
26
+ @command = packages_command
27
+
28
+ return skip_resource "The packages resource is not yet supported on OS #{inspec.os.name}" unless @command
29
+
26
30
  @pattern = pattern_regexp(pattern)
27
- all_pkgs = package_list
31
+ all_pkgs = build_package_list(@command)
28
32
  @list = all_pkgs.find_all do |hm|
29
- hm[:name] =~ pattern_regexp(pattern)
33
+ hm[:name] =~ @pattern
30
34
  end
31
35
  end
32
36
 
@@ -44,31 +48,29 @@ module Inspec::Resources
44
48
 
45
49
  private
46
50
 
51
+ def packages_command
52
+ os = inspec.os
53
+ if os.debian?
54
+ command = "dpkg-query -W -f='${db:Status-Abbrev} ${Package} ${Version}\\n'"
55
+ end
56
+ command
57
+ end
58
+
47
59
  def pattern_regexp(p)
48
60
  if p.class == String
49
61
  Regexp.new(Regexp.escape(p))
50
62
  elsif p.class == Regexp
51
63
  p
52
64
  else
53
- raise 'invalid name argument to packages resource, please use a "string" or /regexp/'
65
+ raise 'Invalid name argument to packages resource, please use a "string" or /regexp/'
54
66
  end
55
67
  end
56
68
 
57
69
  def filtered_packages
70
+ warn "The packages resource is not yet supported on OS #{inspec.os.name}" unless @command
58
71
  @list
59
72
  end
60
73
 
61
- def package_list
62
- os = inspec.os
63
-
64
- if os.debian?
65
- command = "dpkg-query -W -f='${db:Status-Abbrev} ${Package} ${Version}\\n'"
66
- else
67
- raise "packages resource is not yet supported on #{os.name}"
68
- end
69
- build_package_list(command)
70
- end
71
-
72
74
  Package = Struct.new(:status, :name, :version)
73
75
 
74
76
  def build_package_list(command)
@@ -57,7 +57,7 @@ module Inspec::Resources
57
57
  name 'users'
58
58
  desc 'Use the users InSpec audit resource to test local user profiles. Users can be filtered by groups to which they belong, the frequency of required password changes, the directory paths to home and shell.'
59
59
  example "
60
- describe users.where(uid: 0).entries do
60
+ describe users.where { uid == 0 }.entries do
61
61
  it { should eq ['root'] }
62
62
  its('uids') { should eq [1234] }
63
63
  its('gids') { should eq [1234] }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.0
4
+ version: 1.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominik Richter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-08 00:00:00.000000000 Z
11
+ date: 2017-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: train
@@ -474,6 +474,7 @@ files:
474
474
  - lib/inspec/source_reader.rb
475
475
  - lib/inspec/version.rb
476
476
  - lib/matchers/matchers.rb
477
+ - lib/resources/.ssh_conf.rb.swp
477
478
  - lib/resources/apache.rb
478
479
  - lib/resources/apache_conf.rb
479
480
  - lib/resources/apt.rb