Sha256: 88b59e7db8745d1bd725bce0167773cba6e3ab51a03514098e9e93b940d55b59

Contents?: true

Size: 871 Bytes

Versions: 5

Compression:

Stored size: 871 Bytes

Contents

module DataCatalog
  module ImporterFramework
    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 = Puller.new({
            :cache_folder => options[:cache_folder],
            :puller       => options[:puller],
          })
          puller.run
        end

        desc "Push data to the Data Catalog API"
        task :push do
          desc "Pushing data to the Data Catalog API..."
          pusher = 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

5 entries across 5 versions & 1 rubygems

Version Path
datacatalog-importer-0.3.0 lib/tasks.rb
datacatalog-importer-0.2.3 lib/tasks.rb
datacatalog-importer-0.2.2 lib/tasks.rb
datacatalog-importer-0.2.1 lib/tasks.rb
datacatalog-importer-0.2.0 lib/tasks.rb