puppetclassify 0.1.8 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +2 -2
- data/lib/puppet_https.rb +5 -5
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7e41af86d17555f3c6b83cde41559b62f5bf1d424126fe51f8cc14460c1103ec
|
4
|
+
data.tar.gz: 1a4086412121c61184553fbd47058757cdf43dd8dfc6a0233bec9a4651d90eed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6afc141fbceec95d924949091e3ab4d914283e1a0f622b0e949fede6397efd1759d0255f7f0c4ddcf0bb41bff972003ebbe35c23da0dfa2f3ce4f812534af5c
|
7
|
+
data.tar.gz: 0a4e08b5e622efaa108721e6997881a2d45fdd7859af1b65cee346a3af8856c50f14a32c3e289fa898c3ab5a9491adcfbaa54c66e77b7b24d3da0b7373a4dcaa
|
data/README.md
CHANGED
@@ -19,7 +19,7 @@ gem install puppetclassify-0.1.0.gem
|
|
19
19
|
|
20
20
|
## Maintenance
|
21
21
|
|
22
|
-
Maintainers: [
|
22
|
+
Maintainers: [Puppet](https://github.com/puppetlabs)
|
23
23
|
|
24
24
|
Tickets: Open an issue or pull request directly on this repository
|
25
25
|
|
@@ -147,7 +147,7 @@ puppetclassify.groups.pin_nodes(my_group_id, nodes)
|
|
147
147
|
puppetclassify.groups.unpin_nodes(my_group_id, nodes)
|
148
148
|
|
149
149
|
# unpin nodes from EVERY group
|
150
|
-
|
150
|
+
puppetclassify.commands.unpin_from_all(nodes)
|
151
151
|
```
|
152
152
|
|
153
153
|
## Library Docs
|
data/lib/puppet_https.rb
CHANGED
@@ -21,7 +21,7 @@ class PuppetHttps
|
|
21
21
|
cert_path = settings['certificate_path']
|
22
22
|
pkey_path = settings['private_key_path']
|
23
23
|
|
24
|
-
@ca_file = settings['ca_certificate_path'] if ca_cert_path and File.
|
24
|
+
@ca_file = settings['ca_certificate_path'] if ca_cert_path and File.exist?(ca_cert_path)
|
25
25
|
@read_timeout = settings['read_timeout'] || 90 # A default timeout value in seconds
|
26
26
|
|
27
27
|
@auth_method = case
|
@@ -29,7 +29,7 @@ class PuppetHttps
|
|
29
29
|
'token'
|
30
30
|
when (cert_path and pkey_path)
|
31
31
|
'cert'
|
32
|
-
when default_token_path && File.
|
32
|
+
when default_token_path && File.exist?(default_token_path)
|
33
33
|
'token'
|
34
34
|
else
|
35
35
|
nil
|
@@ -47,13 +47,13 @@ class PuppetHttps
|
|
47
47
|
case
|
48
48
|
when (@token and @token.empty?)
|
49
49
|
raise RuntimeError, "Received an empty string for token"
|
50
|
-
when (not @token and not File.
|
50
|
+
when (not @token and not File.exist?(@token_path))
|
51
51
|
raise RuntimeError, "Token file not found at [#{@token_path}]"
|
52
52
|
when (not @token and File.zero?(@token_path))
|
53
53
|
raise RuntimeError, "Token file at [#{@token_path}] is empty"
|
54
54
|
end
|
55
55
|
when 'cert'
|
56
|
-
if File.
|
56
|
+
if File.exist?(cert_path) and File.exist?(pkey_path)
|
57
57
|
@cert = OpenSSL::X509::Certificate.new(File.read(cert_path))
|
58
58
|
@key = OpenSSL::PKey::RSA.new(File.read(pkey_path))
|
59
59
|
else
|
@@ -131,7 +131,7 @@ class PuppetHttps
|
|
131
131
|
|
132
132
|
def token
|
133
133
|
return @token if @token
|
134
|
-
if @token_path and File.
|
134
|
+
if @token_path and File.exist?(@token_path)
|
135
135
|
@token = File.read(@token_path)
|
136
136
|
return @token
|
137
137
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppetclassify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet Labs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A ruby library to interface with the classifier service
|
14
14
|
email: info@puppet.com
|
@@ -49,8 +49,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
49
49
|
- !ruby/object:Gem::Version
|
50
50
|
version: '0'
|
51
51
|
requirements: []
|
52
|
-
|
53
|
-
rubygems_version: 2.6.14
|
52
|
+
rubygems_version: 3.1.6
|
54
53
|
signing_key:
|
55
54
|
specification_version: 4
|
56
55
|
summary: Puppet Classify!
|