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

pulibrary / tigerdata-app / 8c398bb9-338a-4e12-bef3-a01866f641e4

10 Nov 2025 08:58PM UTC coverage: 91.243% (+2.3%) from 88.974%
8c398bb9-338a-4e12-bef3-a01866f641e4

Pull #2177

circleci

web-flow
Merge branch 'main' into 2155-access-error
Pull Request #2177: Handles access error gracefully

2 of 2 new or added lines in 1 file covered. (100.0%)

394 existing lines in 25 files now uncovered.

2855 of 3129 relevant lines covered (91.24%)

554.96 hits per line

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

92.86
/app/presenters/project_dashboard_presenter.rb
1
# frozen_string_literal: true
2
class ProjectDashboardPresenter < ProjectShowPresenter
3✔
3
  include ActionView::Helpers::DateHelper
3✔
4

5
  delegate :to_model, :updated_at, to: :project
3✔
6

7
  def type
3✔
UNCOV
8
    if storage_performance_expectations["approved"].nil?
168✔
UNCOV
9
      "Requested #{storage_performance_expectations['requested']}"
1✔
10
    else
UNCOV
11
      storage_performance_expectations["approved"]
167✔
12
    end
13
  end
14

15
  def latest_file_list_time
3✔
UNCOV
16
    requests = FileInventoryRequest.where(project_id: project.id).order(completion_time: :desc)
169✔
UNCOV
17
    if requests.empty?
169✔
UNCOV
18
      "No Downloads"
165✔
UNCOV
19
    elsif requests.first.completion_time
4✔
UNCOV
20
      "Prepared #{time_ago_in_words(requests.first.completion_time)} ago"
3✔
21
    else
UNCOV
22
      "Preparing now"
1✔
23
    end
24
  end
25

26
  def last_activity
3✔
27
    if project_metadata.updated_on.nil?
166✔
28
      "Not yet active"
166✔
29
    else
30
      "#{remove_about time_ago_in_words(project_metadata.updated_on)} ago"
×
31
    end
32
  end
33

34
  def role(user)
3✔
35
    if data_sponsor.uid == user.uid
169✔
36
      "Sponsor"
87✔
37
    elsif data_manager.uid == user.uid
82✔
38
      "Data Manager"
43✔
39
    else
40
      "Data User"
39✔
41
    end
42
  end
43

44
  def path
3✔
45
    project_directory
83✔
46
  end
47

48
  # Removes "about" (as in "about 1 month ago") from time_ago_in_words
49
  def remove_about(time_ago)
3✔
50
    time_ago.gsub("about ", "")
×
51
  end
52
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