lib/hudson/job_config_builder.rb in hudson-0.3.0.beta.9 vs lib/hudson/job_config_builder.rb in hudson-0.3.0.beta.10

- old
+ new

@@ -106,26 +106,35 @@ end def build_steps(b) b.builders do if job_type == "rails" + build_shell_step b, "bundle install" build_ruby_step b, <<-RUBY.gsub(/^ /, '') unless File.exist?("config/database.yml") require 'fileutils' example = Dir["config/database*"].first puts "Using \#{example} for config/database.yml" FileUtils.cp example, "config/database.yml" end RUBY - build_rake_step b, "db:schema:load" - build_rake_step b, "features" - build_rake_step b, "spec" + build_shell_step b, "bundle exec rake db:schema:load" + build_shell_step b, "bundle exec rake" elsif job_type == "rubygem" build_rake_step b, "features" end end end + # <hudson.tasks.Shell> + # <command>bundle install</command> + # </hudson.tasks.Shell> + def build_shell_step(b, command) + b.tag! "hudson.tasks.Shell" do + b.command command.to_xs.gsub(%r{"}, '&quot;').gsub(%r{'}, '&apos;') + end + end + # <hudson.plugins.ruby.Ruby> # <command>unless File.exist?(&quot;config/database.yml&quot;) # require &apos;fileutils&apos; # example = Dir[&quot;config/database*&quot;].first # puts &quot;Using #{example} for config/database.yml&quot; \ No newline at end of file