Sha256: b71ad3375193be75e699ba8577e4ded301ecd8f359dd6f91977d61cf58156437

Contents?: true

Size: 704 Bytes

Versions: 15

Compression:

Stored size: 704 Bytes

Contents

rule /\#.*/ do |t|
  env = t.name.match(/\#.*/).to_s.gsub("#", "")
  Object::MACK_ENV = env
  ENV["MACK_ENV"] = env
  name = t.name.gsub("##{env}", "")
  Rake::Task[name].invoke
end

rule /^cachetastic:/ do |t|
  x = t.name.gsub("cachetastic:", '')
  x = x.split(":")
  cache_name = x.first
  cache_action = x.last
  puts "cache_name: #{cache_name}"
  puts "cache_action: #{cache_action}"
  ENV['cache_name'] = cache_name
  ENV['cache_action'] = cache_action
  Rake::Task["cachetastic:manipulate_caches"].invoke
end

rule /^generate:/ do |t|
  klass = t.name.gsub("generate:", '')
  Rake::Task["environment"].invoke
  klass = "#{klass.camelcase}Generator"
  gen = klass.constantize.new(ENV)
  gen.run
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
mack-0.0.6.1 tasks/rake_rules.rake
mack-0.0.6.2 tasks/rake_rules.rake
mack-0.0.6 tasks/rake_rules.rake
mack-0.0.7.0 lib/tasks/rake_rules.rake
mack-0.2.0.1 lib/tasks/rake_rules.rake
mack-0.1.0 lib/tasks/rake_rules.rake
mack-0.2.0 lib/tasks/rake_rules.rake
mack-0.4.1 lib/tasks/rake_rules.rake
mack-0.4.0 lib/tasks/rake_rules.rake
mack-0.4.0.1 lib/tasks/rake_rules.rake
mack-0.4.2.1 lib/tasks/rake_rules.rake
mack-0.3.0 lib/tasks/rake_rules.rake
mack-0.4.5 lib/tasks/rake_rules.rake
mack-0.4.6 lib/tasks/rake_rules.rake
mack-0.4.2 lib/tasks/rake_rules.rake