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

pulibrary / tigerdata-app / e941e498-f4a8-4326-87a1-30b7af4ce668

04 Nov 2025 12:57PM UTC coverage: 91.37% (-0.03%) from 91.403%
e941e498-f4a8-4326-87a1-30b7af4ce668

Pull #2126

circleci

bess
Bump tar in the npm_and_yarn group across 1 directory

Bumps the npm_and_yarn group with 1 update in the / directory: [tar](https://github.com/isaacs/node-tar).


Updates `tar` from 7.5.1 to 7.5.2
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.5.1...v7.5.2)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 7.5.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #2126: Bump tar from 7.5.1 to 7.5.2 in the npm_and_yarn group across 1 directory

2827 of 3094 relevant lines covered (91.37%)

488.74 hits per line

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

97.47
/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
105✔
6
  end
7

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

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

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

25
  def project_directory
5✔
26
    request.parent_folder.present? ? File.join(request.parent_folder, request.project_folder) : request.project_folder
12✔
27
  end
28

29
  def departments_list
5✔
30
    return "" if request.departments.blank?
14✔
31
    dept_list = []
12✔
32
    request.departments.each do |dept|
12✔
33
      dept_list << "#{dept['name']} (#{dept['code']})"
21✔
34
    end
35
    dept_list.join(", ")
12✔
36
  end
37

38
  def user_list
5✔
39
    return "" if request.user_roles.blank?
14✔
40
    usr_list = []
10✔
41
    request.user_roles.each do |usr|
10✔
42
      name = full_name(usr["uid"])
11✔
43
      name += " read only" if usr["read_only"]
11✔
44
      usr_list << name
11✔
45
    end
46
    usr_list.join(", ")
10✔
47
  end
48

49
  def full_name(uid)
5✔
50
    return "" if uid.blank?
41✔
51
    user = User.find_by(uid: uid)
37✔
52
    user.display_name_safe.to_s
37✔
53
  end
54

55
  # Returns the correct CSS class suffix for the sidebar navigation progress for a given
56
  # step/substep.
57
  def sidebar_progress(controller, step, substep = nil)
5✔
58
    controller_name = controller.controller_name
270✔
59
    case step
270✔
60
    when 1
61
      step1_css_suffix(controller_name, substep)
108✔
62
    when 2
63
      step2_css_suffix(controller_name)
54✔
64
    when 3
65
      step3_css_suffix(controller_name)
54✔
66
    when 4
67
      step4_css_suffix(controller_name)
54✔
68
    else
69
      "-incomplete"
×
70
    end
71
  end
72

73
  private
5✔
74

75
    def step1_css_suffix(controller_name, substep = nil)
5✔
76
      css_suffix = "-incomplete"
108✔
77
      if substep.nil?
108✔
78
        return "-current" if controller_name.start_with?("project_information")
54✔
79
        if step1_valid?
35✔
80
          css_suffix = "-completed"
12✔
81
        end
82
      elsif substep == "Basic Details"
54✔
83
        return "-current" if controller_name == "project_information"
54✔
84
        if step1_valid?
37✔
85
          css_suffix = "-completed"
12✔
86
        end
87
      end
88
      css_suffix
72✔
89
    end
90

91
    def step2_css_suffix(controller_name)
5✔
92
      return "-current" if controller_name == "roles_and_people"
54✔
93
      if step2_valid?
43✔
94
        "-completed"
7✔
95
      else
96
        "-incomplete"
36✔
97
      end
98
    end
99

100
    def step3_css_suffix(controller_name)
5✔
101
      return "-current" if controller_name == "storage_and_access"
54✔
102
      if step3_valid?
48✔
103
        "-completed"
9✔
104
      else
105
        "-incomplete"
39✔
106
      end
107
    end
108

109
    def step4_css_suffix(controller_name)
5✔
110
      return "-current" if controller_name == "review_and_submit"
54✔
111
      if step4_valid?
40✔
112
        "-completed"
×
113
      else
114
        "-incomplete"
40✔
115
      end
116
    end
117

118
    def step1_valid?
5✔
119
      return false if request.project_title.blank? || request.project_folder.blank? || request.project_purpose.blank? || request.description.blank? || request.departments.blank?
112✔
120
      true
33✔
121
    end
122

123
    def step2_valid?
5✔
124
      return false if request.data_manager.blank? || request.data_sponsor.blank?
52✔
125
      true
10✔
126
    end
127

128
    def step3_valid?
5✔
129
      return false if request.storage_size.nil?
51✔
130
      true
9✔
131
    end
132

133
    def step4_valid?
5✔
134
      step1_valid? && step2_valid? && step3_valid?
40✔
135
    end
136
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