crashwatcher/upload-gist.rb
# Returns a basic auth string of the user's GitHub credentials if set.
# http://github.com/guides/local-github-config
#
# Returns an Array of Strings if auth is found: [user, password]
# Returns nil if no auth is found.
Returns a basic auth string of the user's GitHub credentials if set.

Returns an Array of Strings if auth is found: [user, password]
Returns nil if no auth is found.
Returns a basic auth string of the user ' s GitHub credentials if set . Returns an Array of Strings if auth is found : [ user password ] Returns nil if no auth is found .
def auth
  user  = config("github.user")
  password = config("github.password")
  token = config("github.token")
  if password.to_s.empty? && !token.to_s.empty?
  end
  if user.to_s.empty? || password.to_s.empty?
    nil
    else
    [ user, password ]
  end
end
def auth user = config ( "github.user" ) password = config ( "github.password" ) token = config ( "github.token" ) if password . to_s . empty? && ! token . to_s . empty? end if user . to_s . empty? || password . to_s . empty? nil else [ user , password ] end end
Returns a basic auth string of the user's GitHub credentials if set.
Returns a basic auth string of the user ' s GitHub credentials if set .
# abort "Please set GITHUB_PASSWORD or github.password instead of using a token."