inspec 0.20.0 → 0.20.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: ffbce1bccc070d857ed236bce62eedcb3bb42a4c
4
- data.tar.gz: 14004e3dc76705d06589615590dd8bc5f2d4fd12
3
+ metadata.gz: 9b3d26c30944b98d35c1e06487c1711b8a6bba52
4
+ data.tar.gz: c14acfafa355f63e575c1f7537c8dd8abebb2053
5
5
  SHA512:
6
- metadata.gz: fcd0f4c1ec713bda329e8a2cbfeb9d6897fe511c2f6cfaa9bd6bfb222c68d0a1eefdcf1997bafbce0462172dc7b0153337c58b9c42af0aa6ccaf8c1c16c76495
7
- data.tar.gz: 4a15062bb74303d4845ff8b0d7128909c3b3bb45aeeae1dd18d5a23fae9fd7841c392adbf757f6a1d3825cfc86a960b3042df8e00505d314f74dde136a7c06cd
6
+ metadata.gz: 63fc4286cc81c5894332deeff52d9294b533e7f7febfead32eb2ae2351bbfd320deb8db9167974fd153e656e1ce28de4c8fe91084476efd5dc8ba195c3ed8246
7
+ data.tar.gz: 44f92719f4699885b9c63d34bb6487d6dd4f6e54443e0e2af65b3c22f6697c4c526336e884922d5bbb393c47e0da47e25e0c9b1b39e1aa2347525387024544c1
data/CHANGELOG.md CHANGED
@@ -1,12 +1,26 @@
1
1
  # Change Log
2
2
 
3
- ## [0.20.0](https://github.com/chef/inspec/tree/0.20.0) (2016-04-29)
4
- [Full Changelog](https://github.com/chef/inspec/compare/v0.19.3...0.20.0)
3
+ ## [0.20.1](https://github.com/chef/inspec/tree/0.20.1) (2016-04-30)
4
+ [Full Changelog](https://github.com/chef/inspec/compare/v0.20.0...0.20.1)
5
5
 
6
6
  **Implemented enhancements:**
7
7
 
8
+ - Add basename parameter and add tests [\#701](https://github.com/chef/inspec/pull/701) ([alexpop](https://github.com/alexpop))
9
+
10
+ **Fixed bugs:**
11
+
12
+ - fix appveyor caching [\#700](https://github.com/chef/inspec/pull/700) ([arlimus](https://github.com/arlimus))
13
+
14
+ ## [v0.20.0](https://github.com/chef/inspec/tree/v0.20.0) (2016-04-29)
15
+ [Full Changelog](https://github.com/chef/inspec/compare/v0.19.3...v0.20.0)
16
+
17
+ **Implemented enhancements:**
18
+
19
+ - update to train's new file interface: symlink + uid + gid [\#694](https://github.com/chef/inspec/pull/694) ([arlimus](https://github.com/arlimus))
20
+ - validate target backend [\#688](https://github.com/chef/inspec/pull/688) ([arlimus](https://github.com/arlimus))
8
21
  - `where { field op value }` for filter table [\#684](https://github.com/chef/inspec/pull/684) ([arlimus](https://github.com/arlimus))
9
22
  - add `shell -c` for executing calls against the inspec api [\#683](https://github.com/chef/inspec/pull/683) ([arlimus](https://github.com/arlimus))
23
+ - Hpux [\#682](https://github.com/chef/inspec/pull/682) ([Anirudh-Gupta](https://github.com/Anirudh-Gupta))
10
24
  - Add table-style filter utility [\#681](https://github.com/chef/inspec/pull/681) ([arlimus](https://github.com/arlimus))
11
25
  - added hpux user and package resource support [\#678](https://github.com/chef/inspec/pull/678) ([Anirudh-Gupta](https://github.com/Anirudh-Gupta))
12
26
 
@@ -22,10 +36,8 @@
22
36
 
23
37
  **Merged pull requests:**
24
38
 
39
+ - 0.20.0 [\#698](https://github.com/chef/inspec/pull/698) ([arlimus](https://github.com/arlimus))
25
40
  - update appveyor ruby to 2.2 + fix caching [\#697](https://github.com/chef/inspec/pull/697) ([arlimus](https://github.com/arlimus))
26
- - update to train's new file interface: symlink + uid + gid [\#694](https://github.com/chef/inspec/pull/694) ([arlimus](https://github.com/arlimus))
27
- - validate target backend [\#688](https://github.com/chef/inspec/pull/688) ([arlimus](https://github.com/arlimus))
28
- - Hpux [\#682](https://github.com/chef/inspec/pull/682) ([Anirudh-Gupta](https://github.com/Anirudh-Gupta))
29
41
 
30
42
  ## [v0.19.3](https://github.com/chef/inspec/tree/v0.19.3) (2016-04-22)
31
43
  [Full Changelog](https://github.com/chef/inspec/compare/v0.19.2...v0.19.3)
@@ -807,7 +819,7 @@
807
819
  - Massively improve README [\#208](https://github.com/chef/inspec/pull/208) ([echohack](https://github.com/echohack))
808
820
 
809
821
  ## [0.9.1](https://github.com/chef/inspec/tree/0.9.1) (2015-11-04)
810
- [Full Changelog](https://github.com/chef/inspec/compare/0.9.0...0.9.1)
822
+ [Full Changelog](https://github.com/chef/inspec/compare/v0.9.1...0.9.1)
811
823
 
812
824
  **Closed issues:**
813
825
 
@@ -825,6 +837,9 @@
825
837
  - update table style [\#202](https://github.com/chef/inspec/pull/202) ([chris-rock](https://github.com/chris-rock))
826
838
  - Apache 2.0 LICENSE [\#201](https://github.com/chef/inspec/pull/201) ([jamesc](https://github.com/jamesc))
827
839
 
840
+ ## [v0.9.1](https://github.com/chef/inspec/tree/v0.9.1) (2015-11-03)
841
+ [Full Changelog](https://github.com/chef/inspec/compare/0.9.0...v0.9.1)
842
+
828
843
  ## [0.9.0](https://github.com/chef/inspec/tree/0.9.0) (2015-11-03)
829
844
  [Full Changelog](https://github.com/chef/inspec/compare/0.8.0...0.9.0)
830
845
 
data/Gemfile CHANGED
@@ -27,6 +27,7 @@ end
27
27
 
28
28
  group :tools do
29
29
  gem 'pry', '~> 0.10'
30
+ gem 'rb-readline'
30
31
  gem 'license_finder'
31
32
  gem 'github_changelog_generator', '~> 1'
32
33
  end
@@ -3,5 +3,5 @@
3
3
  # author: Christoph Hartmann
4
4
 
5
5
  module Inspec
6
- VERSION = '0.20.0'.freeze
6
+ VERSION = '0.20.1'.freeze
7
7
  end
@@ -32,7 +32,7 @@ module Inspec::Resources
32
32
  symlink? pipe? mode mode? owner owned_by? group grouped_into?
33
33
  link_path linked_to? mtime size selinux_label immutable?
34
34
  product_version file_version version? md5sum sha256sum
35
- path source source_path uid gid
35
+ path basename source source_path uid gid
36
36
  }.each do |m|
37
37
  define_method m.to_sym do |*args|
38
38
  file.method(m.to_sym).call(*args)
@@ -96,6 +96,8 @@ if os.unix?
96
96
  its('sha256sum') { should eq 'b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9' }
97
97
  its('product_version') { should eq nil }
98
98
  its('file_version') { should eq nil }
99
+ its('basename') { should cmp 'file' }
100
+ its('path') { should cmp '/tmp/file' }
99
101
 
100
102
  its('owner') { should eq filedata[:user] }
101
103
  its('group') { should eq filedata[:group] }
@@ -118,6 +120,8 @@ if os.unix?
118
120
  its('sha256sum') { should eq filedata[:dir_sha256sum] }
119
121
  its('product_version') { should eq nil }
120
122
  its('file_version') { should eq nil }
123
+ its('basename') { should cmp 'folder' }
124
+ its('path') { should cmp '/tmp/folder' }
121
125
 
122
126
  its('owner') { should eq filedata[:user] }
123
127
  its('group') { should eq filedata[:group] }
@@ -153,8 +157,10 @@ if os.linux?
153
157
  end
154
158
 
155
159
  if os.windows?
156
- describe file('C:\\Windows') do
160
+ describe file('C:\Windows') do
157
161
  it { should exist }
158
162
  it { should be_directory }
163
+ its('basename') { should cmp 'Windows' }
164
+ its('path') { should cmp "C:\\Windows" }
159
165
  end
160
166
  end
@@ -33,6 +33,13 @@ describe Inspec::Resources::FileResource do
33
33
  shared_file_permission_tests(:executable?)
34
34
  end
35
35
 
36
+ describe '#basename' do
37
+ it 'returns the basename' do
38
+ resource.stubs(:basename).returns('fakefile')
39
+ resource.basename.must_equal('fakefile')
40
+ end
41
+ end
42
+
36
43
  describe '#to_s' do
37
44
  it 'returns a properly formatted string' do
38
45
  resource.to_s.must_equal('File /fakepath/fakefile')
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: 0.20.0
4
+ version: 0.20.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: 2016-04-29 00:00:00.000000000 Z
11
+ date: 2016-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: r-train
@@ -343,7 +343,6 @@ files:
343
343
  - lib/utils/filter_array.rb
344
344
  - lib/utils/find_files.rb
345
345
  - lib/utils/hash.rb
346
- - lib/utils/hash_map.rb
347
346
  - lib/utils/json_log.rb
348
347
  - lib/utils/modulator.rb
349
348
  - lib/utils/object_traversal.rb
@@ -531,8 +530,6 @@ files:
531
530
  - test/unit/mock/profiles/legacy-empty-metadata/metadata.rb
532
531
  - test/unit/mock/profiles/legacy-simple-metadata/metadata.rb
533
532
  - test/unit/mock/profiles/legacy-simple-metadata/test/.gitkeep
534
- - test/unit/mock/profiles/resource-tiny/inspec.yml
535
- - test/unit/mock/profiles/resource-tiny/libraries/resource.rb
536
533
  - test/unit/mock/profiles/simple-metadata/inspec.yml
537
534
  - test/unit/mock/profiles/skippy-profile-os/controls/one.rb
538
535
  - test/unit/mock/profiles/skippy-profile-os/inspec.yml
@@ -619,7 +616,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
619
616
  version: '0'
620
617
  requirements: []
621
618
  rubyforge_project:
622
- rubygems_version: 2.5.1
619
+ rubygems_version: 2.4.6
623
620
  signing_key:
624
621
  specification_version: 4
625
622
  summary: Infrastructure and compliance testing.
@@ -804,8 +801,6 @@ test_files:
804
801
  - test/unit/mock/profiles/legacy-empty-metadata/metadata.rb
805
802
  - test/unit/mock/profiles/legacy-simple-metadata/metadata.rb
806
803
  - test/unit/mock/profiles/legacy-simple-metadata/test/.gitkeep
807
- - test/unit/mock/profiles/resource-tiny/inspec.yml
808
- - test/unit/mock/profiles/resource-tiny/libraries/resource.rb
809
804
  - test/unit/mock/profiles/simple-metadata/inspec.yml
810
805
  - test/unit/mock/profiles/skippy-profile-os/controls/one.rb
811
806
  - test/unit/mock/profiles/skippy-profile-os/inspec.yml
@@ -1,37 +0,0 @@
1
- # encoding: utf-8
2
- # author: Dominik Richter
3
- # author: Christoph Hartmann
4
-
5
- class HashMap
6
- class << self
7
- def [](hash, *keys)
8
- return hash if keys.empty? || hash.nil?
9
- key = keys.shift
10
- if hash.is_a?(Array)
11
- map = hash.map { |i| [i, key] }
12
- else
13
- map = hash[key]
14
- end
15
- [map, *keys]
16
- rescue NoMethodError => _
17
- nil
18
- end
19
- end
20
- end
21
-
22
- class StringMap
23
- class << self
24
- def [](hash, *keys)
25
- return hash if keys.empty? || hash.nil?
26
- key = keys.shift
27
- if hash.is_a?(Array)
28
- map = hash.map { |i| [i, key] }
29
- else
30
- map = hash[key]
31
- end
32
- [map, *keys]
33
- rescue NoMethodError => _
34
- nil
35
- end
36
- end
37
- end
@@ -1,10 +0,0 @@
1
- name: complete
2
- title: complete example profile
3
- maintainer: Chef Software, Inc.
4
- copyright: Chef Software, Inc.
5
- copyright_email: support@chef.io
6
- license: Proprietary, All rights reserved
7
- summary: Testing stub
8
- version: 1.0.0
9
- supports:
10
- - os-family: linux
@@ -1,3 +0,0 @@
1
- class Tiny < Inspec.resource(1)
2
- name 'tiny'
3
- end