Sha256: ab10ee7966aabaed962d63ee2e301f41f4858d8b65ea18ba6d4faa8ff248ea32

Contents?: true

Size: 927 Bytes

Versions: 13

Compression:

Stored size: 927 Bytes

Contents

namespace :iqvoc do

  namespace :import do

    desc 'Imports some ntriples data from a given url (URL=...). Use the parameter NAMESPACE=... to define the default namespace used in your data.'
    task :url => :environment do
      raise "You have to specify an url for the data file to be imported. Example: rake iqvoc:import:url URL=... NAMESPACE=" unless ENV['URL']
      raise "You have to specify a default namespace for the data to be imported. Example: rake iqvoc:import:url URL=... NAMESPACE=" unless ENV['NAMESPACE']

      stdout_logger = Logger.new(STDOUT)
      stdout_logger.level = Logger::INFO

      debug = true
      publish = if ENV['PUBLISH'].nil? || ENV['PUBLISH'] == "true"
        true
      else
        false
      end

      importer = SkosImporter.new(ENV['URL'], URI.parse(ENV['NAMESPACE']).to_s, MultiLogger.new(stdout_logger, Rails.logger), publish, debug)
      importer.run
    end

  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
iqvoc-4.14.5 lib/tasks/importer.rake
iqvoc-4.14.4 lib/tasks/importer.rake
iqvoc-4.13.2 lib/tasks/importer.rake
iqvoc-4.13.0 lib/tasks/importer.rake
iqvoc-4.12.1 lib/tasks/importer.rake
iqvoc-4.12.0 lib/tasks/importer.rake
iqvoc-4.11.1 lib/tasks/importer.rake
iqvoc-4.11.0 lib/tasks/importer.rake
iqvoc-4.10.0 lib/tasks/importer.rake
iqvoc-4.9.0 lib/tasks/importer.rake
iqvoc-4.8.2 lib/tasks/importer.rake
iqvoc-4.8.1 lib/tasks/importer.rake
iqvoc-4.8.0 lib/tasks/importer.rake