lib/datapimp/sync.rb in datapimp-1.1.1 vs lib/datapimp/sync.rb in datapimp-1.2.0
- old
+ new
@@ -5,20 +5,24 @@
module Sync
def self.data_source_types
%w(dropbox amazon github google json excel nokogiri)
end
- def self.dispatch_sync_data_action(source, options)
- type = options[:type]
+ def self.dispatch_sync_data_action(args, options)
+ source = args.first
+ type = options[:type]
- result = case
- when type == "github"
+ result = case type
+ when "github"
Datapimp::Sources::GithubRepository.new(source, options)
- when type == "google" || type == "google-spreadsheet"
+ when "google" || "google-spreadsheet"
require 'google_drive'
Datapimp::Sources::GoogleSpreadsheet.new(nil, key: source)
+ when "pivotal" then
+ Datapimp::Sources::Pivotal.new(args, options)
+ when "keen" then
+ Datapimp::Sources::Keen.new(args, options)
end
-
result
end
# Create any type of syncable folder and dispatch a run call to it
# with whatever options you want.