Skip to content

Commit

Permalink
deal with PR comments
Browse files Browse the repository at this point in the history
- code cleanup
- refactoring
- satisfy rubocop
  • Loading branch information
ThomasMinor committed Nov 24, 2021
1 parent c8ab439 commit ad58e62
Show file tree
Hide file tree
Showing 10 changed files with 184 additions and 86 deletions.
3 changes: 3 additions & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ Gemfile:
optional:
':test':
- gem: puppet-lint-param-docs
spec/spec_helper.rb:
spec_overrides:
- "require 'support/acceptance/constants.rb'"
25 changes: 17 additions & 8 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -502,15 +502,24 @@
ensure => 'absent',
}
} else {
archive {
$target:
ensure => 'present',
source => $plugin_data['source'],
username => $plugin_data['username'],
password => $plugin_data['password'],
checksum => $plugin_data['checksum'],
checksum_type => $plugin_data['checksum_type'],
$_target_defaults = {
ensure => 'present',
source => $plugin_data['source'],
checksum => $plugin_data['checksum'],
checksum_type => $plugin_data['checksum_type'],
}
$_username = !empty($plugin_data['username']) ? {
default => {},
true => { username => $plugin_data['username'] }
}
$_password = !empty($plugin_data['password']) ? {
default => {},
true => { password => $plugin_data['password'] }
}
$_plugin_archive = {
$target => $_target_defaults + $_username + $_password
}
create_resources(archive, $_plugin_archive)
}
}
}
2 changes: 1 addition & 1 deletion spec/acceptance/default_parameters_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class { 'jira':
EOS

# jira just takes *ages* to start up :-(
WGET_CMD = 'wget -q --tries=24 --retry-connrefused --read-timeout=10 localhost:8080'
WGET_CMD = 'wget -q --tries=24 --retry-connrefused --read-timeout=10 localhost:8080'.freeze
apply_manifest(pp, catch_failures: true)
sleep 60
shell WGET_CMD, acceptable_exit_codes: [0, 8]
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/mysql_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class { 'jira':
}
EOS

WGET_CMD='wget -q --tries=24 --retry-connrefused --read-timeout=10 --no-check-certificate localhost:8081'
WGET_CMD = 'wget -q --tries=24 --retry-connrefused --read-timeout=10 --no-check-certificate localhost:8081'.freeze
apply_manifest(pp, catch_failures: true)
sleep 60
shell WGET_CMD, acceptable_exit_codes: [0, 8]
Expand Down
Loading

0 comments on commit ad58e62

Please sign in to comment.