Comments (3)
Sounds good.
from notifications-rails.
Something like this perhaps?
config.define_pusher :email: :ActionMailer, from: '[email protected]'
config.define_pusher :email: :SimpleMailer, from: '[email protected]'
config.define_pusher :push, :OneSignal, app_id: '...'
config.define_pusher :sms, :SMSEasy, app_id: '...'
config.define_pusher :sms, :TwilioSMS, app_id: '...'
config.define_pusher :fax, :DoPeopleStillUseFaxes, from: '123457890'
config.define_pusher :voicemail, :SomeTextToSpeechAutomatedDialerThing
config.define_pusher :carrier_pigeon, :PigeonGram
config.define_pusher :smoke_signal, :SmokeSignalsDotCom
(the names being service-agnostic names corresponding to different ways users could choose to receive notifications)
def define_pusher(name, klass, options = {})
pushers[name] = ::NotificationPusher::Pusher.new(klass, options)
end
klass
could be a constant symbol like the current API (would check for it under NotificationPusher::
first but still work for fully qualified constant name) or an actual constant.
Looks like this would be a breaking change...
Speaking of breaking changes, do you like the name Pusher
? I think it's pretty good, but when you start talking about a "push" Pusher, it starts to sound a little bit silly/confusing. Just something to think about...
What about calling them DeliveryMethod
s? You can deliver notifications by email, SMS, push, etc. But is it accurate to say you push notifications via any option you can imagine? It's also what ActionMailer calls its option, not that we have to copy them.
from notifications-rails.
I think we can go with that. I also like the idea of renaming Pusher
to DeliveryMethod
. As far as I can see, this change wouldn't even require the 'pushers' itself to change. They only depend on NotificationPusher
.
from notifications-rails.
Related Issues (20)
- Publish nested packages to this repo
- Release 3.0.1
- Release 3.0.2
- Remove badges from readme
- Fix rubocop offenses
- Enable CI for pull requests from forked repositories
- Notification Settings Category having issues comparing string to symbol on validate HOT 6
- undefined local variable or method `notification_target' for User HOT 2
- Setup dependabot
- Remove auto merge
- Update readme
- Add CodeQL
- Add issue templates
- Add pull request template
- Add security policy
- Add contributing guidelines
- Release 3.0.3
- Stop publishing to GPR
- LoadError: cannot load such file -- notification-handler HOT 5
- Test on Ruby 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from notifications-rails.