Permalink
Browse files

clean up pom, Rakefile, gemspec

  • Loading branch information...
1 parent 5fd87b0 commit 6f7c870f37d9853af5c7e164f20d560bbdef88fb @mkristian committed Jul 29, 2010
Showing with 6 additions and 7 deletions.
  1. +6 −7 Rakefile
View
@@ -1,32 +1,31 @@
# -*- ruby -*-
require 'rubygems'
-require './lib/rack_datamapper/version.rb'
require 'spec'
require 'spec/rake/spectask'
-build_dir = 'target'
+BUILD_DIR = 'target'
desc 'clean up'
task :clean do
- FileUtils.rm_rf(build_dir)
+ FileUtils.rm_rf(BUILD_DIR)
end
desc 'Package as a gem.'
task :package do
require 'fileutils'
gemspec = Dir['*.gemspec'].first
Kernel.system("#{RUBY} -S gem build #{gemspec}")
- FileUtils.mkdir_p(build_dir)
+ FileUtils.mkdir_p(BUILD_DIR)
gem = Dir['*.gem'].first
- FileUtils.mv(gem, File.join(build_dir,"#{gem}"))
- puts File.join(build_dir,"#{gem}")
+ FileUtils.mv(gem, File.join(BUILD_DIR,"#{gem}"))
+ puts File.join(BUILD_DIR,"#{gem}")
end
desc 'Install the package as a gem.'
task :install => [:package] do
- gem = Dir[File.join(build_dir, '*.gem')].first
+ gem = Dir[File.join(BUILD_DIR, '*.gem')].first
extra = ENV['GEM_HOME'].nil? && ENV['GEM_PATH'].nil? ? "--user-install" : ""
Kernel.system("#{RUBY} -S gem install --local #{gem} --no-ri --no-rdoc #{extra}")
end

0 comments on commit 6f7c870

Please sign in to comment.