ezmobius / nanite
- Source
- Commits
- Network (64)
- Issues (8)
- Downloads (0)
- Wiki (8)
- Graphs
-
Tree:
398269a
nanite / Rakefile
| f25d586a » | ezmobius | 2008-08-11 | 1 | require 'rubygems' | |
| 2 | require 'rake/gempackagetask' | ||||
| 9837f9f3 » | ezmobius | 2008-09-01 | 3 | require "spec/rake/spectask" | |
| 78baa0c0 » | raggi | 2009-01-28 | 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 | 11 | ||
| 22d88323 » | ezmobius | 2008-08-14 | 12 | GEM = "nanite" | |
| cc603379 » | raphael | 2009-06-22 | 13 | VER = "0.4.1" | |
| 38f7dd9d » | grempe | 2008-12-31 | 14 | AUTHOR = "Ezra Zygmuntowicz" | |
| 15 | EMAIL = "ezra@engineyard.com" | ||||
| 16 | HOMEPAGE = "http://github.com/ezmobius/nanite" | ||||
| 6fc32f6d » | ezmobius | 2008-10-08 | 17 | SUMMARY = "self assembling fabric of ruby daemons" | |
| f25d586a » | ezmobius | 2008-08-11 | 18 | ||
| 9d5260dd » | careo | 2009-01-15 | 19 | Dir.glob('tasks/*.rake').each { |r| Rake.application.add_import r } | |
| 20 | |||||
| f25d586a » | ezmobius | 2008-08-11 | 21 | spec = Gem::Specification.new do |s| | |
| 22 | s.name = GEM | ||||
| 088782f2 » | ezmobius | 2009-01-05 | 23 | s.version = ::VER | |
| f25d586a » | ezmobius | 2008-08-11 | 24 | s.platform = Gem::Platform::RUBY | |
| 25 | s.has_rdoc = true | ||||
| b7d5e633 » | grempe | 2009-01-08 | 26 | s.extra_rdoc_files = ["README.rdoc", "LICENSE", 'TODO'] | |
| f25d586a » | ezmobius | 2008-08-11 | 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 | 32 | ||
| 87e4127c » | ezmobius | 2008-08-31 | 33 | s.bindir = "bin" | |
| d94e8ce3 » | Ian Leitch | 2009-02-13 | 34 | s.executables = %w( nanite-agent nanite-mapper nanite-admin ) | |
| 7f5c2f72 » | grempe | 2009-01-17 | 35 | ||
| 3958d0df » | grempe | 2009-01-18 | 36 | s.add_dependency('amqp', '>= 0.6.0') | |
| 7f5c2f72 » | grempe | 2009-01-17 | 37 | ||
| f25d586a » | ezmobius | 2008-08-11 | 38 | s.require_path = 'lib' | |
| b7d5e633 » | grempe | 2009-01-08 | 39 | s.files = %w(LICENSE README.rdoc Rakefile TODO) + Dir.glob("{lib,bin,specs}/**/*") | |
| f25d586a » | ezmobius | 2008-08-11 | 40 | end | |
| 41 | |||||
| 42 | Rake::GemPackageTask.new(spec) do |pkg| | ||||
| 43 | pkg.gem_spec = spec | ||||
| 44 | end | ||||
| 45 | |||||
| ed771da4 » | mattmatt | 2009-06-25 | 46 | task :default => :spec | |
| 47 | |||||
| f25d586a » | ezmobius | 2008-08-11 | 48 | task :install => [:package] do | |
| 088782f2 » | ezmobius | 2009-01-05 | 49 | sh %{sudo gem install pkg/#{GEM}-#{VER}} | |
| 9837f9f3 » | ezmobius | 2008-09-01 | 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 | 56 | end | |
| 78baa0c0 » | raggi | 2009-01-28 | 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 | ||||
