Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 73 lines (62 sloc) 2.0 kb
662756f @alloy Cleanup Rakefile, use rbconfig to determine which Ruby bin to use.
alloy authored
1 def ruby_bin
2 require 'rbconfig'
3 File.join(Config::CONFIG['prefix'], 'bin', Config::CONFIG['ruby_install_name'])
4 end
5
fc4ec48 @alloy Only use level to judge whether or not the source is a code block.
alloy authored
6 task :default => :run
9575de9 @alloy Start on IRB::Context, which uses a copy of the binding of a given ob…
alloy authored
7
662756f @alloy Cleanup Rakefile, use rbconfig to determine which Ruby bin to use.
alloy authored
8 desc "Run the specs (run it with a rake installed on the Ruby version you want to run the specs on)"
9575de9 @alloy Start on IRB::Context, which uses a copy of the binding of a given ob…
alloy authored
9 task :spec do
0cacff2 @alloy Migrate spec suite to MSpec's API.
alloy authored
10 sh "mspec -t #{ruby_bin} spec"
c57e9e2 @alloy Prepare for 0.1.0 release.
alloy authored
11 end
12
662756f @alloy Cleanup Rakefile, use rbconfig to determine which Ruby bin to use.
alloy authored
13 desc "Run dietrb"
fc4ec48 @alloy Only use level to judge whether or not the source is a code block.
alloy authored
14 task :run do
94957b2 @alloy Get rid of all warnings when $-w is `true'.
alloy authored
15 sh "env RUBYOPT='-w' #{ruby_bin} -I lib ./bin/dietrb -d -r irb/ext/colorize -r pp"
fc4ec48 @alloy Only use level to judge whether or not the source is a code block.
alloy authored
16 end
17
9f3906a @alloy Add a task to merge the source into the MacRuby repo
alloy authored
18 namespace :macruby do
19 desc "AOT compile for MacRuby"
20 task :compile do
21 FileList["lib/**/*.rb"].each do |source|
22 sh "macrubyc --arch i386 --arch x86_64 -C '#{source}' -o '#{source}o'"
23 end
2c9c504 @alloy Add MacRuby AOT compile task
alloy authored
24 end
9f3906a @alloy Add a task to merge the source into the MacRuby repo
alloy authored
25
26 desc "Clean MacRuby binaries"
27 task :clean do
28 FileList["lib/**/*.rbo"].each do |bin|
29 rm bin
30 end
31 end
32
33 desc "Merge source into the MacRuby repo"
34 task :merge do
35 if (repo = ENV['macruby_repo']) && File.exist?(repo)
f980140 @alloy Also merge the specs into the MacRuby repo.
alloy authored
36 bin = File.join(repo, 'bin/irb')
37 lib = File.join(repo, 'lib')
38 spec = File.join(repo, 'spec/dietrb')
9f3906a @alloy Add a task to merge the source into the MacRuby repo
alloy authored
39
f980140 @alloy Also merge the specs into the MacRuby repo.
alloy authored
40 rm_f bin
41 rm_f File.join(lib, 'irb.rb')
9f3906a @alloy Add a task to merge the source into the MacRuby repo
alloy authored
42 rm_rf File.join(lib, 'irb')
f980140 @alloy Also merge the specs into the MacRuby repo.
alloy authored
43 rm_rf spec
9f3906a @alloy Add a task to merge the source into the MacRuby repo
alloy authored
44
f980140 @alloy Also merge the specs into the MacRuby repo.
alloy authored
45 cp 'bin/dietrb', bin
46 cp 'lib/irb.rb', lib
47 cp_r 'lib/irb', lib
48 cp_r 'spec', spec
9f3906a @alloy Add a task to merge the source into the MacRuby repo
alloy authored
49 else
50 puts "[!] Set the `macruby_repo' env variable to point to the MacRuby repo checkout"
51 exit 1
52 end
2c9c504 @alloy Add MacRuby AOT compile task
alloy authored
53 end
54 end
55
cec2bf1 @alloy Release 0.6.0 which adds auto-indentation and file path completion in…
alloy authored
56 #begin
57 #require 'rubygems'
58 #require 'jeweler'
59 #require File.expand_path('../lib/irb/version', __FILE__)
60 #Jeweler::Tasks.new do |gemspec|
61 #gemspec.name = "dietrb"
62 #gemspec.version = IRB::VERSION::STRING
63 #gemspec.summary = gemspec.description = "IRB on a diet, for MacRuby / Ruby 1.9"
64 #gemspec.email = "eloy.de.enige@gmail.com"
65 #gemspec.homepage = "http://github.com/alloy/dietrb"
66 #gemspec.authors = ["Eloy Duran"]
67
68 #gemspec.required_ruby_version = ::Gem::Requirement.new("~> 1.9")
69 #gemspec.files.reject! { |file| file =~ /^(extensions|\.gitignore|\w+_prototype\.rb)/ }
70 #end
71 #rescue LoadError
72 #end
Something went wrong with that request. Please try again.