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

pulibrary / pdc_describe / 5b5d665b-3b84-43db-bb80-ce78bb0f4bf2

26 Apr 2024 01:46PM UTC coverage: 95.888% (-0.2%) from 96.054%
5b5d665b-3b84-43db-bb80-ce78bb0f4bf2

push

circleci

web-flow
Fixes and logs bad Work URLs in production (#1787)

* Temporary work-around to fix and troubleshoot bad Work URLs generated in some places

* Fixed typo

3 of 9 new or added lines in 3 files covered. (33.33%)

3265 of 3405 relevant lines covered (95.89%)

220.43 hits per line

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

84.62
/app/mailers/notification_mailer.rb
1
# frozen_string_literal: true
2
class NotificationMailer < ApplicationMailer
1✔
3
  include Rails.application.routes.url_helpers
1✔
4

5
  def build_message
1✔
6
    @user = params[:user]
5✔
7
    @work_activity = params[:work_activity]
5✔
8

9
    @subject = "[pdc-describe] New Notification"
5✔
10
    @message = @work_activity.message
5✔
11
    @message_html = @work_activity.to_html
5✔
12
    @url = work_url(@work_activity.work)
5✔
13

14
    # Troubleshooting https://github.com/pulibrary/pdc_describe/issues/1783
15
    if @url.include?("/describe/describe/")
5✔
NEW
16
      Rails.logger.error("URL #{@url} included /describe/describe/ and was fixed. See https://github.com/pulibrary/pdc_describe/issues/1783")
×
NEW
17
      @url = @url.gsub("/describe/describe/", "/describe/")
×
18
    end
19

20
    mail(to: @user.email, subject: @subject)
5✔
21
  end
22
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