Sha256: f6f4af5870bd8643d2a2f5d4857fd5180bf5f41dec4f8d85014a52a6fe3eed27

Contents?: true

Size: 927 Bytes

Versions: 4

Compression:

Stored size: 927 Bytes

Contents

namespace :hobo do

  desc "Replace commonly used hobo assets with symlinks into the plugin so that they stay up to date"
  task :symlink_assets => :environment do
    
    path_to_generators = HOBO_ROOT.match(%r(vendor/plugins/.*$))[0] + "/rails_generators"
    
    Dir.chdir("#{RAILS_ROOT}/public") do
      Dir.chdir("javascripts") do
        puts "hobo-rapid.js"
        `rm -f hobo-rapid.js`
        `ln -s ../../#{path_to_generators}/hobo_rapid/templates/hobo-rapid.js`
      end

      Dir.chdir("hobothemes") do
        puts "public/hobothemes/clean"
        `rm -rf clean`
        `ln -s ../../#{path_to_generators}/hobo_rapid/templates/themes/clean/public clean`
      end
    end
    
    Dir.chdir("#{RAILS_ROOT}/app/views/taglibs/themes") do
      puts 'taglibs/themes/clean'
      `rm -rf clean`
      `ln -s ../../../../#{path_to_generators}/hobo_rapid/templates/themes/clean/views clean`
    end

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hobo-0.8.1 tasks/hobo_tasks.rake
hobo-0.8.2 tasks/hobo_tasks.rake
hobo-0.8.3 tasks/hobo_tasks.rake
hobo-0.8 tasks/hobo_tasks.rake