Permalink
Browse files

Try not to be unconventional with the Rakefile

  • Loading branch information...
1 parent 5700a1f commit b586d808b24ed73d06294dead49387e4bad014dc @ferrous26 committed Oct 15, 2011
Showing with 10 additions and 13 deletions.
  1. +9 −12 Rakefile
  2. +1 −1 rubygems-compile.gemspec
View
@@ -1,24 +1,21 @@
-require 'rake/testtask'
-require 'rake/gempackagetask'
-require 'rubygems/dependency_installer'
-
task :default => :gem
-Rake::TestTask.new(:test) do |test|
- test.libs << 'lib' << 'test'
+require 'rake/testtask'
+Rake::TestTask.new do |test|
+ test.libs << 'test'
test.pattern = 'test/**/test_*.rb'
test.verbose = true
test.ruby_opts = ['-rhelper']
end
-eval IO.read('rubygems-compile.gemspec')
+require 'rubygems'
+spec = Gem::Specification.load('rubygems-compile.gemspec')
-Rake::GemPackageTask.new(GEM_SPEC) do |pkg|
- pkg.need_zip = false
- pkg.need_tar = true
-end
+require 'rake/gempackagetask'
+Rake::GemPackageTask.new(spec) { }
+require 'rubygems/dependency_installer'
desc 'Build the gem and install it'
task :install => :gem do
- Gem::Installer.new("pkg/#{GEM_SPEC.file_name}").install
+ Gem::Installer.new("pkg/#{spec.file_name}").install
end
View
@@ -1,4 +1,4 @@
-GEM_SPEC = Gem::Specification.new do |s|
+Gem::Specification.new do |s|
s.name = 'rubygems-compile'
s.version = '1.0.0rc2'
# s.platform = Gem::Platform::MACRUBY

0 comments on commit b586d80

Please sign in to comment.