public
Description: Ruby Enterprise Edition based on MRI 1.8.6
Homepage: http://www.rubyenterpriseedition.com/
Clone URL: git://github.com/FooBarWidget/rubyenterpriseedition.git
Hongli Lai (Phusion) (author)
Mon Jun 29 12:25:12 -0700 2009
100644 25 lines (21 sloc) 0.672 kb
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
require 'distro/tasks'
 
verbose true
 
desc "Create a patch for upstream Ruby"
task :make_patch do
require 'yaml'
branch_data = YAML::load_file('branch.yml')
upstream = ENV['upstream'] || 'master'
files = `git diff #{upstream} --stat | grep '|' | awk '{ print $1 }'`.split("\n")
files -= branch_data['exclude_from_patch'].map { |x| Dir[x] }.flatten
sh "git", "diff", "#{upstream}", *files
end
 
desc "Change shebang lines for Ruby scripts to '#!/usr/bin/env ruby'"
task :fix_shebang do
if ENV['dir'].nil?
STDERR.write("Usage: rake fix_shebang dir=<SOME DIRECTORY>\n")
exit 1
end
Dir.chdir(ENV['dir']) do
sh "sed -i 's|^#!.*$|#!/usr/bin/env ruby|' *"
end
end