Sha256: 4616ffd2035df3f2cf02cbff4ca3a0df0be5e85090e42430cc5e85d0e61d7fc0

Contents?: true

Size: 1.02 KB

Versions: 3

Compression:

Stored size: 1.02 KB

Contents

desc "Loads the Mack environment. Default is development."
task :environment do
  MACK_ENV = ENV["MACK_ENV"] ||= "development" unless Object.const_defined?("MACK_ENV")
  MACK_ROOT = FileUtils.pwd unless Object.const_defined?("MACK_ROOT")
  require File.join(MACK_ROOT, "config", "boot.rb")
end

desc "Loads an irb console allow you full access to the application w/o a browser."
task :console do
  libs = []
  libs << "-r irb/completion"
  libs << "-r #{File.join(File.dirname(__FILE__), '..', 'mack')}"
  libs << "-r #{File.join(File.dirname(__FILE__), '..', 'initialize', 'console')}"
  exec "irb #{libs.join(" ")} --simple-prompt"
end

namespace :dump do
  
  desc "Dumps out the configuration for the specified environment."
  task :config => :environment do
    fcs = app_config.instance.instance_variable_get("@final_configuration_settings")
    conf = {}
    fcs.each_pair do |k, v|
      unless v.is_a?(Application::Configuration::Namespace)
        conf[k.to_s] = v unless k.to_s.match("__")
      end
    end
    pp conf
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mack-0.0.5 tasks/mack_tasks.rake
mack-0.0.6.1 tasks/mack_tasks.rake
mack-0.0.6 tasks/mack_tasks.rake