public
Description: self assembling fabric of ruby daemons
Homepage:
Clone URL: git://github.com/ezmobius/nanite.git
ezmobius (author)
Fri Jun 26 16:19:48 -0700 2009
commit  18474d41a86dd54d2b1b667a2b9dbb05cd660bb0
tree    c13be90a924fd4e555d63373db1234477d4b65a7
parent  d950650b46761dc213d0c43bf98ced45f16beea1 parent  0719f408ca9fdbfe26317700bdc00028fbbbc9de
nanite / Rakefile
100644 76 lines (63 sloc) 1.825 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
require 'rubygems'
require 'rake/gempackagetask'
require "spec/rake/spectask"
begin; require 'rubygems'; rescue LoadError; end
begin
  require 'hanna/rdoctask'
rescue LoadError
  require 'rake/rdoctask'
end
require 'rake/clean'
 
GEM = "nanite"
VER = "0.4.1"
AUTHOR = "Ezra Zygmuntowicz"
EMAIL = "ezra@engineyard.com"
HOMEPAGE = "http://github.com/ezmobius/nanite"
SUMMARY = "self assembling fabric of ruby daemons"
 
Dir.glob('tasks/*.rake').each { |r| Rake.application.add_import r }
 
spec = Gem::Specification.new do |s|
  s.name = GEM
  s.version = ::VER
  s.platform = Gem::Platform::RUBY
  s.has_rdoc = true
  s.extra_rdoc_files = ["README.rdoc", "LICENSE", 'TODO']
  s.summary = SUMMARY
  s.description = s.summary
  s.author = AUTHOR
  s.email = EMAIL
  s.homepage = HOMEPAGE
 
  s.bindir = "bin"
  s.executables = %w( nanite-agent nanite-mapper nanite-admin )
 
  s.add_dependency('amqp', '>= 0.6.0')
 
  s.require_path = 'lib'
  s.files = %w(LICENSE README.rdoc Rakefile TODO) + Dir.glob("{lib,bin,specs}/**/*")
end
 
Rake::GemPackageTask.new(spec) do |pkg|
  pkg.gem_spec = spec
end
 
task :default => :spec
 
task :install => [:package] do
  sh %{sudo gem install pkg/#{GEM}-#{VER}}
end
 
desc "Run unit specs"
Spec::Rake::SpecTask.new do |t|
  t.spec_opts = ["--format", "specdoc", "--colour"]
  t.spec_files = FileList["spec/**/*_spec.rb"]
end
 
desc 'Generate RDoc documentation'
Rake::RDocTask.new do |rd|
  rd.title = spec.name
  rd.rdoc_dir = 'rdoc'
  rd.main = "README.rdoc"
  rd.rdoc_files.include("lib/**/*.rb", *spec.extra_rdoc_files)
end
CLOBBER.include(:clobber_rdoc)
 
desc 'Generate and open documentation'
task :docs => :rdoc do
  case RUBY_PLATFORM
  when /darwin/ ; sh 'open rdoc/index.html'
  when /mswin|mingw/ ; sh 'start rdoc\index.html'
  else
    sh 'firefox rdoc/index.html'
  end
end