Sha256: fb2f612b9ed1bf556c9f98a6314c64163e91515816d0ad0f8511965d12aede05

Contents?: true

Size: 381 Bytes

Versions: 19

Compression:

Stored size: 381 Bytes

Contents

module Gemsmith
  # Provides supplementary utility methods.
  class Kit
    # Answers the git config (i.e. ~/.gitconfig) value for a given key, otherwise nil.
    # ==== Parameters
    # # * +key+ - Required. The git config key to search for.
    def self.git_config_value key
      value = `git config #{key}`.chomp
      value.nil? || value.empty? ? nil : value
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
gemsmith-5.3.0 lib/gemsmith/kit.rb
gemsmith-5.2.0 lib/gemsmith/kit.rb
gemsmith-5.1.0 lib/gemsmith/kit.rb
gemsmith-5.0.0 lib/gemsmith/kit.rb
gemsmith-4.3.0 lib/gemsmith/kit.rb
gemsmith-4.2.0 lib/gemsmith/kit.rb
gemsmith-4.1.0 lib/gemsmith/kit.rb
gemsmith-4.0.0 lib/gemsmith/kit.rb
gemsmith-3.2.0 lib/gemsmith/kit.rb
gemsmith-3.1.0 lib/gemsmith/kit.rb
gemsmith-3.0.0 lib/gemsmith/kit.rb
gemsmith-2.4.0 lib/gemsmith/kit.rb
gemsmith-2.3.0 lib/gemsmith/kit.rb
gemsmith-2.2.0 lib/gemsmith/kit.rb
gemsmith-2.1.0 lib/gemsmith/kit.rb
gemsmith-2.0.0 lib/gemsmith/kit.rb
gemsmith-1.5.0 lib/gemsmith/kit.rb
gemsmith-1.4.0 lib/gemsmith/kit.rb
gemsmith-1.3.0 lib/gemsmith/kit.rb