knife-push 1.1.2 → 1.1.5

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
  SHA256:
3
- metadata.gz: 17eebd0c10b3d507ba5e63034881449f315f79409878f79c164c3819a66c1df0
4
- data.tar.gz: 14263f755f97aff4c0088f1c906be9b05080211a40e17f3c075f409572c651fb
3
+ metadata.gz: 388b9c9ebbbc83270b7329c93b7d57b1fa5c03649f05f6f84cada273e0c56a58
4
+ data.tar.gz: 242ffdba74fb0d386fb0388f7697b1664b049631d70c2d670bf45e793805237b
5
5
  SHA512:
6
- metadata.gz: 5e2364ef0a7297d622b036a0a8fa0deb746ebb38cd441630e2ee5d8dcb8844ca39b74edb966c8c15972cd5f595f295ecb728aaf60fa34574370ceffb51bca940
7
- data.tar.gz: 311d76ae9a0ebd4b05a1adaea87c210ecc4f3ff3ef9064e3fa9e223b3a280f2a4f6ea0694e248632bc8ece698f856fa251c761fd32e22b283cbc26f3a192dc69
6
+ metadata.gz: 6a7a37b6b8efdaf066d6829a905d719b921a4298a1bd2f083fd018000bd3a19a3a480d750218cbeea0a0dc45c7bad766f03624ab6b01d1886ee3a483702485fe
7
+ data.tar.gz: 8ba046a4b3e3de9658286eac24a31804502d4e08e7d7438df860cfccdd53dbe7e1e74af4c0729e5c6c96bd0fa351168cb2534a2e6ed9bac37d0de6ffb0bb7e78
@@ -23,7 +23,7 @@ class Chef
23
23
  if search
24
24
  q = Chef::Search::Query.new
25
25
  escaped_query = URI.escape(search,
26
- Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))
26
+ Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))
27
27
  begin
28
28
  nodes = q.search(:node, escaped_query).first
29
29
  rescue Net::HTTPServerException => e
@@ -81,8 +81,8 @@ class Chef
81
81
 
82
82
  def status_code(job)
83
83
  if job["status"] == "complete" && job["nodes"].keys.all? do |key|
84
- key == "succeeded" || key == "nacked" || key == "unavailable"
85
- end
84
+ key == "succeeded" || key == "nacked" || key == "unavailable"
85
+ end
86
86
  0
87
87
  else
88
88
  1
@@ -21,9 +21,9 @@ class Chef
21
21
  banner "knife job output <job id> <node> [<node> ...]"
22
22
 
23
23
  option :channel,
24
- long: "--channel stdout|stderr",
25
- default: "stdout",
26
- description: "Which output channel to fetch (default stdout)."
24
+ long: "--channel stdout|stderr",
25
+ default: "stdout",
26
+ description: "Which output channel to fetch (default stdout)."
27
27
 
28
28
  def run
29
29
  job_id = name_args[0]
@@ -15,7 +15,7 @@
15
15
  # under the License.
16
16
  #
17
17
 
18
- require "chef/knife/job_helpers"
18
+ require_relative "job_helpers"
19
19
 
20
20
  class Chef
21
21
  class Knife
@@ -35,54 +35,54 @@ class Chef
35
35
  description: "Maximum time the job will be allowed to run (in seconds)."
36
36
 
37
37
  option :quorum,
38
- short: "-q QUORUM",
39
- long: "--quorum QUORUM",
40
- default: "100%",
41
- description: "Pushy job quorum. Percentage (-q 50%) or Count (-q 145)."
38
+ short: "-q QUORUM",
39
+ long: "--quorum QUORUM",
40
+ default: "100%",
41
+ description: "Pushy job quorum. Percentage (-q 50%) or Count (-q 145)."
42
42
 
43
43
  option :search,
44
- short: "-s QUERY",
45
- long: "--search QUERY",
46
- required: false,
47
- description: "Solr query for list of job candidates."
44
+ short: "-s QUERY",
45
+ long: "--search QUERY",
46
+ required: false,
47
+ description: "Solr query for list of job candidates."
48
48
 
49
49
  option :send_file,
50
- long: "--file FILE",
51
- default: nil,
52
- description: "File to send to job."
50
+ long: "--file FILE",
51
+ default: nil,
52
+ description: "File to send to job."
53
53
 
54
54
  option :capture_output,
55
- long: "--capture",
56
- boolean: true,
57
- default: false,
58
- description: "Capture job output."
55
+ long: "--capture",
56
+ boolean: true,
57
+ default: false,
58
+ description: "Capture job output."
59
59
 
60
60
  option :with_env,
61
- long: "--with-env ENV",
62
- default: nil,
63
- description: "JSON blob of environment variables to set."
61
+ long: "--with-env ENV",
62
+ default: nil,
63
+ description: "JSON blob of environment variables to set."
64
64
 
65
65
  option :as_user,
66
- long: "--as-user USER",
67
- default: nil,
68
- description: "User id to run as."
66
+ long: "--as-user USER",
67
+ default: nil,
68
+ description: "User id to run as."
69
69
 
70
70
  option :in_dir,
71
- long: "--in-dir DIR",
72
- default: nil,
73
- description: "Directory to execute the command in."
71
+ long: "--in-dir DIR",
72
+ default: nil,
73
+ description: "Directory to execute the command in."
74
74
 
75
75
  option :nowait,
76
- long: "--nowait",
77
- short: "-b",
78
- boolean: true,
79
- default: false,
80
- description: "Rather than waiting for each job to complete, exit immediately after starting the job."
76
+ long: "--nowait",
77
+ short: "-b",
78
+ boolean: true,
79
+ default: false,
80
+ description: "Rather than waiting for each job to complete, exit immediately after starting the job."
81
81
 
82
82
  option :poll_interval,
83
- long: "--poll-interval RATE",
84
- default: 1.0,
85
- description: "Repeat interval for job status update (in seconds)."
83
+ long: "--poll-interval RATE",
84
+ default: 1.0,
85
+ description: "Repeat interval for job status update (in seconds)."
86
86
 
87
87
  def run
88
88
  job_name = @name_args[0]
@@ -22,7 +22,7 @@ class Chef
22
22
 
23
23
  def run
24
24
  get_node_statuses(name_args).each do |node_status|
25
- puts "#{node_status['node_name']}\t#{node_status['availability']}"
25
+ puts "#{node_status["node_name"]}\t#{node_status["availability"]}"
26
26
  end
27
27
  end
28
28
 
@@ -1,7 +1,7 @@
1
1
 
2
2
  module Knife
3
3
  module Push
4
- VERSION = "1.1.2".freeze
4
+ VERSION = "1.1.5".freeze
5
5
  MAJOR, MINOR, TINY = VERSION.split(".")
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-push
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Keiser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-04 00:00:00.000000000 Z
11
+ date: 2019-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef
@@ -57,8 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
57
  - !ruby/object:Gem::Version
58
58
  version: '0'
59
59
  requirements: []
60
- rubyforge_project:
61
- rubygems_version: 2.7.6
60
+ rubygems_version: 3.0.3
62
61
  signing_key:
63
62
  specification_version: 4
64
63
  summary: Knife plugin for Chef Push Jobs