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

curationexperts / laevigata / 0d10b93f-7d12-4108-bfd7-303659b33b6c

18 Jun 2025 03:38AM UTC coverage: 97.41% (-0.001%) from 97.411%
0d10b93f-7d12-4108-bfd7-303659b33b6c

Pull #2464

circleci

mark-dce
Disable embargo expiration notifications

Per discussions with SCO, they wish to reduce administrative overhead
by eliminating embargo expiration notifications.

We still need to process actual embargo expirations to change the
corresponding ETDs from a restricted to open status.

Therefore, this change leaves the schedule and service code in place
and simply comments out the calls to notification processing so that
we still get nightly expiration processing.
Pull Request #2464: Disable embargo expiration notifications

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

43 existing lines in 7 files now uncovered.

2821 of 2896 relevant lines covered (97.41%)

52.23 hits per line

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

100.0
/app/helpers/graduation_helper.rb
1
module GraduationHelper
4✔
2
  # Calculates the post-graduation embargo release date
3
  # @param graduation_date [Date] - the date a degree is awarded
4
  # @param requested_embargo [String] - the requested embargo length /\d+ [months|years]/
5
  def self.embargo_length_to_embargo_release_date(graduation_date, requested_embargo)
4✔
UNCOV
6
    if requested_embargo == InProgressEtd::NO_EMBARGO || requested_embargo.blank?
9✔
7
      # No post-graduation embargo to apply
8
      Rails.logger.warn "Treating empty requested_embargo as 'None'" if requested_embargo.blank?
3✔
9
      graduation_date
3✔
10
    else
11
      # Calculate embargo expiration date
UNCOV
12
      number, units = requested_embargo.split(" ")
6✔
UNCOV
13
      raise ArgumentError, "Unexpected embargo length '#{requested_embargo}'" unless valid_length(number, units)
6✔
UNCOV
14
      graduation_date = Date.parse(graduation_date) if graduation_date.class == String
5✔
UNCOV
15
      graduation_date + Integer(number).send(units.to_sym)
5✔
16
    end
17
  end
18

19
  # Ensure valid values like "6 months", "2 months", "6 years"
20
  def self.valid_length(number, units)
4✔
UNCOV
21
    valid_quantity = number.to_i > 0
6✔
UNCOV
22
    valid_units = ['months', 'year', 'years'].include?(units)
6✔
UNCOV
23
    valid_quantity && valid_units
6✔
24
  end
25
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