<commit_before>require 'fileutils'

module Swfupload
module InstallHelpers
def self.copy_files dir, files, rails_folder="public"
  files.each do |js_file|
    dest_dir = File.join(RAILS_ROOT, rails_folder,dir)
    FileUtils.mkdir(dest_dir) unless File.exist? dest_dir
    dest_file = File.join(dest_dir, js_file)
    src_file = File.join(File.dirname(__FILE__) , dir, js_file)  	
    FileUtils.cp_r(src_file, dest_file)
    p "copy #{dest_file}"
  end  
end
end
end


puts "Copy started..."
begin
Swfupload::InstallHelpers::copy_files 'javascripts',["swfupload.js", "swfupload.fileprogress.js", "swfupload.handlers.js", "swfupload.queue.js"]
Swfupload::InstallHelpers::copy_files 'stylesheets',["swfupload.css"]
Swfupload::InstallHelpers::copy_files 'images',["FullyTransparent_65x29.png"]
Swfupload::InstallHelpers::copy_files 'flash',["swfupload.swf"]
Swfupload::InstallHelpers::copy_files 'app/views/shared',["_swfupload_form.html.erb"],''
Swfupload::InstallHelpers::copy_files 'config/initializers',["session_flash_support.rb"],''
rescue Exception => e
	puts "e=#{e}"
end
puts "Files copied - Installation complete!"

<commit_msg>Install fix<commit_after>require 'fileutils'

module Swfupload
module InstallHelpers
def self.copy_files dir, files, rails_folder="public"
  files.each do |js_file|
    dest_dir = File.join(RAILS_ROOT, rails_folder,dir)
    FileUtils.mkdir(dest_dir) unless File.exist? dest_dir
    dest_file = File.join(dest_dir, js_file)
    src_file = File.join(File.dirname(__FILE__) , dir, js_file)  	
    FileUtils.cp_r(src_file, dest_file)
    p "copy #{dest_file}"
  end  
end
end
end


puts "Copy started..."
begin
Swfupload::InstallHelpers::copy_files 'javascripts',["swfupload.js", "swfupload.fileprogress.js", "swfupload.handlers.js", "swfupload.queue.js"]
Swfupload::InstallHelpers::copy_files 'stylesheets',["swfupload.css"]
Swfupload::InstallHelpers::copy_files 'images',["FullyTransparent_65x29.png"]
Swfupload::InstallHelpers::copy_files 'flash',["swfupload.swf"]
Swfupload::InstallHelpers::copy_files 'app/views/shared',["_swfupload_form.html.erb"],''
Swfupload::InstallHelpers::copy_files 'config/initializers',["session_swf_support.rb"],''
rescue Exception => e
	puts "e=#{e}"
end
puts "Files copied - Installation complete!"


{'fraction_non_alphanumeric': 0.1431095406360424, 'fraction_numerical': 0.0035335689045936395, 'mean_word_length': 7.031914893617022, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3037421', 'n_tokens_mistral': 803, 'n_tokens_neox': 801, 'n_words': 135}