Rakefile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. require 'rubygems'
  2. require 'rake'
  3. require 'yaml'
  4. require 'jeweler'
  5. require './lib/polyglot/version'
  6. Jeweler::Tasks.new do |gem|
  7. gem.name = "polyglot"
  8. gem.version = Polyglot::VERSION::STRING
  9. gem.homepage = "http://github.com/cjheath/polyglot"
  10. gem.license = "MIT"
  11. gem.summary = %Q{Augment 'require' to load non-Ruby file types}
  12. gem.description = %Q{
  13. The Polyglot library allows a Ruby module to register a loader
  14. for the file type associated with a filename extension, and it
  15. augments 'require' to find and load matching files.}
  16. gem.email = %w[clifford.heath@gmail.com]
  17. gem.authors = ["Clifford Heath"]
  18. gem.files.exclude "website/**/*.*", "script/*"
  19. end
  20. Jeweler::RubygemsDotOrgTasks.new
  21. require 'rdoc/task'
  22. Rake::RDocTask.new do |rdoc|
  23. rdoc.rdoc_dir = 'rdoc'
  24. rdoc.title = "polyglot #{Polyglot::VERSION::STRING}"
  25. rdoc.rdoc_files.include('README.txt')
  26. rdoc.rdoc_files.include('lib/**/*.rb')
  27. end
  28. desc 'Generate website files'
  29. task :website_generate do
  30. sh %q{ruby script/txt2html website/index.txt > website/index.html}
  31. end
  32. desc 'Upload website files via rsync'
  33. task :website_upload do
  34. rfconfig = YAML.load_file("#{ENV['HOME']}/.rubyforge/user-config.yml")
  35. ENV['RSYNC_PASSWORD'] = rfconfig['password']
  36. sh %{rsync -aCv website #{rfconfig['username']}@rubyforge.org:/var/www/gforge-projects/polyglot}
  37. end