Sha256: 003b896ae3e3cb9d266d7a718c72238b50d3bd46bec5595fbbe832d234efbccd

Contents?: true

Size: 1.21 KB

Versions: 32

Compression:

Stored size: 1.21 KB

Contents

namespace :refinery do

  desc "Prepare a basic environment with blank directories ready to override core files safely."
  task :override => :environment do
    dirs = ["app", "app/views", "app/views/layouts", "app/views/admin", "app/views/shared", "app/controllers", "app/models", "app/controllers/admin", "app/helpers", "app/helpers/admin"]
		dirs.each do |dir|
			dir = Rails.root.join(dir.split('/').join(File::SEPARATOR))
			dir.mkdir unless dir.directory?
		end
  end

  desc "Required to upgrade from <= 0.9.0 to 0.9.1 and above"
  task :fix_image_paths_in_content => :environment do
    Page.all.each do |p|
      p.parts.each do |pp|
        pp.update_attribute(:body, pp.body.gsub(/\/images\/system\//, "/system/images/"))
      end
    end

    NewsItem.all.each do |ni|
      ni.update_attribute(:body, ni.body.gsub(/\/images\/system\//, "/system/images/"))
    end

  end

  namespace :cache do
    desc "Eliminate existing cache files for javascript and stylesheet resources in default directories"
    task :clear => :environment do
      FileUtils.rm(Dir[Rails.root.join("public", "javascripts", "cache", "[^.]*")])
      FileUtils.rm(Dir[Rails.root.join("public", "stylesheets", "cache", "[^.]*")])
    end
  end

end

Version data entries

32 entries across 32 versions & 2 rubygems

Version Path
jacobat-refinerycms-0.9.6.14 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.6.34 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.6.33 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.6.32 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.6.31 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.6.30 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.6.29 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.6.28 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.6.27 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.6.26 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.6.25 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.6.24 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.6.23 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.6.22 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.6.21 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.6.19 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.6.18 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.6.17 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.6.16 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.6.15 vendor/plugins/refinery/lib/tasks/refinery.rake