puppetclassify 0.1.7 → 0.2.0

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.
Files changed (4) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +2 -2
  3. data/lib/puppet_https.rb +6 -6
  4. metadata +3 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 5250c1eb3c32ccb86d0ef618bca29d3329a97b35
4
- data.tar.gz: d4e0d119a544c5e35e560b1477a2269c91961bfa
2
+ SHA256:
3
+ metadata.gz: 7e41af86d17555f3c6b83cde41559b62f5bf1d424126fe51f8cc14460c1103ec
4
+ data.tar.gz: 1a4086412121c61184553fbd47058757cdf43dd8dfc6a0233bec9a4651d90eed
5
5
  SHA512:
6
- metadata.gz: 10517340d864c6c2dacb7932ec44d0cca9b8223564c304d69caa43c57b569a399ea85a191354072226731b2d8ec932b22fb1b0ae35ec44af01979bea3d9d6b11
7
- data.tar.gz: d9c944525c38d9fd507dc39cb8745780c9808c4d033d4cfc68327f46ca82b66ac66c5f9b8e191e49a232a2f9c90bc7850308b6fb4031d73c2b22f67d542cc7ec
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: [Brian Cain](https://github.com/briancain) <brian.cain@puppetlabs.com>
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
- puppetlcassify.commands.unpin_from_all(nodes)
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.exists?(ca_cert_path)
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.exists?(default_token_path)
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.exists?(@token_path))
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.exists?(cert_path) and File.exists?(pkey_path)
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
@@ -70,7 +70,7 @@ class PuppetHttps
70
70
  # connection.set_debug_output $stderr
71
71
 
72
72
  connection.use_ssl = true
73
- connection.ssl_version = :TLSv1
73
+ connection.ssl_version = :TLSv1_2
74
74
  connection.verify_mode = OpenSSL::SSL::VERIFY_PEER
75
75
  connection.ca_file = @ca_file if @ca_file
76
76
  connection.read_timeout = @read_timeout
@@ -131,7 +131,7 @@ class PuppetHttps
131
131
 
132
132
  def token
133
133
  return @token if @token
134
- if @token_path and File.exists?(@token_path)
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.1.7
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: 2017-05-16 00:00:00.000000000 Z
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
- rubyforge_project:
53
- rubygems_version: 2.2.5
52
+ rubygems_version: 3.1.6
54
53
  signing_key:
55
54
  specification_version: 4
56
55
  summary: Puppet Classify!