Module: ZeroPushWoosh::Compatibility

Defined in:
lib/zero_push_woosh/compatibility.rb

Instance Method Summary collapse

Instance Method Details

#broadcast(params) ⇒ Object



16
17
18
19
# File 'lib/zero_push_woosh/compatibility.rb', line 16

def broadcast(params)
  warn_on_deprecated_parameters(params)
  super
end

#notify(params) ⇒ Object



11
12
13
14
# File 'lib/zero_push_woosh/compatibility.rb', line 11

def notify(params)
  warn_on_deprecated_parameters(params)
  super
end

#warn_on_deprecated_parameters(params) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/zero_push_woosh/compatibility.rb', line 3

def warn_on_deprecated_parameters(params)
  value = (params[:info] || params['info'] || params[:data] || params['data'])
  if value.is_a?(String)
    warn "[DEPRECATION] `info` or `data` encoded as a string will not be supported in version 3.0.0; Use a hash instead."
    http_config[:request_encoding] = :url_encoded
  end
end