knife-node-context-exec 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: da0deb72f863138843927f8f61b81eec930d50e7
4
- data.tar.gz: d3b439e69b8b9900a297c1fe3b63ce0c118f4a02
3
+ metadata.gz: 46bedee57a032fb09b569f83b7a3e789515b397d
4
+ data.tar.gz: 505435686cd23f4b02c3d8c0695c921f9b976d12
5
5
  SHA512:
6
- metadata.gz: ee1501aa1cde4f6939cae64ca8c3dcbdf885cd1b6c9c619e5ee45612dae64275f8751e6ca476c92b1665a8df806ef4340d88e49e7989a460c943af60454ae929
7
- data.tar.gz: 646d17fd7ab2ec5e9da2363307d2d7f49887e975d54d527d7a4ffb7f4c4c7fcbae33fe6d0a1f2775af437db0ca2fe191fe1d918a762b0c54f20d3421541da4a1
6
+ metadata.gz: 2470def677777328ade531ab064166d5e948e5424b9bbc6283ca1fbf0879027b37340588c4a4fefa1fd13439276105198159a43020c76ece0f9d63f47828cc8b
7
+ data.tar.gz: cfac89ee55083e59c5dac2a73a3bda9a6e5b63a702be0305d7f125d939dfc4602146734f4748bbc2a6a9519eebab7748e159ddf9f8564095ecd4a8e9111639ed
@@ -1,4 +1,5 @@
1
1
  require 'knife-node-context-exec/version'
2
+ require 'chef/knife'
2
3
 
3
4
  # The knife
4
5
  class ContextExec < Chef::Knife
@@ -10,37 +11,38 @@ class ContextExec < Chef::Knife
10
11
  end
11
12
 
12
13
  option :environment,
13
- short: '-E',
14
- long: '--environment',
14
+ short: '-E VALUE',
15
+ long: '--environment VALUE',
15
16
  description: 'The environment to search.'
16
17
  option :node_query,
17
- short: '-Q',
18
- long: '--query',
18
+ short: '-Q VALUE',
19
+ long: '--query VALUE',
19
20
  description: 'The node query.'
20
21
  option :directory,
21
- short: '-D',
22
- long: '--directory',
22
+ short: '-D VALUE',
23
+ long: '--directory VALUE',
23
24
  description: 'A directory for working files.'
24
25
  option :template_filename,
25
- short: '-T',
26
- long: '--template',
26
+ short: '-T VALUE',
27
+ long: '--template VALUE',
27
28
  description: 'The filename of a template.'
28
29
  option :script_filename,
29
- short: '-S',
30
- long: '--script',
30
+ short: '-S VALUE',
31
+ long: '--script VALUE',
31
32
  description: 'The environment to search.'
32
33
  option :command,
33
- short: '-C',
34
- long: '--command',
34
+ short: '-C VALUE',
35
+ long: '--command VALUE',
35
36
  description: 'The command to run.'
36
37
  option :filter_regex,
37
- short: '-R',
38
- long: '--regex',
38
+ short: '-R VALUE',
39
+ long: '--regex VALUE',
39
40
  description: 'A regex used to filter output.'
40
41
  option :parallel,
41
- short: '-P',
42
- long: '--parallel',
43
- description: 'Run in parallel?'
42
+ short: '-P VALUE',
43
+ long: '--parallel VALUE',
44
+ description: 'Run in parallel?',
45
+ boolean: true
44
46
 
45
47
  def run
46
48
  puts "knife context exec #{KnifeNodeContextExec::VERSION}"
@@ -51,7 +53,7 @@ class ContextExec < Chef::Knife
51
53
  script_filename = config[:script_filename].to_s
52
54
  command = config[:command].to_s
53
55
  filter_regex = config[:filter_regex].to_s
54
- parallel = config[:parallel].to_s
56
+ parallel = config[:parallel]
55
57
  puts "Environment: #{environment}"
56
58
  puts "Query: #{node_query}"
57
59
  puts "Directory: #{directory}"
@@ -65,6 +67,6 @@ class ContextExec < Chef::Knife
65
67
  end
66
68
  nodes.each { |node| puts "Found #{node.name}" }
67
69
  KnifeNodeContextExec.run(nodes, directory, template_filename, script_filename, command, filter_regex,
68
- parallel == 'true', false)
70
+ parallel, false)
69
71
  end
70
72
  end
@@ -1,3 +1,3 @@
1
1
  module KnifeNodeContextExec
2
- VERSION = '1.0.2'.freeze
2
+ VERSION = '1.0.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-node-context-exec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Heald