knife-inspect 0.12.0 → 0.13.0

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: 6626269c4b43a35aa38d29b4903b08ab8cdd2759
4
- data.tar.gz: cb2379c1b41f19f880bec679612e7d703683cfbb
3
+ metadata.gz: f79672a70614a64cac5d27a6ce90ca8cde03426e
4
+ data.tar.gz: 5968fc3c6d5e5ddf39c36cf9286a81f886cb050e
5
5
  SHA512:
6
- metadata.gz: b9018765a0064ef16df6b4bf3854727285bcce390a15cfa06dacf2bd490f56d8dea151fb53c0012fd4da386e6579f7cba9427f15a016f40e6e98518c9a0d4a47
7
- data.tar.gz: 7c8b6f93a258e3e28af3898db145f04a095ffabfcf8a1b1a222cef85b5dafd728712eacf2ce0bf4da27b8429d964408ab2fb5de979a3dc5a3035f5612b1a4648
6
+ metadata.gz: 4290e1e41c1eafe08e17e887947552a498e977a777a0ec811036e2e66a332ee0ca66ea6f6c04c925cb83d041b62fa5dcaf3c32037a33aca830d6c8a370a180a9
7
+ data.tar.gz: a287dfe82192a90be2a846d08b34b02a77c345b142989349806f870ef11771ea4a2cac4f5bc24f8cb64086b46cf2ff1804d855ca97e4a138725c5c0b857afe5a
@@ -1,13 +1,11 @@
1
1
  language: ruby
2
+ cache: bundler
2
3
  rvm:
3
4
  - 2.1
4
5
  - 2.2
5
6
  env:
6
- - CHEF_VERSION=10.34.6
7
- - CHEF_VERSION=11.16.4
8
- - CHEF_VERSION=12.0.3
9
- before_script:
10
- - chef-client --version
7
+ - CHEF_VERSION=12.6.0
8
+ - CHEF_VERSION=12.7.2
11
9
  notifications:
12
10
  email: false
13
11
  sudo: false
data/HISTORY.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.13.0 ( 2016-02-16 )
2
+
3
+ * Fixed compatibility with Chef 12.7.2 ([#42][#42])
4
+
5
+
1
6
  ## 0.12.0 ( 2015-02-05 )
2
7
 
3
8
  * Bumped Chef compatibility to support Chef 12 ([#36][#36]). This is otherwise
@@ -177,3 +182,4 @@ instead.
177
182
  [#27]: https://github.com/bmarini/knife-inspect/issues/27
178
183
  [#23]: https://github.com/bmarini/knife-inspect/issues/23
179
184
  [#35]: https://github.com/bmarini/knife-inspect/issues/35
185
+ [#42]: https://github.com/bmarini/knife-inspect/issues/42
@@ -24,8 +24,8 @@ Gem::Specification.new do |s|
24
24
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
25
25
 
26
26
  s.add_development_dependency 'rake', '~> 10.1'
27
- s.add_development_dependency 'rspec', '~> 3.0.0'
28
- s.add_development_dependency 'simplecov', '~> 0.8'
27
+ s.add_development_dependency 'rspec', '~> 3.4.0'
28
+ s.add_development_dependency 'simplecov', '~> 0.11'
29
29
  s.add_development_dependency 'coveralls', '~> 0.7'
30
30
 
31
31
  s.add_runtime_dependency 'chef', chef_version
@@ -10,7 +10,6 @@ require 'health_inspector/checklists/data_bags'
10
10
  require 'health_inspector/checklists/data_bag_items'
11
11
  require 'health_inspector/checklists/environments'
12
12
  require 'health_inspector/checklists/roles'
13
- require 'chef/rest'
14
13
  require 'chef/version'
15
14
 
16
15
  module HealthInspector
@@ -37,7 +37,8 @@ module HealthInspector
37
37
  return unless versions_exist? && versions_match?
38
38
 
39
39
  begin
40
- cookbook = context.rest.get_rest("/cookbooks/#{name}/#{local}")
40
+ # Cast local (Chef::Version) into a string
41
+ cookbook = Chef::CookbookVersion.load(name, local.to_s)
41
42
  messages = []
42
43
 
43
44
  Chef::CookbookVersion::COOKBOOK_SEGMENTS.each do |segment|
@@ -98,7 +99,7 @@ module HealthInspector
98
99
  end
99
100
 
100
101
  def server_items
101
- @context.rest.get_rest('/cookbooks').reduce({}) do |hsh, (name, version)|
102
+ Chef::CookbookVersion.list.reduce({}) do |hsh, (name, version)|
102
103
  hsh[name] = Chef::Version.new(version['versions'].first['version'])
103
104
  hsh
104
105
  end
@@ -12,10 +12,6 @@ module HealthInspector
12
12
  Array(Chef::Config.cookbook_path)
13
13
  end
14
14
 
15
- def rest
16
- @knife.rest
17
- end
18
-
19
15
  def repo_path
20
16
  ENV['PWD']
21
17
  end
@@ -1,3 +1,3 @@
1
1
  module HealthInspector
2
- VERSION = '0.12.0'
2
+ VERSION = '0.13.0'
3
3
  end
@@ -12,9 +12,7 @@ RSpec.describe HealthInspector::Checklists::Cookbooks do
12
12
 
13
13
  describe '#server_items' do
14
14
  it 'returns a list of roles from the chef server' do
15
- allow(health_inspector_context).to receive(:rest).and_return(double)
16
- expect(health_inspector_context.rest).to receive(:get_rest)
17
- .with('/cookbooks')
15
+ expect(Chef::CookbookVersion).to receive(:list)
18
16
  .and_return(
19
17
  'cookbook_one' => { 'versions' => [{ 'version' => '1.0.0' }] },
20
18
  'cookbook_two' => { 'versions' => [{ 'version' => '0.0.1' }] }
@@ -1,10 +1,9 @@
1
1
  if RUBY_VERSION > '1.9'
2
2
  require 'simplecov'
3
3
  require 'coveralls'
4
- SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
5
- SimpleCov::Formatter::HTMLFormatter,
6
- Coveralls::SimpleCov::Formatter
7
- ]
4
+ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
5
+ [SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter]
6
+ )
8
7
  SimpleCov.start do
9
8
  add_filter '/spec/'
10
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-inspect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Karékinian
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-02-24 00:00:00.000000000 Z
12
+ date: 2016-02-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -31,28 +31,28 @@ dependencies:
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: 3.0.0
34
+ version: 3.4.0
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: 3.0.0
41
+ version: 3.4.0
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: simplecov
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: '0.8'
48
+ version: '0.11'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: '0.8'
55
+ version: '0.11'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: coveralls
58
58
  requirement: !ruby/object:Gem::Requirement
@@ -190,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
190
190
  version: '0'
191
191
  requirements: []
192
192
  rubyforge_project:
193
- rubygems_version: 2.2.2
193
+ rubygems_version: 2.4.5.1
194
194
  signing_key:
195
195
  specification_version: 4
196
196
  summary: Inspect your chef repo as it is compared to what is on your chef server