Sha256: 950658fb1fcd6d10bb2d3a52f06d9b7506b5c57bc39888847b7eede6084f9e3a

Contents?: true

Size: 487 Bytes

Versions: 6

Compression:

Stored size: 487 Bytes

Contents

require 'open3'

class AppUtils

  def self.execute(command, should_exit=true)
    is_success = system command
    unless is_success
      puts "\n\n======================================================\n\n"
      puts ' Something went wrong while executing this:'.red
      puts "  $ #{command}\n".yellow
      puts "======================================================\n\n"
      exit 1 if should_exit
    end
  end

  def self.is_folder? (path)
    File.directory?(path)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gito-0.4.9 lib/gito/app_utils.rb
gito-0.4.8 lib/gito/app_utils.rb
gito-0.4.7 lib/gito/app_utils.rb
gito-0.4.6 lib/gito/app_utils.rb
gito-0.4.5 lib/gito/app_utils.rb
gito-0.4.4 lib/gito/app_utils.rb