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

Upgrade: Bump noticed from 1.6.3 to 2.4.1 #4705

Closed
wants to merge 1 commit into from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Aug 5, 2024

Bumps noticed from 1.6.3 to 2.4.1.

Release notes

Sourced from noticed's releases.

v2.4.1

What's Changed

New Contributors

Full Changelog: excid3/noticed@v2.4.0...v2.4.1

v2.4.0

What's Changed

New Contributors

Full Changelog: excid3/noticed@v2.3.3...v2.4.0

v2.3.2

What's Changed

Full Changelog: excid3/noticed@v2.3.1...v2.3.2

v2.3.1

Full Changelog: excid3/noticed@v2.3.0...v2.3.1

v2.3.0

What's Changed

New Contributors

... (truncated)

Changelog

Sourced from noticed's changelog.

2.4.1

  • Include private methods when checking if respond_to?(:method). Fixes #475

2.4.0

  • Add recipients feature to let Notifiers determine their recipients
class CommentNotifier < ApplicationNotifier
  # Notify all the commenters on this post except the new comment author
Can be given a lambda or Proc
recipients ->{ params[:comment].post.commenters.excluding(params[:comment].user).distinct }
Can be given a block
recipients do
params[:comment].post.commenters.excluding(params[:comment].user).distinct
end
Or can call a method
recipients :fetch_recipients
def fetch_recipients
params[:comment].post.commenters.excluding(params[:comment].user).distinct
end
end

2.3.3

  • Use public_send for Email delivery so it doesn't accidentally call private methods.

2.3.2

  • Set :json type on :params column with default to better integrate with ActiveRecord. This fixes sqlserver (and probably other databases). #451

2.3.1

  • Skip ApplicationNotifier in generator if it already exists

2.3.0

  • Add error_handler to Twilio delivery method #444
  • Fix record being removed for Ephemeral notifications #448

2.2.2

  • fetch_constant will now constantize Strings returned from procs or method calls

... (truncated)

Upgrade guide

Sourced from noticed's upgrade guide.

Noticed Upgrade Guide

Follow this guide to upgrade your Noticed implementation to the next version

Noticed 2.1

We've added a counter cache to Noticed::Event to keep track of the associated notifications.

Run the following command to copy over the migrations:

rails noticed:install:migrations

Noticed 2.0

We've made some major changes to Noticed to simplify and support more delivery methods.

Models

Instead of having models live in your application, Noticed v2 adds models managed by the gem.

Delete the Notification model at app/models/notification.rb.

Then run the new migrations:

rails noticed:install:migrations
rails db:migrate

To migrate your data to the new tables, loop through your existing notifications and create new records for each one. You can do this in a Rake task or in the Rails console:

# Temporarily define the Notification model to access the old table
class Notification < ActiveRecord::Base
  self.inheritance_column = nil
end
Migrate each record to the new tables
Notification.find_each do |notification|
attributes = notification.attributes.slice("type", "created_at", "updated_at").with_indifferent_access
attributes[:type] = attributes[:type].sub("Notification", "Notifier")
attributes[:params] = Noticed::Coder.load(notification.params)
attributes[:params] = {} if attributes[:params].try(:has_key?, "noticed_error") # Skip invalid records
Extract related record to belongs_to :record association
This allows ActiveRecord associations instead of querying the JSON data
attributes[:record] = attributes[:params].delete(:user) || attributes[:params].delete(:account)
attributes[:notifications_attributes] = [{
type: "#{attributes[:type]}::Notification",
</tr></table>

... (truncated)

Commits
  • 078053d Version bump
  • 4857a91 Merge branch 'main' of github.com:excid3/noticed
  • 693a64b Check if respond to private methods before send.
  • 71ad318 Fix undefined ApplicationDeliveryMethod (#470)
  • 4d1bb96 Fix anchor link to "Sending notifications" (#464)
  • af778b3 Support before_enqueue for bulk delivery methods (#463)
  • 27b853a Version bump
  • 30e02db Add recipients feature for defining recipients inside the notifier (#459)
  • 49477ee Update test dependencies
  • 14aad24 Update FCM docs
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code labels Aug 5, 2024
@dependabot dependabot bot force-pushed the dependabot/bundler/noticed-2.4.1 branch 2 times, most recently from 5c6702b to 148a67b Compare August 11, 2024 00:10
@dependabot dependabot bot force-pushed the dependabot/bundler/noticed-2.4.1 branch from 148a67b to b6f3d87 Compare August 17, 2024 08:05
@dependabot dependabot bot force-pushed the dependabot/bundler/noticed-2.4.1 branch from b6f3d87 to 5853e57 Compare August 27, 2024 06:26
Bumps [noticed](https://github.com/excid3/noticed) from 1.6.3 to 2.4.1.
- [Release notes](https://github.com/excid3/noticed/releases)
- [Changelog](https://github.com/excid3/noticed/blob/main/CHANGELOG.md)
- [Upgrade guide](https://github.com/excid3/noticed/blob/main/UPGRADE.md)
- [Commits](excid3/noticed@v1.6.3...v2.4.1)

---
updated-dependencies:
- dependency-name: noticed
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/bundler/noticed-2.4.1 branch from 5853e57 to 39d3c97 Compare September 3, 2024 17:13
Copy link
Contributor Author

dependabot bot commented on behalf of github Sep 9, 2024

Superseded by #4804.

@dependabot dependabot bot closed this Sep 9, 2024
@dependabot dependabot bot deleted the dependabot/bundler/noticed-2.4.1 branch September 9, 2024 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

0 participants