Sha256: 03149d1e677681f628d1d862f6e9daf5dbae0cf817961a8511ab51d84a4ee82b

Contents?: true

Size: 584 Bytes

Versions: 6

Compression:

Stored size: 584 Bytes

Contents

module Xing
  module Nominal
    module DependencyUtils
      require 'pp'
      def sh_or_fail(command, fail_message)
        sh command do |ok, result|
          dep_fail fail_message unless ok
        end
      end

      def dep_fail(fail_message, details = nil)
        message = "Dependency Failed: " + fail_message
        message += "  (Details below):\n#{details.pretty_inspect}" if details
        abort red(message)
      end

      def red(string)
        "\e[1;31m#{string}\e[0m"
      end

      def dep_success(message)
        puts message
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
xing-backend-1.0.0.pre.beta lib/xing/nominal/dependency_utils.rb
xing-backend-0.0.25 lib/xing/nominal/dependency_utils.rb
xing-backend-0.0.23 lib/xing/nominal/dependency_utils.rb
xing-backend-0.0.22 lib/xing/nominal/dependency_utils.rb
xing-backend-0.0.21 lib/xing/nominal/dependency_utils.rb
xing-backend-0.0.20 lib/xing/nominal/dependency_utils.rb