Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Change templates to use simple ruby constructs instead of the slightl…

…y mysterious 'all_targets'
  • Loading branch information...
commit c5730707f34826f8b4f1344b7c91d3eae7759ce6 1 parent 28c0eee
@ianwhite authored
Showing with 41 additions and 47 deletions.
  1. +12 −14 templates/default.rb
  2. +16 −18 templates/rspec.rb
  3. +13 −15 templates/shoulda.rb
View
26 templates/default.rb
@@ -7,21 +7,19 @@
# other repos
repo "rails", :url => "git://github.com/rails/rails"
- # targets
- target "edge", :branch => 'origin/master'
- target "2.1", :branch => "origin/2-1-stable"
- target "2.0", :branch => "origin/2-0-stable"
- target "1.2", :branch => "origin/1-2-stable"
-
- # all targets
- all_targets do
- prepare do
- plugin "#{plugin}", :clone => true # so we can work in targets
- end
+ # target railses
+ ['origin/master', 'origin/2-2-stable', 'origin/2-1-stable', 'origin/2-0-stable'].each do |rails|
+
+ # declare how to prepare, and run each CI target
+ target "Rails: #{rails}", :tree_ish => rails do
+ prepare do
+ plugin "#{plugin}", :clone => true # so we can work in targets
+ end
- run do
- cd "vendor/plugins/#{plugin}" do
- sh "rake"
+ run do
+ cd "vendor/plugins/#{plugin}" do
+ sh "rake"
+ end
end
end
end
View
34 templates/rspec.rb
@@ -9,25 +9,23 @@
repo "rspec", :url => "git://github.com/dchelimsky/rspec"
repo "rspec-rails", :url => "git://github.com/dchelimsky/rspec-rails"
- # targets
- target "edge", :branch => 'origin/master'
- target "2.1", :branch => "origin/2-1-stable"
- target "2.0", :branch => "origin/2-0-stable"
- target "1.2", :branch => "origin/1-2-stable"
-
- # all targets
- all_targets do
- prepare do
- plugin "#{plugin}", :clone => true # so we can work in targets
- plugin "rspec"
- plugin "rspec-rails" do
- sh "script/generate rspec -f"
+ # target railses
+ ['origin/master', 'origin/2-2-stable', 'origin/2-1-stable', 'origin/2-0-stable'].each do |rails|
+
+ # declare how to prepare, and run each CI target
+ target "Rails: #{rails}", :tree_ish => rails do
+ prepare do
+ plugin "#{plugin}", :clone => true # so we can work in targets
+ plugin "rspec"
+ plugin "rspec-rails" do
+ `script/generate rspec -f`
+ end
end
- end
-
- run do
- cd "vendor/plugins/#{plugin}" do
- sh "rake"
+
+ run do
+ cd "vendor/plugins/#{plugin}" do
+ sh "rake"
+ end
end
end
end
View
28 templates/shoulda.rb
@@ -8,22 +8,20 @@
repo "rails", :url => "git://github.com/rails/rails"
repo "shoulda", :url => "git://github.com/thoughtbot/shoulda"
- # targets
- target "edge", :branch => 'origin/master'
- target "2.1", :branch => "origin/2-1-stable"
- target "2.0", :branch => "origin/2-0-stable"
- target "1.2", :branch => "origin/1-2-stable"
-
- # all targets
- all_targets do
- prepare do
- plugin "#{plugin}", :clone => true # so we can work in targets
- plugin "shoulda"
- end
+ # target railses
+ ['origin/master', 'origin/2-2-stable', 'origin/2-1-stable', 'origin/2-0-stable'].each do |rails|
+
+ # declare how to prepare, and run each CI target
+ target "Rails: #{rails}", :tree_ish => rails do
+ prepare do
+ plugin "#{plugin}", :clone => true # so we can work in targets
+ plugin "shoulda"
+ end
- run do
- cd "vendor/plugins/#{plugin}" do
- sh "rake"
+ run do
+ cd "vendor/plugins/#{plugin}" do
+ sh "rake"
+ end
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.