Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

clean up pom, Rakefile, gemspec

  • Loading branch information...
commit 989bdf5472f2e5268c049ae6e17af157256d206d 1 parent eeff042
Christian Meier authored July 30, 2010

Showing 1 changed file with 6 additions and 8 deletions. Show diff stats Hide diff stats

  1. 14  Rakefile
14  Rakefile
@@ -5,13 +5,11 @@ require 'rubygems'
5 5
 require 'spec'
6 6
 require 'spec/rake/spectask'
7 7
 
8  
-require './lib/datamapper4rails/version.rb'
9  
-
10  
-build_dir = 'target'
  8
+BUILD_DIR = 'target'
11 9
 
12 10
 desc 'clean up'
13 11
 task :clean do
14  
-  FileUtils.rm_rf(build_dir)
  12
+  FileUtils.rm_rf(BUILD_DIR)
15 13
 end
16 14
 
17 15
 desc 'Package as a gem.'
@@ -19,15 +17,15 @@ task :package do
19 17
   require 'fileutils'
20 18
   gemspec = Dir['*.gemspec'].first
21 19
   Kernel.system("#{RUBY} -S gem build #{gemspec}")
22  
-  FileUtils.mkdir_p(build_dir)
  20
+  FileUtils.mkdir_p(BUILD_DIR)
23 21
   gem = Dir['*.gem'].first
24  
-  FileUtils.mv(gem, File.join(build_dir,"#{gem}"))
25  
-  puts File.join(build_dir,"#{gem}")
  22
+  FileUtils.mv(gem, File.join(BUILD_DIR,"#{gem}"))
  23
+  puts File.join(BUILD_DIR,"#{gem}")
26 24
 end
27 25
 
28 26
 desc 'Install the package as a gem.'
29 27
 task :install => [:package] do
30  
-  gem = Dir[File.join(build_dir, '*.gem')].first
  28
+  gem = Dir[File.join(BUILD_DIR, '*.gem')].first
31 29
   extra = ENV['GEM_HOME'].nil? && ENV['GEM_PATH'].nil? ? "--user-install" : ""
32 30
   Kernel.system("#{RUBY} -S gem install --local #{gem} --no-ri --no-rdoc #{extra}")
33 31
 end

0 notes on commit 989bdf5

Please sign in to comment.
Something went wrong with that request. Please try again.