Skip to content

Commit

Permalink
remove plugins from spec setup and use file.file?
Browse files Browse the repository at this point in the history
  • Loading branch information
caitmich committed Jun 27, 2024
1 parent c4ef859 commit 742c1be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/jobs/kit_import_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def import_templates(template_type)
return unless Dir.exist?(kit_template_dir)

Dir["#{kit_template_dir}/*"].each do |file|
return unless File.exist?(file)
return unless File.file?(file)

file_name = name_file(File.basename(file), destination)
FileUtils.cp(file, "#{destination}/#{file_name}")
Expand Down
2 changes: 1 addition & 1 deletion spec/support/kit_upload_macros.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def setup_kit_import
FileUtils.cp file.path, @tmp_dir
@tmp_file = File.new(@tmp_dir.join('kit.zip'))

['methodologies', 'notes', 'plugins', 'projects', 'reports'].each do |item|
['methodologies', 'notes', 'projects', 'reports'].each do |item|
conf = Configuration.find_or_initialize_by(name: "admin:paths:templates:#{item}")
folder = @tmp_dir.join(item)
conf.value = folder
Expand Down

0 comments on commit 742c1be

Please sign in to comment.