lib/ably/rest/client.rb in ably-0.1.2 vs lib/ably/rest/client.rb in ably-0.1.3

- old
+ new

@@ -17,10 +17,11 @@ # @!attribute [r] tls # @return [Boolean] True if client is configured to use TLS for all Ably communication # @!attribute [r] environment # @return [String] May contain 'sandbox' when testing the client library against an alternate Ably environment class Client + include Ably::Modules::Conversions include Ably::Modules::HttpHelpers extend Forwardable DOMAIN = "rest.ably.io" @@ -48,11 +49,11 @@ # # # create a new client and configure a client ID used for presence # client = Ably::Rest::Client.new(api_key: 'key.id:secret', client_id: 'john') # def initialize(options, &auth_block) - options = options.dup + options = options.clone if options.kind_of?(String) options = { api_key: options } end @@ -91,10 +92,10 @@ # # @return [Time] The time as reported by the Ably service def time response = get('/time', {}, send_auth_header: false) - Time.at(response.body.first / 1000.0) + as_time_from_epoch(response.body.first) end # True if client is configured to use TLS for all Ably communication # # @return [Boolean]