lib/provider/github.rb in ticketmaster-github-0.1.1 vs lib/provider/github.rb in ticketmaster-github-0.1.2
- old
+ new
@@ -12,15 +12,15 @@
# declare needed overloaded methods here
def authorize(auth = {})
@authentication ||= TicketMaster::Authenticator.new(auth)
auth = @authentication
- if auth.token.nil? or auth.login.nil?
+ if auth.token.nil? or (auth.login.nil? and auth.username.nil?)
raise "Please provide token and login"
else
Octopi::Api.api = Octopi::AuthApi.instance
Octopi::Api.api.token = auth.token
- Octopi::Api.api.login = auth.login
+ Octopi::Api.api.login = auth.login || auth.username
end
end
def projects(*options)
if options.empty?