knife-essentials 1.5.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,5 @@
1
1
  require 'chef_fs/knife'
2
+ require 'chef/application/client'
2
3
 
3
4
  class Chef
4
5
  class Knife
@@ -10,10 +11,11 @@ class Chef
10
11
  deps do
11
12
  require 'chef'
12
13
  require 'chef/log'
13
- require 'chef/application/client'
14
14
  require 'chef_fs/file_system'
15
15
  end
16
16
 
17
+ options.merge!(Chef::Application::Client.options)
18
+
17
19
  option :port,
18
20
  :short => '-p',
19
21
  :long => '--port=PORT',
@@ -28,6 +30,8 @@ class Chef
28
30
  ui.output "Using config file #{config[:config_file]} ..."
29
31
  end
30
32
 
33
+ Chef::Config.merge!(config)
34
+
31
35
  self.exit_code = 0
32
36
  end
33
37
 
@@ -51,6 +55,7 @@ class Chef
51
55
  end
52
56
  end
53
57
  client = Chef::Application::Client.new
58
+ client.config = config
54
59
  if run_list != ''
55
60
  client.config[:override_runlist] = run_list
56
61
  end
@@ -34,22 +34,25 @@ module ChefFS
34
34
 
35
35
  def self.inherited(c)
36
36
  super
37
+
37
38
  # Ensure we always get to do our includes, whether subclass calls deps or not
38
39
  c.deps do
39
40
  end
40
41
 
41
- option :repo_mode,
42
- :long => '--repo-mode MODE',
43
- :description => "Specifies the local repository layout. Values: static, everything, hosted_everything. Default: everything/hosted_everything"
42
+ c.options.merge!(options)
43
+ end
44
+
45
+ option :repo_mode,
46
+ :long => '--repo-mode MODE',
47
+ :description => "Specifies the local repository layout. Values: static, everything, hosted_everything. Default: everything/hosted_everything"
44
48
 
45
- option :chef_repo_path,
46
- :long => '--chef-repo-path PATH',
47
- :description => 'Overrides the location of chef repo. Default is specified by chef_repo_path in the config'
49
+ option :chef_repo_path,
50
+ :long => '--chef-repo-path PATH',
51
+ :description => 'Overrides the location of chef repo. Default is specified by chef_repo_path in the config'
48
52
 
49
- option :concurrency,
50
- :long => '--concurrency THREADS',
51
- :description => 'Maximum number of simultaneous requests to send (default: 10)'
52
- end
53
+ option :concurrency,
54
+ :long => '--concurrency THREADS',
55
+ :description => 'Maximum number of simultaneous requests to send (default: 10)'
53
56
 
54
57
  def configure_chef
55
58
  super
@@ -1,3 +1,3 @@
1
1
  module ChefFS
2
- VERSION = "1.5.1"
2
+ VERSION = "1.5.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-essentials
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: