ezmobius / nanite

self assembling fabric of ruby daemons

This URL has Read+Write access

nanite / Rakefile
f25d586a » ezmobius 2008-08-11 Adding NEw Nanite Map/Reduc... 1 require 'rubygems'
2 require 'rake/gempackagetask'
9837f9f3 » ezmobius 2008-09-01 added a few Resource specif... 3 require "spec/rake/spectask"
78baa0c0 » raggi 2009-01-28 Added support for rdoc gene... 4 begin; require 'rubygems'; rescue LoadError; end
5 begin
6 require 'hanna/rdoctask'
7 rescue LoadError
8 require 'rake/rdoctask'
9 end
10 require 'rake/clean'
f25d586a » ezmobius 2008-08-11 Adding NEw Nanite Map/Reduc... 11
22d88323 » ezmobius 2008-08-14 updated libraries to do map... 12 GEM = "nanite"
cc603379 » raphael 2009-06-22 Bump up minor rev to make i... 13 VER = "0.4.1"
38f7dd9d » grempe 2008-12-31 De-Anonymize the generated ... 14 AUTHOR = "Ezra Zygmuntowicz"
15 EMAIL = "ezra@engineyard.com"
16 HOMEPAGE = "http://github.com/ezmobius/nanite"
6fc32f6d » ezmobius 2008-10-08 slight changes 17 SUMMARY = "self assembling fabric of ruby daemons"
f25d586a » ezmobius 2008-08-11 Adding NEw Nanite Map/Reduc... 18
9d5260dd » careo 2009-01-15 experimental rake tasks to ... 19 Dir.glob('tasks/*.rake').each { |r| Rake.application.add_import r }
20
f25d586a » ezmobius 2008-08-11 Adding NEw Nanite Map/Reduc... 21 spec = Gem::Specification.new do |s|
22 s.name = GEM
088782f2 » ezmobius 2009-01-05 integrating halogrium's ref... 23 s.version = ::VER
f25d586a » ezmobius 2008-08-11 Adding NEw Nanite Map/Reduc... 24 s.platform = Gem::Platform::RUBY
25 s.has_rdoc = true
b7d5e633 » grempe 2009-01-08 Moving README so we can get... 26 s.extra_rdoc_files = ["README.rdoc", "LICENSE", 'TODO']
f25d586a » ezmobius 2008-08-11 Adding NEw Nanite Map/Reduc... 27 s.summary = SUMMARY
28 s.description = s.summary
29 s.author = AUTHOR
30 s.email = EMAIL
31 s.homepage = HOMEPAGE
7f5c2f72 » grempe 2009-01-17 Consolidate some example re... 32
87e4127c » ezmobius 2008-08-31 big refactoring for securit... 33 s.bindir = "bin"
d94e8ce3 » Ian Leitch 2009-02-13 Distinct seperation of Mapp... 34 s.executables = %w( nanite-agent nanite-mapper nanite-admin )
7f5c2f72 » grempe 2009-01-17 Consolidate some example re... 35
3958d0df » grempe 2009-01-18 Updated instructions for am... 36 s.add_dependency('amqp', '>= 0.6.0')
7f5c2f72 » grempe 2009-01-17 Consolidate some example re... 37
f25d586a » ezmobius 2008-08-11 Adding NEw Nanite Map/Reduc... 38 s.require_path = 'lib'
b7d5e633 » grempe 2009-01-08 Moving README so we can get... 39 s.files = %w(LICENSE README.rdoc Rakefile TODO) + Dir.glob("{lib,bin,specs}/**/*")
f25d586a » ezmobius 2008-08-11 Adding NEw Nanite Map/Reduc... 40 end
41
42 Rake::GemPackageTask.new(spec) do |pkg|
43 pkg.gem_spec = spec
44 end
45
ed771da4 » mattmatt 2009-06-25 Rake default task is now to... 46 task :default => :spec
47
f25d586a » ezmobius 2008-08-11 Adding NEw Nanite Map/Reduc... 48 task :install => [:package] do
088782f2 » ezmobius 2009-01-05 integrating halogrium's ref... 49 sh %{sudo gem install pkg/#{GEM}-#{VER}}
9837f9f3 » ezmobius 2008-09-01 added a few Resource specif... 50 end
51
52 desc "Run unit specs"
53 Spec::Rake::SpecTask.new do |t|
54 t.spec_opts = ["--format", "specdoc", "--colour"]
55 t.spec_files = FileList["spec/**/*_spec.rb"]
7f5c2f72 » grempe 2009-01-17 Consolidate some example re... 56 end
78baa0c0 » raggi 2009-01-28 Added support for rdoc gene... 57
58 desc 'Generate RDoc documentation'
59 Rake::RDocTask.new do |rd|
60 rd.title = spec.name
61 rd.rdoc_dir = 'rdoc'
62 rd.main = "README.rdoc"
63 rd.rdoc_files.include("lib/**/*.rb", *spec.extra_rdoc_files)
64 end
65 CLOBBER.include(:clobber_rdoc)
66
67 desc 'Generate and open documentation'
68 task :docs => :rdoc do
69 case RUBY_PLATFORM
70 when /darwin/ ; sh 'open rdoc/index.html'
71 when /mswin|mingw/ ; sh 'start rdoc\index.html'
72 else
73 sh 'firefox rdoc/index.html'
74 end
75 end