Rakefile in resque-mongo-1.8.1 vs Rakefile in resque-mongo-1.9.8.1
- old
+ new
@@ -1,10 +1,19 @@
load 'tasks/redis.rake'
$LOAD_PATH.unshift 'lib'
require 'resque/tasks'
+def command?(command)
+ system("type #{command} > /dev/null 2>&1")
+end
+
+
+#
+# Tests
+#
+
task :default => :test
desc "Run tests"
task :test do
# Don't use the rake/testtask because it loads a new
@@ -18,48 +27,34 @@
desc "Activate kicker - gem install kicker"
task :kick do
exec "kicker -e rake lib test"
end
-task :install => [ 'redis:install', 'dtach:install' ]
-desc "Build a gem"
-task :gem => [ :test, :gemspec, :build ]
+#
+# Install
+#
-begin
- require 'jeweler'
- require 'resque/version'
+task :install => [ 'redis:install', 'dtach:install' ]
- Jeweler::Tasks.new do |gemspec|
- gemspec.name = "resque-mongo"
- gemspec.summary = ""
- gemspec.description = ""
- gemspec.email = "yatiohi@ideopolis.gr"
- gemspec.homepage = "http://github.com/ctrochalakis/resque-mongo"
- gemspec.authors = ["Christos Trochalakis"]
- gemspec.version = Resque::Version
- gemspec.add_dependency "mongo", ">=0.20"
- gemspec.add_dependency "vegas", ">=0.1.2"
- gemspec.add_dependency "sinatra", ">=0.9.2"
- gemspec.add_development_dependency "jeweler"
- end
-rescue LoadError
- puts "Jeweler not available. Install it with: "
- puts "gem install jeweler"
-end
+#
+# Documentation
+#
begin
require 'sdoc_helpers'
rescue LoadError
- puts "sdoc support not enabled. Please gem install sdoc-helpers."
end
desc "Push a new version to Gemcutter"
-task :publish => [ :test, :gemspec, :build ] do
- system "git tag v#{Resque::Version}"
- system "git push origin v#{Resque::Version}"
- system "git push origin master"
- system "gem push pkg/resque-mongo-#{Resque::Version}.gem"
- system "git clean -fd"
+task :publish do
+ require 'resque/version'
+
+ sh "gem build resque.gemspec"
+ sh "gem push resque-#{Resque::Version}.gem"
+ sh "git tag v#{Resque::Version}"
+ sh "git push origin v#{Resque::Version}"
+ sh "git push origin master"
+ sh "git clean -fd"
exec "rake pages"
end