Sha256: d1ca141f48a926f8ce4d35e650944afa49bc2b294596ff3c156bc6a46eb16cb2

Contents?: true

Size: 281 Bytes

Versions: 2

Compression:

Stored size: 281 Bytes

Contents

module Inch
  module Utils
    module ShellHelper
      def git(dir, command)
        old_pwd = Dir.pwd
        Dir.chdir dir
        out = sh("git #{command}")
        Dir.chdir old_pwd
        out
      end

      def sh(command)
        `#{command}`
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
inch-0.4.0.rc2 lib/inch/utils/shell_helper.rb
inch-0.4.0.rc1 lib/inch/utils/shell_helper.rb