Module: Iqvoc::RDFSync::Helper

Included in:
Concepts::VersionsController, TriplestoreSyncController
Defined in:
lib/iqvoc/rdf_sync.rb

Overview

TODO: rename – XXX: does not belong here!?

Instance Method Summary collapse

Instance Method Details

#triplestore_syncerObject



97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/iqvoc/rdf_sync.rb', line 97

def triplestore_syncer
  base_url = root_url(:lang => nil) # XXX: brittle in the face of future changes?

  host = URI.parse(Iqvoc.config["triplestore.url"])
  port = host.port
  host.port = 80 # XXX: hack to remove port from serialization
  host = host.to_s

  return Iqvoc::RDFSync.new(base_url, host, :port => port,
      :username => Iqvoc.config["triplestore.username"].presence,
      :password => Iqvoc.config["triplestore.password"].presence,
      :view_context => view_context) # fugly, but necessary; cf. RDFSync#serialize
end