Sha256: 2ed92f4e48ba158f0812692dea91953f40b4a7e345bc0b8c317505d5c62abc99

Contents?: true

Size: 366 Bytes

Versions: 25

Compression:

Stored size: 366 Bytes

Contents

# frozen_string_literal: true

module Gemsmith
  # A thin wrapper to Git.
  class Git
    def self.config_value key
      `git config #{key}`.chomp
    end

    def self.github_user
      config_value "github.user"
    end

    def self.github_url project
      return "" if github_user.empty?

      "https://github.com/#{github_user}/#{project}"
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
gemsmith-13.3.0 lib/gemsmith/git.rb
gemsmith-13.2.0 lib/gemsmith/git.rb
gemsmith-13.1.0 lib/gemsmith/git.rb
gemsmith-13.0.0 lib/gemsmith/git.rb
gemsmith-12.4.0 lib/gemsmith/git.rb