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

benwbrum / fromthepage / 17387282326

01 Sep 2025 09:13PM UTC coverage: 64.405%. Remained the same
17387282326

push

github

web-flow
4857 - Require rubocop step in CI (#4858)

* 4857 - Require rubocop step in CI

* 4865 - Organize gemfiles

1790 of 3303 branches covered (54.19%)

Branch coverage included in aggregate %.

839 of 1497 new or added lines in 133 files covered. (56.05%)

43 existing lines in 29 files now uncovered.

7928 of 11786 relevant lines covered (67.27%)

103.82 hits per line

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

69.57
/app/models/external_api_request.rb
1
# == Schema Information
2
#
3
# Table name: external_api_requests
4
#
5
#  id            :integer          not null, primary key
6
#  engine        :string(255)
7
#  params        :text(65535)
8
#  status        :string(255)
9
#  created_at    :datetime         not null
10
#  updated_at    :datetime         not null
11
#  collection_id :integer          not null
12
#  page_id       :integer
13
#  user_id       :integer          not null
14
#  work_id       :integer
15
#
16
# Indexes
17
#
18
#  index_external_api_requests_on_collection_id  (collection_id)
19
#  index_external_api_requests_on_page_id        (page_id)
20
#  index_external_api_requests_on_user_id        (user_id)
21
#  index_external_api_requests_on_work_id        (work_id)
22
#
23
# Foreign Keys
24
#
25
#  fk_rails_...  (collection_id => collections.id)
26
#  fk_rails_...  (user_id => users.id)
27
#  fk_rails_...  (work_id => works.id)
28
#
29
class ExternalApiRequest < ApplicationRecord
1✔
30
  belongs_to :user
1✔
31
  belongs_to :collection
1✔
32
  belongs_to :work
1✔
33
  belongs_to :page
1✔
34

35

36
  module Status
1✔
37
    QUEUED = 'queued'
1✔
38
    RUNNING = 'running'
1✔
39
    WAITING = 'waiting'
1✔
40
    COMPLETED = 'completed'
1✔
41
    FAILED = 'failed'
1✔
42

43
    def self.running
1✔
NEW
44
      [ QUEUED, RUNNING, WAITING ]
×
45
    end
46
  end
47

48

49
  # params are serialized as json so we need accessors that let us work with ruby hashes
50
  def params
1✔
51
    if self[:params].blank?
×
52
      {}
×
53
    else
×
54
      JSON.parse(self[:params])
×
55
    end
56
  end
57

58
  def params=(hash)
1✔
59
    self[:params]=hash.to_json
×
60
  end
61

62
  module Engine
1✔
63
    TRANSKRIBUS = 'transkribus'
1✔
64
  end
65
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