push
circleci
0 of 33 new or added lines in 1 file covered. (0.0%)
9374 existing lines in 213 files now uncovered.47 of 9753 relevant lines covered (0.48%)
0.01 hits per line
| 1 |
# frozen_string_literal: true
|
|
| 2 |
|
|
|
UNCOV
3
|
module Requests |
× |
|
UNCOV
4
|
class SolrOpenUrlContext |
× |
|
UNCOV
5
|
attr_reader :ctx
|
× |
| 6 |
|
|
|
UNCOV
7
|
def initialize(solr_doc:) |
× |
|
UNCOV
8
|
return if solr_doc._source.empty? |
× |
| 9 |
|
|
|
UNCOV
10
|
@ctx = solr_doc.to_ctx
|
× |
| 11 |
# Dates are not desired for other OpenURLs, but are
|
|
| 12 |
# essential for ILLiad requests
|
|
|
UNCOV
13
|
@ctx.referent.set_metadata('date', solr_doc['pub_date_display'].first) if @ctx.referent.format == 'journal' && solr_doc['pub_date_display'].present? |
× |
|
UNCOV
14
|
end
|
× |
|
UNCOV
15
|
end
|
× |
|
UNCOV
16
|
end
|
× |