Class: Gemsmith::Git

Inherits:
Object
  • Object
show all
Defined in:
lib/gemsmith/git.rb

Overview

A thin wrapper to Git.

Class Method Summary collapse

Class Method Details

.config_value(key) ⇒ Object



6
7
8
# File 'lib/gemsmith/git.rb', line 6

def self.config_value key
  `git config #{key}`.chomp
end

.github_url(project) ⇒ Object



14
15
16
17
# File 'lib/gemsmith/git.rb', line 14

def self.github_url project
  return "" if github_user.empty?
  "https://github.com/#{github_user}/#{project}"
end

.github_userObject



10
11
12
# File 'lib/gemsmith/git.rb', line 10

def self.github_user
  config_value "github.user"
end