namespace :envelopes do
  desc 'Imports documents into Neo4j'
  task :environment do
  end

  desc 'Imports a JSON-LD file from Credential Registry.'
  task :neo4j_import do
    require File.expand_path('../../../config/environment', __FILE__)
    require_relative '../../app/services/neo4j_import'

    Envelope.find_each do |envelope|
      Neo4jImport.new(envelope.decoded_resource).create
    end
  end
end

Add rake task to import all envelopes into Neo4j
Add rake task to import all envelopes into Neo4j
