Permalink
Browse files

Refactored gem tasks in Rakefile.

  • Loading branch information...
1 parent 923a738 commit f2846bc22f74e08fb92be48e366eda3bd363d979 @djberg96 committed Aug 31, 2011
Showing with 12 additions and 9 deletions.
  1. +12 −9 Rakefile
View
@@ -4,16 +4,19 @@ require 'rake/testtask'
CLEAN.include("**/*.gem", "**/*.rbc")
-desc 'Build the hashslice gem'
-task :gem do
- spec = eval(IO.read('hashslice.gemspec'))
- Gem::Builder.new(spec).build
-end
+namespace :gem do
+
+ desc 'Build the hashslice gem'
+ task :create => [:clean] do
+ spec = eval(IO.read('hashslice.gemspec'))
+ Gem::Builder.new(spec).build
+ end
-desc "Install the hashslice library as a gem"
-task :install_gem => [:gem] do
- file = Dir["*.gem"].first
- sh "gem install #{file}"
+ desc "Install the hashslice library as a gem"
+ task :install => [:create] do
+ file = Dir["*.gem"].first
+ sh "gem install #{file}"
+ end
end
Rake::TestTask.new do |t|

0 comments on commit f2846bc

Please sign in to comment.