Navigation Menu

Skip to content

Commit

Permalink
allowing the executable to be run without loading the gem, makes it e…
Browse files Browse the repository at this point in the history
…asier to test.
  • Loading branch information
adamsanderson committed Jun 6, 2008
1 parent 3f7a5ce commit c1e343c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion bin/ruby_diff
@@ -1,8 +1,19 @@
#!/usr/bin/env ruby
require 'rubygems'
require 'ruby_diff'
require 'optparse'

# If we're loading ruby_diff directly for development,
# don't require it through rubygems. Is there a better
# way to do this?

if $0 == __FILE__
# loaded directly (dev)
require File.dirname(__FILE__)+"/../lib/ruby_diff"
else
# loaded via ruby_gems
require 'ruby_diff'
end

@options = {}

feeder_mapping = {
Expand Down

0 comments on commit c1e343c

Please sign in to comment.