lib/pubnub/events/channel_registration.rb in pubnub-4.0.0beta2 vs lib/pubnub/events/channel_registration.rb in pubnub-4.0.0
- old
+ new
@@ -129,93 +129,93 @@
config: get_config
},
result: {
- data: parsed_response['payload'],
- code: req_res_objects[:response].code,
- operation: define_operation,
- client_request: req_res_objects[:request],
- server_response: req_res_objects[:response],
+ data: parsed_response['payload'],
+ code: req_res_objects[:response].code,
+ operation: define_operation,
+ client_request: req_res_objects[:request],
+ server_response: req_res_objects[:response]
}
)
end
def error_envelope(parsed_response, error, req_res_objects)
if error
Pubnub::ErrorEnvelope.new(
- event: @event,
- event_options: @given_options,
- timetoken: nil,
- status: {
- code: req_res_objects[:response].code,
- operation: define_operation,
- client_request: req_res_objects[:request],
- server_response: req_res_objects[:response],
- data: nil,
- category: :json_parse_error,
- error: true,
- auto_retried: false,
+ event: @event,
+ event_options: @given_options,
+ timetoken: nil,
+ status: {
+ code: req_res_objects[:response].code,
+ operation: define_operation,
+ client_request: req_res_objects[:request],
+ server_response: req_res_objects[:response],
+ data: nil,
+ category: :json_parse_error,
+ error: true,
+ auto_retried: false,
- current_timetoken: nil,
- last_timetoken: nil,
- subscribed_channels: nil,
- subscribed_channel_groups: nil,
+ current_timetoken: nil,
+ last_timetoken: nil,
+ subscribed_channels: nil,
+ subscribed_channel_groups: nil,
- config: get_config
- },
+ config: get_config
+ },
- result: {
- data: parsed_response['payload'],
- code: req_res_objects[:response].code,
- operation: define_operation,
- client_request: req_res_objects[:request],
- server_response: req_res_objects[:response]
- }
+ result: {
+ data: parsed_response['payload'],
+ code: req_res_objects[:response].code,
+ operation: define_operation,
+ client_request: req_res_objects[:request],
+ server_response: req_res_objects[:response]
+ }
)
else
ErrorEnvelope.new(
- event: @event,
- event_options: @given_options,
- timetoken: nil,
- status: {
- code: req_res_objects[:response].code,
- client_request: req_res_objects[:request],
- server_response: req_res_objects[:response],
- category: nil,
- error: true,
- auto_retried: false,
+ event: @event,
+ event_options: @given_options,
+ timetoken: nil,
+ status: {
+ code: req_res_objects[:response].code,
+ client_request: req_res_objects[:request],
+ server_response: req_res_objects[:response],
+ category: nil,
+ error: true,
+ auto_retried: false,
- current_timetoken: nil,
- last_timetoken: nil,
- subscribed_channels: nil,
- subscribed_channel_groups: nil,
+ current_timetoken: nil,
+ last_timetoken: nil,
+ subscribed_channels: nil,
+ subscribed_channel_groups: nil,
- config: get_config
+ config: get_config
- },
+ },
- result: {
- data: parsed_response['payload'],
- code: req_res_objects[:response].code,
- operation: define_operation,
- client_request: req_res_objects[:request],
- server_response: req_res_objects[:response]
- }
+ result: {
+ data: parsed_response['payload'],
+ code: req_res_objects[:response].code,
+ operation: define_operation,
+ client_request: req_res_objects[:request],
+ server_response: req_res_objects[:response]
+ }
)
end
end
def define_operation
case @action
- when :add
- Pubnub::Constants::OPERATION_CHANNEL_GROUP_ADD
- when :remove
- Pubnub::Constants::OPERATION_CHANNEL_GROUP_REMOVE
- when :get
- Pubnub::Constants::OPERATION_LIST_ALL_CHANNELS_IN_CHANNEL_GROUP
- when :list_groups
- Pubnub::Constants::OPERATION_LIST_ALL_CHANNEL_GROUPS
+ when :add
+ Pubnub::Constants::OPERATION_CHANNEL_GROUP_ADD
+ when :remove
+ Pubnub::Constants::OPERATION_CHANNEL_GROUP_REMOVE
+ when :get
+ Pubnub::Constants::OPERATION_LIST_ALL_CHANNELS_IN_CHANNEL_GROUP
+ when :list_groups
+ Pubnub::Constants::OPERATION_LIST_ALL_CHANNEL_GROUPS
end
end
end
end