Sha256: b8b2ddee4ff80eadb596358a12c29c3d617f68bc1c67a6191500b3325f71b487

Contents?: true

Size: 1.12 KB

Versions: 41

Compression:

Stored size: 1.12 KB

Contents

#!/usr/bin/env ruby
#--
# Copyright 2004 Austin Ziegler <diff-lcs@halostatue.ca>
#   adapted from:
#     Algorithm::Diff (Perl) by Ned Konz <perl@bike-nomad.com>
#     Smalltalk by Mario I. Wolczko <mario@wolczko.com>
#   implements McIlroy-Hunt diff algorithm
#
# This program is free software. It may be redistributed and/or modified under
# the terms of the GPL version 2 (or later), the Perl Artistic licence, or the
# Ruby licence.
# 
# $Id: ldiff,v 1.6 2004/09/26 01:35:57 austin Exp $
#++

  # 1) Try to load Ruwiki from the gem.
  # 2) Try to load Ruwiki from $LOAD_PATH.
  # 3) Modify $LOAD_PATH and try to load it from the modified $LOAD_PATH.
  # 4) Fail hard.
load_state = 1
  begin
    if 1 == load_state
      require 'rubygems'
      require_gem 'diff-lcs', '= 1.1.1'
    else
      require 'diff/lcs'
    end
  rescue LoadError
    load_state += 1

    case load_state
    when 3
      $LOAD_PATH.unshift "#{File.dirname($0)}/../lib"
    when 4
      $LOAD_PATH.shift
      $LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib"
    when 5
      raise
    end
    retry
  end

require 'diff/lcs/ldiff'

exit Diff::LCS::Ldiff.run(ARGV)

Version data entries

41 entries across 40 versions & 8 rubygems

Version Path
resque-pool-0.3.0 vendor/bundle/ruby/1.8/gems/diff-lcs-1.1.2/bin/ldiff
resque-pool-0.3.0.beta.2 vendor/bundle/ruby/1.8/gems/diff-lcs-1.1.2/bin/ldiff
messagebus_ruby_api-0.4.7 spec/ruby/1.9.1/gems/diff-lcs-1.1.2/bin/ldiff
messagebus_ruby_api-0.4.4 spec/ruby/1.9.1/gems/diff-lcs-1.1.2/bin/ldiff
vim-jar-0.1.2.0001 bundler/ruby/1.8/gems/diff-lcs-1.1.2/bin/ldiff
vim-jar-0.1.2 bundler/ruby/1.8/gems/diff-lcs-1.1.2/bin/ldiff
vim-jar-0.1.1 bundler/ruby/1.8/gems/diff-lcs-1.1.2/bin/ldiff
vim-jar-0.1.0 bundler/ruby/1.8/gems/diff-lcs-1.1.2/bin/ldiff
vim-jar-0.0.3 bundler/ruby/1.8/gems/diff-lcs-1.1.2/bin/ldiff
vim-jar-0.0.2 bundler/ruby/1.8/gems/diff-lcs-1.1.2/bin/ldiff
vim-jar-0.0.1 bundler/ruby/1.8/gems/diff-lcs-1.1.2/bin/ldiff
gemrage-1.0.0 vendor/ruby/1.8/gems/diff-lcs-1.1.2/bin/ldiff
gemrage-0.4.1 vendor/ruby/1.8/gems/diff-lcs-1.1.2/bin/ldiff
gemrage-0.4.0 vendor/ruby/1.8/gems/diff-lcs-1.1.2/bin/ldiff
gemrage-0.3.2 vendor/ruby/1.8/gems/diff-lcs-1.1.2/bin/ldiff
gemrage-0.3.1 vendor/ruby/1.8/gems/diff-lcs-1.1.2/bin/ldiff
gemrage-0.3.0 vendor/ruby/1.8/gems/diff-lcs-1.1.2/bin/ldiff
gemrage-0.2.0 vendor/ruby/1.8/gems/diff-lcs-1.1.2/bin/ldiff
gemrage-0.1.2 vendor/ruby/1.8/gems/diff-lcs-1.1.2/bin/ldiff
gemrage-0.1.1 vendor/ruby/1.8/gems/diff-lcs-1.1.2/bin/ldiff