• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pulibrary / allsearch_api / 8cca27ea-0ec0-4546-b1e5-0dc9f1ef05a3

31 Oct 2025 06:27PM UTC coverage: 99.903% (+0.003%) from 99.9%
8cca27ea-0ec0-4546-b1e5-0dc9f1ef05a3

Pull #389

circleci

sandbergja
Replace uses of the Banner ActiveRecord model with Rom-RB

The ActiveRecord model is still used in tests and a database migration,
maybe those could be migrated to Rom-RB in a separate PR?

A Rom Container is created that uses the same database connections as
ActiveRecord.  This allows rom to use the same database transactions
as activerecord, allowing tests (which use db transactions to stay
isolated from one another) to still pass.
Pull Request #389: Replace uses of the Banner ActiveRecord model with Rom-RB

34 of 39 new or added lines in 4 files covered. (87.18%)

57 existing lines in 13 files now uncovered.

1031 of 1032 relevant lines covered (99.9%)

112.35 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/app/models/dpul.rb
1
# frozen_string_literal: true
2

3
# This class is responsible for querying DPUL
4
class Dpul
3✔
5
  include ActiveModel::API
3✔
6
  include Parsed
3✔
7
  include Solr
3✔
8
  attr_reader :query_terms, :service, :service_response
3✔
9

10
  def initialize(query_terms:)
3✔
UNCOV
11
    @query_terms = query_terms
23✔
UNCOV
12
    @service = 'dpul'
23✔
UNCOV
13
    @service_response = solr_service_response
23✔
14
  end
15

16
  def solr_fields
3✔
UNCOV
17
    %w[id readonly_title_ssim readonly_creator_ssim readonly_publisher_ssim readonly_format_ssim
23✔
18
       readonly_collections_tesim]
19
  end
20

21
  def solr_sort
3✔
UNCOV
22
    'score desc'
23✔
23
  end
24

25
  def extra_solr_params
3✔
UNCOV
26
    'group=true&group.main=true&group.limit=1&group.field=content_metadata_iiif_manifest_field_ssi&group.facet=true'
23✔
27
  end
28
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc