Rakefile in thumbs_up-0.4.6 vs Rakefile in thumbs_up-0.5.0

- old
+ new

@@ -1,42 +1,32 @@ # encoding: UTF-8 require 'rubygems' -require 'bundler' +require 'bundler' unless defined?(Bundler) +$LOAD_PATH.unshift File.expand_path("../lib", __FILE__) +require 'thumbs_up/version' + begin Bundler.setup(:default, :development) rescue Bundler::BundlerError => e $stderr.puts e.message $stderr.puts "Run `bundle install` to install missing gems" exit e.status_code end require 'rake' -require 'jeweler' -Jeweler::Tasks.new do |gem| - gem.name = "thumbs_up" - gem.summary = "Voting for ActiveRecord with multiple vote sources and karma calculation." - gem.description = "ThumbsUp provides dead-simple voting capabilities to ActiveRecord models with karma calculation, a la stackoverflow.com." - gem.email = "brady@ldawn.com" - gem.homepage = "http://github.com/brady8/thumbs_up" - gem.authors = ["Brady Bouchard", "Peter Jackson", "Cosmin Radoi", "Bence Nagy", "Rob Maddox", "Wojciech Wnętrzak"] - # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings -end -Jeweler::RubygemsDotOrgTasks.new - require 'rake/testtask' Rake::TestTask.new(:test) do |test| test.libs << 'lib' << 'test' test.test_files = Dir.glob("test/**/*_test.rb") test.verbose = true end -require 'rdoc/task' -Rake::RDocTask.new do |rdoc| - version = File.exist?('VERSION') ? File.read('VERSION') : "" - rdoc.rdoc_dir = 'rdoc' - rdoc.title = "leaderboard #{version}" - rdoc.rdoc_files.include('README*') - rdoc.rdoc_files.include('lib/**/*.rb') +task :build do + system "gem build thumbs_up.gemspec" +end + +task :release => :build do + system "gem push thumbs_up-#{ThumbsUp::VERSION}.gem" end task :default => :test \ No newline at end of file