{ß: rooto:"YARD::CodeObjects::RootObject:@childrenIC:&YARD::CodeObjects::CodeObjectList[ o:$YARD::CodeObjects::ModuleObject;IC;[ o:#YARD::CodeObjects::ClassObject;IC;[Lo:$YARD::CodeObjects::MethodObject:@module_functionF: @scope: instance:@visibility: public: @pathI"Pubnub::Client#uuid:EF:@parameters[: @files[[I"lib/pubnub/client.rb;Ti:@current_file_has_commentsF: @name: uuid:@source_type: ruby: @tags[:@docstrings{:@docstringIC:YARD::Docstring"(Returns the value of attribute uuid ;F: @object@ : @summary0:@hash_flagF:@ref_tags[;[: @allI"(Returns the value of attribute uuid;F:@unresolved_reference0:@namespace@ : @sourceI"def uuid @uuid end;F:@signatureI" def uuid;F: @dynamicTo; ; F; ;;;;I"Pubnub::Client#uuid=;F;[[I" value;F0;[[@i;F;: uuid=;;;[;{;IC;"Sets the attribute uuid ;F;@;0; F;![;[o:YARD::Tags::Tag :@tag_nameI" param;F: @textI",the value to set the attribute uuid to.;F;I" value;F: @types0;@;"I"QSets the attribute uuid @param value the value to set the attribute uuid to.;F;#0;$@ ;%I")def uuid=(value) @uuid = value end;F;&I"def uuid=(value);F;'To; ; F; ;;;;I"Pubnub::Client#cipher_key;F;[;[[@i;F;:cipher_key;;;[;{;IC;".Returns the value of attribute cipher_key ;F;@-;0; F;![;[;"I".Returns the value of attribute cipher_key;F;#0;$@ ;%I"%def cipher_key @cipher_key end;F;&I"def cipher_key;F;'To; ; F; ;;;;I"Pubnub::Client#cipher_key=;F;[[I" value;F0;[[@i;F;:cipher_key=;;;[;{;IC;""Sets the attribute cipher_key ;F;@:;0; F;![;[o;) ;*I" param;F;+I"2the value to set the attribute cipher_key to.;F;I" value;F;,0;@:;"I"]Sets the attribute cipher_key @param value the value to set the attribute cipher_key to.;F;#0;$@ ;%I"5def cipher_key=(value) @cipher_key = value end;F;&I"def cipher_key=(value);F;'To; ; F; ;;;;I"Pubnub::Client#host;F;[;[[@i;F;: host;;;[;{;IC;"(Returns the value of attribute host ;F;@M;0; F;![;[;"I"(Returns the value of attribute host;F;#0;$@ ;%I"def host @host end;F;&I" def host;F;'To; ; F; ;;;;I"Pubnub::Client#host=;F;[[I" value;F0;[[@i;F;: host=;;;[;{;IC;"Sets the attribute host ;F;@Z;0; F;![;[o;) ;*I" param;F;+I",the value to set the attribute host to.;F;I" value;F;,0;@Z;"I"QSets the attribute host @param value the value to set the attribute host to.;F;#0;$@ ;%I")def host=(value) @host = value end;F;&I"def host=(value);F;'To; ; F; ;;;;I"Pubnub::Client#query;F;[;[[@i;F;: query;;;[;{;IC;")Returns the value of attribute query ;F;@m;0; F;![;[;"I")Returns the value of attribute query;F;#0;$@ ;%I"def query @query end;F;&I"def query;F;'To; ; F; ;;;;I"Pubnub::Client#query=;F;[[I" value;F0;[[@i;F;: query=;;;[;{;IC;"Sets the attribute query ;F;@z;0; F;![;[o;) ;*I" param;F;+I"-the value to set the attribute query to.;F;I" value;F;,0;@z;"I"SSets the attribute query @param value the value to set the attribute query to.;F;#0;$@ ;%I"+def query=(value) @query = value end;F;&I"def query=(value);F;'To; ; F; ;;;;I"Pubnub::Client#response;F;[;[[@i;F;: response;;;[;{;IC;",Returns the value of attribute response ;F;@ˆ;0; F;![;[;"I",Returns the value of attribute response;F;#0;$@ ;%I"!def response @response end;F;&I"def response;F;'To; ; F; ;;;;I"Pubnub::Client#response=;F;[[I" value;F0;[[@i;F;:response=;;;[;{;IC;" Sets the attribute response ;F;@•;0; F;![;[o;) ;*I" param;F;+I"0the value to set the attribute response to.;F;I" value;F;,0;@•;"I"YSets the attribute response @param value the value to set the attribute response to.;F;#0;$@ ;%I"1def response=(value) @response = value end;F;&I"def response=(value);F;'To; ; F; ;;;;I"Pubnub::Client#timetoken;F;[;[[@i;F;:timetoken;;;[;{;IC;"-Returns the value of attribute timetoken ;F;@¨;0; F;![;[;"I"-Returns the value of attribute timetoken;F;#0;$@ ;%I"#def timetoken @timetoken end;F;&I"def timetoken;F;'To; ; F; ;;;;I"Pubnub::Client#timetoken=;F;[[I" value;F0;[[@i;F;:timetoken=;;;[;{;IC;"!Sets the attribute timetoken ;F;@µ;0; F;![;[o;) ;*I" param;F;+I"1the value to set the attribute timetoken to.;F;I" value;F;,0;@µ;"I"[Sets the attribute timetoken @param value the value to set the attribute timetoken to.;F;#0;$@ ;%I"3def timetoken=(value) @timetoken = value end;F;&I"def timetoken=(value);F;'To; ; F; ;;;;I"Pubnub::Client#url;F;[;[[@i;F;:url;;;[;{;IC;"'Returns the value of attribute url ;F;@È;0; F;![;[;"I"'Returns the value of attribute url;F;#0;$@ ;%I"def url @url end;F;&I" def url;F;'To; ; F; ;;;;I"Pubnub::Client#url=;F;[[I" value;F0;[[@i;F;: url=;;;[;{;IC;"Sets the attribute url ;F;@Õ;0; F;![;[o;) ;*I" param;F;+I"+the value to set the attribute url to.;F;I" value;F;,0;@Õ;"I"OSets the attribute url @param value the value to set the attribute url to.;F;#0;$@ ;%I"'def url=(value) @url = value end;F;&I"def url=(value);F;'To; ; F; ;;;;I"Pubnub::Client#operation;F;[;[[@i;F;:operation;;;[;{;IC;"-Returns the value of attribute operation ;F;@è;0; F;![;[;"I"-Returns the value of attribute operation;F;#0;$@ ;%I"#def operation @operation end;F;&I"def operation;F;'To; ; F; ;;;;I"Pubnub::Client#operation=;F;[[I" value;F0;[[@i;F;:operation=;;;[;{;IC;"!Sets the attribute operation ;F;@õ;0; F;![;[o;) ;*I" param;F;+I"1the value to set the attribute operation to.;F;I" value;F;,0;@õ;"I"[Sets the attribute operation @param value the value to set the attribute operation to.;F;#0;$@ ;%I"3def operation=(value) @operation = value end;F;&I"def operation=(value);F;'To; ; F; ;;;;I"Pubnub::Client#callback;F;[;[[@i;F;: callback;;;[;{;IC;",Returns the value of attribute callback ;F;@;0; F;![;[;"I",Returns the value of attribute callback;F;#0;$@ ;%I"!def callback @callback end;F;&I"def callback;F;'To; ; F; ;;;;I"Pubnub::Client#callback=;F;[[I" value;F0;[[@i;F;:callback=;;;[;{;IC;" Sets the attribute callback ;F;@;0; F;![;[o;) ;*I" param;F;+I"0the value to set the attribute callback to.;F;I" value;F;,0;@;"I"YSets the attribute callback @param value the value to set the attribute callback to.;F;#0;$@ ;%I"1def callback=(value) @callback = value end;F;&I"def callback=(value);F;'To; ; F; ;;;;I"Pubnub::Client#publish_key;F;[;[[@i;F;:publish_key;;;[;{;IC;"/Returns the value of attribute publish_key ;F;@(;0; F;![;[;"I"/Returns the value of attribute publish_key;F;#0;$@ ;%I"'def publish_key @publish_key end;F;&I"def publish_key;F;'To; ; F; ;;;;I" Pubnub::Client#publish_key=;F;[[I" value;F0;[[@i;F;:publish_key=;;;[;{;IC;"#Sets the attribute publish_key ;F;@5;0; F;![;[o;) ;*I" param;F;+I"3the value to set the attribute publish_key to.;F;I" value;F;,0;@5;"I"_Sets the attribute publish_key @param value the value to set the attribute publish_key to.;F;#0;$@ ;%I"7def publish_key=(value) @publish_key = value end;F;&I"def publish_key=(value);F;'To; ; F; ;;;;I"!Pubnub::Client#subscribe_key;F;[;[[@i;F;:subscribe_key;;;[;{;IC;"1Returns the value of attribute subscribe_key ;F;@H;0; F;![;[;"I"1Returns the value of attribute subscribe_key;F;#0;$@ ;%I"+def subscribe_key @subscribe_key end;F;&I"def subscribe_key;F;'To; ; F; ;;;;I""Pubnub::Client#subscribe_key=;F;[[I" value;F0;[[@i;F;:subscribe_key=;;;[;{;IC;"%Sets the attribute subscribe_key ;F;@U;0; F;![;[o;) ;*I" param;F;+I"5the value to set the attribute subscribe_key to.;F;I" value;F;,0;@U;"I"cSets the attribute subscribe_key @param value the value to set the attribute subscribe_key to.;F;#0;$@ ;%I";def subscribe_key=(value) @subscribe_key = value end;F;&I"def subscribe_key=(value);F;'To; ; F; ;;;;I"Pubnub::Client#secret_key;F;[;[[@i;F;:secret_key;;;[;{;IC;".Returns the value of attribute secret_key ;F;@h;0; F;![;[;"I".Returns the value of attribute secret_key;F;#0;$@ ;%I"%def secret_key @secret_key end;F;&I"def secret_key;F;'To; ; F; ;;;;I"Pubnub::Client#secret_key=;F;[[I" value;F0;[[@i;F;:secret_key=;;;[;{;IC;""Sets the attribute secret_key ;F;@u;0; F;![;[o;) ;*I" param;F;+I"2the value to set the attribute secret_key to.;F;I" value;F;,0;@u;"I"]Sets the attribute secret_key @param value the value to set the attribute secret_key to.;F;#0;$@ ;%I"5def secret_key=(value) @secret_key = value end;F;&I"def secret_key=(value);F;'To; ; F; ;;;;I"Pubnub::Client#channel;F;[;[[@i;F;: channel;;;[;{;IC;"+Returns the value of attribute channel ;F;@ˆ;0; F;![;[;"I"+Returns the value of attribute channel;F;#0;$@ ;%I"def channel @channel end;F;&I"def channel;F;'To; ; F; ;;;;I"Pubnub::Client#channel=;F;[[I" value;F0;[[@i;F;: channel=;;;[;{;IC;"Sets the attribute channel ;F;@•;0; F;![;[o;) ;*I" param;F;+I"/the value to set the attribute channel to.;F;I" value;F;,0;@•;"I"WSets the attribute channel @param value the value to set the attribute channel to.;F;#0;$@ ;%I"/def channel=(value) @channel = value end;F;&I"def channel=(value);F;'To; ; F; ;;;;I"Pubnub::Client#jsonp;F;[;[[@i;F;: jsonp;;;[;{;IC;")Returns the value of attribute jsonp ;F;@¨;0; F;![;[;"I")Returns the value of attribute jsonp;F;#0;$@ ;%I"def jsonp @jsonp end;F;&I"def jsonp;F;'To; ; F; ;;;;I"Pubnub::Client#jsonp=;F;[[I" value;F0;[[@i;F;: jsonp=;;;[;{;IC;"Sets the attribute jsonp ;F;@µ;0; F;![;[o;) ;*I" param;F;+I"-the value to set the attribute jsonp to.;F;I" value;F;,0;@µ;"I"SSets the attribute jsonp @param value the value to set the attribute jsonp to.;F;#0;$@ ;%I"+def jsonp=(value) @jsonp = value end;F;&I"def jsonp=(value);F;'To; ; F; ;;;;I"Pubnub::Client#message;F;[;[[@i;F;: message;;;[;{;IC;"+Returns the value of attribute message ;F;@È;0; F;![;[;"I"+Returns the value of attribute message;F;#0;$@ ;%I"def message @message end;F;&I"def message;F;'To; ; F; ;;;;I"Pubnub::Client#message=;F;[[I" value;F0;[[@i;F;: message=;;;[;{;IC;"Sets the attribute message ;F;@Õ;0; F;![;[o;) ;*I" param;F;+I"/the value to set the attribute message to.;F;I" value;F;,0;@Õ;"I"WSets the attribute message @param value the value to set the attribute message to.;F;#0;$@ ;%I"/def message=(value) @message = value end;F;&I"def message=(value);F;'To; ; F; ;;;;I"Pubnub::Client#ssl;F;[;[[@i;F;:ssl;;;[;{;IC;"'Returns the value of attribute ssl ;F;@è;0; F;![;[;"I"'Returns the value of attribute ssl;F;#0;$@ ;%I"def ssl @ssl end;F;&I" def ssl;F;'To; ; F; ;;;;I"Pubnub::Client#ssl=;F;[[I" value;F0;[[@i;F;: ssl=;;;[;{;IC;"Sets the attribute ssl ;F;@õ;0; F;![;[o;) ;*I" param;F;+I"+the value to set the attribute ssl to.;F;I" value;F;,0;@õ;"I"OSets the attribute ssl @param value the value to set the attribute ssl to.;F;#0;$@ ;%I"'def ssl=(value) @ssl = value end;F;&I"def ssl=(value);F;'To; ; F; ;;;;I"Pubnub::Client#port;F;[;[[@i;F;: port;;;[;{;IC;"(Returns the value of attribute port ;F;@;0; F;![;[;"I"(Returns the value of attribute port;F;#0;$@ ;%I"def port @port end;F;&I" def port;F;'To; ; F; ;;;;I"Pubnub::Client#port=;F;[[I" value;F0;[[@i;F;: port=;;;[;{;IC;"Sets the attribute port ;F;@;0; F;![;[o;) ;*I" param;F;+I",the value to set the attribute port to.;F;I" value;F;,0;@;"I"QSets the attribute port @param value the value to set the attribute port to.;F;#0;$@ ;%I")def port=(value) @port = value end;F;&I"def port=(value);F;'To; ; F; ;;;;I"$Pubnub::Client#close_connection;F;[;[[@i;F;:close_connection;;;[;{;IC;"4Returns the value of attribute close_connection ;F;@(;0; F;![;[;"I"4Returns the value of attribute close_connection;F;#0;$@ ;%I"1def close_connection @close_connection end;F;&I"def close_connection;F;'To; ; F; ;;;;I"%Pubnub::Client#close_connection=;F;[[I" value;F0;[[@i;F;:close_connection=;;;[;{;IC;"(Sets the attribute close_connection ;F;@5;0; F;![;[o;) ;*I" param;F;+I"8the value to set the attribute close_connection to.;F;I" value;F;,0;@5;"I"iSets the attribute close_connection @param value the value to set the attribute close_connection to.;F;#0;$@ ;%I"Adef close_connection=(value) @close_connection = value end;F;&I"!def close_connection=(value);F;'To; ; F; ;;;;I"!Pubnub::Client#history_limit;F;[;[[@i;F;:history_limit;;;[;{;IC;"1Returns the value of attribute history_limit ;F;@H;0; F;![;[;"I"1Returns the value of attribute history_limit;F;#0;$@ ;%I"+def history_limit @history_limit end;F;&I"def history_limit;F;'To; ; F; ;;;;I""Pubnub::Client#history_limit=;F;[[I" value;F0;[[@i;F;:history_limit=;;;[;{;IC;"%Sets the attribute history_limit ;F;@U;0; F;![;[o;) ;*I" param;F;+I"5the value to set the attribute history_limit to.;F;I" value;F;,0;@U;"I"cSets the attribute history_limit @param value the value to set the attribute history_limit to.;F;#0;$@ ;%I";def history_limit=(value) @history_limit = value end;F;&I"def history_limit=(value);F;'To; ; F; ;;;;I"!Pubnub::Client#history_count;F;[;[[@i;F;:history_count;;;[;{;IC;"1Returns the value of attribute history_count ;F;@h;0; F;![;[;"I"1Returns the value of attribute history_count;F;#0;$@ ;%I"+def history_count @history_count end;F;&I"def history_count;F;'To; ; F; ;;;;I""Pubnub::Client#history_count=;F;[[I" value;F0;[[@i;F;:history_count=;;;[;{;IC;"%Sets the attribute history_count ;F;@u;0; F;![;[o;) ;*I" param;F;+I"5the value to set the attribute history_count to.;F;I" value;F;,0;@u;"I"cSets the attribute history_count @param value the value to set the attribute history_count to.;F;#0;$@ ;%I";def history_count=(value) @history_count = value end;F;&I"def history_count=(value);F;'To; ; F; ;;;;I"!Pubnub::Client#history_start;F;[;[[@i;F;:history_start;;;[;{;IC;"1Returns the value of attribute history_start ;F;@ˆ;0; F;![;[;"I"1Returns the value of attribute history_start;F;#0;$@ ;%I"+def history_start @history_start end;F;&I"def history_start;F;'To; ; F; ;;;;I""Pubnub::Client#history_start=;F;[[I" value;F0;[[@i;F;:history_start=;;;[;{;IC;"%Sets the attribute history_start ;F;@•;0; F;![;[o;) ;*I" param;F;+I"5the value to set the attribute history_start to.;F;I" value;F;,0;@•;"I"cSets the attribute history_start @param value the value to set the attribute history_start to.;F;#0;$@ ;%I";def history_start=(value) @history_start = value end;F;&I"def history_start=(value);F;'To; ; F; ;;;;I"Pubnub::Client#history_end;F;[;[[@i;F;:history_end;;;[;{;IC;"/Returns the value of attribute history_end ;F;@¨;0; F;![;[;"I"/Returns the value of attribute history_end;F;#0;$@ ;%I"'def history_end @history_end end;F;&I"def history_end;F;'To; ; F; ;;;;I" Pubnub::Client#history_end=;F;[[I" value;F0;[[@i;F;:history_end=;;;[;{;IC;"#Sets the attribute history_end ;F;@µ;0; F;![;[o;) ;*I" param;F;+I"3the value to set the attribute history_end to.;F;I" value;F;,0;@µ;"I"_Sets the attribute history_end @param value the value to set the attribute history_end to.;F;#0;$@ ;%I"7def history_end=(value) @history_end = value end;F;&I"def history_end=(value);F;'To; ; F; ;;;;I"#Pubnub::Client#history_reverse;F;[;[[@i;F;:history_reverse;;;[;{;IC;"3Returns the value of attribute history_reverse ;F;@È;0; F;![;[;"I"3Returns the value of attribute history_reverse;F;#0;$@ ;%I"/def history_reverse @history_reverse end;F;&I"def history_reverse;F;'To; ; F; ;;;;I"$Pubnub::Client#history_reverse=;F;[[I" value;F0;[[@i;F;:history_reverse=;;;[;{;IC;"'Sets the attribute history_reverse ;F;@Õ;0; F;![;[o;) ;*I" param;F;+I"7the value to set the attribute history_reverse to.;F;I" value;F;,0;@Õ;"I"gSets the attribute history_reverse @param value the value to set the attribute history_reverse to.;F;#0;$@ ;%I"?def history_reverse=(value) @history_reverse = value end;F;&I" def history_reverse=(value);F;'To; ; F; ;;;;I" Pubnub::Client#session_uuid;F;[;[[@i;F;:session_uuid;;;[;{;IC;"0Returns the value of attribute session_uuid ;F;@è;0; F;![;[;"I"0Returns the value of attribute session_uuid;F;#0;$@ ;%I")def session_uuid @session_uuid end;F;&I"def session_uuid;F;'To; ; F; ;;;;I"!Pubnub::Client#session_uuid=;F;[[I" value;F0;[[@i;F;:session_uuid=;;;[;{;IC;"$Sets the attribute session_uuid ;F;@õ;0; F;![;[o;) ;*I" param;F;+I"4the value to set the attribute session_uuid to.;F;I" value;F;,0;@õ;"I"aSets the attribute session_uuid @param value the value to set the attribute session_uuid to.;F;#0;$@ ;%I"9def session_uuid=(value) @session_uuid = value end;F;&I"def session_uuid=(value);F;'To; ; F; ;;;;I""Pubnub::Client#last_timetoken;F;[;[[@i;F;:last_timetoken;;;[;{;IC;"2Returns the value of attribute last_timetoken ;F;@;0; F;![;[;"I"2Returns the value of attribute last_timetoken;F;#0;$@ ;%I"-def last_timetoken @last_timetoken end;F;&I"def last_timetoken;F;'To; ; F; ;;;;I"#Pubnub::Client#last_timetoken=;F;[[I" value;F0;[[@i;F;:last_timetoken=;;;[;{;IC;"&Sets the attribute last_timetoken ;F;@;0; F;![;[o;) ;*I" param;F;+I"6the value to set the attribute last_timetoken to.;F;I" value;F;,0;@;"I"eSets the attribute last_timetoken @param value the value to set the attribute last_timetoken to.;F;#0;$@ ;%I"=def last_timetoken=(value) @last_timetoken = value end;F;&I"def last_timetoken=(value);F;'To; ; F; ;;;;I"Pubnub::Client#origin;F;[;[[@i;F;: origin;;;[;{;IC;"*Returns the value of attribute origin ;F;@(;0; F;![;[;"I"*Returns the value of attribute origin;F;#0;$@ ;%I"def origin @origin end;F;&I"def origin;F;'To; ; F; ;;;;I"Pubnub::Client#origin=;F;[[I" value;F0;[[@i;F;: origin=;;;[;{;IC;"Sets the attribute origin ;F;@5;0; F;![;[o;) ;*I" param;F;+I".the value to set the attribute origin to.;F;I" value;F;,0;@5;"I"USets the attribute origin @param value the value to set the attribute origin to.;F;#0;$@ ;%I"-def origin=(value) @origin = value end;F;&I"def origin=(value);F;'To; ; F; ;;;;I"Pubnub::Client#error;F;[;[[@i;F;: error;;;[;{;IC;")Returns the value of attribute error ;F;@H;0; F;![;[;"I")Returns the value of attribute error;F;#0;$@ ;%I"def error @error end;F;&I"def error;F;'To; ; F; ;;;;I"Pubnub::Client#error=;F;[[I" value;F0;[[@i;F;: error=;;;[;{;IC;"Sets the attribute error ;F;@U;0; F;![;[o;) ;*I" param;F;+I"-the value to set the attribute error to.;F;I" value;F;,0;@U;"I"SSets the attribute error @param value the value to set the attribute error to.;F;#0;$@ ;%I"+def error=(value) @error = value end;F;&I"def error=(value);F;'To; ; F; ;;;;I"Pubnub::Client#initialize;F;[[I" options;TI"{};T;[[@i;F;:initialize;;;[;{;IC;" ;F;@h;0; F;![;[o;) ;*I" return;F;+I"a new instance of Client;F;0;,[I" Client;F;@h;"I";F;#0;$@ ;%I"7def initialize(options = {}) @retry = true @retry_count = 0 @callback = options[:callback]# || DEFAULT_CALLBACK @cipher_key = options[:cipher_key] @publish_key = options[:publish_key]# || DEFAULT_PUBLISH_KEY @subscribe_key = options[:subscribe_key] || DEFAULT_SUBSCRIBE_KEY @channel = options[:channel] || DEFAULT_CHANNEL @message = options[:message] @ssl = options[:ssl]# || DEFAULT_SSL_SET @secret_key = options[:secret_key]# || '0' @timetoken = options[:timetoken]# || '0' @session_uuid = UUID.new.generate @history_count = options[:count] @history_start = options[:start] @history_end = options[:end] @history_reverse = options[:reverse] @port = options[:port]# || DEFAULT_PORT @url = options[:url] @origin = options[:origin] @origin = DEFAULT_ORIGIN unless @origin @query = options[:query] @http_sync = options[:http_sync] @params = Hash.new @subscribes = Array.new end;T;&I"!def initialize(options = {});T;'T:@explicitTo; ; F; ;;;;I"Pubnub::Client#publish;F;[[I" options;TI"{};T[I" &block;F0;[[@i2;F;: publish;;;[;{;IC;" ;F;@};0; F;![;[;"I";F;#0;$@ ;%I"ûdef publish(options = {}, &block) merge_options(options, 'publish') verify_operation('publish', options.merge!(:block_given => block_given?)) if block_given? start_request { |envelope| block.call envelope } else start_request end end;T;&I"&def publish(options = {}, &block);T;'T;bTo; ; F; ;;;;I"Pubnub::Client#subscribe;F;[[I" options;TI"{};T[I" &block;F0;[[@i<;F;:subscribe;;;[;{;IC;" ;F;@;0; F;![;[;"I";F;#0;$@ ;%I"def subscribe(options = {}, &block) merge_options(options, 'subscribe') verify_operation('subscribe', options.merge!(:block_given => block_given?)) if block_given? start_request { |envelope| block.call envelope } else start_request end end;T;&I"(def subscribe(options = {}, &block);T;'T;bTo; ; F; ;;;;I"Pubnub::Client#presence;F;[[I" options;TI"{};T[I" &block;F0;[[@iF;F;: presence;;;[;{;IC;" ;F;@¡;0; F;![;[;"I";F;#0;$@ ;%I"þdef presence(options = {}, &block) merge_options(options, 'presence') verify_operation('presence', options.merge!(:block_given => block_given?)) if block_given? start_request { |envelope| block.call envelope } else start_request end end;T;&I"'def presence(options = {}, &block);T;'T;bTo; ; F; ;;;;I"Pubnub::Client#history;F;[[I" options;TI"{};T[I" &block;F0;[[@iP;F;: history;;;[;{;IC;" ;F;@³;0; F;![;[;"I";F;#0;$@ ;%I"def history(options = {}, &block) merge_options(options, 'history') verify_operation('history', options.merge!(:block_given => block_given?)) @options[:params].merge!({:count => options[:count]}) @options[:params].merge!({:start => options[:start]}) unless options[:start].nil? @options[:params].merge!({:end => options[:end]}) unless options[:end].nil? @options[:params].merge!({:reverse => 'true'}) if options[:reverse] if block_given? start_request { |envelope| block.call envelope } else start_request end end;T;&I"&def history(options = {}, &block);T;'T;bTo; ; F; ;;;;I"Pubnub::Client#leave;F;[[I" options;TI"{};T[I" &block;F0;[[@i`;F;: leave;;;[;{;IC;" ;F;@Å;0; F;![;[;"I";F;#0;$@ ;%I"õdef leave(options = {}, &block) merge_options(options, 'leave') verify_operation('leave', options.merge!(:block_given => block_given?)) if block_given? start_request { |envelope| block.call envelope } else start_request end end;T;&I"$def leave(options = {}, &block);T;'T;bTo; ; F; ;;;;I"Pubnub::Client#unsubscribe;F;[;[[@ii;F;:unsubscribe;;;[;{;IC;";F;@×;0; F;![;[;"I" ;F;#0:@line_range0;$@ ;%I"õdef leave(options = {}, &block) merge_options(options, 'leave') verify_operation('leave', options.merge!(:block_given => block_given?)) if block_given? start_request { |envelope| block.call envelope } else start_request end end;T;&@Ö;'To; ; F; ;;;;I"Pubnub::Client#here_now;F;[[I" options;TI"{};T[I" &block;F0;[[@ik;F;: here_now;;;[;{;IC;" ;F;@ã;0; F;![;[;"I";F;#0;$@ ;%I"þdef here_now(options = {}, &block) merge_options(options, 'here_now') verify_operation('here_now', options.merge!(:block_given => block_given?)) if block_given? start_request { |envelope| block.call envelope } else start_request end end;T;&I"'def here_now(options = {}, &block);T;'T;bTo; ; F; ;;;;I"Pubnub::Client#time;F;[[I" options;TI"{};T[I" &block;F0;[[@iu;F;: time;;;[;{;IC;" ;F;@õ;0; F;![;[;"I";F;#0;$@ ;%I"òdef time(options = {}, &block) merge_options(options, 'time') verify_operation('time', options.merge!(:block_given => block_given?)) if block_given? start_request { |envelope| block.call envelope } else start_request end end;T;&I"#def time(options = {}, &block);T;'T;bTo; ; F; ;;: private;I"!Pubnub::Client#merge_options;F;[[I" options;TI"{};T[I"operation;T0;[[@i|;F;:merge_options;;;[;{;IC;" ;F;@;0; F;![;[;"I";F;#0;$@ ;%I"ædef merge_options(options = {}, operation) @options = { :ssl => @ssl, :cipher_key => @cipher_key, :publish_key => @publish_key, :subscribe_key => @subscribe_key, :secret_key => @secret_key, :origin => @origin, :operation => operation, :params => { :uuid => @session_uuid }, :timetoken => @timetoken, :channel => compile_channel_parameter(options[:channel],options[:channels]) }.merge(options) end;T;&I"/def merge_options(options = {}, operation);T;'T;bTo; ; F; ;;;l;I"!Pubnub::Client#start_request;F;[[I" &block;F0;[[@i‹;F;:start_request;;;[;{;IC;" ;F;@;0; F;![;[;"I";F;#0;$@ ;%I" def start_request(&block) request = Pubnub::Request.new(@options) unless @options[:http_sync] Thread.new { EM.run } while EM.reactor_running? == false do end if %w(subscribe presence).include? request.operation EM.add_periodic_timer(PERIODIC_TIMER) do if @close_connection EM.stop else http = send_request(request) http.callback do if http.response_header.status.to_i == 200 if is_valid_json?(http.response) make_callback = is_update?(request.timetoken) request.handle_response(http) if block_given? request.envelopes.each do |envelope| block.call envelope end else request.envelopes.each do |envelope| request.callback.call envelope end end if make_callback end end end http.errback do end end end else EM.next_tick do http = send_request(request) http.callback do if http.response_header.status.to_i == 200 if is_valid_json?(http.response) request.handle_response(http) if block_given? request.envelopes.each do |envelope| block.call envelope end else request.envelopes.each do |envelope| request.callback.call envelope end end end else begin if block_given? request.envelopes.each do |envelope| block.call envelope end else request.envelopes.each do |envelope| request.callback.call envelope end end rescue if block_given? block.call [0, "Bad server response: #{http.response_header.http_status.to_i}"] else request.callback.call([0, "Bad server response: #{http.response_header.http_status.to_i}"]) end end end end end end else response = HTTParty.get(request.origin + request.path, :query => request.query) if response.response.code.to_i == 200 if is_valid_json?(response.body) request.handle_response(response) if block_given? request.envelopes.each do |envelope| block.call envelope end else request.envelopes.each do |envelope| request.callback.call envelope end end end else begin request.handle_response(response) if block_given? request.envelopes.each do |envelope| block.call envelope end else request.envelopes.each do |envelope| request.callback.call envelope end end rescue if block_given? block.call [0, "Bad server response: #{response.response.code}"] else request.callback.call([0, "Bad server response: #{response.response.code}"]) end end end end end;T;&I"def start_request(&block);T;'T;bTo; ; F; ;;;l;I" Pubnub::Client#send_request;F;[[I" request;T0;[[@i;F;:send_request;;;[;{;IC;" ;F;@(;0; F;![;[;"I";F;#0;$@ ;%I"{def send_request(request) EM::HttpRequest.new(request.origin).get :path => request.path, :query => request.query end;T;&I"def send_request(request);T;'T;bTo; ; F; ;;;l;I"Pubnub::Client#is_update?;F;[[I"timetoken;T0;[[@i;F;:is_update?;;;[;{;IC;" ;F;@7;0; F;![;[o;) ;*I" return;F;+I";F;0;,[I" Boolean;F;@7;"I";F;#0;$@ ;%I"]def is_update?(timetoken) @timetoken == timetoken ? false : @timetoken = timetoken end;T;&I"def is_update?(timetoken);T;'T;bTo; ; F; ;;;l;I""Pubnub::Client#is_valid_json?;F;[[I" response;T0;[[@i ;F;:is_valid_json?;;;[;{;IC;" ;F;@K;0; F;![;[o;) ;*I" return;F;+I";F;0;,[I" Boolean;F;@K;"I";F;#0;$@ ;%I"‘def is_valid_json?(response) begin JSON.parse(response) valid = true rescue increment_retries valid = false end valid end;T;&I"!def is_valid_json?(response);T;'T;bTo; ; F; ;;;l;I"%Pubnub::Client#increment_retries;F;[;[[@i;F;:increment_retries;;;[;{;IC;" ;F;@_;0; F;![;[;"I";F;#0;$@ ;%I"¢def increment_retries if @retry_count < MAX_RETRIES @retry = true else @retry = false @retry_count = 0 end @retry_count = @retry_count + 1 end;T;&I"def increment_retries;T;'T;bTo; ; F; ;;;l;I"$Pubnub::Client#verify_operation;F;[[I"operation;T0[I" options;T0;[[@i;F;:verify_operation;;;[;{;IC;" ;F;@l;0; F;![;[;"I";F;#0;$@ ;%I"Ôdef verify_operation(operation, options) case operation when 'publish' raise(ArgumentError, 'publish() requires :channel, :message parameters and callback parameter or block given.') unless (options[:channel] || options[:channels]) && (options[:callback] || options[:block_given]) && options[:message] when 'subscribe' raise(ArgumentError, 'subscribe() requires :channel parameters and callback parameter or block given.') unless (options[:channel] || options[:channels]) && (options[:callback] || options[:block_given]) when 'presence' raise(ArgumentError, 'presence() requires :channel parameters and callback parameter or block given.') unless (options[:channel] || options[:channels]) && (options[:callback] || options[:block_given]) when 'time' raise(ArgumentError, 'time() require callback parameter or block given.') unless (options[:callback] || options[:block_given]) when 'history' raise(ArgumentError, 'history() requires :channel, :count parameters and callback parameter or block given.') unless (options[:channel] || options[:channels]) && (options[:callback] || options[:block_given]) && options[:count] when 'here_now' raise(ArgumentError, 'here_now() requires :channel parameters and callback parameter or block given.') unless (options[:channel] || options[:channels]) && (options[:callback] || options[:block_given]) when 'leave' raise(ArgumentError, 'leave() requires :channel parameters and callback parameter or block given.') unless (options[:channel] || options[:channels]) && (options[:callback] || options[:block_given]) end unless options[:callback].nil? raise('callback is invalid.') unless options[:callback].respond_to? 'call' end end;T;&I"-def verify_operation(operation, options);T;'T;bTo; ; F; ;;;l;I"-Pubnub::Client#compile_channel_parameter;F;[[I" channel;T0[I" channels;T0;[[@i6;F;:compile_channel_parameter;;;[;{;IC;" ;F;@};0; F;![;[o;) ;*I" raise;F;+I";F;0;,[I"ArgumentError;T;@};"I";F;#0;$@ ;%I"def compile_channel_parameter(channel, channels) raise(ArgumentError, 'Can\'t handle both :channel and :channels parameters given.') if channel && channels channel = channels if channels channel = channel.join(',') if channel.class == Array channel end;T;&I"5def compile_channel_parameter(channel, channels);T;'T;bT: @owner@ :@class_mixinsIC;[;u@ :@instance_mixinsIC;[o:YARD::CodeObjects::Proxy : @imethod0:@origname0:@orignamespace0;:Configuration;$@: @objo; ;IC;[o:&YARD::CodeObjects::ConstantObject;[[I" lib/pubnub/configuration.rb;Ti;F;:DEFAULT_SECRET_KEY;;;;;[;{;IC;" ;F;@˜;0; F;![;[;"I";F;#0;$@–;I".Pubnub::Configuration::DEFAULT_SECRET_KEY;F;&I"#DEFAULT_SECRET_KEY = 0;T;%I"#DEFAULT_SECRET_KEY = 0;T: @valueI"0;T;'To;~;[[@›i ;F;:DEFAULT_TIMETOKEN;;;;;[;{;IC;" ;F;@¦;0; F;![;[;"I";F;#0;$@–;I"-Pubnub::Configuration::DEFAULT_TIMETOKEN;F;&I"#DEFAULT_TIMETOKEN = 0;T;%I"#DEFAULT_TIMETOKEN = 0;T;{I"0;T;'To;~;[[@›i ;F;:DEFAULT_ORIGIN;;;;;[;{;IC;" ;F;@³;0; F;![;[;"I";F;#0;$@–;I"*Pubnub::Configuration::DEFAULT_ORIGIN;F;&I"5DEFAULT_ORIGIN = 'pubsub.pubnub.com';T;%I"5DEFAULT_ORIGIN = 'pubsub.pubnub.com';T;{I"'pubsub.pubnub.com';T;'To;~;[[@›i ;F;:DEFAULT_PORT;;;;;[;{;IC;" ;F;@À;0; F;![;[;"I";F;#0;$@–;I"(Pubnub::Configuration::DEFAULT_PORT;F;&I"$DEFAULT_PORT = 80;T;%I"$DEFAULT_PORT = 80;T;{I"80;T;'To;~;[[@›i ;F;:DEFAULT_METHOD;;;;;[;{;IC;" ;F;@Í;0; F;![;[;"I";F;#0;$@–;I"*Pubnub::Configuration::DEFAULT_METHOD;F;&I"'DEFAULT_METHOD = 'GET';T;%I"'DEFAULT_METHOD = 'GET';T;{I" 'GET';T;'To;~;[[@›i ;F;:DEFAULT_CONTENT_TYPE;;;;;[;{;IC;" ;F;@Ú;0; F;![;[;"I";F;#0;$@–;I"0Pubnub::Configuration::DEFAULT_CONTENT_TYPE;F;&I"4DEFAULT_CONTENT_TYPE = 'application/json';T;%I"4DEFAULT_CONTENT_TYPE = 'application/json';T;{I"'application/json';T;'To;~;[[@›i;F;:DEFAULT_PATH;;;;;[;{;IC;" ;F;@ç;0; F;![;[;"I";F;#0;$@–;I"(Pubnub::Configuration::DEFAULT_PATH;F;&I"%DEFAULT_PATH = '/';T;%I"%DEFAULT_PATH = '/';T;{I"'/';T;'To;~;[[@›i;F;:DEFAULT_PARAMS;;;;;[;{;IC;" ;F;@ô;0; F;![;[;"I";F;#0;$@–;I"*Pubnub::Configuration::DEFAULT_PARAMS;F;&I"$DEFAULT_PARAMS = {};T;%I"$DEFAULT_PARAMS = {};T;{I"{};T;'To;~;[[@›i;F;:DEFAULT_HEADERS;;;;;[;{;IC;" ;F;@;0; F;![;[;"I";F;#0;$@–;I"+Pubnub::Configuration::DEFAULT_HEADERS;F;&I"$DEFAULT_HEADERS = {};T;%I"$DEFAULT_HEADERS = {};T;{I"{};T;'To;~;[[@›i;F;:DEFAULT_USER_AGENT;;;;;[;{;IC;" ;F;@;0; F;![;[;"I";F;#0;$@–;I".Pubnub::Configuration::DEFAULT_USER_AGENT;F;&I"ADEFAULT_USER_AGENT = "Pubnub Ruby #{PUBNUB_VERSION}";T;%I"ADEFAULT_USER_AGENT = "Pubnub Ruby #{PUBNUB_VERSION}";T;{I"$"Pubnub Ruby #{PUBNUB_VERSION}";T;'To;~;[[@›i;F;:DEFAULT_SSL_SET;;;;;[;{;IC;" ;F;@;0; F;![;[;"I";F;#0;$@–;I"+Pubnub::Configuration::DEFAULT_SSL_SET;F;&I"'DEFAULT_SSL_SET = false;T;%I"'DEFAULT_SSL_SET = false;T;{I" false;T;'To;~;[[@›i;F;:DEFAULT_TIMEOUT;;;;;[;{;IC;" ;F;@(;0; F;![;[;"I";F;#0;$@–;I"+Pubnub::Configuration::DEFAULT_TIMEOUT;F;&I"#DEFAULT_TIMEOUT = 5;T;%I"#DEFAULT_TIMEOUT = 5;T;{I"5;T;'To;~;[[@›i;F;:DEFAULT_ENCODING;;;;;[;{;IC;" ;F;@5;0; F;![;[;"I";F;#0;$@–;I",Pubnub::Configuration::DEFAULT_ENCODING;F;&I"%DEFAULT_ENCODING = nil;T;%I"%DEFAULT_ENCODING = nil;T;{I"nil;T;'To;~;[[@›i;F;:DEFAULT_AUTO_RECONNECT;;;;;[;{;IC;" ;F;@B;0; F;![;[;"I";F;#0;$@–;I"2Pubnub::Configuration::DEFAULT_AUTO_RECONNECT;F;&I"&DEFAULT_AUTO_RECONNECT = true;T;%I"&DEFAULT_AUTO_RECONNECT = true;T;{I" true;T;'To;~;[[@›i;F;:DEFAULT_CALLBACK;;;;;[;{;IC;" ;F;@O;0; F;![;[;"I";F;#0;$@–;I",Pubnub::Configuration::DEFAULT_CALLBACK;F;&I"=DEFAULT_CALLBACK = lambda { |data| puts data };T;%I"=DEFAULT_CALLBACK = lambda { |data| puts data };T;{I" lambda { |data| puts data };T;'To;~;[[@›i;F;:DEFAULT_PUBLISH_KEY;;;;;[;{;IC;" ;F;@\;0; F;![;[;"I";F;#0;$@–;I"/Pubnub::Configuration::DEFAULT_PUBLISH_KEY;F;&I"(DEFAULT_PUBLISH_KEY = 'demo';T;%I"(DEFAULT_PUBLISH_KEY = 'demo';T;{I" 'demo';T;'To;~;[[@›i;F;:DEFAULT_SUBSCRIBE_KEY;;;;;[;{;IC;" ;F;@i;0; F;![;[;"I";F;#0;$@–;I"1Pubnub::Configuration::DEFAULT_SUBSCRIBE_KEY;F;&I"(DEFAULT_SUBSCRIBE_KEY = 'demo';T;%I"(DEFAULT_SUBSCRIBE_KEY = 'demo';T;{I" 'demo';T;'To;~;[[@›i;F;:DEFAULT_CHANNEL;;;;;[;{;IC;" ;F;@v;0; F;![;[;"I";F;#0;$@–;I"+Pubnub::Configuration::DEFAULT_CHANNEL;F;&I"/DEFAULT_CHANNEL = 'hello_world';T;%I"/DEFAULT_CHANNEL = 'hello_world';T;{I"'hello_world';T;'To;~;[[@›i;F;:PERIODIC_TIMER;;;;;[;{;IC;" ;F;@ƒ;0; F;![;[;"I";F;#0;$@–;I"*Pubnub::Configuration::PERIODIC_TIMER;F;&I"#PERIODIC_TIMER = 5;T;%I"#PERIODIC_TIMER = 5;T;{I"5;T;'To;~;[[@›i;F;:RETRYING_TIME;;;;;[;{;IC;" ;F;@;0; F;![;[;"I";F;#0;$@–;I")Pubnub::Configuration::RETRYING_TIME;F;&I"%RETRYING_TIME = 310;T;%I"%RETRYING_TIME = 310;T;{I"310;T;'To;~;[[@›i;F;:MAX_RETRIES;;;;;[;{;IC;" ;F;@;0; F;![;[;"I";F;#0;$@–;I"'Pubnub::Configuration::MAX_RETRIES;F;&I"BMAX_RETRIES = 1.0/PERIODIC_TIMER*RETRYING_TIME;T;%I"BMAX_RETRIES = 1.0/PERIODIC_TIMER*RETRYING_TIME;T;{I"%1.0/PERIODIC_TIMER*RETRYING_TIME;T;'T;u@–;vIC;[;u@–;wIC;[;u@–:@attributesIC:SymbolHash{: classIC;‘{:@symbolize_valueT;IC;‘{;“T;“T: @aliases{: @groups[;[[@›i;F;;|;;;;;[;{;IC;" ;F;@–;0; F;![;[;"I";F;#0;$@;I"Pubnub::Configuration;F;'T: @type: module;u@ ;IC;‘{;’IC;‘{;“T;IC;‘{ ;IC;‘{: read@ : write@;“T;-IC;‘{;˜@-;™@:;“T;/IC;‘{;˜@M;™@Z;“T;1IC;‘{;˜@m;™@z;“T;3IC;‘{;˜@ˆ;™@•;“T;5IC;‘{;˜@¨;™@µ;“T;7IC;‘{;˜@È;™@Õ;“T;9IC;‘{;˜@è;™@õ;“T;;IC;‘{;˜@;™@;“T;=IC;‘{;˜@(;™@5;“T;?IC;‘{;˜@H;™@U;“T;AIC;‘{;˜@h;™@u;“T;CIC;‘{;˜@ˆ;™@•;“T;EIC;‘{;˜@¨;™@µ;“T;GIC;‘{;˜@È;™@Õ;“T;IIC;‘{;˜@è;™@õ;“T;KIC;‘{;˜@;™@;“T;MIC;‘{;˜@(;™@5;“T;OIC;‘{;˜@H;™@U;“T;QIC;‘{;˜@h;™@u;“T;SIC;‘{;˜@ˆ;™@•;“T;UIC;‘{;˜@¨;™@µ;“T;WIC;‘{;˜@È;™@Õ;“T;YIC;‘{;˜@è;™@õ;“T;[IC;‘{;˜@;™@;“T;]IC;‘{;˜@(;™@5;“T;_IC;‘{;˜@H;™@U;“T;“T;“T;”{@×;g;•[;[[@i ;F;: Client;;;;;[;{;IC;" ;F;@ ;0; F;![;[;"I";F;#0;$@;I"Pubnub::Client;F:@superclasso;x ;y0;z0;{0;: Object;$@;}o; ;IC;[o; ; F; ;;;;I"Object#blank?;F;[;[[I"lib/pubnub.rb;Ti%;F;: blank?;;;[;{;IC;" ;F;@æ;0; F;![;[o;) ;*I" return;F;+I";F;0;,[I" Boolean;F;@æ;"I";F;#0;$@ä;%I";def blank? respond_to?(:empty?) ? empty? : !self end;T;&I"def blank?;T;'T;bTo; ; F; ;;;;I"Object#present?;F;[;[[@ëi);F;: present?;;;[;{;IC;" ;F;@ù;0; F;![;[o;) ;*I" return;F;+I";F;0;,[I" Boolean;F;@ù;"I";F;#0;$@ä;%I"def present? !blank? end;T;&I"def present?;T;'T;bT;u@ä;vIC;[;u@ä;wIC;[;u@ä;IC;‘{;’IC;‘{;“T;IC;‘{;“T;“T;”{;•[;[[@ëi$;F;;œ;;;;;[;{;IC;" ;F;@ä;0; F;![;[;"I";F;#0;$@;I" Object;F;›o;x ;y0;z0;{0;:BasicObject;$@;}0;–;’;–;’;'T@–o; ;IC;[o; ; F; ;;;;I"Pubnub::Crypto#initialize;F;[[I"cipher_key;T0;[[I"lib/pubnub/crypto.rb;Ti;F;;a;;;[;{;IC;" ;F;@;0; F;![;[o;) ;*I" return;F;+I"a new instance of Crypto;F;0;,[I" Crypto;F;@;"I";F;#0;$@;%I"¥def initialize(cipher_key) @alg = 'AES-256-CBC' sha256_key = Digest::SHA256.hexdigest(cipher_key) @key = sha256_key.slice(0,32) @iv = '0123456789012345' end;T;&I"def initialize(cipher_key);T;'T;bTo; ; F; ;;;;I"Pubnub::Crypto#encrypt;F;[[I" message;T0;[[@%i;F;: encrypt;;;[;{;IC;" ;F;@3;0; F;![;[;"I";F;#0;$@;%I"ódef encrypt(message) aes = OpenSSL::Cipher::Cipher.new(@alg) aes.encrypt aes.key = @key aes.iv = @iv json_message = Yajl.dump(message) cipher = aes.update(json_message) cipher << aes.final Base64.strict_encode64(cipher) end;T;&I"def encrypt(message);T;'T;bTo; ; F; ;;;;I"Pubnub::Crypto#decrypt;F;[[I"cipher_text;T0;[[@%i!;F;: decrypt;;;[;{;IC;" ;F;@B;0; F;![;[;"I";F;#0;$@;%I"Ñdef decrypt(cipher_text) decode_cipher = OpenSSL::Cipher::Cipher.new(@alg) decode_cipher.decrypt decode_cipher.key = @key decode_cipher.iv = @iv plain_text = '' begin undecoded_text = Base64.decode64(cipher_text) plain_text = decode_cipher.update(undecoded_text) plain_text << decode_cipher.final rescue return 'DECRYPTION_ERROR' end begin Yajl.load(plain_text) rescue return 'PARSE DECRYPTION MESSAGE ERROR' end end;T;&I"def decrypt(cipher_text);T;'T;bT;u@;vIC;[;u@;wIC;[;u@;IC;‘{;’IC;‘{;“T;IC;‘{;“T;“T;”{;•[;[[@%i;F;: Crypto;;;;;[;{;IC;" ;F;@;0; F;![;[;"I";F;#0;$@;I"Pubnub::Crypto;F;›o;x ;y0;z0;{0;;œ;$@;}@ä;–;’;'To; ;IC;[ o; ;IC;[;u@d;vIC;[;u@d;wIC;[;u@d;IC;‘{;’IC;‘{;“T;IC;‘{;“T;“T;”{;•[;[[I"lib/pubnub/error.rb;Ti;F;:PresenceError;;;;;[;{;IC;" ;F;@d;0; F;![;[;"I";F;#0;$@b;I"!Pubnub::Error::PresenceError;F;›o;x ;y0;z0;{0;:RuntimeError;$@b;}0;–;’;'To; ;IC;[;u@x;vIC;[;u@x;wIC;[;u@x;IC;‘{;’IC;‘{;“T;IC;‘{;“T;“T;”{;•[;[[@oi [@oi;F;:PublishError;;;;;[;{;IC;" ;F;@x;0; F;![;[;"I";F;#0;$@b;I" Pubnub::Error::PublishError;F;›o;x ;y0;z0;{0;;¤;$@b;}0;–;’;'To; ;IC;[;u@Œ;vIC;[;u@Œ;wIC;[;u@Œ;IC;‘{;’IC;‘{;“T;IC;‘{;“T;“T;”{;•[;[[@oi ;F;:SubscribeError;;;;;[;{;IC;" ;F;@Œ;0; F;![;[;"I";F;#0;$@b;I""Pubnub::Error::SubscribeError;F;›o;x ;y0;z0;{0;;¤;$@b;}0;–;’;'To; ;IC;[;u@Ÿ;vIC;[;u@Ÿ;wIC;[;u@Ÿ;IC;‘{;’IC;‘{;“T;IC;‘{;“T;“T;”{;•[;[[@oi;F;:InitError;;;;;[;{;IC;" ;F;@Ÿ;0; F;![;[;"I";F;#0;$@b;I"Pubnub::Error::InitError;F;›o;x ;y0;z0;{0;;¤;$@b;}0;–;’;'To; ;IC;[o; ; F; ;;;;I"6Pubnub::Error::OperationError#operation_exception;F;[;[[@oi;F;:operation_exception;;;[;{;IC;" ;F;@´;0; F;![;[;"I";F;#0;$@²;%I"©def operation_exception #if @operation.present? # ("Pubnub::" + @operation.to_s.capitalize + "Error").constantize #else PubnubRequest::RequestError #end end;T;&I"def operation_exception;T;'T;bT;u@²;vIC;[;u@²;wIC;[;u@²;IC;‘{;’IC;‘{;“T;IC;‘{;“T;“T;”{;•[;[[@oi;F;:OperationError;;;;;[;{;IC;" ;F;@²;0; F;![;[;"I";F;#0;$@b;I""Pubnub::Error::OperationError;F;›o;x ;y0;z0;{0;;¤;$@b;}0;–;’;'T;u@b;vIC;[;u@b;wIC;[;u@b;IC;‘{;’IC;‘{;“T;IC;‘{;“T;“T;”{;•[;[[@oi;F;: Error;;;;;[;{;IC;" ;F;@b;0; F;![;[;"I";F;#0;$@;I"Pubnub::Error;F;'To; ; F; ;’;;;I"Pubnub.new;F;[[I" options;TI"{};T;[[@ëi=;F;:new;;;[;{;IC;" ;F;@â;0; F;![;[;"I";F;#0;$@;%I"ëdef new(options = {}) #raise(Pubnub::Error::InitError, 'Initialize with either a hash of options, or exactly 5 named parameters.') unless args.size == 5 or (args.size == 1 and args[0].class == Hash) Pubnub::Client.new(options) end;T;&I"def new(options = {});T;'T;bTo; ;IC;[,o; ; F; ;;;;I"Pubnub::Request#envelopes;F;[;[[I"lib/pubnub/request.rb;Ti;F;:envelopes;;;[;{;IC;"-Returns the value of attribute envelopes ;F;@ô;0; F;![;[;"I"-Returns the value of attribute envelopes;F;#0;$@ò;%I"#def envelopes @envelopes end;F;&I"def envelopes;F;'To; ; F; ;;;;I"Pubnub::Request#envelopes=;F;[[I" value;F0;[[@ùi;F;:envelopes=;;;[;{;IC;"!Sets the attribute envelopes ;F;@;0; F;![;[o;) ;*I" param;F;+I"1the value to set the attribute envelopes to.;F;I" value;F;,0;@;"I"[Sets the attribute envelopes @param value the value to set the attribute envelopes to.;F;#0;$@ò;%I"3def envelopes=(value) @envelopes = value end;F;&I"def envelopes=(value);F;'To; ; F; ;;;;I"Pubnub::Request#port;F;[;[[@ùi;F;;K;;;[;{;IC;"(Returns the value of attribute port ;F;@;0; F;![;[;"I"(Returns the value of attribute port;F;#0;$@ò;%I"def port @port end;F;&I" def port;F;'To; ; F; ;;;;I"Pubnub::Request#port=;F;[[I" value;F0;[[@ùi;F;;L;;;[;{;IC;"Sets the attribute port ;F;@";0; F;![;[o;) ;*I" param;F;+I",the value to set the attribute port to.;F;I" value;F;,0;@";"I"QSets the attribute port @param value the value to set the attribute port to.;F;#0;$@ò;%I")def port=(value) @port = value end;F;&I"def port=(value);F;'To; ; F; ;;;;I"Pubnub::Request#timetoken;F;[;[[@ùi;F;;5;;;[;{;IC;"-Returns the value of attribute timetoken ;F;@5;0; F;![;[;"I"-Returns the value of attribute timetoken;F;#0;$@ò;%I"#def timetoken @timetoken end;F;&I"def timetoken;F;'To; ; F; ;;;;I"Pubnub::Request#timetoken=;F;[[I" value;F0;[[@ùi;F;;6;;;[;{;IC;"!Sets the attribute timetoken ;F;@B;0; F;![;[o;) ;*I" param;F;+I"1the value to set the attribute timetoken to.;F;I" value;F;,0;@B;"I"[Sets the attribute timetoken @param value the value to set the attribute timetoken to.;F;#0;$@ò;%I"3def timetoken=(value) @timetoken = value end;F;&I"def timetoken=(value);F;'To; ; F; ;;;;I"Pubnub::Request#operation;F;[;[[@ùi;F;;9;;;[;{;IC;"-Returns the value of attribute operation ;F;@U;0; F;![;[;"I"-Returns the value of attribute operation;F;#0;$@ò;%I"#def operation @operation end;F;&I"def operation;F;'To; ; F; ;;;;I"Pubnub::Request#operation=;F;[[I" value;F0;[[@ùi;F;;:;;;[;{;IC;"!Sets the attribute operation ;F;@b;0; F;![;[o;) ;*I" param;F;+I"1the value to set the attribute operation to.;F;I" value;F;,0;@b;"I"[Sets the attribute operation @param value the value to set the attribute operation to.;F;#0;$@ò;%I"3def operation=(value) @operation = value end;F;&I"def operation=(value);F;'To; ; F; ;;;;I"Pubnub::Request#response;F;[;[[@ùi;F;;3;;;[;{;IC;",Returns the value of attribute response ;F;@u;0; F;![;[;"I",Returns the value of attribute response;F;#0;$@ò;%I"!def response @response end;F;&I"def response;F;'To; ; F; ;;;;I"Pubnub::Request#response=;F;[[I" value;F0;[[@ùi;F;;4;;;[;{;IC;" Sets the attribute response ;F;@‚;0; F;![;[o;) ;*I" param;F;+I"0the value to set the attribute response to.;F;I" value;F;,0;@‚;"I"YSets the attribute response @param value the value to set the attribute response to.;F;#0;$@ò;%I"1def response=(value) @response = value end;F;&I"def response=(value);F;'To; ; F; ;;;;I"Pubnub::Request#ssl;F;[;[[@ùi;F;;I;;;[;{;IC;"'Returns the value of attribute ssl ;F;@•;0; F;![;[;"I"'Returns the value of attribute ssl;F;#0;$@ò;%I"def ssl @ssl end;F;&I" def ssl;F;'To; ; F; ;;;;I"Pubnub::Request#ssl=;F;[[I"ssl;T0;[[@ùi[@ùi0;F;;J;;;[;{;IC;"Sets the attribute ssl ;F;@¢;0; F;![;[o;) ;*I" param;F;+I"+the value to set the attribute ssl to.;F;I" value;F;,0;@¢;"I"OSets the attribute ssl @param value the value to set the attribute ssl to.;F;#0;$@ò;%I"'def ssl=(value) @ssl = value end;F;&I"def ssl=(ssl);F;'T;bTo; ; F; ;;;;I"Pubnub::Request#channel;F;[;[[@ùi;F;;C;;;[;{;IC;"+Returns the value of attribute channel ;F;@¶;0; F;![;[;"I"+Returns the value of attribute channel;F;#0;$@ò;%I"def channel @channel end;F;&I"def channel;F;'To; ; F; ;;;;I"Pubnub::Request#channel=;F;[[I" value;F0;[[@ùi;F;;D;;;[;{;IC;"Sets the attribute channel ;F;@Ã;0; F;![;[o;) ;*I" param;F;+I"/the value to set the attribute channel to.;F;I" value;F;,0;@Ã;"I"WSets the attribute channel @param value the value to set the attribute channel to.;F;#0;$@ò;%I"/def channel=(value) @channel = value end;F;&I"def channel=(value);F;'To; ; F; ;;;;I"Pubnub::Request#callback;F;[;[[@ùi;F;;;;;;[;{;IC;",Returns the value of attribute callback ;F;@Ö;0; F;![;[;"I",Returns the value of attribute callback;F;#0;$@ò;%I"!def callback @callback end;F;&I"def callback;F;'To; ; F; ;;;;I"Pubnub::Request#callback=;F;[[I" value;F0;[[@ùi;F;;<;;;[;{;IC;" Sets the attribute callback ;F;@ã;0; F;![;[o;) ;*I" param;F;+I"0the value to set the attribute callback to.;F;I" value;F;,0;@ã;"I"YSets the attribute callback @param value the value to set the attribute callback to.;F;#0;$@ò;%I"1def callback=(value) @callback = value end;F;&I"def callback=(value);F;'To; ; F; ;;;;I"Pubnub::Request#cipher_key;F;[;[[@ùi;F;;-;;;[;{;IC;".Returns the value of attribute cipher_key ;F;@ö;0; F;![;[;"I".Returns the value of attribute cipher_key;F;#0;$@ò;%I"%def cipher_key @cipher_key end;F;&I"def cipher_key;F;'To; ; F; ;;;;I" Pubnub::Request#cipher_key=;F;[[I" value;F0;[[@ùi;F;;.;;;[;{;IC;""Sets the attribute cipher_key ;F;@;0; F;![;[o;) ;*I" param;F;+I"2the value to set the attribute cipher_key to.;F;I" value;F;,0;@;"I"]Sets the attribute cipher_key @param value the value to set the attribute cipher_key to.;F;#0;$@ò;%I"5def cipher_key=(value) @cipher_key = value end;F;&I"def cipher_key=(value);F;'To; ; F; ;;;;I""Pubnub::Request#subscribe_key;F;[;[[@ùi;F;;?;;;[;{;IC;"1Returns the value of attribute subscribe_key ;F;@;0; F;![;[;"I"1Returns the value of attribute subscribe_key;F;#0;$@ò;%I"+def subscribe_key @subscribe_key end;F;&I"def subscribe_key;F;'To; ; F; ;;;;I"#Pubnub::Request#subscribe_key=;F;[[I" value;F0;[[@ùi;F;;@;;;[;{;IC;"%Sets the attribute subscribe_key ;F;@#;0; F;![;[o;) ;*I" param;F;+I"5the value to set the attribute subscribe_key to.;F;I" value;F;,0;@#;"I"cSets the attribute subscribe_key @param value the value to set the attribute subscribe_key to.;F;#0;$@ò;%I";def subscribe_key=(value) @subscribe_key = value end;F;&I"def subscribe_key=(value);F;'To; ; F; ;;;;I"Pubnub::Request#secret_key;F;[;[[@ùi;F;;A;;;[;{;IC;".Returns the value of attribute secret_key ;F;@6;0; F;![;[;"I".Returns the value of attribute secret_key;F;#0;$@ò;%I"%def secret_key @secret_key end;F;&I"def secret_key;F;'To; ; F; ;;;;I" Pubnub::Request#secret_key=;F;[[I" value;F0;[[@ùi;F;;B;;;[;{;IC;""Sets the attribute secret_key ;F;@C;0; F;![;[o;) ;*I" param;F;+I"2the value to set the attribute secret_key to.;F;I" value;F;,0;@C;"I"]Sets the attribute secret_key @param value the value to set the attribute secret_key to.;F;#0;$@ò;%I"5def secret_key=(value) @secret_key = value end;F;&I"def secret_key=(value);F;'To; ; F; ;;;;I"Pubnub::Request#message;F;[;[[@ùi;F;;G;;;[;{;IC;"+Returns the value of attribute message ;F;@V;0; F;![;[;"I"+Returns the value of attribute message;F;#0;$@ò;%I"def message @message end;F;&I"def message;F;'To; ; F; ;;;;I"Pubnub::Request#message=;F;[[I" value;F0;[[@ùi;F;;H;;;[;{;IC;"Sets the attribute message ;F;@c;0; F;![;[o;) ;*I" param;F;+I"/the value to set the attribute message to.;F;I" value;F;,0;@c;"I"WSets the attribute message @param value the value to set the attribute message to.;F;#0;$@ò;%I"/def message=(value) @message = value end;F;&I"def message=(value);F;'To; ; F; ;;;;I" Pubnub::Request#publish_key;F;[;[[@ùi;F;;=;;;[;{;IC;"/Returns the value of attribute publish_key ;F;@v;0; F;![;[;"I"/Returns the value of attribute publish_key;F;#0;$@ò;%I"'def publish_key @publish_key end;F;&I"def publish_key;F;'To; ; F; ;;;;I"!Pubnub::Request#publish_key=;F;[[I" value;F0;[[@ùi;F;;>;;;[;{;IC;"#Sets the attribute publish_key ;F;@ƒ;0; F;![;[o;) ;*I" param;F;+I"3the value to set the attribute publish_key to.;F;I" value;F;,0;@ƒ;"I"_Sets the attribute publish_key @param value the value to set the attribute publish_key to.;F;#0;$@ò;%I"7def publish_key=(value) @publish_key = value end;F;&I"def publish_key=(value);F;'To; ; F; ;;;;I"Pubnub::Request#initialize;F;[[I" options;TI"{};T;[[@ùi;F;;a;;;[;{;IC;" ;F;@–;0; F;![;[o;) ;*I" return;F;+I"a new instance of Request;F;0;,[I" Request;F;@–;"I";F;#0;$@ò;%I"def initialize(options = {}) @options = options @params = options[:params] @operation = options[:operation] @callback = options[:callback] @channel = options[:channel] @message = options[:message] @timetoken = options[:timetoken] || "0" @timetoken = options[:override_timetoken] if options[:override_timetoken] @ssl = options[:ssl] @params = options[:params] @history_limit = options[:limit] @port = options[:port] @host = options[:origin] @query = options[:query] set_cipher_key(options, @cipher_key) if %w(publish subscribe history).include? @operation set_message(options, @cipher_key) if %w(publish).include? @operation set_publish_key(options, @publish_key) if %w(publish).include? @operation set_subscribe_key(options, @subscribe_key) if %w(publish presence here_now history subscribe leave).include? @operation set_secret_key(options, @secret_key) if %w(publish subscribe).include? @operation end;T;&I"!def initialize(options = {});T;'T;bTo; ; F; ;;;;I"Pubnub::Request#origin;F;[;[[@ùi:;F;;];;;[;{;IC;" ;F;@«;0; F;![;[;"I";F;#0;$@ò;%I"def origin if @ssl @origin = 'https://' + @host @port = 443 else @origin = 'http://' + @host @port = 80 end @origin end;T;&I"def origin;T;'T;bTo; ; F; ;;;;I"Pubnub::Request#path;F;[;[[@ùiE;F;: path;;;[;{;IC;" ;F;@¸;0; F;![;[;"I";F;#0;$@ò;%I"Jdef path encode_path(case @operation when 'publish' [ @operation, @publish_key, @subscribe_key, @secret_key, @channel, '0', @message.to_json ] when 'subscribe' [ @operation, @subscribe_key, @channel, '0', @timetoken ] when 'presence' [ 'subscribe', @subscribe_key, @channel.to_s + '-pnpres', '0', @timetoken ] when 'time' [ @operation, '0' ] when 'history' [ 'v2', 'history', 'sub-key', @subscribe_key, 'channel', @channel ] when 'here_now' [ 'v2', 'presence', 'sub-key', @subscribe_key, 'channel', @channel ] when 'leave' [ 'v2', 'presence', 'sub-key', @subscribe_key, 'channel', @channel ] else raise("I can't create that URL for you due to unknown operation type.") end ) end;T;&I" def path;T;'T;bTo; ; F; ;;;;I" Pubnub::Request#encode_path;F;[[I" request;T0;[[@ùi‚;F;:encode_path;;;[;{;IC;" ;F;@Å;0; F;![;[;"I";F;#0;$@ò;%I"°def encode_path(request) path = URI.encode('/' + request.map{|i| i.to_s}.reject(&:empty?).join('/')) if @operation == 'leave' "#{path}/leave" else path end end;T;&I"def encode_path(request);T;'T;bTo; ; F; ;;;;I"Pubnub::Request#params;F;[;[[@ùiŒ;F;: params;;;[;{;IC;" ;F;@Ô;0; F;![;[;"I";F;#0;$@ò;%I"def params flat = {} @params.each do |param,val| next if val.to_s.empty? flat[param.to_s] = val.to_s end flat end;T;&I"def params;T;'T;bTo; ; F; ;;;;I"Pubnub::Request#query;F;[;[[@ùi•;F;;1;;;[;{;IC;" ;F;@á;0; F;![;[;"I";F;#0;$@ò;%I"cdef query params.map do |param, value| [param, value].join('=') end.sort.join('&') end;T;&I"def query;T;'T;bTo; ; F; ;;;;I"$Pubnub::Request#handle_response;F;[[I" http;T0;[[@ùi›;F;:handle_response;;;[;{;IC;" ;F;@î;0; F;![;[;"I";F;#0;$@ò;%I"£def handle_response(http) @response = nil if http.respond_to?(:body) && http.respond_to?(:code) && http.respond_to?(:message) && http.respond_to?(:headers) # httparty @response = Yajl.load(http.body) else # em-http-request @response = http.response.respond_to?(:content) ? Yajl.load(http.response.content) : Yajl.load(http.response) end @last_timetoken = @timetoken @timetoken = @response[1] unless @operation == 'time' if self.cipher_key.present? && %w(subscribe history).include?(@operation) response_array = Array.new crypto = Pubnub::Crypto.new(@cipher_key) if %w(subscribe history).include?(@operation) iteration = @response[0] else iteration = @response end iteration.each do |msg| response_array << crypto.decrypt(msg) end if iteration case @operation when 'subscribe' @response[0] = response_array when 'history' json_response_data = Yajl.load(http.response) @response = [response_array, json_response_data[1], json_response_data[2]] end end @envelopes = Array.new if %w(subscribe history).include? @operation @response.first.each_with_index do |res,index| @envelopes << Pubnub::Response.new(:http => http, :index => index, :response => @response) end else @envelopes << Pubnub::Response.new(:http => http, :channel => @channel, :response => @response, :operation => @operation) end end;T;&I"def handle_response(http);T;'T;bTo; ; F; ;;;l;I" Pubnub::Request#aes_encrypt;F;[[I"cipher_key;T0[I" options;T0[I"publish_request;T0;[[@ùiÍ;F;:aes_encrypt;;;[;{;IC;" ;F;@ý;0; F;![;[;"I";F;#0;$@ò;%I"›def aes_encrypt(cipher_key, options, publish_request) pc = Pubnub::Crypto.new(cipher_key) publish_request.message = pc.encrypt(options[:message]) end;T;&I":def aes_encrypt(cipher_key, options, publish_request);T;'T;bTo; ; F; ;;;l;I"#Pubnub::Request#set_cipher_key;F;[[I" options;T0[I"self_cipher_key;T0;[[@ùiÔ;F;:set_cipher_key;;;[;{;IC;" ;F;@ ;0; F;![;[;"I";F;#0;$@ò;%I"def set_cipher_key(options, self_cipher_key) if self_cipher_key.present? && options[:cipher_key].present? raise(OperationError, "existing cipher_key #{self_cipher_key} cannot be overridden at publish-time.") elsif (self_cipher_key.present? && options[:cipher_key].blank?) || (self_cipher_key.blank? && options[:cipher_key].present?) this_cipher_key = self_cipher_key || options[:cipher_key] raise(OperationError, 'secret key must be a string.') if this_cipher_key.class != String @cipher_key = this_cipher_key end end;T;&I"1def set_cipher_key(options, self_cipher_key);T;'T;bTo; ; F; ;;;l;I"#Pubnub::Request#set_secret_key;F;[[I" options;T0[I"self_secret_key;T0;[[@ùià;F;:set_secret_key;;;[;{;IC;" ;F;@! ;0; F;![;[;"I";F;#0;$@ò;%I".def set_secret_key(options, self_secret_key) if self_secret_key.present? && options[:secret_key].present? raise(OperationError, "existing secret_key #{self_secret_key} cannot be overridden at publish-time.") elsif (self_secret_key.present? && options[:secret_key].blank?) || (self_secret_key.blank? && options[:secret_key].present?) my_secret_key = self_secret_key || options[:secret_key] raise(OperationError, 'secret key must be a string.') if my_secret_key.class != String signature = '{ @publish_key, @subscribe_key, @secret_key, channel, message}' digest = OpenSSL::Digest.new('sha256') key = [my_secret_key] hmac = OpenSSL::HMAC.hexdigest(digest, key.pack('H*'), signature) @secret_key = hmac else @secret_key = '0' end end;T;&I"1def set_secret_key(options, self_secret_key);T;'T;bTo; ; F; ;;;l;I" Pubnub::Request#set_message;F;[[I" options;T0[I"self_cipher_key;T0;[[@ùió;F;:set_message;;;[;{;IC;" ;F;@2 ;0; F;![;[;"I";F;#0;$@ò;%I"{def set_message(options, self_cipher_key) if options[:message].blank? && options[:message] != '' raise(OperationError, 'message is a required parameter.') else my_cipher_key = options[:cipher_key] || self_cipher_key if my_cipher_key.present? @message = aes_encrypt(my_cipher_key, options, self) else @message = options[:message] end end end;T;&I".def set_message(options, self_cipher_key);T;'T;bTo; ; F; ;;;l;I"$Pubnub::Request#set_publish_key;F;[[I" options;T0[I"self_publish_key;T0;[[@ùi;F;:set_publish_key;;;[;{;IC;" ;F;@C ;0; F;![;[;"I";F;#0;$@ò;%I"²def set_publish_key(options, self_publish_key) if options[:publish_key].blank? && self_publish_key.blank? raise(OperationError, 'publish_key is a required parameter.') elsif self_publish_key.present? && options[:publish_key].present? raise(OperationError, "existing publish_key #{self_publish_key} cannot be overridden at publish-time.") else @publish_key = (self_publish_key || options[:publish_key]).to_s end end;T;&I"3def set_publish_key(options, self_publish_key);T;'T;bTo; ; F; ;;;l;I"&Pubnub::Request#set_subscribe_key;F;[[I" options;T0[I"self_subscribe_key;T0;[[@ùi ;F;:set_subscribe_key;;;[;{;IC;" ;F;@T ;0; F;![;[;"I";F;#0;$@ò;%I"Ìdef set_subscribe_key(options, self_subscribe_key) if options[:subscribe_key].blank? && self_subscribe_key.blank? raise(OperationError, 'subscribe_key is a required parameter.') elsif self_subscribe_key.present? && options[:subscribe_key].present? raise(OperationError, "existing subscribe_key #{self_subscribe_key} cannot be overridden at subscribe-time.") else @subscribe_key = (self_subscribe_key || options[:subscribe_key]).to_s end end;T;&I"7def set_subscribe_key(options, self_subscribe_key);T;'T;bT;u@ò;vIC;[;u@ò;wIC;[o;x ;y0;zI"Pubnub::Error;T;{@ò;;ª;$@;}@b;–;—o;x ;y0;zI"Pubnub::Configuration;T;{@ò;;|;$@;}@–;–;—;u@ò;IC;‘{;’IC;‘{;“T;IC;‘{;¬IC;‘{;˜@ô;™@;“T;KIC;‘{;˜@;™@";“T;5IC;‘{;˜@5;™@B;“T;9IC;‘{;˜@U;™@b;“T;3IC;‘{;˜@u;™@‚;“T;IIC;‘{;˜@•;™@¢;“T;CIC;‘{;˜@¶;™@Ã;“T;;IC;‘{;˜@Ö;™@ã;“T;-IC;‘{;˜@ö;™@;“T;?IC;‘{;˜@;™@#;“T;AIC;‘{;˜@6;™@C;“T;GIC;‘{;˜@V;™@c;“T;=IC;‘{;˜@v;™@ƒ;“T;“T;“T;”{;•[;[[@ùi;F;: Request;;;;;[;{;IC;" ;F;@ò;0; F;![;[;"I";F;#0;$@;I"Pubnub::Request;F;›o;x ;y0;z0;{0;;œ;$@;}@ä;–0;'To; ;IC;[o; ; F; ;;;;I"Pubnub::Response#message;F;[;[[I"lib/pubnub/response.rb;Ti;F;;G;;;[;{;IC;"+Returns the value of attribute message ;F;@‰ ;0; F;![;[;"I"+Returns the value of attribute message;F;#0;$@‡ ;%I"def message @message end;F;&I"def message;F;'To; ; F; ;;;;I"Pubnub::Response#channel;F;[;[[@Ž i;F;;C;;;[;{;IC;"+Returns the value of attribute channel ;F;@— ;0; F;![;[;"I"+Returns the value of attribute channel;F;#0;$@‡ ;%I"def channel @channel end;F;&I"def channel;F;'To; ; F; ;;;;I"Pubnub::Response#timetoken;F;[;[[@Ž i;F;;5;;;[;{;IC;"-Returns the value of attribute timetoken ;F;@¤ ;0; F;![;[;"I"-Returns the value of attribute timetoken;F;#0;$@‡ ;%I"#def timetoken @timetoken end;F;&I"def timetoken;F;'To; ; F; ;;;;I"!Pubnub::Response#status_code;F;[;[[@Ž i;F;:status_code;;;[;{;IC;"/Returns the value of attribute status_code ;F;@± ;0; F;![;[;"I"/Returns the value of attribute status_code;F;#0;$@‡ ;%I"'def status_code @status_code end;F;&I"def status_code;F;'To; ; F; ;;;;I"Pubnub::Response#response;F;[;[[@Ž i;F;;3;;;[;{;IC;",Returns the value of attribute response ;F;@¾ ;0; F;![;[;"I",Returns the value of attribute response;F;#0;$@‡ ;%I"!def response @response end;F;&I"def response;F;'To; ; F; ;;;;I"Pubnub::Response#msg;F;[;[[@Ž i;F;:msg;;;[;{;IC;"+Returns the value of attribute message;F;@Ë ;0; F;![;[;"I",Returns the value of attribute message ;F;#0;i0;$@‡ ;%I"def message @message end;F;&@– ;'To; ; F; ;;;;I" Pubnub::Response#initialize;F;[[I" options;TI"{};T;[[@Ž i;T;;a;;;[;{;IC;"²Creates Pubnub::Response object based on options hash Sets @message, @channel, @timetoken, @status_code, :response attributes To properly init new response object it need :http, :response, :channel options While you pass :index option it will treat :response as array which size is greater than one In case you want create your custom error response, you have to pass :error_init option with true value and :message with your message ;F;![;[o;) ;*I" return;F;+I"a new instance of Response;F;0;,[I" Response;F;@× ;"I"Creates Pubnub::Response object based on options hash Sets @message, @channel, @timetoken, @status_code, :response attributes @message contains usable single message for callback @channel contains channel which was used in request @timetoken contains server timetoken @status_code contains status code of server response @response contains whole server response body which was used to build that Pubnub::Response @headers contains whole server response headers To properly init new response object it need :http, :response, :channel options While you pass :index option it will treat :response as array which size is greater than one In case you want create your custom error response, you have to pass :error_init option with true value and :message with your message;T;#0;@× ; F;io: Range: exclF: begini :endi;$@‡ ;%I" def initialize(options = {}) if options[:error_init] @message = options[:message] @timetoken = 0 else if options[:http].respond_to?(:body) && options[:http].respond_to?(:code) && options[:http].respond_to?(:message) && options[:http].respond_to?(:headers) # httparty @message = options[:response] @timetoken = options[:response] @status_code = options[:http].response.code @headers = options[:http].headers.inspect else @message = options[:index] ? options[:response][0][options[:index]] : options[:response][0] if options[:response][2] @channel = options[:index] ? options[:response][2][options[:index]] : options[:channel] else @channel = options[:channel] end @timetoken = options[:response][1] @status_code = options[:http].response_header.status.to_i @headers = options[:http].response_header end if options[:http].respond_to?(:body) && options[:http].respond_to?(:code) && options[:http].respond_to?(:message) && options[:http].respond_to?(:headers) # httparty @response = options[:http].body else @response = options[:http].response end end end;T;&I"!def initialize(options = {});T;'T;bTo; ; F; ;;;;I"Pubnub::Response#==;F;[[I" other;T0;[[@Ž i7;T;:==;;;[;{;IC;"[Simple compare to other object basing on string representation of response (see #to_s) ;F;![;[;"I"[Simple compare to other object basing on string representation of response (see #to_s);T;#0;@í ; F;io;»;¼F;½i5;¾i6;$@‡ ;%I"0def ==(other) @response == other.to_s end;T;&I"def ==(other);T;'T;bTo; ; F; ;;;;I"Pubnub::Response#to_s;F;[;[[@Ž i<;T;: to_s;;;[;{;IC;"Returns @response.to_s ;F;![;[;"I"Returns @response.to_s;T;#0;@ý ; F;io;»;¼F;½i;;¾i;;$@‡ ;%I""def to_s @response.to_s end;T;&I" def to_s;T;'T;bT;u@‡ ;vIC;[;u@‡ ;wIC;[;u@‡ ;IC;‘{;’IC;‘{;“T;IC;‘{ ;GIC;‘{;˜@‰ ;™0;“T;CIC;‘{;˜@— ;™0;“T;5IC;‘{;˜@¤ ;™0;“T;¹IC;‘{;˜@± ;™0;“T;3IC;‘{;˜@¾ ;™0;“T;“T;“T;”{@Ë ;G;•[;[[@Ž i;F;: Response;;;;;[;{;IC;" ;F;@‡ ;0; F;![;[;"I";F;#0;$o;x ;y0;z0;{0;: Pubnub;$@;}@;–0;I"Pubnub::Response;F;›o;x ;y0;z0;{0;;œ;$@;}@ä;–0;u@;vIC;[o;x ;y0;z0;{0;;|;$@;}@–;–;—;u@;wIC;[o;x ;y0;z0;{0;;ª;$@;}@b;–;—;u@;IC;‘{;’IC;‘{;“T;IC;‘{;“T;“T;”{;•[;[ [@i [@›i[@%i[I"lib/pubnub/daemon.rb;Ti[@oi[@ëi8[@ùi;F;;Â;;;;;[;{;IC;" ;F;@;0; F;![;[;"I";F;#0;$@;I" Pubnub;Fo; ;IC;[o; ;IC;[ o; ;IC;[o;~;[[I"lib/pubnub/em/client.rb;Ti ;F;:CALLBACKS;;;;;[;{;IC;" ;F;@A ;0; F;![;[;"I";F;#0;$@? ;I",EventMachine::Pubnub::Client::CALLBACKS;F;&I"CALLBACKS = [;T;%I"(CALLBACKS = [ :no_data_callback ];T;{I"[ :no_data_callback ];T;'To; ; F; ;;;;I",EventMachine::Pubnub::Client#connection;F;[;[[@D i;F;:connection;;;[;{;IC;".Returns the value of attribute connection ;F;@O ;0; F;![;[;"I".Returns the value of attribute connection;F;#0;$@? ;%I"%def connection @connection end;F;&I"def connection;F;'To; ; F; ;;;;I"-EventMachine::Pubnub::Client#connection=;F;[[I" value;F0;[[@D i;F;:connection=;;;[;{;IC;""Sets the attribute connection ;F;@\ ;0; F;![;[o;) ;*I" param;F;+I"2the value to set the attribute connection to.;F;I" value;F;,0;@\ ;"I"]Sets the attribute connection @param value the value to set the attribute connection to.;F;#0;$@? ;%I"5def connection=(value) @connection = value end;F;&I"def connection=(value);F;'To; ; F; ;;;;I")EventMachine::Pubnub::Client#options;F;[;[[@D i;F;: options;;;[;{;IC;"+Returns the value of attribute options ;F;@o ;0; F;![;[;"I"+Returns the value of attribute options;F;#0;$@? ;%I"def options @options end;F;&I"def options;F;'To; ; F; ;;;;I"*EventMachine::Pubnub::Client#options=;F;[[I" value;F0;[[@D i;F;: options=;;;[;{;IC;"Sets the attribute options ;F;@| ;0; F;![;[o;) ;*I" param;F;+I"/the value to set the attribute options to.;F;I" value;F;,0;@| ;"I"WSets the attribute options @param value the value to set the attribute options to.;F;#0;$@? ;%I"/def options=(value) @options = value end;F;&I"def options=(value);F;'To; ; F; ;;;;I"&EventMachine::Pubnub::Client#host;F;[;[[@D i;F;;/;;;[;{;IC;"(Returns the value of attribute host ;F;@ ;0; F;![;[;"I"(Returns the value of attribute host;F;#0;$@? ;%I"def host @host end;F;&I" def host;F;'To; ; F; ;;;;I"'EventMachine::Pubnub::Client#host=;F;[[I" value;F0;[[@D i;F;;0;;;[;{;IC;"Sets the attribute host ;F;@œ ;0; F;![;[o;) ;*I" param;F;+I",the value to set the attribute host to.;F;I" value;F;,0;@œ ;"I"QSets the attribute host @param value the value to set the attribute host to.;F;#0;$@? ;%I")def host=(value) @host = value end;F;&I"def host=(value);F;'To; ; F; ;;;;I"&EventMachine::Pubnub::Client#port;F;[;[[@D i;F;;K;;;[;{;IC;"(Returns the value of attribute port ;F;@¯ ;0; F;![;[;"I"(Returns the value of attribute port;F;#0;$@? ;%I"def port @port end;F;&I" def port;F;'To; ; F; ;;;;I"'EventMachine::Pubnub::Client#port=;F;[[I" value;F0;[[@D i;F;;L;;;[;{;IC;"Sets the attribute port ;F;@¼ ;0; F;![;[o;) ;*I" param;F;+I",the value to set the attribute port to.;F;I" value;F;,0;@¼ ;"I"QSets the attribute port @param value the value to set the attribute port to.;F;#0;$@? ;%I")def port=(value) @port = value end;F;&I"def port=(value);F;'To; ; F; ;’;;;I")EventMachine::Pubnub::Client.connect;F;[[I" options;TI"{};T;[[@D i;F;: connect;;;[;{;IC;" ;F;@Ï ;0; F;![;[;"I";F;#0;$@? ;%I"_def self.connect(options = {}) new(options).tap do |client| client.connect end end;T;&I"#def self.connect(options = {});T;'T;bTo; ; F; ;;;;I",EventMachine::Pubnub::Client#initialize;F;[[I" options;TI"{};T;[[@D i;F;;a;;;[;{;IC;" ;F;@ß ;0; F;![;[o;) ;*I" return;F;+I"a new instance of Client;F;0;,[I" Client;F;@ß ;"I";F;#0;$@? ;%I"def initialize(options = {}) @options = DEFAULT_CONNECTION_OPTIONS.merge(options) @options[:host] = DEFAULT_CONNECTION_OPTIONS[:host] if @options[:host].to_s.empty? validate_client @host = @options[:host] @port = @options[:port] @connection = nil end;T;&I"!def initialize(options = {});T;'T;bTo; ; F; ;;;;I")EventMachine::Pubnub::Client#connect;F;[;[[@D i';F;;È;;;[;{;IC;" ;F;@ô ;0; F;![;[;"I";F;#0;$@? ;%I"]def connect @connection = EM.connect(@host, @port, Connection, self, @host, @port) end;T;&I"def connect;T;'T;bTo; ; F; ;;;;I"&EventMachine::Pubnub::Client#each;F;[[I" &block;F0;[[@D i+;F;: each;;;[;{;IC;" ;F;@ ;0; F;![;[;"I";F;#0;$@? ;%I"7def each(&block) @each_item_callback = block end;T;&I"def each(&block);T;'T;bTo; ; F; ;;;;I"*EventMachine::Pubnub::Client#on_error;F;[[I" &block;F0;[[@D i/;F;: on_error;;;[;{;IC;" ;F;@ ;0; F;![;[;"I";F;#0;$@? ;%I"7def on_error(&block) @error_callback = block end;T;&I"def on_error(&block);T;'T;bTo; ; F; ;;;;I"4EventMachine::Pubnub::Client#on_no_data_recived;F;[[I" &block;F0;[[@D i3;F;:on_no_data_recived;;;[;{;IC;" ;F;@ ;0; F;![;[;"I";F;#0;$@? ;%I"Cdef on_no_data_recived(&block) @no_data_callback = block end;T;&I"#def on_no_data_recived(&block);T;'T;bTo; ; F; ;;;;I"1EventMachine::Pubnub::Client#validate_client;F;[;[[@D i7;F;:validate_client;;;[;{;IC;" ;F;@. ;0; F;![;[;"I";F;#0;$@? ;%I"0def validate_client # TODO validation end;T;&I"def validate_client;T;'T;bT;u@? ;vIC;[;u@? ;wIC;[;u@? ;IC;‘{;’IC;‘{;“T;IC;‘{ ;ÄIC;‘{;˜@O ;™@\ ;“T;ÆIC;‘{;˜@o ;™@| ;“T;/IC;‘{;˜@ ;™@œ ;“T;KIC;‘{;˜@¯ ;™@¼ ;“T;“T;“T;”{;•[;[[@D i ;F;;š;;;;;[;{;IC;" ;F;@? ;0; F;![;[;"I";F;#0;$@= ;I"!EventMachine::Pubnub::Client;F;›o;x ;y0;z0;{0;;œ;$@;}@ä;–;’;'To; ;IC;[o;~;[[I" lib/pubnub/em/connection.rb;Ti;F;:MAX_LINE_LENGTH;;;;;[;{;IC;" ;F;@R ;0; F;![;[;"I";F;#0;$@P ;I"6EventMachine::Pubnub::Connection::MAX_LINE_LENGTH;F;&I" MAX_LINE_LENGTH = 1024*1024;T;%I" MAX_LINE_LENGTH = 1024*1024;T;{I"1024*1024;T;'To;~;[[@U i;F;:STALL_TIMER;;;;;[;{;IC;" ;F;@` ;0; F;![;[;"I";F;#0;$@P ;I"2EventMachine::Pubnub::Connection::STALL_TIMER;F;&I"STALL_TIMER = 10;T;%I"STALL_TIMER = 10;T;{I"10;T;'To;~;[[@U i;F;:STALL_TIMEOUT;;;;;[;{;IC;" ;F;@m ;0; F;![;[;"I";F;#0;$@P ;I"4EventMachine::Pubnub::Connection::STALL_TIMEOUT;F;&I"STALL_TIMEOUT = 60;T;%I"STALL_TIMEOUT = 60;T;{I"60;T;'To; ; F; ;;;;I"0EventMachine::Pubnub::Connection#initialize;F;[[I" client;T0[I" host;T0[I" port;T0;[[@U i;F;;a;;;[;{;IC;" ;F;@z ;0; F;![;[o;) ;*I" return;F;+I"!a new instance of Connection;F;0;,[I"Connection;F;@z ;"I";F;#0;$@P ;%I"Þdef initialize(client, host, port) @client = client @host = host @port = port @options = @client.options #TODO connect reconnectors @network_reconnector = nil @application_reconnectior = nil end;T;&I"'def initialize(client, host, port);T;'T;bTo; ; F; ;;;;I":EventMachine::Pubnub::Connection#connection_completed;F;[;[[@U i ;F;:connection_completed;;;[;{;IC;" ;F;@’ ;0; F;![;[;"I";F;#0;$@P ;%I"ndef connection_completed reset_connection @request = Request.new(@options) send_data(@request) end;T;&I"def connection_completed;T;'T;bTo; ; F; ;;;;I"2EventMachine::Pubnub::Connection#receive_data;F;[[I" data;T0;[[@U i2;T;:receive_data;;;[;{;IC;"Üdef post_init @stall_timer = EM::PeriodicTimer.new(STALL_TIMER) do if gracefully_closed? @stall_timer.cancel elsif stalled? close_connection invoke_callback(@client.no_data_callback) end end end ;F;![;[;"I"Üdef post_init @stall_timer = EM::PeriodicTimer.new(STALL_TIMER) do if gracefully_closed? @stall_timer.cancel elsif stalled? close_connection invoke_callback(@client.no_data_callback) end end end;T;#0;@Ÿ ; F;io;»;¼F;½i';¾i0;$@P ;%I">def receive_data(data) #puts data @parser << data end;T;&I"def receive_data(data);T;'T;bTo; ; F; ;;;;I"6EventMachine::Pubnub::Connection#network_failure?;F;[;[[@U i7;F;:network_failure?;;;[;{;IC;" ;F;@¯ ;0; F;![;[o;) ;*I" return;F;+I";F;0;,[I" Boolean;F;@¯ ;"I";F;#0;$@P ;%I"3def network_failure? @response_code == 0 end;T;&I"def network_failure?;T;'T;bTo; ; F; ;;;;I"8EventMachine::Pubnub::Connection#gracefully_closed?;F;[;[[@U i;;F;:gracefully_closed?;;;[;{;IC;" ;F;@Á ;0; F;![;[o;) ;*I" return;F;+I";F;0;,[I" Boolean;F;@Á ;"I";F;#0;$@P ;%I"4def gracefully_closed? @gracefully_closed end;T;&I"def gracefully_closed?;T;'T;bTo; ; F; ;;;;I":EventMachine::Pubnub::Connection#immediate_reconnect?;F;[;[[@U i?;F;:immediate_reconnect?;;;[;{;IC;" ;F;@Ó ;0; F;![;[o;) ;*I" return;F;+I";F;0;,[I" Boolean;F;@Ó ;"I";F;#0;$@P ;%I"8def immediate_reconnect? @immediate_reconnect end;T;&I"def immediate_reconnect?;T;'T;bTo; ; F; ;;;;I">EventMachine::Pubnub::Connection#auto_reconnect_on_close?;F;[;[[@U iC;F;:auto_reconnect_on_close?;;;[;{;IC;" ;F;@å ;0; F;![;[o;) ;*I" return;F;+I";F;0;,[I" Boolean;F;@å ;"I";F;#0;$@P ;%I"Ndef auto_reconnect_on_close? auto_reconnect? && !gracefully_closed? end;T;&I"!def auto_reconnect_on_close?;T;'T;bTo; ; F; ;;;;I"*EventMachine::Pubnub::Connection#ssl?;F;[;[[@U iG;F;: ssl?;;;[;{;IC;" ;F;@÷ ;0; F;![;[o;) ;*I" return;F;+I";F;0;,[I" Boolean;F;@÷ ;"I";F;#0;$@P ;%I""def ssl? @options[:ssl] end;T;&I" def ssl?;T;'T;bTo; ; F; ;;;;I".EventMachine::Pubnub::Connection#stalled?;F;[;[[@U iK;F;: stalled?;;;[;{;IC;" ;F;@ ;0; F;![;[o;) ;*I" return;F;+I";F;0;,[I" Boolean;F;@ ;"I";F;#0;$@P ;%I"odef stalled? @last_response ||= EM::Pubnub::Response.new @last_response.older_than?(STALL_TIMEOUT) end;T;&I"def stalled?;T;'T;bTo; ; F; ;;;;I",EventMachine::Pubnub::Connection#update;F;[[I" options;TI"{};T;[[@U iP;F;: update;;;[;{;IC;" ;F;@ ;0; F;![;[;"I";F;#0;$@P ;%I" e invoke_callback(@client.max_reconnects_callback, @reconnector.reconnect_timeout, @reconnector.reconnect_count) end end;T;&I"def shedule_reconnect;T;'T;bTo; ; F; ;;;;I"5EventMachine::Pubnub::Connection#invoke_callback;F;[[I" callback;T0[I" *args;F0;[[@U ir;F;:invoke_callback;;;[;{;IC;" ;F;@R ;0; F;![;[;"I";F;#0;$@P ;%I"Pdef invoke_callback(callback, *args) callback.call(*args) if callback end;T;&I")def invoke_callback(callback, *args);T;'T;bTo; ; F; ;;;;I"9EventMachine::Pubnub::Connection#on_headers_complete;F;[[I" headers;T0;[[@U iv;F;:on_headers_complete;;;[;{;IC;" ;F;@c ;0; F;![;[;"I";F;#0;$@P ;%I"ædef on_headers_complete(headers) @response_code = @parser.status_code @headers = headers #puts "GOT RESPONSE CODE #{@response_code}" if @response_code.to_i == 200 return end # TODO handle error codes end;T;&I"%def on_headers_complete(headers);T;'T;bTo; ; F; ;;;;I"-EventMachine::Pubnub::Connection#on_body;F;[[I" body;T0;[[@U i€;F;: on_body;;;[;{;IC;" ;F;@r ;0; F;![;[;"I";F;#0;$@P ;%I"*def on_body(body) @body << body end;T;&I"def on_body(body);T;'T;bTo; ; F; ;;;;I"9EventMachine::Pubnub::Connection#on_message_complete;F;[;[[@U i„;F;:on_message_complete;;;[;{;IC;" ;F;@ ;0; F;![;[;"I";F;#0;$@P ;%I"Ædef on_message_complete #puts Yajl::Parser.parse(@body) if @options[:callback] @options[:callback].call(Yajl::Parser.parse(@body)) else #puts Yajl::Parser.parse(@body) end stop end;T;&I"def on_message_complete;T;'T;bTo; ; F; ;;;;I"6EventMachine::Pubnub::Connection#reset_connection;F;[;[[@U iŽ;F;:reset_connection;;;[;{;IC;" ;F;@Ž ;0; F;![;[;"I";F;#0;$@P ;%I"def reset_connection @body = '' @parser = Http::Parser.new(self) @last_response = Response.new @response_code = 0 @gracefully_closed = false @immediate_reconnect = false @auto_reconnect = @options[:auto_reconnect] end;T;&I"def reset_connection;T;'T;bT;u@P ;vIC;[;u@P ;wIC;[;u@P ;IC;‘{;’IC;‘{;“T;IC;‘{;“T;“T;”{;•[;[[@U i;F;:Connection;;;;;[;{;IC;" ;F;@P ;0; F;![;[;"I";F;#0;$@= ;I"%EventMachine::Pubnub::Connection;F;›o;x ;y0;zI"EM::Connection;T;{@; ;;á;$o;x ;y0;z0;{0;:EM;$@; ;}0;–0;}0;–;’;'To; ;IC;[o; ; F; ;;;;I"-EventMachine::Pubnub::Request#initialize;F;[[I" options;TI"{};T;[[I"lib/pubnub/em/request.rb;Ti ;F;;a;;;[;{;IC;" ;F;@° ;0; F;![;[o;) ;*I" return;F;+I"a new instance of Request;F;0;,[I" Request;F;@° ;"I";F;#0;$@® ;%I"def initialize(options = {}) @options = { :host => ORIGIN_HOST, :request_method => 'GET' }.merge(options) end;T;&I"!def initialize(options = {});T;'T;bTo; ; F; ;;;;I"'EventMachine::Pubnub::Request#to_s;F;[;[[@¸ i;F;;À;;;[;{;IC;" ;F;@Æ ;0; F;![;[;"I";F;#0;$@® ;%I"°def to_s content = query data = [] data << "#{@options[:request_method]} #{request_uri} HTTP/1.1" data << "Host: #{@options[:host]}" #if gzip? # data << 'Connection: Keep-Alive' # data << 'Accept-Encoding: deflate, gzip' #else data << 'Accept: */*' #end data << "User-Agent: Ruby" if put_or_post? data << "Content-Type: #{@options[:content_type]}; charset=US-ASCII" data << "Content-Length: #{content.bytesize}" end @options[:headers].each do |name, value| data << "#{name}: #{value}" end unless @options[:headers].nil? data << "\r\n" data = data.join("\r\n") data << content if post? || put? puts "\n\n #{data} \n\n" data end;T;&I" def to_s;T;'T;bTo; ; F; ;;;l;I"'EventMachine::Pubnub::Request#get?;F;[;[[@¸ i7;F;: get?;;;[;{;IC;" ;F;@Ó ;0; F;![;[o;) ;*I" return;F;+I";F;0;,[I" Boolean;F;@Ó ;"I";F;#0;$@® ;%I"+def get? request_method == 'GET' end;T;&I" def get?;T;'T;bTo; ; F; ;;;l;I"(EventMachine::Pubnub::Request#post?;F;[;[[@¸ i;;F;: post?;;;[;{;IC;" ;F;@å ;0; F;![;[o;) ;*I" return;F;+I";F;0;,[I" Boolean;F;@å ;"I";F;#0;$@® ;%I"-def post? request_method == 'POST' end;T;&I"def post?;T;'T;bTo; ; F; ;;;l;I"'EventMachine::Pubnub::Request#put?;F;[;[[@¸ i?;F;: put?;;;[;{;IC;" ;F;@÷ ;0; F;![;[o;) ;*I" return;F;+I";F;0;,[I" Boolean;F;@÷ ;"I";F;#0;$@® ;%I"+def put? request_method == 'PUT' end;T;&I" def put?;T;'T;bTo; ; F; ;;;l;I"/EventMachine::Pubnub::Request#put_or_post?;F;[;[[@¸ iC;F;:put_or_post?;;;[;{;IC;" ;F;@ ;0; F;![;[o;) ;*I" return;F;+I";F;0;,[I" Boolean;F;@ ;"I";F;#0;$@® ;%I")def put_or_post? put? || post? end;T;&I"def put_or_post?;T;'T;bTo; ; F; ;;;l;I"1EventMachine::Pubnub::Request#request_method;F;[;[[@¸ iH;F;:request_method;;;[;{;IC;" ;F;@ ;0; F;![;[;"I";F;#0;$@® ;%I";def request_method @options[:method].to_s.upcase end;T;&I"def request_method;T;'T;bTo; ; F; ;;;l;I".EventMachine::Pubnub::Request#request_uri;F;[;[[@¸ iL;F;:request_uri;;;[;{;IC;" ;F;@( ;0; F;![;[;"I";F;#0;$@® ;%I"def request_uri path end;T;&I"def request_uri;T;'T;bTo; ; F; ;;;l;I")EventMachine::Pubnub::Request#params;F;[;[[@¸ iP;F;;°;;;[;{;IC;" ;F;@5 ;0; F;![;[;"I";F;#0;$@® ;%I"‹def params flat = {} @options[:params].each do |param,val| next if val.to_s.empty? flat[param.to_s] = val.to_s end flat end;T;&I"def params;T;'T;bTo; ; F; ;;;l;I"(EventMachine::Pubnub::Request#query;F;[;[[@¸ iY;F;;1;;;[;{;IC;" ;F;@B ;0; F;![;[;"I";F;#0;$@® ;%I"cdef query params.map do |param, value| [param, value].join('=') end.sort.join('&') end;T;&I"def query;T;'T;bTo; ; F; ;;;l;I"'EventMachine::Pubnub::Request#path;F;[;[[@¸ i_;F;;®;;;[;{;IC;" ;F;@O ;0; F;![;[;"I";F;#0;$@® ;%I"^def path #@options[:ssl] ? origin = "https://" : origin = "http://" #if @options[:origin] # origin << @options[:origin] #else # origin << ORIGIN_HOST #end url = encode_url(case @options[:operation] when 'publish' [ @options[:operation], @options[:publish_key], @options[:subscribe_key], @options[:secret_key], @options[:channel], '0', @options[:message].to_json ] when 'subscribe' [ @options[:operation], @options[:subscribe_key], @options[:channel], '0', @options[:timetoken] ] when 'presence' [ 'subscribe', @options[:subscribe_key], @options[:channel].to_s + '-pnpres', '0', @options[:timetoken] ] when 'time' [ @options[:operation], '0' ] when 'history' [ @options[:operation], @options[:subscribe_key], @options[:channel], '0', @options[:history_limit] ] when 'history' [ 'v2', 'history', 'sub-key', @options[:subscribe_key], 'channel', @options[:channel] ] when 'here_now' [ 'v2', 'presence', 'sub-key', @options[:subscribe_key], 'channel', @options[:channel] ] else raise("I can't create that URL for you due to unknown operation type.") end ) url = url + "?#{query}" unless query.empty? url end;T;&I" def path;T;'T;bTo; ; F; ;;;l;I"-EventMachine::Pubnub::Request#encode_url;F;[[I" request;T0;[[@¸ i§;F;:encode_url;;;[;{;IC;" ;F;@\ ;0; F;![;[;"I";F;#0;$@® ;%I"õdef encode_url(request) '/' + request.map { |bit| bit.to_s.split('').map { |ch| ' ~`!@#$%^&*()+=[]\\{}|;\':",./<>?'.index(ch) ? '%' + ch.unpack('H2')[0].to_s.upcase : URI.encode(ch) }.join('') }.reject(&:empty?).join('/') end;T;&I"def encode_url(request);T;'T;bT;u@® ;vIC;[;u@® ;wIC;[;u@® ;IC;‘{;’IC;‘{;“T;IC;‘{;“T;“T;”{;•[;[[@¸ i ;F;;¸;;;;;[;{;IC;" ;F;@® ;0; F;![;[;"I";F;#0;$@= ;I""EventMachine::Pubnub::Request;F;›o;x ;y0;z0;{0;;œ;$@;}@ä;–;’;'To; ;IC;[o; ; F; ;;;;I".EventMachine::Pubnub::Response#initialize;F;[;[[I"lib/pubnub/em/response.rb;Ti ;F;;a;;;[;{;IC;" ;F;@~ ;0; F;![;[o;) ;*I" return;F;+I"a new instance of Response;F;0;,[I" Response;F;@~ ;"I";F;#0;$@| ;%I"def initialize end;T;&I"def initialize;T;'T;bTo; ; F; ;;;;I"/EventMachine::Pubnub::Response#older_than?;F;[[I" seconds;T0;[[@ƒ i ;F;:older_than?;;;[;{;IC;" ;F;@‘ ;0; F;![;[o;) ;*I" return;F;+I";F;0;,[I" Boolean;F;@‘ ;"I";F;#0;$@| ;%I"Ldef older_than?(seconds) @timestamp ||= Time.now age > seconds end;T;&I"def older_than?(seconds);T;'T;bTo; ; F; ;;;l;I"'EventMachine::Pubnub::Response#age;F;[;[[@ƒ i;F;:age;;;[;{;IC;" ;F;@¥ ;0; F;![;[;"I";F;#0;$@| ;%I"(def age Time.now - @timestamp end;T;&I" def age;T;'T;bT;u@| ;vIC;[;u@| ;wIC;[;u@| ;IC;‘{;’IC;‘{;“T;IC;‘{;“T;“T;”{;•[;[[@ƒ i;F;;Á;;;;;[;{;IC;" ;F;@| ;0; F;![;[;"I";F;#0;$@= ;I"#EventMachine::Pubnub::Response;F;›o;x ;y0;z0;{0;;œ;$@;}@ä;–;’;'T;u@= ;vIC;[;u@= ;wIC;[;u@= ;IC;‘{;’IC;‘{;“T;IC;‘{;“T;“T;”{;•[;[ [@D i [@U i [@¸ i [@ƒ i;F;;Â;;;;;[;{;IC;" ;F;@= ;0; F;![;[;"I";F;#0;$@; ;I"EventMachine::Pubnub;F;'T;u@; ;vIC;[;u@; ;wIC;[;u@; ;IC;‘{;’IC;‘{;“T;IC;‘{;“T;“T;”{;•[;[ [@D i[@U i [@¸ i [@ƒ i;F;:EventMachine;;;;;[;{;IC;" ;F;@; ;0; F;![;[;"I";F;#0;$@;I"EventMachine;Fo; ; F; ;;;;I" #uuid;F;[;[[@ëi;T;;;;;[;{;IC;"p----------------------------------- PubNub 3.4 Real-time Push Cloud API ----------------------------------- ;F;![;[;"I"p----------------------------------- PubNub 3.4 Real-time Push Cloud API -----------------------------------;T;#0;@é ; T;io;»;¼F;½i ;¾i;$@;%I"require 'uuid';T;&I"require 'uuid';T@äo; ;IC;[o; ; F; ;;;;I" Proc#try;F;[[I"*a;F0[I"&b;F0;[[@ëi/;F;:try;;;[;{;IC;" ;F;@ù ;0; F;![;[;"I";F;#0;$@÷ ;%I"gdef try(*a, &b) if a.empty? && block_given? yield self else __send__(*a, &b) end end;T;&I"def try(*a, &b);T;'T;bT;u@÷ ;vIC;[;u@÷ ;wIC;[;u@÷ ;IC;‘{;’IC;‘{;“T;IC;‘{;“T;“T;”{;•[;[[@ëi.;F;: Proc;;;;;[;{;IC;" ;F;@÷ ;0; F;![;[;"I";F;#0;$@;I" Proc;F;›o;x ;y0;z0;{0;;œ;$@;}@ä;–0o;~;[[I"lib/version.rb;Ti;F;:PUBNUB_VERSION;;;;;[;{;IC;" ;F;@;0; F;![;[;"I";F;#0;$@;I"PUBNUB_VERSION;F;&I"PUBNUB_VERSION = '3.4';T;%I"PUBNUB_VERSION = '3.4';T;{I" '3.4';T;u@;vIC;[;u@;wIC;[;u@;IC;‘{;’IC;‘{;“T;IC;‘{;“T;“T;”{;•[;[;F;;;;;;;[;{;IC;" ;F;@;0; F;![;[;"I";F;#0;$0;I";F;Â@:Pubnub::Client@ :Pubnub::Client#uuid@ :Pubnub::Client#uuid=@:Pubnub::Client#cipher_key@-:Pubnub::Client#cipher_key=@::Pubnub::Client#host@M:Pubnub::Client#host=@Z:Pubnub::Client#query@m:Pubnub::Client#query=@z:Pubnub::Client#response@ˆ:Pubnub::Client#response=@•:Pubnub::Client#timetoken@¨:Pubnub::Client#timetoken=@µ:Pubnub::Client#url@È:Pubnub::Client#url=@Õ:Pubnub::Client#operation@è:Pubnub::Client#operation=@õ:Pubnub::Client#callback@:Pubnub::Client#callback=@:Pubnub::Client#publish_key@(: Pubnub::Client#publish_key=@5:!Pubnub::Client#subscribe_key@H:"Pubnub::Client#subscribe_key=@U:Pubnub::Client#secret_key@h:Pubnub::Client#secret_key=@u:Pubnub::Client#channel@ˆ:Pubnub::Client#channel=@•:Pubnub::Client#jsonp@¨:Pubnub::Client#jsonp=@µ:Pubnub::Client#message@È:Pubnub::Client#message=@Õ:Pubnub::Client#ssl@è:Pubnub::Client#ssl=@õ:Pubnub::Client#port@:Pubnub::Client#port=@:$Pubnub::Client#close_connection@(:%Pubnub::Client#close_connection=@5:!Pubnub::Client#history_limit@H:"Pubnub::Client#history_limit=@U:!Pubnub::Client#history_count@h:"Pubnub::Client#history_count=@u:!Pubnub::Client#history_start@ˆ:"Pubnub::Client#history_start=@•:Pubnub::Client#history_end@¨: Pubnub::Client#history_end=@µ:#Pubnub::Client#history_reverse@È:$Pubnub::Client#history_reverse=@Õ: Pubnub::Client#session_uuid@è:!Pubnub::Client#session_uuid=@õ:"Pubnub::Client#last_timetoken@:#Pubnub::Client#last_timetoken=@:Pubnub::Client#origin@(:Pubnub::Client#origin=@5:Pubnub::Client#error@H:Pubnub::Client#error=@U:Pubnub::Client#initialize@h:Pubnub::Client#publish@}:Pubnub::Client#subscribe@:Pubnub::Client#presence@¡:Pubnub::Client#history@³:Pubnub::Client#leave@Å:Pubnub::Client#unsubscribe@×:Pubnub::Client#here_now@ã:Pubnub::Client#time@õ:!Pubnub::Client#merge_options@:!Pubnub::Client#start_request@: Pubnub::Client#send_request@(:Pubnub::Client#is_update?@7:"Pubnub::Client#is_valid_json?@K:%Pubnub::Client#increment_retries@_:$Pubnub::Client#verify_operation@l:-Pubnub::Client#compile_channel_parameter@}:Pubnub::Configuration@–:.Pubnub::Configuration::DEFAULT_SECRET_KEY@˜:-Pubnub::Configuration::DEFAULT_TIMETOKEN@¦:*Pubnub::Configuration::DEFAULT_ORIGIN@³:(Pubnub::Configuration::DEFAULT_PORT@À:*Pubnub::Configuration::DEFAULT_METHOD@Í:0Pubnub::Configuration::DEFAULT_CONTENT_TYPE@Ú:(Pubnub::Configuration::DEFAULT_PATH@ç:*Pubnub::Configuration::DEFAULT_PARAMS@ô:+Pubnub::Configuration::DEFAULT_HEADERS@:.Pubnub::Configuration::DEFAULT_USER_AGENT@:+Pubnub::Configuration::DEFAULT_SSL_SET@:+Pubnub::Configuration::DEFAULT_TIMEOUT@(:,Pubnub::Configuration::DEFAULT_ENCODING@5:2Pubnub::Configuration::DEFAULT_AUTO_RECONNECT@B:,Pubnub::Configuration::DEFAULT_CALLBACK@O:/Pubnub::Configuration::DEFAULT_PUBLISH_KEY@\:1Pubnub::Configuration::DEFAULT_SUBSCRIBE_KEY@i:+Pubnub::Configuration::DEFAULT_CHANNEL@v:*Pubnub::Configuration::PERIODIC_TIMER@ƒ:)Pubnub::Configuration::RETRYING_TIME@:'Pubnub::Configuration::MAX_RETRIES@:Pubnub::Crypto@:Pubnub::Crypto#initialize@:Pubnub::Crypto#encrypt@3:Pubnub::Crypto#decrypt@B;ì@; :EventMachine::Pubnub@= :!EventMachine::Pubnub::Client@? :,EventMachine::Pubnub::Client::CALLBACKS@A :,EventMachine::Pubnub::Client#connection@O :-EventMachine::Pubnub::Client#connection=@\ :)EventMachine::Pubnub::Client#options@o :*EventMachine::Pubnub::Client#options=@| :&EventMachine::Pubnub::Client#host@ :'EventMachine::Pubnub::Client#host=@œ :&EventMachine::Pubnub::Client#port@¯ :'EventMachine::Pubnub::Client#port=@¼ :)EventMachine::Pubnub::Client.connect@Ï :,EventMachine::Pubnub::Client#initialize@ß :)EventMachine::Pubnub::Client#connect@ô :&EventMachine::Pubnub::Client#each@ :*EventMachine::Pubnub::Client#on_error@ :4EventMachine::Pubnub::Client#on_no_data_recived@ :1EventMachine::Pubnub::Client#validate_client@. :%EventMachine::Pubnub::Connection@P :6EventMachine::Pubnub::Connection::MAX_LINE_LENGTH@R :2EventMachine::Pubnub::Connection::STALL_TIMER@` :4EventMachine::Pubnub::Connection::STALL_TIMEOUT@m :0EventMachine::Pubnub::Connection#initialize@z ::EventMachine::Pubnub::Connection#connection_completed@’ :2EventMachine::Pubnub::Connection#receive_data@Ÿ :6EventMachine::Pubnub::Connection#network_failure?@¯ :8EventMachine::Pubnub::Connection#gracefully_closed?@Á ::EventMachine::Pubnub::Connection#immediate_reconnect?@Ó :>EventMachine::Pubnub::Connection#auto_reconnect_on_close?@å :*EventMachine::Pubnub::Connection#ssl?@÷ :.EventMachine::Pubnub::Connection#stalled?@ :,EventMachine::Pubnub::Connection#update@ :*EventMachine::Pubnub::Connection#stop@+ :9EventMachine::Pubnub::Connection#immediate_reconnect@8 :7EventMachine::Pubnub::Connection#shedule_reconnect@E :5EventMachine::Pubnub::Connection#invoke_callback@R :9EventMachine::Pubnub::Connection#on_headers_complete@c :-EventMachine::Pubnub::Connection#on_body@r :9EventMachine::Pubnub::Connection#on_message_complete@ :6EventMachine::Pubnub::Connection#reset_connection@Ž :"EventMachine::Pubnub::Request@® :-EventMachine::Pubnub::Request#initialize@° :'EventMachine::Pubnub::Request#to_s@Æ :'EventMachine::Pubnub::Request#get?@Ó :(EventMachine::Pubnub::Request#post?@å :'EventMachine::Pubnub::Request#put?@÷ :/EventMachine::Pubnub::Request#put_or_post?@ :1EventMachine::Pubnub::Request#request_method@ :.EventMachine::Pubnub::Request#request_uri@( :)EventMachine::Pubnub::Request#params@5 :(EventMachine::Pubnub::Request#query@B :'EventMachine::Pubnub::Request#path@O :-EventMachine::Pubnub::Request#encode_url@\ :#EventMachine::Pubnub::Response@| :.EventMachine::Pubnub::Response#initialize@~ :/EventMachine::Pubnub::Response#older_than?@‘ :'EventMachine::Pubnub::Response#age@¥ :Pubnub::Error@b:!Pubnub::Error::PresenceError@d: Pubnub::Error::PublishError@x:"Pubnub::Error::SubscribeError@Œ:Pubnub::Error::InitError@Ÿ:"Pubnub::Error::OperationError@²:6Pubnub::Error::OperationError#operation_exception@´: #uuid@é ;œ@ä:Object#blank?@æ:Object#present?@ù;î@÷ : Proc#try@ù :Pubnub.new@â:Pubnub::Request@ò:Pubnub::Request#envelopes@ô:Pubnub::Request#envelopes=@:Pubnub::Request#port@:Pubnub::Request#port=@":Pubnub::Request#timetoken@5:Pubnub::Request#timetoken=@B:Pubnub::Request#operation@U:Pubnub::Request#operation=@b:Pubnub::Request#response@u:Pubnub::Request#response=@‚:Pubnub::Request#ssl@•:Pubnub::Request#ssl=@¢:Pubnub::Request#channel@¶:Pubnub::Request#channel=@Ã:Pubnub::Request#callback@Ö:Pubnub::Request#callback=@ã:Pubnub::Request#cipher_key@ö: Pubnub::Request#cipher_key=@:"Pubnub::Request#subscribe_key@:#Pubnub::Request#subscribe_key=@#:Pubnub::Request#secret_key@6: Pubnub::Request#secret_key=@C:Pubnub::Request#message@V:Pubnub::Request#message=@c: Pubnub::Request#publish_key@v:!Pubnub::Request#publish_key=@ƒ:Pubnub::Request#initialize@–:Pubnub::Request#origin@«:Pubnub::Request#path@¸: Pubnub::Request#encode_path@Å:Pubnub::Request#params@Ô:Pubnub::Request#query@á:$Pubnub::Request#handle_response@î: Pubnub::Request#aes_encrypt@ý:#Pubnub::Request#set_cipher_key@ :#Pubnub::Request#set_secret_key@! : Pubnub::Request#set_message@2 :$Pubnub::Request#set_publish_key@C :&Pubnub::Request#set_subscribe_key@T :Pubnub::Response@‡ :Pubnub::Response#message@‰ :Pubnub::Response#channel@— :Pubnub::Response#timetoken@¤ :!Pubnub::Response#status_code@± :Pubnub::Response#response@¾ :Pubnub::Response#msg@Ë : Pubnub::Response#initialize@× :Pubnub::Response#==@í :Pubnub::Response#to_s@ý ;ï@