Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 451b3aa9e7
Fetching contributors…

Cannot retrieve contributors at this time

file 25 lines (20 sloc) 0.578 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 'rake'

desc "Bundle all the code into a single script"

task :bundle do
  require 'find'

  git_rank = File.open('git-rank', 'w')
  git_rank.puts "#!/usr/bin/env ruby"

  Find.find('lib', 'bin') do |file|
    next unless FileTest.file? file
    File.read(file).each_line do |line|
      next if line =~ /^require.*git-rank/
      next if line =~ /^#!/
      git_rank.puts line
    end
  end

  File.chmod(0755, git_rank.path)
  git_rank.close
  puts "git-rank created"
  puts "This file be run as a script"
  puts "Add it somewhere in your PATH for easy execution"
end
Something went wrong with that request. Please try again.