Skip to content

Instantly share code, notes, and snippets.

@ianwhite
Created November 25, 2008 04:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ianwhite/28786 to your computer and use it in GitHub Desktop.
Save ianwhite/28786 to your computer and use it in GitHub Desktop.
# example of a 'matrix' set of target versions with garlic
#
# just for kicks I stuck in all the 2.x stable branches, + some 3 different rspecs
#
# a better example would be keeping rspec constant, and where you have 2 real
# app dependencies
garlic do
repo 'nested_has_many_through', :path => '.'
repo 'rails', :url => 'git://github.com/rails/rails'
repo 'rspec', :url => 'git://github.com/dchelimsky/rspec'
repo 'rspec-rails', :url => 'git://github.com/dchelimsky/rspec-rails'
# target rails versions
['origin/2-2-stable', 'origin/2-1-stable', 'origin/2-0-stable'].each do |rails|
# target rspec versions
['1.1.4', '1.1.11', 'origin/master'].each do |rspec|
# specify how to prepare app and run CI task
target "Rails: #{rails} with Rspec: #{rspec}", :tree_ish => rails do
prepare do
plugin 'rspec', :tree_ish => rspec
plugin 'rspec-rails', :tree_ish => rspec do
`script/generate rspec -f`
end
plugin 'nested_has_many_through', :clone => true
end
run do
cd "vendor/plugins/nested_has_many_through" do
sh "rake spec:rcov:verify"
end
end
end
end
end
end
# and I found out that rspec-1.1.4 + rails 2.2-stable + the plugin doesn't work
==============================================================================
Targets: Rails: origin/2-2-stable with Rspec: 1.1.4, Rails: origin/2-2-stable with Rspec: 1.1.11, Rails: origin/2-2-stable with Rspec: origin/master, Rails: origin/2-1-stable with Rspec: 1.1.4, Rails: origin/2-1-stable with Rspec: 1.1.11, Rails: origin/2-1-stable with Rspec: origin/master, Rails: origin/2-0-stable with Rspec: 1.1.4, Rails: origin/2-0-stable with Rspec: 1.1.11, Rails: origin/2-0-stable with Rspec: origin/master
==============================================================================
------------------------------------------------------------------------------
Target: Rails: origin/2-2-stable with Rspec: 1.1.4 (commit 085ebf0, run at Tue Nov 25 18:14:37 +1100 2008)
------------------------------------------------------------------------------
(in /Users/ian/dev/ianwhite/nested_has_many_through/.garlic/rails__origin_2-2-stable_with_rspec__1.1.4/vendor/plugins/nested_has_many_through)
rm -r doc/coverage
+----------------------------------------------------+-------+-------+--------+
| File | Lines | LOC | COV |
+----------------------------------------------------+-------+-------+--------+
|lib/nested_has_many_through.rb | 137 | 93 | 19.4% |
+----------------------------------------------------+-------+-------+--------+
|Total | 137 | 93 | 19.4% |
+----------------------------------------------------+-------+-------+--------+
19.4% 1 file(s) 137 Lines 93 LOC
/Users/ian/dev/ianwhite/nested_has_many_through/.garlic/rails__origin_2-2-stable_with_rspec__1.1.4/vendor/plugins/rspec-rails/lib/spec/rails/example/rails_example_group.rb:3: undefined method `cache_template_extensions=' for ActionView::Base:Class (NoMethodError)
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /Users/ian/dev/ianwhite/nested_has_many_through/.garlic/rails__origin_2-2-stable_with_rspec__1.1.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:155:in `require'
from /Users/ian/dev/ianwhite/nested_has_many_through/.garlic/rails__origin_2-2-stable_with_rspec__1.1.4/vendor/plugins/rspec-rails/lib/spec/rails/example.rb:6
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /Users/ian/dev/ianwhite/nested_has_many_through/.garlic/rails__origin_2-2-stable_with_rspec__1.1.4/vendor/rails/activesupport/lib/active_support/dependencies.rb:155:in `require'
from /Users/ian/dev/ianwhite/nested_has_many_through/.garlic/rails__origin_2-2-stable_with_rspec__1.1.4/vendor/plugins/rspec-rails/lib/spec/rails.rb:13
... 14 levels...
from /opt/local/lib/ruby/gems/1.8/gems/spicycode-rcov-0.8.1.3.0/bin/rcov:541:in `load'
from /opt/local/lib/ruby/gems/1.8/gems/spicycode-rcov-0.8.1.3.0/bin/rcov:541
from /opt/local/bin/rcov:19:in `load'
from /opt/local/bin/rcov:19
rake aborted!
Command /opt/local/bin/ruby -I"/Users/ian/dev/ianwhite/nested_has_many_through/.garlic/rails__origin_2-2-stable_with_rspec__1.1.4/vendor/plugins/rspec/lib" -S rcov --text-report --exclude spec/,rcov.rb,/Users/ian/dev/ianwhite/nested_has_many_through/.garlic/rails__origin_2-2-stable_with_rspec__1.1.4 -o "doc/coverage" "/Users/ian/dev/ianwhite/nested_has_many_through/.garlic/rails__origin_2-2-stable_with_rspec__1.1.4/vendor/plugins/rspec/bin/spec" -- "spec/models/author_spec.rb" "spec/models/commenter_spec.rb" failed
(See full trace by running task with --trace)
target: Rails: origin/2-2-stable with Rspec: 1.1.4 FAIL
------------------------------------------------------------------------------
Target: Rails: origin/2-2-stable with Rspec: 1.1.11 (commit 085ebf0, run at Tue Nov 25 18:14:40 +1100 2008)
------------------------------------------------------------------------------
(in /Users/ian/dev/ianwhite/nested_has_many_through/.garlic/rails__origin_2-2-stable_with_rspec__1.1.11/vendor/plugins/nested_has_many_through)
rm -r doc/coverage
...............................
Finished in 0.937734 seconds
31 examples, 0 failures
+----------------------------------------------------+-------+-------+--------+
| File | Lines | LOC | COV |
+----------------------------------------------------+-------+-------+--------+
|lib/nested_has_many_through.rb | 137 | 93 | 95.7% |
+----------------------------------------------------+-------+-------+--------+
|Total | 137 | 93 | 95.7% |
+----------------------------------------------------+-------+-------+--------+
95.7% 1 file(s) 137 Lines 93 LOC
Coverage: 97.1% (threshold: 97.1%)
target: Rails: origin/2-2-stable with Rspec: 1.1.11 PASS
------------------------------------------------------------------------------
Target: Rails: origin/2-2-stable with Rspec: origin/master (commit 085ebf0, run at Tue Nov 25 18:14:44 +1100 2008)
------------------------------------------------------------------------------
(in /Users/ian/dev/ianwhite/nested_has_many_through/.garlic/rails__origin_2-2-stable_with_rspec__origin_master/vendor/plugins/nested_has_many_through)
rm -r doc/coverage
...............................
Finished in 1.026581 seconds
31 examples, 0 failures
+----------------------------------------------------+-------+-------+--------+
| File | Lines | LOC | COV |
+----------------------------------------------------+-------+-------+--------+
|lib/nested_has_many_through.rb | 137 | 93 | 95.7% |
+----------------------------------------------------+-------+-------+--------+
|Total | 137 | 93 | 95.7% |
+----------------------------------------------------+-------+-------+--------+
95.7% 1 file(s) 137 Lines 93 LOC
Coverage: 97.1% (threshold: 97.1%)
target: Rails: origin/2-2-stable with Rspec: origin/master PASS
------------------------------------------------------------------------------
Target: Rails: origin/2-1-stable with Rspec: 1.1.4 (commit 099a98e, run at Tue Nov 25 18:14:48 +1100 2008)
------------------------------------------------------------------------------
(in /Users/ian/dev/ianwhite/nested_has_many_through/.garlic/rails__origin_2-1-stable_with_rspec__1.1.4/vendor/plugins/nested_has_many_through)
rm -r doc/coverage
DEPRECATION WARNING: config.action_view.cache_template_extensions option has been deprecated and has no affect. Please remove it from your config files. See http://www.rubyonrails.org/deprecation for details. (called from /Users/ian/dev/ianwhite/nested_has_many_through/.garlic/rails__origin_2-1-stable_with_rspec__1.1.4/vendor/plugins/rspec-rails/lib/spec/rails/example/rails_example_group.rb:3)
...............................
Finished in 0.856928 seconds
31 examples, 0 failures
+----------------------------------------------------+-------+-------+--------+
| File | Lines | LOC | COV |
+----------------------------------------------------+-------+-------+--------+
|lib/nested_has_many_through.rb | 137 | 93 | 95.7% |
+----------------------------------------------------+-------+-------+--------+
|Total | 137 | 93 | 95.7% |
+----------------------------------------------------+-------+-------+--------+
95.7% 1 file(s) 137 Lines 93 LOC
Coverage: 97.1% (threshold: 97.1%)
target: Rails: origin/2-1-stable with Rspec: 1.1.4 PASS
------------------------------------------------------------------------------
Target: Rails: origin/2-1-stable with Rspec: 1.1.11 (commit 099a98e, run at Tue Nov 25 18:14:53 +1100 2008)
------------------------------------------------------------------------------
(in /Users/ian/dev/ianwhite/nested_has_many_through/.garlic/rails__origin_2-1-stable_with_rspec__1.1.11/vendor/plugins/nested_has_many_through)
rm -r doc/coverage
...............................
Finished in 0.886089 seconds
31 examples, 0 failures
+----------------------------------------------------+-------+-------+--------+
| File | Lines | LOC | COV |
+----------------------------------------------------+-------+-------+--------+
|lib/nested_has_many_through.rb | 137 | 93 | 95.7% |
+----------------------------------------------------+-------+-------+--------+
|Total | 137 | 93 | 95.7% |
+----------------------------------------------------+-------+-------+--------+
95.7% 1 file(s) 137 Lines 93 LOC
Coverage: 97.1% (threshold: 97.1%)
target: Rails: origin/2-1-stable with Rspec: 1.1.11 PASS
------------------------------------------------------------------------------
Target: Rails: origin/2-1-stable with Rspec: origin/master (commit 099a98e, run at Tue Nov 25 18:14:57 +1100 2008)
------------------------------------------------------------------------------
(in /Users/ian/dev/ianwhite/nested_has_many_through/.garlic/rails__origin_2-1-stable_with_rspec__origin_master/vendor/plugins/nested_has_many_through)
rm -r doc/coverage
...............................
Finished in 0.855346 seconds
31 examples, 0 failures
+----------------------------------------------------+-------+-------+--------+
| File | Lines | LOC | COV |
+----------------------------------------------------+-------+-------+--------+
|lib/nested_has_many_through.rb | 137 | 93 | 95.7% |
+----------------------------------------------------+-------+-------+--------+
|Total | 137 | 93 | 95.7% |
+----------------------------------------------------+-------+-------+--------+
95.7% 1 file(s) 137 Lines 93 LOC
Coverage: 97.1% (threshold: 97.1%)
target: Rails: origin/2-1-stable with Rspec: origin/master PASS
------------------------------------------------------------------------------
Target: Rails: origin/2-0-stable with Rspec: 1.1.4 (commit c329794, run at Tue Nov 25 18:15:02 +1100 2008)
------------------------------------------------------------------------------
(in /Users/ian/dev/ianwhite/nested_has_many_through/.garlic/rails__origin_2-0-stable_with_rspec__1.1.4/vendor/plugins/nested_has_many_through)
rm -r doc/coverage
............................
Finished in 0.701434 seconds
28 examples, 0 failures
+----------------------------------------------------+-------+-------+--------+
| File | Lines | LOC | COV |
+----------------------------------------------------+-------+-------+--------+
|lib/nested_has_many_through.rb | 137 | 93 | 95.7% |
+----------------------------------------------------+-------+-------+--------+
|Total | 137 | 93 | 95.7% |
+----------------------------------------------------+-------+-------+--------+
95.7% 1 file(s) 137 Lines 93 LOC
Coverage: 97.1% (threshold: 97.1%)
target: Rails: origin/2-0-stable with Rspec: 1.1.4 PASS
------------------------------------------------------------------------------
Target: Rails: origin/2-0-stable with Rspec: 1.1.11 (commit c329794, run at Tue Nov 25 18:15:06 +1100 2008)
------------------------------------------------------------------------------
(in /Users/ian/dev/ianwhite/nested_has_many_through/.garlic/rails__origin_2-0-stable_with_rspec__1.1.11/vendor/plugins/nested_has_many_through)
rm -r doc/coverage
............................
Finished in 0.638597 seconds
28 examples, 0 failures
+----------------------------------------------------+-------+-------+--------+
| File | Lines | LOC | COV |
+----------------------------------------------------+-------+-------+--------+
|lib/nested_has_many_through.rb | 137 | 93 | 95.7% |
+----------------------------------------------------+-------+-------+--------+
|Total | 137 | 93 | 95.7% |
+----------------------------------------------------+-------+-------+--------+
95.7% 1 file(s) 137 Lines 93 LOC
Coverage: 97.1% (threshold: 97.1%)
target: Rails: origin/2-0-stable with Rspec: 1.1.11 PASS
------------------------------------------------------------------------------
Target: Rails: origin/2-0-stable with Rspec: origin/master (commit c329794, run at Tue Nov 25 18:15:10 +1100 2008)
------------------------------------------------------------------------------
(in /Users/ian/dev/ianwhite/nested_has_many_through/.garlic/rails__origin_2-0-stable_with_rspec__origin_master/vendor/plugins/nested_has_many_through)
rm -r doc/coverage
............................
Finished in 0.644313 seconds
28 examples, 0 failures
+----------------------------------------------------+-------+-------+--------+
| File | Lines | LOC | COV |
+----------------------------------------------------+-------+-------+--------+
|lib/nested_has_many_through.rb | 137 | 93 | 95.7% |
+----------------------------------------------------+-------+-------+--------+
|Total | 137 | 93 | 95.7% |
+----------------------------------------------------+-------+-------+--------+
95.7% 1 file(s) 137 Lines 93 LOC
Coverage: 97.1% (threshold: 97.1%)
target: Rails: origin/2-0-stable with Rspec: origin/master PASS
==============================================================================
USAGE: garlic [options] [command] (try garlic --help)
Error: The following targets passed: Rails: origin/2-2-stable with Rspec: 1.1.11, Rails: origin/2-2-stable with Rspec: origin/master, Rails: origin/2-1-stable with Rspec: 1.1.4, Rails: origin/2-1-stable with Rspec: 1.1.11, Rails: origin/2-1-stable with Rspec: origin/master, Rails: origin/2-0-stable with Rspec: 1.1.4, Rails: origin/2-0-stable with Rspec: 1.1.11, Rails: origin/2-0-stable with Rspec: origin/master.
The following targets FAILED: Rails: origin/2-2-stable with Rspec: 1.1.4.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment