public
Description: Ruby Enterprise Edition based on MRI 1.8.6
Homepage: http://www.rubyenterpriseedition.com/
Clone URL: git://github.com/FooBarWidget/rubyenterpriseedition.git
100644 21 lines (19 sloc) 0.634 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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