Sha256: e67a95242104bf00b60c33a7a65b994cd3d9a62fa506ed81bc99deaa4efbc845

Contents?: true

Size: 375 Bytes

Versions: 1

Compression:

Stored size: 375 Bytes

Contents

require 'rake/tasklib'

module Albacore	
	class SQLCmdTask < Rake::TaskLib
		attr_accessor :name
		
		def initialize(name=:sqlcmd, &block)
			@name = name
			@sqlcmd = SQLCmd.new
			@block = block
			define
		end
		
		def define
			task name do
				@block.call(@sqlcmd) unless @block.nil?
				@sqlcmd.run
				fail if @sqlcmd.failed
			end
		end	
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
albacore-0.0.7 lib/rake/sqlcmdtask.rb