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

benwbrum / fromthepage / 18174939649

01 Oct 2025 08:36PM UTC coverage: 65.028%. Remained the same
18174939649

Pull #4950

github

web-flow
Merge 7640db234 into 8f380a269
Pull Request #4950: Rubocop lint remove array whitespaces

1848 of 3359 branches covered (55.02%)

Branch coverage included in aggregate %.

154 of 201 new or added lines in 62 files covered. (76.62%)

8087 of 11919 relevant lines covered (67.85%)

109.57 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