Sha256: 518d24687035dac6a752ba11ada54ed3555a8c116baa7c0603a5084fd32d364f

Contents?: true

Size: 1.11 KB

Versions: 10

Compression:

Stored size: 1.11 KB

Contents

require 'alchemy/tasks/tidy'

namespace :alchemy do
  namespace :tidy do
    desc "Tidy up Alchemy database."
    task :up do
      Rake::Task['alchemy:tidy:element_positions'].invoke
      Rake::Task['alchemy:tidy:content_positions'].invoke
      Rake::Task['alchemy:tidy:remove_orphaned_records'].invoke
    end

    desc "Fixes element positions."
    task element_positions: [:environment] do
      Alchemy::Tidy.update_element_positions
    end

    desc "Fixes content positions."
    task content_positions: [:environment] do
      Alchemy::Tidy.update_content_positions
    end

    desc "Remove orphaned records (elements & contents)."
    task remove_orphaned_records: [:environment] do
      Rake::Task['alchemy:tidy:remove_orphaned_elements'].invoke
      Rake::Task['alchemy:tidy:remove_orphaned_contents'].invoke
    end

    desc "Remove orphaned elements."
    task remove_orphaned_elements: [:environment] do
      Alchemy::Tidy.remove_orphaned_elements
    end

    desc "Remove orphaned contents."
    task remove_orphaned_contents: [:environment] do
      Alchemy::Tidy.remove_orphaned_contents
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
alchemy_cms-4.4.0 lib/tasks/alchemy/tidy.rake
alchemy_cms-4.3.2 lib/tasks/alchemy/tidy.rake
alchemy_cms-4.2.4 lib/tasks/alchemy/tidy.rake
alchemy_cms-4.3.1 lib/tasks/alchemy/tidy.rake
alchemy_cms-4.2.3 lib/tasks/alchemy/tidy.rake
alchemy_cms-4.3.0 lib/tasks/alchemy/tidy.rake
alchemy_cms-4.2.2 lib/tasks/alchemy/tidy.rake
alchemy_cms-4.2.1 lib/tasks/alchemy/tidy.rake
alchemy_cms-4.2.0 lib/tasks/alchemy/tidy.rake
alchemy_cms-4.2.0.rc1 lib/tasks/alchemy/tidy.rake