#!/usr/bin/env ruby

rd = File.expand_path("../../../lib")
$:.unshift rd unless $:.include? rd

task :hello do |t|
    sys.touch t.name
end

conf = plugin :Configure do |conf|
    conf.init_modes = [:default]
    conf.override_modes = nil
    conf.task		# define a task named :configure
    conf.check "a" do |c|
	c.default "value_a"
	c.guess { "value_a_guess" }
	c.react { |val|
	    p val
	}
    end
    conf.check "b" do |c|
	c.default "value_b"
    end
    conf.check "c" do |c|
    end
    conf.check "d" do |c|
	c.react {
	}
    end
    conf.check "e" do |c|
	c.guess { false }
    end
end

file conf["a"] do |t|
    sys.touch t.name
end

task :clean do
    sys.rm_f %w(config hello value_a value_a_guess)
end
