Sha256: 3d492a399198836e09dd4389d5ff0d52f037f0b8c46af3e57cf485695d9fca8b

Contents?: true

Size: 365 Bytes

Versions: 26

Compression:

Stored size: 365 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

26 entries across 26 versions & 1 rubygems

Version Path
gemsmith-9.2.0 lib/gemsmith/git.rb
gemsmith-9.1.0 lib/gemsmith/git.rb
gemsmith-9.0.0 lib/gemsmith/git.rb
gemsmith-8.2.0 lib/gemsmith/git.rb
gemsmith-8.1.0 lib/gemsmith/git.rb
gemsmith-8.0.0 lib/gemsmith/git.rb