knife-push 1.1.5 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chef/knife/job_helpers.rb +4 -3
- data/lib/chef/knife/job_output.rb +3 -9
- data/lib/chef/knife/job_start.rb +1 -1
- data/lib/knife-push/version.rb +1 -1
- metadata +19 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 636e6fa1d65f445cf9f4981f3d75b857854b756f507468f6950a4234e3b6f980
|
4
|
+
data.tar.gz: 11b1c0bbec31bb8a6e69469cafd3d385458d3f3f8f21e42b9afae6bd673c971f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ed039e98ff4e483ac41f03c2f17b7b58e344236d1e92954e3850ca947fef6a48c3333cb10cc75f7dad56868d27010f2a41439542160a3d4682011fb63844601
|
7
|
+
data.tar.gz: 25f6b27f874f515b06857c57c450652c824a6471dcba8114c9a92255e9eeffd591c935a5b7d2d026edb22090a2bd52dbaa804d766a382fd10120dfdac1f252ba
|
@@ -15,6 +15,8 @@
|
|
15
15
|
# under the License.
|
16
16
|
#
|
17
17
|
|
18
|
+
require "addressable/uri"
|
19
|
+
|
18
20
|
class Chef
|
19
21
|
class Knife
|
20
22
|
module JobHelpers
|
@@ -22,11 +24,10 @@ class Chef
|
|
22
24
|
node_names = []
|
23
25
|
if search
|
24
26
|
q = Chef::Search::Query.new
|
25
|
-
escaped_query = URI.
|
26
|
-
Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))
|
27
|
+
escaped_query = Addressable::URI.encode_component(search, Addressable::URI::CharacterClasses::QUERY)
|
27
28
|
begin
|
28
29
|
nodes = q.search(:node, escaped_query).first
|
29
|
-
rescue Net::
|
30
|
+
rescue Net::HTTPClientException => e
|
30
31
|
msg Chef::JSONCompat.from_json(e.response.body)["error"].first
|
31
32
|
ui.error("knife search failed: #{msg}")
|
32
33
|
exit 1
|
@@ -39,16 +39,10 @@ class Chef
|
|
39
39
|
|
40
40
|
def get_channel(channel)
|
41
41
|
channel ||= "stdout"
|
42
|
-
|
43
|
-
when "stdout"
|
44
|
-
return channel
|
45
|
-
when "stderr"
|
46
|
-
return channel
|
47
|
-
else
|
48
|
-
raise "Invalid Format please enter stdout or stderr"
|
49
|
-
end
|
50
|
-
end
|
42
|
+
return channel if channel == "stdout" || channel == "stderr"
|
51
43
|
|
44
|
+
raise "Invalid Format please enter stdout or stderr"
|
45
|
+
end
|
52
46
|
end
|
53
47
|
end
|
54
48
|
end
|
data/lib/chef/knife/job_start.rb
CHANGED
data/lib/knife-push/version.rb
CHANGED
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:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Keiser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef
|
@@ -16,14 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '15.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '15.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: addressable
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
description: Knife plugin for Chef Push Jobs
|
28
42
|
email: jkeiser@chef.io
|
29
43
|
executables: []
|
@@ -50,7 +64,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
50
64
|
requirements:
|
51
65
|
- - ">="
|
52
66
|
- !ruby/object:Gem::Version
|
53
|
-
version: 2.
|
67
|
+
version: '2.5'
|
54
68
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
55
69
|
requirements:
|
56
70
|
- - ">="
|