Sha256: 9c42cad9e190573703a7bc772ad610bcabe912179c068eb71d68ca04634f0c46
Contents?: true
Size: 1.47 KB
Versions: 9
Compression:
Stored size: 1.47 KB
Contents
namespace :cmstyle do desc "Setup CmStyle" task :setup do puts "Setting up CmStyle for your Project..." #source paths source_view_files = Dir.glob(Gem.loaded_specs["cmstyle"].full_gem_path + "/lib/app/views/layouts/*") source_image_files = Dir.glob(Gem.loaded_specs["cmstyle"].full_gem_path + "/lib/app/assets/images/*") source_application_js = Gem.loaded_specs["cmstyle"].full_gem_path + "/lib/app/assets/javascripts/application.js" source_application_css = Gem.loaded_specs["cmstyle"].full_gem_path + "/lib/app/assets/stylesheets/application.css" #target paths target_view_path = Rails.root + "app/views/layouts/" target_js_path = Rails.root + "app/assets/javascripts/" target_css_path = Rails.root + "app/assets/stylesheets/" target_image_path = Rails.root + "app/assets/images/" puts "Copying layout view files to app/views/layouts" FileUtils.cp_r source_view_files, target_view_path puts "Copying application.js to app/assets/javascripts" FileUtils.cp_r source_application_js, target_js_path puts "Copying application.css to app/assets/stylesheets" FileUtils.cp_r source_application_css, target_css_path puts "Copying images to app/assets/images" FileUtils.cp_r source_image_files, target_image_path puts "Done." puts "" puts "NOTE: don't forget to add APPLICATION_MENU, APPLICATION_NAME and APPLICATION_DATABASE to application.rb initializer to get the header and footer working properly." end end
Version data entries
9 entries across 9 versions & 1 rubygems