Sha256: 9f1dec114a04ccd839a0d619a689a007cc3d9489c27fed148e866a0949f95ff6

Contents?: true

Size: 368 Bytes

Versions: 25

Compression:

Stored size: 368 Bytes

Contents

class Homesick
  # Hack in support for diffing symlinks
  class Shell < Thor::Shell::Color

    def show_diff(destination, content)
      destination = Pathname.new(destination)

      if destination.symlink?
        say "- #{destination.readlink}", :red, true
        say "+ #{content.expand_path}", :green, true
      else
        super
      end
    end

  end
end

Version data entries

25 entries across 25 versions & 2 rubygems

Version Path
homesick-1.0.0 lib/homesick/shell.rb
homesick-0.9.8 lib/homesick/shell.rb
homesick-0.9.7 lib/homesick/shell.rb
homesick-0.9.6 lib/homesick/shell.rb
homesick-0.9.5 lib/homesick/shell.rb
homesick-0.9.4 lib/homesick/shell.rb
homesick-0.9.3 lib/homesick/shell.rb
homesick-0.9.2 lib/homesick/shell.rb
homesick-0.9.1 lib/homesick/shell.rb
homesick-0.9.0 lib/homesick/shell.rb
homesick-0.8.1 lib/homesick/shell.rb
homesick-0.8.0 lib/homesick/shell.rb
yahomesick-0.1.1 lib/homesick/shell.rb
yahomesick-0.1.0 lib/homesick/shell.rb
homesick-0.7.0 lib/homesick/shell.rb
homesick-0.6.1 lib/homesick/shell.rb
homesick-0.6.0 lib/homesick/shell.rb
homesick-0.5.4 lib/homesick/shell.rb
homesick-0.5.3 lib/homesick/shell.rb
homesick-0.5.2 lib/homesick/shell.rb