Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix ruby cop warning
Signed-off-by: Gavin Didrichsen <[email protected]>
  • Loading branch information
gavindidrichsen committed Jun 20, 2024
commit 02f4c47ced40ca63202731dd5d3e4a68407532c2
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def function_method(name, parts = {})
# exposed hack.
return nil unless Puppet::Parser::Functions.function(name)

scope.method("function_#{name}".to_sym)
scope.method(:"function_#{name}")
end
module_function :function_method
end
Expand Down
8 changes: 4 additions & 4 deletions lib/puppetlabs_spec_helper/tasks/fixtures.rb
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def download_items(items)
end
end
# wait for all the threads to finish
items.each { |_remote, opts| opts[:thread].join }
items.each_value { |opts| opts[:thread].join }
end

# @param target [String] - the target directory
Expand Down Expand Up @@ -427,12 +427,12 @@ def download_module(remote, opts)

desc 'Clean up the fixtures directory'
task :spec_clean do
repositories.each do |_remote, opts|
repositories.each_value do |opts|
target = opts['target']
FileUtils.rm_rf(target)
end

forge_modules.each do |_remote, opts|
forge_modules.each_value do |opts|
target = opts['target']
FileUtils.rm_rf(target)
end
Expand All @@ -446,7 +446,7 @@ def download_module(remote, opts)

desc 'Clean up any fixture symlinks'
task :spec_clean_symlinks do
fixtures('symlinks').each do |_source, opts|
fixtures('symlinks').each_value do |opts|
target = opts['target']
FileUtils.rm_f(target)
end
Expand Down