   [context]
   (get-in context [:system :public-conf :relative-root-url]))
 
+(defn- context->preview-gem-umm-version
+  [context]
+  (get-in context [:system system-key :preview-gem-umm-version]))
+
 (defn render-collection
   "Renders a UMM-C collection record and returns the HTML as a string."
   [context collection]

  "The main ERB used to generate the Collection HTML."
  (io/resource "collection_preview/collection_preview.erb"))

(def preview-gem-umm-schema-version
  "Temporay def for the UMM schema version that is supported by the CMR preview gem.
   This will be removed once CMR preview gem is fixed to include the UMM schema version
   it supports in the gem. (MMT-921)"
  "1.6")

(defn- create-jruby-runtime
  "Creates and initializes a JRuby runtime."

  l/Lifecycle

  (start
   [this _system]
   (-> this
       (assoc :jruby-runtime (create-jruby-runtime))
       (assoc :preview-gem-umm-version
              (or (get-preview-gem-umm-version) default-preview-gem-umm-version))))
  (stop
   [this _system]
   (dissoc this :jruby-runtime)))

(defn create-collection-renderer
  "Returns an instance of the collection renderer component."
