Class: Rake::ShipitTask::Step::Task

Inherits:
Object
  • Object
show all
Defined in:
lib/shipit.rb

Instance Method Summary collapse

Constructor Details

#initialize(step, *names) ⇒ Task

Returns a new instance of Task.



212
213
214
215
# File 'lib/shipit.rb', line 212

def initialize(step, *names)
	@names = names
	@tasks = []
end

Instance Method Details

#prepareObject



217
218
219
220
221
222
# File 'lib/shipit.rb', line 217

def prepare
	tasks = `rake -T`.scan(/^rake ([^\s]+)/).flatten
	@names.each do |t|
		raise "Unknown task #{t}" unless tasks.include? t.to_s
	end
end

#runObject



224
225
226
227
228
# File 'lib/shipit.rb', line 224

def run
	@names.each do |t|
		system("rake", t.to_s)
	end
end