ianwhite / inherit_views

rails plugin that enables inheritance of views along a controller class heirachy

inherit_views / garlic.rb
100644 32 lines (28 sloc) 1.091 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
garlic do
  repo 'inherit_views', :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'
 
  # first is rails target, last is inherit views branch
  [
    {:rails => 'master', :inherit_views => 'rails-2.3'},
    {:rails => '2-2-stable', :inherit_views => 'master'},
    {:rails => '2-1-stable', :inherit_views => 'rails-2.0-2.1'}
    #{:rails => '2-0-stable', :inherit_views => 'rails-2.0-2.1'} rspec + raisl 2.0 is not playing nice at the moment
  ].each do |target|
 
    target target[:rails], :branch => "origin/#{target[:rails]}" do
      prepare do
        plugin 'inherit_views', :branch => "origin/#{target[:inherit_views]}", :clone => true
        plugin 'rspec', :as => 'rspec'
        plugin 'rspec-rails', :as => 'rspec-rails' do
          sh "script/generate rspec -f"
        end
      end
      run do
        cd "vendor/plugins/inherit_views" do
          sh "rake rcov:verify"
        end
      end
    end
    
  end
end