Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add one_email_per_occurrence option and migration task #53

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Commits on Jul 17, 2024

  1. Add one_email_per_occurrence option and migration task

    Introduce the one_email_per_occurrence configuration option to limit email notifications to one per occurrence. Updated README and error controller to support the new feature, and added Rake task to handle migrations.
    imageaid committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    7bc8480 View commit details
    Browse the repository at this point in the history
  2. standard.rb fixes

    imageaid committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    9f18111 View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2024

  1. Adjustments from feedback on PR

    - Converted prev_resolved_at to a datetime from a timestamp in migration
    - Added a method `should_send_email?` to determine if an email goes instead of a string of conditionals
    - Cleaned up guard clauses
    - Improved the datetime comparison in an AR query
    imageaid committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    b2e1ded View commit details
    Browse the repository at this point in the history
  2. Refactor solid_errors_tasks.rake to remove hardcoded migrations

    The refactor involved removing a segment which forced a specific migration to run in favor of Rails' mechanism of alerting when migrations are pending. The prior method was too rigid and hard-coded. Now, the system still copies the migration over but doesn't automatically run it.
    imageaid committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    319fa02 View commit details
    Browse the repository at this point in the history
  3. Rework 'prev_resolved_at' from error_params

    The 'prev_resolved_at' parameter has been removed from the error_params in the errors_controller, and subsequently from the error buttons in the views. Meanwhile, in the subscriber, 'prev_resolved_at' is now updated with the current 'resolved_at' before this is set to nil, maintaining the history of resolution times.
    imageaid committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    5fe0e51 View commit details
    Browse the repository at this point in the history
  4. Refactor email sending condition in SolidErrors

    Simplified the condition check whether to send an email in SolidErrors::Occurrence. The method should_send_email? now has guard clauses if SolidErrors does not send emails or if no email recipient is set. Additionally, the instance method one_email_per_occurrence is renamed to one_email_per_occurrence? to follow the naming convention like `send_emails?`.
    imageaid committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    c47a881 View commit details
    Browse the repository at this point in the history
  5. Remove one_email_per_occurrence config option from SolidErrors

    The config option that limits the email notifications to one email per error occurrence in the SolidErrors has been removed and, instead, that approach is used automatically (sending one per occurrence). Corrections were also made to the post-install message in the gemspec file to remove the ``*and* runs` from the note since we are not auto-running migrations.
    imageaid committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    8719f90 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    212e5ff View commit details
    Browse the repository at this point in the history
  7. Make email sending condition consistent style; update migration copyi…

    …ng process
    
    In the 'Occurrence' model, the condition checking if an error has only one occurrence has been simplified by replacing 'count == 1' with 'one?'. In the rake task, the file copying process from Solid Errors to Rails application has been altered so that instead of copying the file directly, it's named with a timestamp before copying to avoid potential naming conflicts. The migration file name was also simplified by removing the timestamp so that we can dynamically add one.
    imageaid committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    b78a6e9 View commit details
    Browse the repository at this point in the history
  8. Update file existence check in solid_errors_tasks

    This patch replaces the original file existence check so that it now checks if there are any files with the same original filename (no timestamp) in the entire directory structure under the destination path. This avoids unnecessary file copy operations.
    imageaid committed Jul 18, 2024
    Configuration menu
    Copy the full SHA
    b728c2c View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2024

  1. Simplify file search in solid_errors_tasks rake task

    Don't need nested directory in glob
    imageaid committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    20bf39a View commit details
    Browse the repository at this point in the history
  2. Update README.md

    Co-authored-by: Stephen Margheim <stephen.margheim@gmail.com>
    imageaid and fractaledmind committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    3c41ab2 View commit details
    Browse the repository at this point in the history
  3. Update lib/tasks/solid_errors_tasks.rake

    Co-authored-by: Stephen Margheim <stephen.margheim@gmail.com>
    imageaid and fractaledmind committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    3f3ae1e View commit details
    Browse the repository at this point in the history
  4. Update lib/tasks/solid_errors_tasks.rake

    Co-authored-by: Stephen Margheim <stephen.margheim@gmail.com>
    imageaid and fractaledmind committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    cf27fc6 View commit details
    Browse the repository at this point in the history
  5. Update README and solid_errors tasks

    Added instructions to README file for running migration installer after updating the gem. Also, refactored 'solid_errors_tasks.rake' by simplifying the filename generation process during migration. These changes facilitate smoother gem updates and migrations.
    imageaid committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    e3fc454 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    bac9123 View commit details
    Browse the repository at this point in the history

Commits on Jul 22, 2024

  1. Configuration menu
    Copy the full SHA
    32f3242 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3843711 View commit details
    Browse the repository at this point in the history
  3. another test run

    imageaid committed Jul 22, 2024
    Configuration menu
    Copy the full SHA
    7f4755c View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2024

  1. version bump 0.4.3.003

    This version (x.003) has changes that ensure the migration is copied to the containing application.
    imageaid committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    3fad88f View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2024

  1. Configuration menu
    Copy the full SHA
    0c16934 View commit details
    Browse the repository at this point in the history