Sha256: e271d577962c931b17757075caaca1923c0b59c4f183a67de2718273dafddca0

Contents?: true

Size: 780 Bytes

Versions: 6

Compression:

Stored size: 780 Bytes

Contents

module TicketMaster::Provider
  # This is the Pivotal Tracker Provider for ticketmaster
  module Pivotal
    include TicketMaster::Provider::Base
    TICKET_API = PivotalAPI::Story
    PROJECT_API = PivotalAPI::Project
    
    # This is for cases when you want to instantiate using TicketMaster::Provider::Lighthouse.new(auth)
    def self.new(auth = {})
      TicketMaster.new(:pivotal, auth)
    end
    
    # The authorize and initializer for this provider
    def authorize(auth = {})
      @authentication ||= TicketMaster::Authenticator.new(auth)
      auth = @authentication
      if auth.token
        PivotalAPI.token = auth.token
      elsif auth.username && auth.password
        PivotalAPI.authenticate(auth.username, auth.password)
      end
    end
    
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ticketmaster-pivotal-0.3.9 lib/provider/pivotal.rb
ticketmaster-pivotal-0.3.8 lib/provider/pivotal.rb
ticketmaster-pivotal-0.3.7 lib/provider/pivotal.rb
ticketmaster-pivotal-0.3.3 lib/provider/pivotal.rb
ticketmaster-pivotal-0.3.0 lib/provider/pivotal.rb
ticketmaster-pivotal-0.2.0 lib/provider/pivotal.rb