[macruby-changes] [4707] DietRB/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Fri Oct 8 04:02:37 PDT 2010
Revision: 4707
http://trac.macosforge.org/projects/ruby/changeset/4707
Author: eloy.de.enige at gmail.com
Date: 2010-10-08 04:02:35 -0700 (Fri, 08 Oct 2010)
Log Message:
-----------
Cleanup Rakefile, use rbconfig to determine which Ruby bin to use.
So to run, for instance, the specs with Ruby 1.9: $ rake19 spec.
From: Eloy Duran <eloy.de.enige at gmail.com>
Modified Paths:
--------------
DietRB/trunk/Rakefile
DietRB/trunk/spec/spec_helper.rb
Modified: DietRB/trunk/Rakefile
===================================================================
--- DietRB/trunk/Rakefile 2010-10-08 11:02:27 UTC (rev 4706)
+++ DietRB/trunk/Rakefile 2010-10-08 11:02:35 UTC (rev 4707)
@@ -1,21 +1,18 @@
+def ruby_bin
+ require 'rbconfig'
+ File.join(Config::CONFIG['prefix'], 'bin', Config::CONFIG['ruby_install_name'])
+end
+
task :default => :run
-desc "Run the specs"
+desc "Run the specs (run it with a rake installed on the Ruby version you want to run the specs on)"
task :spec do
- # sh "macbacon #{FileList['spec/**/*_spec.rb'].join(' ')}"
- bacon = `which bacon19 || which bacon`.chomp
- sh "#{bacon} #{FileList['spec/**/*_spec.rb'].join(' ')}"
+ sh "#{ruby_bin} -r #{FileList['./spec/**/*_spec.rb'].join(' -r ')} -e ''"
end
-desc "Run specs with Kicker"
-task :kick do
- sh "kicker -e 'rake spec' lib spec"
-end
-
-desc "Run dietrb with ruby19"
+desc "Run dietrb"
task :run do
- ruby = `which ruby19 || which ruby`.chomp
- sh "#{ruby} -Ilib ./bin/dietrb -r irb/ext/colorize -r pp"
+ sh "#{ruby_bin} -I lib ./bin/dietrb -r irb/ext/colorize -r pp"
end
desc "AOT compile for MacRuby"
Modified: DietRB/trunk/spec/spec_helper.rb
===================================================================
--- DietRB/trunk/spec/spec_helper.rb 2010-10-08 11:02:27 UTC (rev 4706)
+++ DietRB/trunk/spec/spec_helper.rb 2010-10-08 11:02:35 UTC (rev 4707)
@@ -1,6 +1,8 @@
require 'rubygems'
require 'bacon'
+Bacon.summary_on_exit
+
ENV['SPECCING'] = 'true'
ROOT = File.expand_path('../../', __FILE__)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101008/b90687f4/attachment-0001.html>
More information about the macruby-changes
mailing list