Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

clean up pom, Rakefile, gemspec

  • Loading branch information...
commit 6f7c870f37d9853af5c7e164f20d560bbdef88fb 1 parent 5fd87b0
@mkristian authored
Showing with 6 additions and 7 deletions.
  1. +6 −7 Rakefile
View
13 Rakefile
@@ -1,16 +1,15 @@
# -*- 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.'
@@ -18,15 +17,15 @@ 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
Please sign in to comment.
Something went wrong with that request. Please try again.