Class: DataCatalog::ImporterFramework::Pusher

Inherits:
Object
  • Object
show all
Includes:
Shared
Defined in:
lib/pusher.rb

Constant Summary collapse

REQUIRED =
%w(api_key base_uri cache_folder)
LOOKUP_KEYS =

These keys should not be passed along directly; they need to be examined so that real ID’s can be passed along instead.

[:organization, :downloads]

Instance Method Summary collapse

Methods included from Shared

#folder

Constructor Details

#initialize(options) ⇒ Pusher

Returns a new instance of Pusher.



17
18
19
20
21
22
# File 'lib/pusher.rb', line 17

def initialize(options)
  REQUIRED.each do |r|
    raise Error, "option :#{r} is required" unless options[r.intern]
  end
  @options = options
end

Instance Method Details

#runObject



24
25
26
27
28
29
30
31
32
# File 'lib/pusher.rb', line 24

def run
  setup_api
  Utility.report_timing "push organizations" do
    push_organizations
  end
  Utility.report_timing "push sources" do
    push_sources
  end
end