Skip to content
Browse files

Added note r.e. deprecation of old trigger methods

  • Loading branch information...
1 parent fb52cfa commit 7704ed420a2b7e7a93e7e8db11b8261a3e35cfab @mloughran mloughran committed
Showing with 11 additions and 3 deletions.
  1. +2 −3 lib/pusher.rb
  2. +9 −0 lib/pusher/channel.rb
View
5 lib/pusher.rb
@@ -7,12 +7,11 @@
# Used for configuring API credentials and creating Channel objects
#
module Pusher
- # All Pusher errors descend from this class so you can easily rescue Pusher
- # errors
+ # All errors descend from this class so they can be easily rescued
#
# @example
# begin
- # Pusher['a_channel'].trigger!('an_event', {:some => 'data'})
+ # Pusher.trigger('channel_name', 'event_name, {:some => 'data'})
# rescue Pusher::Error => e
# # Do something on error
# end
View
9 lib/pusher/channel.rb
@@ -15,6 +15,9 @@ def initialize(base_url, name, client = Pusher)
# Trigger event asynchronously using EventMachine::HttpRequest
#
+ # [Deprecated] This method will be removed in a future gem version. Please
+ # switch to Pusher.trigger_async or Pusher::Client#trigger_async instead
+ #
# @param (see #trigger!)
# @return [EM::DefaultDeferrable]
# Attach a callback to be notified of success (with no parameters).
@@ -32,6 +35,9 @@ def trigger_async(event_name, data, socket_id = nil)
# Trigger event
#
+ # [Deprecated] This method will be removed in a future gem version. Please
+ # switch to Pusher.trigger or Pusher::Client#trigger instead
+ #
# @example
# begin
# Pusher['my-channel'].trigger!('an_event', {:some => 'data'})
@@ -55,6 +61,9 @@ def trigger!(event_name, data, socket_id = nil)
# Trigger event, catching and logging any errors.
#
+ # [Deprecated] This method will be removed in a future gem version. Please
+ # switch to Pusher.trigger or Pusher::Client#trigger instead
+ #
# @note CAUTION! No exceptions will be raised on failure
# @param (see #trigger!)
#

0 comments on commit 7704ed4

Please sign in to comment.
Something went wrong with that request. Please try again.