Sha256: bb6d5e8c064630db3490cd063a837d916fa0d74266109b01ee84345f7edc914a
Contents?: true
Size: 702 Bytes
Versions: 1
Compression:
Stored size: 702 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.run(ENV.to_hash) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mack-0.4.7 | lib/tasks/rake_rules.rake |