Skip to content

Commit c5eb2c9

Browse files
committed
Ran rubocop with autocorrect on tasks and functions
1 parent 0ba9622 commit c5eb2c9

File tree

8 files changed

+18
-4
lines changed

8 files changed

+18
-4
lines changed

examples/ruby_task.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/opt/puppetlabs/puppet/bin/ruby
2+
# frozen_string_literal: true
3+
24
#
35
# rubocop:disable Style/GlobalVars
46
require 'json'

lib/puppet/functions/peadm/file_content_upload.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require 'tempfile'
24

35
Puppet::Functions.create_function(:'peadm::file_content_upload') do

lib/puppet/functions/peadm/node_manager_yaml_location.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
Puppet::Functions.create_function(:'peadm::node_manager_yaml_location') do
24
dispatch :nm_yaml_location do
35
end

tasks/rbac_token.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/opt/puppetlabs/puppet/bin/ruby
2+
# frozen_string_literal: true
3+
24
#
35
# rubocop:disable Style/GlobalVars
46
require 'net/https'
@@ -16,7 +18,7 @@
1618
'login' => 'admin',
1719
'password' => $params['password'],
1820
'lifetime' => '1y',
19-
'label' => 'provision-time token',
21+
'label' => 'provision-time token'
2022
}.to_json
2123

2224
http = Net::HTTP.new(uri.host, uri.port)

tasks/read_file.rb

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/opt/puppetlabs/puppet/bin/ruby
2+
# frozen_string_literal: true
23

34
require 'json'
45

@@ -8,11 +9,11 @@
89
rescue StandardError => err
910
result = {
1011
'content' => nil,
11-
'error' => err.message,
12+
'error' => err.message
1213
}
1314
else
1415
result = {
15-
'content' => content,
16+
'content' => content
1617
}
1718
ensure
1819
puts result.to_json

tasks/sign_csr.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/opt/puppetlabs/puppet/bin/ruby
2+
# frozen_string_literal: true
3+
24
#
35
require 'json'
46
require 'open3'

tasks/submit_csr.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/opt/puppetlabs/puppet/bin/ruby
2+
# frozen_string_literal: true
3+
24
#
35
require 'json'
46
require 'open3'

tasks/trusted_facts.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/opt/puppetlabs/puppet/bin/ruby
2+
# frozen_string_literal: true
23

34
require 'openssl'
45
require 'puppet'
@@ -35,7 +36,7 @@
3536
result = {
3637
'certname' => certname,
3738
'dns-alt-names' => alt_names,
38-
'extensions' => extensions,
39+
'extensions' => extensions
3940
}
4041

4142
puts result.to_json

0 commit comments

Comments
 (0)