diff --git a/.gitignore b/.gitignore index b356d0b..75cc52c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ .DS_Store doc/* -garlic -garlic.rb -garlic_report.txt +.garlic_work diff --git a/Rakefile b/Rakefile index 3b0c510..daef651 100644 --- a/Rakefile +++ b/Rakefile @@ -5,6 +5,7 @@ $LOAD_PATH.unshift(rspec_base) if File.exist?(rspec_base) and !$LOAD_PATH.includ require 'spec/rake/spectask' require 'spec/rake/verify_rcov' require 'rake/rdoctask' +begin; require 'garlic/tasks'; rescue LoadError; end plugin_name = 'response_for' @@ -67,17 +68,6 @@ namespace :doc do task :all => ["spec:doc:html", "spec:doc", "spec:rcov", "doc"] end -# load up garlic if it's here -if File.directory?(File.join(File.dirname(__FILE__), 'garlic')) - require File.join(File.dirname(__FILE__), 'garlic/lib/garlic_tasks') - require File.join(File.dirname(__FILE__), 'garlic') -end - -desc "clone the garlic repo (for running ci tasks)" -task :get_garlic do - sh "git clone git://github.com/ianwhite/garlic.git garlic" -end - task :cruise do # run the garlic task, capture the output, if succesful make the docs and copy them to ardes begin diff --git a/garlic.rb b/garlic.rb new file mode 100644 index 0000000..10d9425 --- /dev/null +++ b/garlic.rb @@ -0,0 +1,30 @@ +garlic do + # requried repositories + repo 'rails', :url => 'git://github.com/rails/rails', :local => '~/dev/vendor/rails' + repo 'rspec', :url => 'git://github.com/dchelimsky/rspec', :local => '~/dev/vendor/rspec' + repo 'rspec-rails', :url => 'git://github.com/dchelimsky/rspec-rails', :local => '~/dev/vendor/rspec-rails' + repo 'response_for', :path => '.' + + # our targets + target 'edge' + target '2.1-stable', :branch => 'origin/2-1-stable' + target '2.1.1', :tag => 'v2.1.2' + target '2.2.0', :tag => 'v2.2.0' + + # all targets do the same thing + all_targets do + prepare do + plugin 'response_for', :clone => true + plugin 'rspec' + plugin 'rspec-rails' do + sh "script/generate rspec -f" + end + end + + run do + cd "vendor/plugins/response_for" do + sh "rake spec:rcov:verify" + end + end + end +end \ No newline at end of file diff --git a/garlic_example.rb b/garlic_example.rb deleted file mode 100644 index 5abaa77..0000000 --- a/garlic_example.rb +++ /dev/null @@ -1,43 +0,0 @@ -# This is for running specs against target versions of rails -# -# To use do -# - cp garlic_example.rb garlic.rb -# - rake get_garlic -# - [optional] edit this file to point the repos at your local clones of -# rails, rspec, and rspec-rails -# - rake garlic:all -# -# All of the work and dependencies will be created in the galric dir, and the -# garlic dir can safely be deleted at any point - -garlic do - # default paths are 'garlic/work', and 'garlic/repos' - # work_path 'garlic/work' - # repo_path 'garlic/repos' - - # repo, give a url, specify :local to use a local repo (faster - # and will still update from the origin url) - repo 'rails', :url => 'git://github.com/rails/rails'#, :local => "~/dev/vendor/rails" - repo 'rspec', :url => 'git://github.com/dchelimsky/rspec'#, :local => "~/dev/vendor/rspec" - repo 'rspec-rails', :url => 'git://github.com/dchelimsky/rspec-rails'#, :local => "~/dev/vendor/rspec-rails" - repo 'response_for', :path => '.' - - # for target, default repo is 'rails', default branch is 'master' - target 'edge' - target '2.1-stable', :branch => 'origin/2-1-stable' - target '2.1.1', :tag => 'v2.1.1' - - all_targets do - prepare do - plugin 'rspec' - plugin('rspec-rails') { sh "script/generate rspec -f" } - plugin 'response_for', :clone => true - end - - run do - cd "vendor/plugins/response_for" do - sh "rake spec:rcov:verify" - end - end - end -end