Sha256: 63192696780781d8d3e948ca20dc0810556c675c822370950ada5e94dedda282
Contents?: true
Size: 497 Bytes
Versions: 31
Compression:
Stored size: 497 Bytes
Contents
# frozen_string_literal: true require "open3" module Milestoner module Git # A lightweight Git Config wrapper. class Config def initialize shell: Open3 @shell = shell end def get key shell.capture3 "git config --get #{key}" end def set key, value shell.capture3 %(git config --add #{key} "#{value}") end def value key get(key).first.chomp end private attr_reader :shell end end end
Version data entries
31 entries across 31 versions & 1 rubygems