<commit_before># frozen_string_literal: true

module MedicationRefillHelper
  include CalendarHelper
  # Save refill date to Google calendar
  def save_refill_to_google_calendar(medication)
    return true unless current_user.google_oauth2_enabled? &&
                       new_cal_refill_reminder_needed?(medication)
    begin
      args = calendar_uploader_params(medication)
      CalendarUploader.new(args).upload_event
    rescue => error
      puts error
      puts error.inspect
      return_to_sign_in
    else
      true
    end
  end

  def calendar_uploader_params(medication)
    { summary: "Refill for #{medication.name}",
      date: medication.refill,
      access_token: current_user.google_access_token,
      email: current_user.email }
  end
end
<commit_msg>removed leftover debugging puts calls<commit_after># frozen_string_literal: true

module MedicationRefillHelper
  include CalendarHelper
  # Save refill date to Google calendar
  def save_refill_to_google_calendar(medication)
    return true unless current_user.google_oauth2_enabled? &&
                       new_cal_refill_reminder_needed?(medication)
    begin
      args = calendar_uploader_params(medication)
      CalendarUploader.new(args).upload_event
    rescue
      return_to_sign_in
    else
      true
    end
  end

  def calendar_uploader_params(medication)
    { summary: "Refill for #{medication.name}",
      date: medication.refill,
      access_token: current_user.google_access_token,
      email: current_user.email }
  end
end

{'fraction_non_alphanumeric': 0.05689993459777633, 'fraction_numerical': 0.0013080444735120995, 'mean_word_length': 3.473684210526316, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7306031', 'n_tokens_mistral': 460, 'n_tokens_neox': 455, 'n_words': 97}