Sha256: 44fb6873e9c93145b44580abb5208eb6a7b28a8bcd98ee5bc09d7ba39776305e

Contents?: true

Size: 485 Bytes

Versions: 5

Compression:

Stored size: 485 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"
      exit 1 if should_exit
    end
  end

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gito-0.4.14 lib/gito/app_utils.rb
gito-0.4.13 lib/gito/app_utils.rb
gito-0.4.12 lib/gito/app_utils.rb
gito-0.4.11 lib/gito/app_utils.rb
gito-0.4.10 lib/gito/app_utils.rb