Sha256: 09a30a2a6e9a6e683f9eddb2d6927ca25ce35975288d886a915f5b5edf3f7c35
Contents?: true
Size: 961 Bytes
Versions: 1
Compression:
Stored size: 961 Bytes
Contents
namespace :reporter do to_copy = ["jquery.js", "jquery-ui.min.js", "reporter.js"] # install desc 'Copies required scripts files to the public/javascripts directory.' task :install do # inform the user of whats happening puts "Copying #{to_copy.to_sentence} to public/javascripts/..." success = true to_copy.each do |script| # copy from destination = File.join(RAILS_ROOT, "/public/javascripts/", script) # copy to source = File.join(RAILS_ROOT + "/vendor/plugins/reporter/javascripts/", script) # copy success = false unless FileUtils.cp_r(source, destination) end puts "Required scripts copied successfully!" end # uninstall desc 'Removes required scripts from the public/javascripts directory.' task :uninstall do FileUtils.rm_r to_copy.collect { |script| RAILS_ROOT + "/public/javascripts/" + script } puts "#{to_copy.to_sentence} removed successfully." end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
report_ui-0.0.1.alpha | tasks/reporter.rake |