Sha256: 9bfc292028e61d91907ed29c4ae7126ca16a117a56b7ed3cfaa33bf6cf8784eb

Contents?: true

Size: 661 Bytes

Versions: 1

Compression:

Stored size: 661 Bytes

Contents

#!/usr/bin/env ruby

require 'travis_check_rubies/version'

matches = TravisCheckRubies::Version.matches
if matches.values.any?
  ansi_red = `tput setaf 1 2>/dev/null`
  ansi_green = `tput setaf 2 2>/dev/null`
  ansi_reset = `tput sgr0 2>/dev/null`
  puts 'Suggested changes:'
  matches.each do |version, matched_versions|
    if !matched_versions || matched_versions.include?(version)
      puts " #{version}"
    else
      puts "#{ansi_red}-#{version}#{ansi_reset}"
    end
    if matched_versions
      (matched_versions - [version]).each do |matched_version|
        puts "#{ansi_green}+#{matched_version}#{ansi_reset}"
      end
    end
  end
  abort
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
travis_check_rubies-0.1.0 bin/travis_check_rubies