Module: GitHubWatched::Config
Instance Method Summary collapse
Instance Method Details
#git_config(name) ⇒ Object
6 7 8 9 |
# File 'lib/github_watched/config.rb', line 6 def git_config(name) value = `git config --get #{Shellwords.escape name}`.chomp value if $?.success? end |
#github_username ⇒ Object
11 12 13 |
# File 'lib/github_watched/config.rb', line 11 def github_username git_config('github.user') or raise 'GitHub username not set. Use `git config --global github.user username` to set.' end |