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

pulibrary / tigerdata-app / 6940292d-58ec-4f2a-a05e-c8fb9b4787e9

24 Nov 2025 06:47PM UTC coverage: 87.586% (+17.2%) from 70.412%
6940292d-58ec-4f2a-a05e-c8fb9b4787e9

Pull #2238

circleci

hectorcorrea
Remove a bit of unused JavaScript
Pull Request #2238: Remove a bit of unused JavaScript

2787 of 3182 relevant lines covered (87.59%)

358.54 hits per line

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

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

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

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

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

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

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

44
  def path
2✔
45
    project_directory
×
46
  end
47

48
  # Removes "about" (as in "about 1 month ago") from time_ago_in_words
49
  def remove_about(time_ago)
2✔
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