Skip to content

Commit

Permalink
Require user and token. Closes defunkt#35
Browse files Browse the repository at this point in the history
  • Loading branch information
indirect committed Apr 10, 2011
1 parent 782c3f8 commit 8a201bd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/gist.rb
Expand Up @@ -182,7 +182,11 @@ def auth
user = config("github.user")
token = config("github.token")

user.to_s.empty? ? {} : { :login => user, :token => token }
if user.to_s.empty? || token.to_s.empty?
{}
else
{ :login => user, :token => token }
end
end

# Returns default values based on settings in your gitconfig. See
Expand Down

0 comments on commit 8a201bd

Please sign in to comment.