Module: Ably

Defined in:
lib/ably/modules/ably.rb,
lib/ably/auth.rb,
lib/ably/rest.rb,
lib/ably/agent.rb,
lib/ably/logger.rb,
lib/ably/version.rb,
lib/ably/realtime.rb,
lib/ably/rest/push.rb,
lib/ably/exceptions.rb,
lib/ably/rest/client.rb,
lib/ably/rest/channel.rb,
lib/ably/realtime/auth.rb,
lib/ably/realtime/push.rb,
lib/ably/rest/channels.rb,
lib/ably/rest/presence.rb,
lib/ably/realtime/client.rb,
lib/ably/realtime/channel.rb,
lib/ably/realtime/channels.rb,
lib/ably/realtime/connection.rb,
lib/ably/modules/event_emitter.rb,
lib/ably/rest/middleware/logger.rb,
lib/ably/modules/exception_codes.rb,
lib/ably/rest/middleware/encoder.rb,
lib/ably/rest/middleware/exceptions.rb,
lib/ably/rest/middleware/parse_json.rb,
lib/ably/models/message_encoders/base.rb,
lib/ably/rest/middleware/parse_message_pack.rb,
lib/ably/rest/middleware/external_exceptions.rb,
lib/ably/rest/middleware/fail_if_unsupported_mime_type.rb

Overview

MessageEncoders are registered with the Ably client library and are responsible for encoding & decoding messages.

For example, if a message body is detected as JSON, it is encoded as a String and the encoding attribute of the message is defined as 'json'. Encrypted messages are encoded & decoded by the Cipher encoder.

Defined Under Namespace

Modules: Exceptions, Models, Modules, Realtime, Rest, Util Classes: Auth, Logger

Constant Summary collapse

AGENT =
"ably-ruby/#{Ably::VERSION} ruby/#{RUBY_VERSION}"
VERSION =
'1.1.7'
PROTOCOL_VERSION =
'1.1'
FALLBACK_DOMAIN =

Fallback hosts to use when a connection to rest/realtime.ably.io is not possible due to network failures either at the client, between the client and Ably, within an Ably data center, or at the IO domain registrar see docs.ably.io/client-lib-development-guide/features/#RSC15a

'ably-realtime.com'.freeze
FALLBACK_IDS =
%w(a b c d e).freeze
FALLBACK_HOSTS =

Default production fallbacks a.ably-realtime.com … e.ably-realtime.com

FALLBACK_IDS.map { |host| "#{host}.#{FALLBACK_DOMAIN}".freeze }.freeze
CUSTOM_ENVIRONMENT_FALLBACKS_SUFFIXES =

Custom environment default fallbacks ENV-a-fallback.ably-realtime.com … ENV-a-fallback.ably-realtime.com

FALLBACK_IDS.map do |host|
  "-#{host}-fallback.#{FALLBACK_DOMAIN}".freeze
end.freeze
INTERNET_CHECK =
{
  url:     '//internet-up.ably-realtime.com/is-the-internet-up.txt',
  ok_text: 'yes'
}.freeze

Class Method Summary collapse

Class Method Details

.major_minor_version_numericObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


6
7
8
# File 'lib/ably/version.rb', line 6

def self.major_minor_version_numeric
  VERSION.gsub(/\.\d+$/, '').to_f
end