Rakefile in textmagic-0.2.2 vs Rakefile in textmagic-0.3.0

- old
+ new

@@ -1,17 +1,22 @@ require 'rubygems' require 'rake' +require 'sdoc' begin require 'jeweler' Jeweler::Tasks.new do |gem| gem.name = "textmagic" - gem.summary = %Q{Ruby interface to the TextMagic's SMS gateway} + gem.summary = %Q{Ruby interface to the TextMagic's Bulk SMS Gateway} gem.email = "vladimir.tuzinsky@gmail.com" gem.homepage = "http://github.com/bobes/textmagic" - gem.authors = ["Vladimír Bobeš Tužinský"] + gem.authors = ["Vladimir Bobes Tuzinsky"] gem.rubyforge_project = "textmagic" + gem.add_runtime_dependency "httparty", ">= 0.4.3" + gem.add_development_dependency "mocha", ">= 0.9.5" + gem.add_development_dependency "fakeweb", ">= 1.2.2" + gem.add_development_dependency "jeremymcanally-matchy", ">= 0.1.0" end Jeweler::RubyforgeTasks.new rescue LoadError puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler" @@ -51,6 +56,37 @@ rdoc.rdoc_dir = 'rdoc' rdoc.title = "textmagic #{version}" rdoc.rdoc_files.include('README*') rdoc.rdoc_files.include('lib/**/*.rb') + rdoc.options << '--charset' << 'utf8' + rdoc.options << '--fmt' << 'shtml' + rdoc.template = 'direct' +end + +desc "Build, commit and publish the RDOC files" +task :doc => :rerdoc do + cmd = <<-EOS + echo 'Packing and deleting rdoc directory' + tar -cf rdoc.tar rdoc + rm -rf rdoc + echo 'Checking out gh-pages branch' + git checkout -m gh-pages + echo 'Replacing rdoc directory' + rm -rf rdoc + tar -xf rdoc.tar + rm rdoc.tar + echo 'Commiting' + git add rdoc + git commit -m 'Updated RDoc' + echo 'Pushing to origin' + git push origin gh-pages + EOS + + system cmd.split(/\n\s*/).join(' && ') + + system <<-EOS + echo 'Checking out master' + git checkout master + echo 'Done' + EOS end