lib/datapimp/sources/pivotal.rb in datapimp-1.2.2 vs lib/datapimp/sources/pivotal.rb in datapimp-1.2.3
- old
+ new
@@ -1,13 +1,12 @@
-require 'pivotal-tracker'
-
module Datapimp::Sources
class Pivotal < Datapimp::Sources::Base
def initialize(args, options)
@project_id = args.shift
@story_id = args.shift
@options = options.to_mash
+ require 'pivotal-tracker' unless defined?(PivotalTracker)
PivotalTracker::Client.token = Datapimp.config.pivotal_access_token
end
def all
%w(user_activity project_activity project_stories).each_with_object({}) do |slice, memo|