Sha256: e1ea97807c6f6c406decaca7697c54c17cb92bbb249073e5a960527208ff3bb2
Contents?: true
Size: 1.42 KB
Versions: 1
Compression:
Stored size: 1.42 KB
Contents
# encoding: utf-8 =begin rdoc =end require 'rake' require 'rake/delphi' require 'rake/delphi/project' if RAKEVERSION !~ /^0\.8/ require 'rake/dsl_definition' include Rake::DSL Rake::TaskManager.record_task_metadata = true if Rake::TaskManager.respond_to?('record_task_metadata') end module TestModule PROJECT_NAME = 'Rake test project' PROJECT_FILE = 'testproject' task :default => 'test:compile' namespace :test do desc 'Compilation' _task = task :compile do |t| puts 'task %s executed' % t.name end desc 'Preparation' task :prepare, :useresources, :options do |t, opts| _task = Rake::Task['test:compile'] dpr = Rake.application.define_task(Rake::Delphi::Project, (_task.shortname + ':delphi').to_sym) dpr[:resources_additional] = 'resources' unless opts[:useresources] options = opts[:options] || {} if options.kind_of?(String) options = eval(options) end options.each do |k, v| dpr[k] = v end dpr_vars = {} dpr_vars[:bin_path] = options[:bin] || File.expand_path(File.dirname(__FILE__) + '/bin') dpr_vars[:bin] = File.expand_path2(dpr_vars[:bin_path]) dpr.init(Module.nesting, File.expand_path(__FILE__), dpr_vars, 0) directory dpr_vars[:bin_path] _task.enhance [dpr_vars[:bin_path], dpr] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rake-delphi-0.0.4 | test/resources/testproject/Rakefile.rb |