Sha256: 919e734ccadc560c8706e2864ac2b83f03e955cd192c9a356e6ee286091bce52
Contents?: true
Size: 647 Bytes
Versions: 12
Compression:
Stored size: 647 Bytes
Contents
module Lono::Cfn::Preview module DiffViewer def show_diff(existing_path, new_path) command = "#{diff_viewer} #{existing_path} #{new_path}" puts "Running: #{command}" out = `#{command}` if out.strip == '' puts "There were no differences." else puts out end end def diff_viewer return ENV['LONO_DIFF'] if ENV['LONO_DIFF'] colordiff_installed = system("type colordiff > /dev/null 2>&1") unless colordiff_installed puts "INFO: colordiff it not available. Recommend installing it." end colordiff_installed ? "colordiff" : "diff" end end end
Version data entries
12 entries across 12 versions & 1 rubygems