Sha256: d3ccdbf47ab789b829da3222b836f67439527fa6fcb22e13cfa3b993e758bd93

Contents?: true

Size: 473 Bytes

Versions: 1

Compression:

Stored size: 473 Bytes

Contents

module Engineyard::Recipes
  module GitCmd
    class << self
      attr_accessor :test_mode
    end
    
    def self.git(command)
      if test_mode
        git_mock_log = File.expand_path("../../../tmp/git.log", __FILE__)
        File.open(git_mock_log, "a") { |file| file << command; file << "\n" }
      else
        puts "git #{command}"
        `git #{command}`
      end
    end

    def git(command)
      Engineyard::Recipes::GitCmd.git(command)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
engineyard-recipes-0.2.0.pre2 lib/engineyard-recipes/git_cmd.rb