Skip to content

Commit

Permalink
Keep the public API as small as we can
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenharman committed Feb 6, 2013
1 parent 0a5235c commit 3ab4224
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions lib/git_tracker/standalone.rb
Expand Up @@ -35,6 +35,16 @@ def build(io)
io
end

def ruby_executable
if File.executable? '/usr/bin/ruby' then '/usr/bin/ruby'
else
require 'rbconfig'
File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name'])
end
end

private

def inline_source(code, io)
code.each_line do |line|
io << line unless comment?(line) || require_own_file?(line)
Expand All @@ -60,13 +70,5 @@ def each_source_file
end
end

def ruby_executable
if File.executable? '/usr/bin/ruby' then '/usr/bin/ruby'
else
require 'rbconfig'
File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name'])
end
end

end
end

0 comments on commit 3ab4224

Please sign in to comment.