Rakefile 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #
  2. # To change this template, choose Tools | Templates
  3. # and open the template in the editor.
  4. require 'rubygems'
  5. require 'rake'
  6. require 'rake/clean'
  7. require 'rake/gempackagetask'
  8. require 'rake/rdoctask'
  9. require 'rake/testtask'
  10. spec = Gem::Specification.new do |s|
  11. s.name = 'TBackup'
  12. s.version = '0.0.1'
  13. s.has_rdoc = true
  14. s.extra_rdoc_files = ['README', 'LICENSE']
  15. s.summary = 'Your summary here'
  16. s.description = s.summary
  17. s.author = ''
  18. s.email = ''
  19. # s.executables = ['your_executable_here']
  20. s.files = %w(LICENSE README Rakefile) + Dir.glob("{bin,lib,spec}/**/*")
  21. s.require_path = "lib"
  22. s.bindir = "bin"
  23. end
  24. Rake::GemPackageTask.new(spec) do |p|
  25. p.gem_spec = spec
  26. p.need_tar = true
  27. p.need_zip = true
  28. end
  29. Rake::RDocTask.new do |rdoc|
  30. files =['README', 'LICENSE', 'lib/**/*.rb']
  31. rdoc.rdoc_files.add(files)
  32. rdoc.main = "README" # page to start on
  33. rdoc.title = "TBackup Docs"
  34. rdoc.rdoc_dir = 'doc/rdoc' # rdoc output folder
  35. rdoc.options << '--line-numbers'
  36. end
  37. Rake::TestTask.new do |t|
  38. t.test_files = FileList['test/**/*.rb']
  39. end