Sha256: 9101c1ef64d2a5cb03c685a2ca028c6cc5bb8b5f6835eacb34fc24a201c3e99c

Contents?: true

Size: 889 Bytes

Versions: 30

Compression:

Stored size: 889 Bytes

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 = File.join([RAILS_ROOT] | dir.split('/'))
			Dir.mkdir dir unless File.directory? dir
		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
  
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
refinerycms-0.9.5.27 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.5.26 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.5.25 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.5.24 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.5.23 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.5.22 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.5.21 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.5.20 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.5.19 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.5.18 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.5.17 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.5.16 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.5.15 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.5.14 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.5.13 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.5.12 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.5.11 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.5.10 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.5.9 vendor/plugins/refinery/lib/tasks/refinery.rake
refinerycms-0.9.5.8 vendor/plugins/refinery/lib/tasks/refinery.rake