Sha256: 907ae3e69fe473e3ccc4d62db3cb279b0ee10c0b2298c05afab6be92815e46a9
Contents?: true
Size: 851 Bytes
Versions: 1
Compression:
Stored size: 851 Bytes
Contents
conf = plugin :Configure do |conf| conf.init_modes = [:explicit] conf.override_modes = [:env] conf.task # define a task named :configure conf.check "target" do |c| c.default "conf_csharp.exe" c.interact { c.prompt "Name for executable: " } end # define more checks end plugin :Csharp do |cs| cs.config = conf end conf.init task :default => ["conf_csharp.cs", conf["target"]] # from our example above gen Assembly, conf["target"] do |t| t.libs = %w(System.Xml.dll) t.sources = Dir["*.cs"] end file "conf_csharp.cs" do |t| File.open(t.name, "w") { |f| f << <<-EOF class ConfCSharp { public static void Main(string[] args) { System.Console.WriteLine("ConfCSharp"); } } EOF } end task :clean do sys.rm_f Dir["*.{exe,cs}"] + %w(config) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rant-0.3.2 | test/plugin/rantfile |