Name: Anonymous 2011-06-17 11:07
What do you think about Ruby-style DSLs? Like this one:
I think it's pretty cool, you can't be as expressive in Lisp.
Project.configure do |config|
# project configuration
config.frequency = 20
config.ruby = '1.9.2' # Your server needs to have rvm installed for this setting to be considered
config.environment_variables = {"FOO" => "bar"}
config.after_build Proc.new { |build, project| `touch ~/Desktop/actually_built`}
config.timeout = 10.minutes
config.command = 'make' #to be used if you're using anything other than rake
# callbacks and notifications
# sending mail
config.on_build_completion do |build,notification,previous_build_status|
notification.from('from@example.com').to('to@example.com').with_subject("build for #{build.project.name} #{build.status}").send
end
# code to deploy on staging
config.on_build_success do |build,notification|
end
# post to IRC channel & send mail
config.on_build_failure do |build,notification|
end
# post to IRC channel & deploy on staging
config.on_red_to_green do |build,notification|
end
endI think it's pretty cool, you can't be as expressive in Lisp.