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

pulibrary / tigerdata-app / d7ce1bf9-25b8-4b3e-b9dd-43f9a26f2d96

17 Oct 2025 05:51PM UTC coverage: 91.054%. Remained the same
d7ce1bf9-25b8-4b3e-b9dd-43f9a26f2d96

Pull #2055

circleci

jrgriffiniii
- Ensuring that `parallelism` is set to 4
- Separating `system` RSpec spec suites in the CI build
- Using an `inconsistent` RSpec tag to mark inconsistently failing tests
- Ensuring that CI does not run for `inconsistent` tests
Pull Request #2055: Ensuring that `parallelism` is set to 4 for CircleCI and separates `system` and inconsistently-failing tests into separate CI jobs

2738 of 3007 relevant lines covered (91.05%)

380.37 hits per line

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

96.83
/app/presenters/request_presenter.rb
1
# frozen_string_literal: true
2
class RequestPresenter
5✔
3
  attr_reader :request
5✔
4
  def initialize(request)
5✔
5
    @request = request
107✔
6
  end
7

8
  def eligible_to_edit?(user)
5✔
9
    return false if user.nil?
21✔
10
    if request.submitted?
21✔
11
      user.eligible_sysadmin?
11✔
12
    else
13
      user.uid == request.requested_by || user.eligible_sysadmin?
10✔
14
    end
15
  end
16

17
  def data_sponsor
5✔
18
    full_name(request.data_sponsor)
12✔
19
  end
20

21
  def data_manager
5✔
22
    full_name(request.data_manager)
13✔
23
  end
24

25
  def full_name(uid)
5✔
26
    return "" if uid.blank?
28✔
27
    user = User.find_by(uid: uid)
24✔
28
    user.display_name_safe.to_s
24✔
29
  end
30

31
  # Returns the correct CSS class suffix for the sidebar navigation progress for a given
32
  # step/substep.
33
  def sidebar_progress(controller, step, substep = nil)
5✔
34
    controller_name = controller.controller_name
270✔
35
    case step
270✔
36
    when 1
37
      step1_css_suffix(controller_name, substep)
108✔
38
    when 2
39
      step2_css_suffix(controller_name)
54✔
40
    when 3
41
      step3_css_suffix(controller_name)
54✔
42
    when 4
43
      step4_css_suffix(controller_name)
54✔
44
    else
45
      "-incomplete"
×
46
    end
47
  end
48

49
  private
5✔
50

51
    def step1_css_suffix(controller_name, substep = nil)
5✔
52
      css_suffix = "-incomplete"
108✔
53
      if substep.nil?
108✔
54
        return "-current" if controller_name.start_with?("project_information")
54✔
55
        if step1_valid?
35✔
56
          css_suffix = "-completed"
12✔
57
        end
58
      elsif substep == "Basic Details"
54✔
59
        return "-current" if controller_name == "project_information"
54✔
60
        if step1_valid?
37✔
61
          css_suffix = "-completed"
12✔
62
        end
63
      end
64
      css_suffix
72✔
65
    end
66

67
    def step2_css_suffix(controller_name)
5✔
68
      return "-current" if controller_name == "roles_and_people"
54✔
69
      if step2_valid?
43✔
70
        "-completed"
7✔
71
      else
72
        "-incomplete"
36✔
73
      end
74
    end
75

76
    def step3_css_suffix(controller_name)
5✔
77
      return "-current" if controller_name == "storage_and_access"
54✔
78
      if step3_valid?
48✔
79
        "-completed"
9✔
80
      else
81
        "-incomplete"
39✔
82
      end
83
    end
84

85
    def step4_css_suffix(controller_name)
5✔
86
      return "-current" if controller_name == "review_and_submit"
54✔
87
      if step4_valid?
40✔
88
        "-completed"
×
89
      else
90
        "-incomplete"
40✔
91
      end
92
    end
93

94
    def step1_valid?
5✔
95
      return false if request.project_title.blank? || request.project_folder.blank? || request.project_purpose.blank? || request.description.blank? || request.departments.blank?
112✔
96
      true
33✔
97
    end
98

99
    def step2_valid?
5✔
100
      return false if request.data_manager.blank? || request.data_sponsor.blank?
52✔
101
      true
10✔
102
    end
103

104
    def step3_valid?
5✔
105
      return false if request.storage_size.nil?
51✔
106
      true
9✔
107
    end
108

109
    def step4_valid?
5✔
110
      step1_valid? && step2_valid? && step3_valid?
40✔
111
    end
112
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