Sha256: 748f37a7b279d811f4907099262c59d5c57bfb350f3e0c14c297448b6b5af040

Contents?: true

Size: 909 Bytes

Versions: 13

Compression:

Stored size: 909 Bytes

Contents

module DataCatalog
  module Importer
    class Tasks
  
      def initialize(options)
        define(options)
      end

      protected

      def define(options)
        desc "Pull data from the #{options[:name]}"
        task :pull do
          puts "Pulling data from the #{options[:name]}..."
          puller = DataCatalog::Importer::Puller.new({
            :cache_folder => options[:cache_folder],
            :pullers      => options[:pullers],
          })
          puller.run
        end

        desc "Push data to the Data Catalog API"
        task :push do
          desc "Pushing data to the Data Catalog API..."
          pusher = DataCatalog::Importer::Pusher.new({
            :api_key      => options[:api_key],
            :base_uri     => options[:base_uri],
            :cache_folder => options[:cache_folder],
          })
          pusher.run
        end
      end

    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
datacatalog-importer-0.1.12 lib/tasks.rb
datacatalog-importer-0.1.11 lib/tasks.rb
datacatalog-importer-0.1.10 lib/tasks.rb
datacatalog-importer-0.1.9 lib/tasks.rb
datacatalog-importer-0.1.8 lib/tasks.rb
datacatalog-importer-0.1.7 lib/tasks.rb
datacatalog-importer-0.1.6 lib/tasks.rb
datacatalog-importer-0.1.5 lib/tasks.rb
datacatalog-importer-0.1.4 lib/tasks.rb
datacatalog-importer-0.1.3 lib/tasks.rb
datacatalog-importer-0.1.2 lib/tasks.rb
datacatalog-importer-0.1.1 lib/tasks.rb
datacatalog-importer-0.1.0 lib/tasks.rb