Permalink
Browse files

Needed to add --global to the suggest git commands

  • Loading branch information...
1 parent 052748c commit 1c94044900d2ae886b8775a938aa41e28b7a12cd @keithpitt keithpitt committed Jan 15, 2011
Showing with 4 additions and 4 deletions.
  1. +2 −2 lib/github/command.rb
  2. +2 −2 spec/command_spec.rb
@@ -69,7 +69,7 @@ def die(message)
def github_user
user = git("config --get github.user")
if user.empty?
- die("You must 'git config github.user [your Github username]' before running this command")
+ die("You must 'git config --global github.user [your Github username]' before running this command")
end
user
@@ -78,7 +78,7 @@ def github_user
def github_token
token = git("config --get github.token")
if token.empty?
- die("You must 'git config github.token [your API token]' before running this command")
+ die("You must 'git config --global github.token [your API token]' before running this command")
end
token
@@ -82,14 +82,14 @@
it "should die if a github API token cannot be found" do
@command.should_receive(:git).once.with("config --get github.token").and_return("")
- @command.should_receive(:puts).once.with("=> You must 'git config github.token [your API token]' before running this command")
+ @command.should_receive(:puts).once.with("=> You must 'git config --global github.token [your API token]' before running this command")
@command.should_receive(:exit!).once
@command.github_token
end
it "should die if a github username token cannot be found" do
@command.should_receive(:git).once.with("config --get github.user").and_return("")
- @command.should_receive(:puts).once.with("=> You must 'git config github.user [your Github username]' before running this command")
+ @command.should_receive(:puts).once.with("=> You must 'git config --global github.user [your Github username]' before running this command")
@command.should_receive(:exit!).once
@command.github_user
end

0 comments on commit 1c94044

Please sign in to comment.