File: Rakefile

package info (click to toggle)
ruby-inline 3.12.4-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 408 kB
  • sloc: ruby: 1,504; makefile: 2
file content (40 lines) | stat: -rw-r--r-- 854 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# -*- ruby -*-

require 'rubygems'
require 'hoe'

Hoe.add_include_dirs "../../ZenTest/dev/lib"
Hoe.add_include_dirs "lib"

Hoe.plugin :seattlerb
Hoe.plugin :isolate

Hoe.spec "RubyInline" do
  developer 'Ryan Davis', 'ryand-ruby@zenspider.com'

  clean_globs << File.expand_path("~/.ruby_inline")
  spec_extras[:requirements] =
    "A POSIX environment and a compiler for your language."

  dependency "ZenTest", "~> 4.3" # for ZenTest mapping
end

task :test => :clean

desc "run all examples"
task :examples do
  %w(example.rb example2.rb
     tutorial/example1.rb
     tutorial/example2.rb).each do |e|
    rm_rf '~/.ruby_inline'
    ruby "-Ilib -w #{e}"
  end
end

desc "run simple benchmarks"
task :bench do
  verbose(false) do
    ruby "-Ilib ./example.rb"
    ruby "-Ilib ./example.rb 1000000 12" # 12 is the bignum cutoff for factorial
  end
end