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-12.3.0 lib/gemsmith/git.rb
gemsmith-12.2.0 lib/gemsmith/git.rb
gemsmith-12.1.0 lib/gemsmith/git.rb
gemsmith-12.0.0 lib/gemsmith/git.rb
gemsmith-11.3.0 lib/gemsmith/git.rb
gemsmith-11.2.0 lib/gemsmith/git.rb
gemsmith-11.1.0 lib/gemsmith/git.rb
gemsmith-11.0.1 lib/gemsmith/git.rb
gemsmith-11.0.0 lib/gemsmith/git.rb
gemsmith-10.4.2 lib/gemsmith/git.rb
gemsmith-10.4.1 lib/gemsmith/git.rb
gemsmith-10.4.0 lib/gemsmith/git.rb
gemsmith-10.3.0 lib/gemsmith/git.rb
gemsmith-10.2.0 lib/gemsmith/git.rb
gemsmith-10.1.0 lib/gemsmith/git.rb
gemsmith-10.0.0 lib/gemsmith/git.rb
gemsmith-9.6.0 lib/gemsmith/git.rb
gemsmith-9.5.0 lib/gemsmith/git.rb
gemsmith-9.4.0 lib/gemsmith/git.rb
gemsmith-9.3.0 lib/gemsmith/git.rb