ianwhite / inherit_views

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

This URL has Read+Write access

inherit_views / garlic_example.rb
100644 76 lines (68 sloc) 2.517 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# 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/spec"
  repo 'rspec-rails', :url => 'git://github.com/dchelimsky/rspec-rails' , :local => "~/dev/vendor/spec"
  
  # these are for testing rails-2.0-2.1 branch
  repo 'ianwhite-rspec', :url => 'git://github.com/ianwhite/rspec' , :local => "~/dev/ianwhite/spec"
  repo 'ianwhite-rspec-rails', :url => 'git://github.com/ianwhite/rspec-rails' , :local => "~/dev/ianwhite/spec"
  
  repo 'inherit_views', :path => '.'
 
  # for target, default repo is 'rails', default branch is 'master'
  target 'edge', :branch => 'origin/master' do
    prepare do
      plugin 'inherit_views', :branch => 'origin/master', :clone => true
      plugin 'rspec'
      plugin 'rspec-rails' do
        sh "script/generate rspec -f"
      end
      run do
        cd "vendor/plugins/inherit_views" do
          sh "rake spec:rcov:verify"
        end
      end
    end
  end
  
  target '2.0-stable', :branch => 'origin/2-0-stable' do
    prepare do
      plugin 'inherit_views', :branch => 'origin/rails-2.0-2.1', :clone => true
      plugin 'ianwhite-rspec', :as => 'rspec'
      plugin 'ianwhite-rspec-rails', :as => 'rspec-rails' do
        sh "script/generate rspec -f"
      end
      run do
        cd "vendor/plugins/inherit_views" do
          sh "rake spec"
        end
      end
    end
  end
  
  target '2.1-stable', :branch => 'origin/2-1-stable' do
    prepare do
      plugin 'inherit_views', :branch => 'origin/rails-2.0-2.1', :clone => true
      plugin 'ianwhite-rspec', :as => 'rspec'
      plugin 'ianwhite-rspec-rails', :as => 'rspec-rails' do
        sh "script/generate rspec -f"
      end
      run do
        cd "vendor/plugins/inherit_views" do
          sh "rake spec"
        end
      end
    end
  end
end