Project

notificon

0.0
No commit activity in last 3 years
No release in over 3 years
Gem for tracking and managing application notifications
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.6
~> 1.6
 Project Readme

notificon

Gem for tracking and managing application notifications for users. Just an abstraction of some common functionality.

It currently uses MongoDB as a datastore

Setup

Add the gem to your Gemfile

gem 'notificon'

Configure the data store

Notificon.setup do |config|
  config.connection_profile = mongodb://server
end

You can also pass in a logger and cache for the gem to use

Notificon.setup do |config|
  config.connection_profile = mongodb://.......
  config.logger = Rails.logger
  config.cache = Rails.cache
end

** TODO ** rake task for ensuring indexes

Usage

The core operations have been exposed as a class methods on the Notificon module

Recording a notification

Notificon.add_notification(username, item_url, item_text, actor, action, occured_at, item_id)
  • username - The String identifying the user being notified
  • item_url - A String url of the item notification relates to
  • item_text - A String that describes the item
  • actor - The String identifying the user that performed the action
  • action - A Symbol representing the action that the actor performed
  • occured_at - The Time the action was performed
  • item_id - A String uniquely identifying the item the notification is for