Rakefile in textmagic-0.3.3 vs Rakefile in textmagic-0.4.0

- old
+ new

@@ -1,11 +1,15 @@ -require 'rubygems' -require 'rake' -require 'sdoc' +# encoding: utf-8 +require "rubygems" +require "rake" +require "yaml" +require "rake/testtask" +require "rake/rdoctask" + begin - require 'jeweler' + require "jeweler" Jeweler::Tasks.new do |gem| gem.name = "textmagic" gem.summary = %Q{Ruby interface to the TextMagic's Bulk SMS Gateway} gem.description = %Q{ textmagic is a Ruby interface to the TextMagic's Bulk SMS Gateway. @@ -15,48 +19,45 @@ } gem.email = "vladimir.tuzinsky@gmail.com" gem.homepage = "http://github.com/bobes/textmagic" gem.authors = ["Vladimír Bobeš Tužinský"] 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" + gem.add_runtime_dependency "httparty", ">= 0.5.2" + gem.add_development_dependency "mocha", ">= 0.9.8" + gem.add_development_dependency "shoulda", ">= 2.10.3" + gem.add_development_dependency "fakeweb", ">= 1.2.8" + gem.add_development_dependency "mcmire-matchy", ">= 0.5.2" end Jeweler::RubyforgeTasks.new rescue LoadError puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler" end -require 'rake/testtask' Rake::TestTask.new(:test) do |test| - test.libs << 'lib' << 'test' - test.pattern = 'test/**/*_test.rb' + test.libs << "lib" << "test" + test.pattern = "test/**/test_*.rb" test.verbose = true end +task :default => :test begin - require 'rcov/rcovtask' + require "rcov/rcovtask" Rcov::RcovTask.new do |test| - test.libs << 'test' - test.pattern = 'test/**/*_test.rb' + test.libs << "test" + test.pattern = "test/**/test_*.rb" test.verbose = true end rescue LoadError task :rcov do abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov" end end - -task :default => :test - -require 'rake/rdoctask' Rake::RDocTask.new do |rdoc| - if File.exist?('VERSION.yml') - config = YAML.load(File.read('VERSION.yml')) + if File.exist?("VERSION.yml") + config = YAML.load(File.read("VERSION.yml")) version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}" else version = "" end @@ -86,10 +87,10 @@ git commit -m 'Updated RDoc' echo 'Pushing to origin' git push origin gh-pages EOS - system cmd.split(/\n\s*/).join(' && ') + system cmd.split(/\n\s*/).join(" && ") system <<-EOS echo 'Checking out master' git checkout master echo 'Done'