Sha256: aeb359c9dc4a496954a3d7d8225cbc60755d9d210443c4fed09510116699ef97

Contents?: true

Size: 899 Bytes

Versions: 3

Compression:

Stored size: 899 Bytes

Contents

require File.join(File.dirname(__FILE__), '../../alchemy/upgrader.rb')

namespace :alchemy do

  desc "Upgrades database content to Alchemy CMS v#{Alchemy::VERSION} (Set UPGRADE env variable to only run a specific task)."
  task :upgrade => :environment do
    Alchemy::Upgrader.run!
  end

  namespace :upgrade do
    desc "List all available upgrade tasks."
    task :list => [:environment] do
      puts "\nAvailable upgrade tasks"
      puts "-----------------------\n"
      methods = (Alchemy::Upgrader.private_methods - Object.private_methods - Alchemy::Upgrader.superclass.private_methods)
      if methods.any?
        methods.each { |method| puts method }
        puts "\nUsage:"
        puts "------"
        puts "Run one or more tasks with `bundle exec rake alchemy:upgrade UPGRADE=task_name1,task_name2`\n"
      else
        puts "No upgrades available."
      end
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
alchemy_cms-2.6.1 lib/tasks/alchemy/upgrade.rake
alchemy_cms-2.6.0 lib/tasks/alchemy/upgrade.rake
alchemy_cms-2.6.0.rc5 lib/tasks/alchemy/upgrade.rake