kstephens / cabar

Cabar - an extensible software component backplane.

This URL has Read+Write access

kstephens (author)
Mon Sep 21 18:11:43 -0700 2009
commit  c9946cdf80d2ed79dfdb902dac085cc83c6dbb45
tree    1502bfdd6d954a5fa09c4ae6675884214ddcccfc
parent  9e60e5f1e5550156f01c8834fc823bbb1c3295be
cabar / Rakefile
100644 120 lines (90 sloc) 2.589 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
require 'rubygems'
require 'rake'
 
VC_NAME = 'cabar'
 
begin
  require 'echoe'
 
  $e = Echoe.new(VC_NAME, '1.0') do |p|
    p.rubyforge_name = 'cabar'
    p.summary = "Cabar - Component Backplane Manager."
    p.description = "For more info:
 
http://kurtstephens.com/cabar
http://github.com/kstephens/cabar/tree/master
http://rubyforge.org/projects/cabar
http://cabar.rubyforge.org/
"
    p.url = "http://git/"
    p.author = ['Kurt Stephens']
    p.email = "ruby-cabar@umleta.com"
    # p.dependencies = ["launchy"]
  end
 
rescue LoadError => boom
  puts "You are missing a dependency required for meta-operations on this gem."
  puts "#{boom.to_s.capitalize}."
end
 
require "spec/rake/spectask"
 
 
task :tgz do
  sh "cd .. && tar -czvf cabar.tar.gz cabar"
end
 
desc "Generates example docs"
task :docs_example => :docs do
  sh "cd example && rake doc_graphs"
  sh "rm -rf doc/example/doc"
  sh "mkdir -p doc/example"
  sh "cp -rp example/doc doc/example/doc"
  sh "find doc -type d -name .svn | xargs rm -rf"
end
 
 
######################################################################
 
# task :publish_docs => :docs_example
 
$: << File.expand_path('lib/ruby')
 
desc "Run tests in example/"
task :test_example do
  sh "cd example && rake"
end
# task :test => :test_example
 
# add spec tasks, if you have rspec installed
begin
  require 'spec/rake/spectask'
 
  SPEC_RUBY_OPTS = [ '-I', File.expand_path('lib/ruby') ]
  SPEC_FILES = FileList['test/**/*.spec']
  SPEC_OPTS = ['--color', '--backtrace']
 
  Spec::Rake::SpecTask.new("spec") do |t|
    t.ruby_opts = SPEC_RUBY_OPTS
    t.spec_files = SPEC_FILES
    t.spec_opts = SPEC_OPTS
  end
 
  task :test do
    Rake::Task['spec'].invoke
  end
 
  Spec::Rake::SpecTask.new("rcov_spec") do |t|
    t.spec_files = SPEC_FILES
    t.spec_opts = SPEC_OPTS
    t.rcov = true
    t.rcov_opts = ['--exclude', '^spec,/gems/']
  end
end
 
desc "run all comp/* tests"
task :test_comps
task :test => :test_comps
 
comp_dirs = [ ]
Dir["comp/*/Rakefile"].each do | rf |
  dir = File.dirname(rf)
  name = File.basename(dir)
  comp_dirs << [ dir, name ]
end
 
Dir["comp/*/*/Rakefile"].each do | rf |
  dir = File.dirname(rf)
  name = File.basename(File.dirname(dir))
  comp_dirs << [ dir, name ]
end
 
comp_dirs.each do | (dir, name) |
  desc "run tests in #{dir}"
  name = "test_comp_#{name}".to_sym
  task name do
    sh "cd #{dir} && rake test"
  end
  task :test_comps => name
end
 
 
######################################################################
 
require 'lib/tasks/p4_git'
VC_OPTS[:manifest] = 'Manifest'
VC_OPTS[:precious] = /^contrib\//