summaryrefslogtreecommitdiff
path: root/Rakefile
blob: 8894a7dca0e1d386f8724b64055a69e3429b497d (plain)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
require 'rake_helpers/ftp.rb'

ROOT = '.'
LIB_ROOT = File.join ROOT, 'lib'
RUBY = ENV.fetch 'ruby', 'ruby'

EXTRA_FILES = %w(README FOLDERS)
def EXTRA_FILES.in folder
  map do |file_name|
    File.join folder, file_name
  end
end

task :default => :test

task :upload => %w( gem:upload doc:upload example:upload )

def ruby command
  params =
    if RUBY == 'rbx'
      '-I/usr/local/lib/ruby/1.8'
    else
      '-w'
    end
  cmd = "#{RUBY} #{params} #{command}"
  puts cmd
  system cmd
end

task '19' do
  RUBY.replace 'ruby19'
end

task '18' do
  RUBY.replace 'ruby'
end

task '187' do
  RUBY.replace 'ruby187'
end

task 'yarv' do
  RUBY.replace 'ruby-yarv'
end

task 'jruby' do
  RUBY.replace 'jruby'
end

task 'rubinius' do
  RUBY.replace 'rbx'
end

task 'ee' do
  RUBY.replace 'rubyee'
end

for task_file in Dir['rake_tasks/*.rake']
  load task_file
end