Sha256: 3f68a9ed37950363db93e9ace87c5faa5c640122056c16166100bf224842b72a
Contents?: true
Size: 641 Bytes
Versions: 14
Compression:
Stored size: 641 Bytes
Contents
require 'cap-util' module CapUtil # This defines a base utiltiy for building tasks that run rake tasks. Pass # in the rake task name and this will make sure it is run with the appropriate # settings and environment class RakeTask include CapUtil attr_reader :cmd def initialize(cap, task, opts=nil) @cap = cap opts ||= {} opts[:root] ||= :current_path opts[:rake] ||= "bundle exec rake" opts[:env] ||= "" rakefile_root = cap.send(opts[:root]) @cmd = "cd #{rakefile_root} && #{opts[:env]} #{opts[:rake]} #{task}" end def run; super(@cmd); end end end
Version data entries
14 entries across 14 versions & 1 rubygems