ianwhite / inherit_views

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

This URL has Read+Write access

ianwhite (author)
Fri Feb 06 06:09:13 -0800 2009
commit  3d630483a88f57388236509595e4aabf0a5e9fa7
tree    d7d22c2898492057d69df09ac9f2dfb906f15e54
parent  5053c4b253d6302f462d1f4256e9d54cb39eba90
inherit_views / Rakefile
100644 51 lines (42 sloc) 1.542 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
# use pluginized rpsec if it exists
rspec_base = File.expand_path(File.dirname(__FILE__) + '/../rspec/lib')
$LOAD_PATH.unshift(rspec_base) if File.exist?(rspec_base) and !$LOAD_PATH.include?(rspec_base)
 
require 'spec/rake/spectask'
require 'spec/rake/verify_rcov'
require 'rake/rdoctask'
 
plugin_name = File.basename(File.dirname(__FILE__))
 
task :default => :spec
 
desc "Run the specs for #{plugin_name}"
Spec::Rake::SpecTask.new(:spec) do |t|
  t.spec_files = FileList['spec/**/*_spec.rb']
  t.spec_opts = ["--colour"]
end
 
desc "Generate RCov report for #{plugin_name}"
Spec::Rake::SpecTask.new(:rcov) do |t|
  t.spec_files = FileList['spec/**/*_spec.rb']
  t.rcov = true
  t.rcov_dir = 'doc/coverage'
  t.rcov_opts = ['--text-report', '--exclude', "spec/,rcov.rb,#{File.expand_path(File.join(File.dirname(__FILE__),'../../..'))}"]
end
 
namespace :rcov do
  desc "Verify RCov threshold for #{plugin_name}"
  RCov::VerifyTask.new(:verify => :rcov) do |t|
    t.threshold = 100.0
    t.index_html = File.join(File.dirname(__FILE__), 'doc/coverage/index.html')
  end
end
 
task :rdoc => :doc
 
desc "Generate rdoc for #{plugin_name}"
Rake::RDocTask.new(:doc) do |t|
  t.rdoc_dir = 'doc'
  t.main = 'README.rdoc'
  t.title = "#{plugin_name}"
  t.template = ENV['RDOC_TEMPLATE']
  t.options = ['--line-numbers', '--inline-source']
  t.rdoc_files.include('README.rdoc', 'History.txt', 'License.txt')
  t.rdoc_files.include('lib/**/*.rb')
end
 
task :cruise do
  sh "garlic clean && garlic all"
  puts "The build is GOOD"
end