diff --git a/lib/gem_init/app.rb b/lib/gem_init/app.rb index b23e40f..243f6de 100644 --- a/lib/gem_init/app.rb +++ b/lib/gem_init/app.rb @@ -16,7 +16,7 @@ class App :email => "YOUR EMAIL", }, :github => { - :name => "your_github_user_name" + :user => "your_github_user_name" } } @@ -54,7 +54,8 @@ def email end def github_user - @github_user ||= git_config[:github][:user] + config = git_config[:github] || DEFAULT_GIT_CONFIG[:github] + @github_user ||= config[:user] end private @@ -76,7 +77,9 @@ def read_git_config end end # Be a tad paranoid and make it harder to accidentally reveal this - config[:github][:token] = nil + if config[:github] + config[:github][:token] = nil + end config rescue Errno::ENOENT warn "Could not read your ~/.gitconfig, using silly defaults." diff --git a/lib/gem_init/version.rb b/lib/gem_init/version.rb index d2cb2a8..fdbfdb7 100644 --- a/lib/gem_init/version.rb +++ b/lib/gem_init/version.rb @@ -2,7 +2,7 @@ module GemInit module Version MAJOR = 0 MINOR = 0 - TINY = 1 + TINY = 2 BUILD = nil STRING = [MAJOR, MINOR, TINY, BUILD].compact.join('.') end