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

uclibs / ucrate / b55db03c-843f-45a9-98b3-f75772ac783c

16 Apr 2025 05:43PM UTC coverage: 54.567% (-19.5%) from 74.06%
b55db03c-843f-45a9-98b3-f75772ac783c

push

circleci

web-flow
Add github workflow to trigger Teams webhook to notify for PR (#1179)

2103 of 3854 relevant lines covered (54.57%)

42.87 hits per line

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

93.55
/app/models/document.rb
1
# frozen_string_literal: true
2

3
# Generated via
4
#  `rails generate hyrax:work Document`
5
class Document < ActiveFedora::Base
1✔
6
  include ::Hyrax::WorkBehavior
1✔
7
  include RemotelyIdentifiedByDoi::Attributes
1✔
8
  include RemoveProxyEditors::RemoveUser
1✔
9

10
  self.indexer = DocumentIndexer
1✔
11
  # Change this to restrict which works can be added as a child.
12
  # self.valid_child_concerns = []
13
  validates :title, presence: { message: 'Your work must have a title.' }
1✔
14

15
  property :alternate_title, predicate: ::RDF::URI.new('http://purl.org/dc/terms/title#alternative') do |index|
1✔
16
    index.as :stored_searchable
2✔
17
  end
18

19
  property :geo_subject, predicate: ::RDF::URI.new('http://purl.org/dc/terms/coverage#spatial') do |index|
1✔
20
    index.as :stored_searchable, :facetable
2✔
21
  end
22

23
  property :genre, predicate: ::RDF::URI.new('http://purl.org/dc/terms/type#genre'), multiple: false do |index|
1✔
24
    index.as :stored_searchable, :facetable
2✔
25
  end
26

27
  property :time_period, predicate: ::RDF::URI.new('http://purl.org/dc/terms/coverage#temporal') do |index|
1✔
28
    index.as :stored_searchable, :facetable
2✔
29
  end
30

31
  property :required_software, predicate: ::RDF::Vocab::DC.requires, multiple: false do |index|
1✔
32
    index.as :stored_searchable
2✔
33
  end
34

35
  property :note, predicate: ::RDF::URI.new('http://purl.org/dc/terms/description#note'), multiple: false do |index|
1✔
36
    index.as :stored_searchable
2✔
37
  end
38

39
  property :college, predicate: ::RDF::URI.new('http://purl.org/dc/terms/subject#college'), multiple: false do |index|
1✔
40
    index.as :stored_searchable, :facetable
2✔
41
  end
42

43
  property :department, predicate: ::RDF::URI.new('http://purl.org/dc/terms/subject#department'), multiple: false do |index|
1✔
44
    index.as :stored_searchable, :facetable
2✔
45
  end
46

47
  def self.to_s_u
1✔
48
    'document'
×
49
  end
50

51
  def multiple?(field)
1✔
52
    DocumentForm.multiple? field
×
53
  end
54

55
  def self.multiple?(field)
1✔
56
    if %i[title rights_statement description date_created license].include? field.to_sym
61✔
57
      false
16✔
58
    else
59
      super
45✔
60
    end
61
  end
62

63
  # This must be included at the end, because it finalizes the metadata
64
  # schema (by adding accepts_nested_attributes)
65
  include ::Hyrax::BasicMetadata
1✔
66
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

© 2026 Coveralls, Inc