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

pulibrary / tigerdata-app / 93cce249-3dee-4f64-bd68-4e50b5cbf48e

21 Oct 2025 09:49PM UTC coverage: 82.779% (+1.5%) from 81.319%
93cce249-3dee-4f64-bd68-4e50b5cbf48e

push

circleci

web-flow
Stop mediaflux when we stop everything else (#2066)

Ref #2065

2490 of 3008 relevant lines covered (82.78%)

226.2 hits per line

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

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

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

7
  delegate :data_sponsor, :data_manager, to: :project_metadata
1✔
8

9
  def type
1✔
10
    if storage_performance_expectations["approved"].nil?
182✔
11
      "Requested #{storage_performance_expectations['requested']}"
2✔
12
    else
13
      storage_performance_expectations["approved"]
180✔
14
    end
15
  end
16

17
  def latest_file_list_time
1✔
18
    requests = FileInventoryRequest.where(project_id: project.id).order(completion_time: :desc)
182✔
19
    if requests.empty?
182✔
20
      "No Downloads"
180✔
21
    elsif requests.first.completion_time
2✔
22
      "Prepared #{time_ago_in_words(requests.first.completion_time)} ago"
2✔
23
    else
24
      "Preparing now"
×
25
    end
26
  end
27

28
  def last_activity
1✔
29
    if project_metadata.updated_on.nil?
182✔
30
      "Not yet active"
4✔
31
    else
32
      "#{remove_about time_ago_in_words(project_metadata.updated_on)} ago"
178✔
33
    end
34
  end
35

36
  def role(user)
1✔
37
    if data_sponsor == user.uid
182✔
38
      "Sponsor"
52✔
39
    elsif data_manager == user.uid
130✔
40
      "Data Manager"
46✔
41
    else
42
      "Data User"
84✔
43
    end
44
  end
45

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