Permalink
Browse files

[core] update parser to better handle whitespace

  • Loading branch information...
geemus committed May 12, 2011
1 parent 37499d7 commit b452aa679d72a3d5093c50e4c987693d111306bd
Showing with 598 additions and 597 deletions.
  1. +17 −8 benchs/parse_vs_push.rb
  2. +1 −1 lib/fog/aws/parsers/cloud_formation/create_stack.rb
  3. +3 −3 lib/fog/aws/parsers/cloud_formation/describe_stack_events.rb
  4. +3 −3 lib/fog/aws/parsers/cloud_formation/describe_stack_resources.rb
  5. +6 −6 lib/fog/aws/parsers/cloud_formation/describe_stacks.rb
  6. +1 −1 lib/fog/aws/parsers/cloud_formation/get_template.rb
  7. +5 −5 lib/fog/aws/parsers/cloud_formation/validate_template.rb
  8. +3 −3 lib/fog/aws/parsers/elb/configure_health_check.rb
  9. +2 −2 lib/fog/aws/parsers/elb/create_load_balancer.rb
  10. +1 −1 lib/fog/aws/parsers/elb/delete_load_balancer.rb
  11. +2 −2 lib/fog/aws/parsers/elb/deregister_instances_from_load_balancer.rb
  12. +2 −2 lib/fog/aws/parsers/elb/describe_instance_health.rb
  13. +12 −12 lib/fog/aws/parsers/elb/describe_load_balancers.rb
  14. +2 −2 lib/fog/aws/parsers/elb/disable_availability_zones_for_load_balancer.rb
  15. +1 −1 lib/fog/aws/parsers/elb/empty.rb
  16. +2 −2 lib/fog/aws/parsers/elb/enable_availability_zones_for_load_balancer.rb
  17. +2 −2 lib/fog/aws/parsers/elb/register_instances_with_load_balancer.rb
  18. +1 −1 lib/fog/aws/parsers/iam/basic.rb
  19. +2 −2 lib/fog/aws/parsers/iam/create_access_key.rb
  20. +2 −2 lib/fog/aws/parsers/iam/create_group.rb
  21. +2 −2 lib/fog/aws/parsers/iam/create_user.rb
  22. +6 −6 lib/fog/aws/parsers/iam/get_group.rb
  23. +2 −2 lib/fog/aws/parsers/iam/get_user.rb
  24. +2 −2 lib/fog/aws/parsers/iam/get_user_policy.rb
  25. +3 −3 lib/fog/aws/parsers/iam/list_access_keys.rb
  26. +3 −3 lib/fog/aws/parsers/iam/list_groups.rb
  27. +3 −3 lib/fog/aws/parsers/iam/list_groups_for_user.rb
  28. +3 −3 lib/fog/aws/parsers/iam/list_policies.rb
  29. +4 −4 lib/fog/aws/parsers/iam/list_server_certificates.rb
  30. +3 −3 lib/fog/aws/parsers/iam/list_signing_certificates.rb
  31. +3 −3 lib/fog/aws/parsers/iam/list_users.rb
  32. +3 −3 lib/fog/aws/parsers/iam/login_profile.rb
  33. +2 −2 lib/fog/aws/parsers/iam/update_group.rb
  34. +2 −2 lib/fog/aws/parsers/iam/update_user.rb
  35. +3 −3 lib/fog/aws/parsers/iam/upload_server_certificate.rb
  36. +2 −2 lib/fog/aws/parsers/iam/upload_signing_certificate.rb
  37. +1 −1 lib/fog/aws/parsers/rds/authorize_db_security_group_ingress.rb
  38. +1 −1 lib/fog/aws/parsers/rds/create_db_instance.rb
  39. +1 −1 lib/fog/aws/parsers/rds/create_db_instance_read_replica.rb
  40. +4 −4 lib/fog/aws/parsers/rds/create_db_parameter_group.rb
  41. +1 −1 lib/fog/aws/parsers/rds/create_db_security_group.rb
  42. +1 −1 lib/fog/aws/parsers/rds/create_db_snapshot.rb
  43. +16 −16 lib/fog/aws/parsers/rds/db_parser.rb
  44. +1 −1 lib/fog/aws/parsers/rds/delete_db_instance.rb
  45. +1 −1 lib/fog/aws/parsers/rds/delete_db_parameter_group.rb
  46. +1 −1 lib/fog/aws/parsers/rds/delete_db_security_group.rb
  47. +1 −1 lib/fog/aws/parsers/rds/delete_db_snapshot.rb
  48. +2 −2 lib/fog/aws/parsers/rds/describe_db_instances.rb
  49. +5 −5 lib/fog/aws/parsers/rds/describe_db_parameter_groups.rb
  50. +10 −10 lib/fog/aws/parsers/rds/describe_db_parameters.rb
  51. +2 −2 lib/fog/aws/parsers/rds/describe_db_security_groups.rb
  52. +2 −2 lib/fog/aws/parsers/rds/describe_db_snapshots.rb
  53. +1 −1 lib/fog/aws/parsers/rds/modify_db_instance.rb
  54. +2 −2 lib/fog/aws/parsers/rds/modify_db_parameter_group.rb
  55. +1 −1 lib/fog/aws/parsers/rds/reboot_db_instance.rb
  56. +1 −1 lib/fog/aws/parsers/rds/restore_db_instance_from_db_snapshot.rb
  57. +1 −1 lib/fog/aws/parsers/rds/restore_db_instance_to_point_in_time.rb
  58. +1 −1 lib/fog/aws/parsers/rds/revoke_db_security_group_ingress.rb
  59. +4 −4 lib/fog/aws/parsers/rds/security_group_parser.rb
  60. +11 −11 lib/fog/aws/parsers/rds/snapshot_parser.rb
  61. +1 −1 lib/fog/aws/parsers/ses/delete_verified_email_address.rb
  62. +2 −2 lib/fog/aws/parsers/ses/get_send_quota.rb
  63. +2 −2 lib/fog/aws/parsers/ses/get_send_statistics.rb
  64. +2 −2 lib/fog/aws/parsers/ses/list_verified_email_addresses.rb
  65. +2 −2 lib/fog/aws/parsers/ses/send_email.rb
  66. +2 −2 lib/fog/aws/parsers/ses/send_raw_email.rb
  67. +1 −1 lib/fog/aws/parsers/ses/verify_email_address.rb
  68. +2 −2 lib/fog/aws/parsers/simpledb/basic.rb
  69. +4 −4 lib/fog/aws/parsers/simpledb/domain_metadata.rb
  70. +4 −4 lib/fog/aws/parsers/simpledb/get_attributes.rb
  71. +3 −3 lib/fog/aws/parsers/simpledb/list_domains.rb
  72. +5 −5 lib/fog/aws/parsers/simpledb/select.rb
  73. +11 −11 lib/fog/cdn/parsers/aws/distribution.rb
  74. +9 −9 lib/fog/cdn/parsers/aws/get_distribution_list.rb
  75. +3 −3 lib/fog/cdn/parsers/aws/post_invalidation.rb
  76. +1 −1 lib/fog/compute/parsers/aws/allocate_address.rb
  77. +2 −2 lib/fog/compute/parsers/aws/attach_volume.rb
  78. +2 −2 lib/fog/compute/parsers/aws/basic.rb
  79. +1 −1 lib/fog/compute/parsers/aws/create_image.rb
  80. +1 −1 lib/fog/compute/parsers/aws/create_key_pair.rb
  81. +4 −4 lib/fog/compute/parsers/aws/create_snapshot.rb
  82. +3 −3 lib/fog/compute/parsers/aws/create_volume.rb
  83. +1 −1 lib/fog/compute/parsers/aws/deregister_image.rb
  84. +2 −2 lib/fog/compute/parsers/aws/describe_addresses.rb
  85. +3 −3 lib/fog/compute/parsers/aws/describe_availability_zones.rb
  86. +7 −7 lib/fog/compute/parsers/aws/describe_images.rb
  87. +17 −17 lib/fog/compute/parsers/aws/describe_instances.rb
  88. +2 −2 lib/fog/compute/parsers/aws/describe_key_pairs.rb
  89. +2 −2 lib/fog/compute/parsers/aws/describe_regions.rb
  90. +5 −5 lib/fog/compute/parsers/aws/describe_reserved_instances.rb
  91. +4 −4 lib/fog/compute/parsers/aws/describe_reserved_instances_offerings.rb
  92. +8 −8 lib/fog/compute/parsers/aws/describe_security_groups.rb
  93. +5 −5 lib/fog/compute/parsers/aws/describe_snapshots.rb
  94. +2 −2 lib/fog/compute/parsers/aws/describe_tags.rb
  95. +8 −8 lib/fog/compute/parsers/aws/describe_volumes.rb
  96. +2 −2 lib/fog/compute/parsers/aws/detach_volume.rb
  97. +3 −7 lib/fog/compute/parsers/aws/get_console_output.rb
  98. +1 −1 lib/fog/compute/parsers/aws/import_key_pair.rb
  99. +3 −3 lib/fog/compute/parsers/aws/monitor_unmonitor_instances.rb
  100. +1 −1 lib/fog/compute/parsers/aws/register_image.rb
  101. +14 −22 lib/fog/compute/parsers/aws/run_instances.rb
  102. +3 −3 lib/fog/compute/parsers/aws/start_stop_instances.rb
  103. +6 −6 lib/fog/compute/parsers/aws/terminate_instances.rb
  104. +4 −4 lib/fog/compute/parsers/slicehost/create_slice.rb
  105. +3 −3 lib/fog/compute/parsers/slicehost/get_backups.rb
  106. +2 −2 lib/fog/compute/parsers/slicehost/get_flavor.rb
  107. +2 −2 lib/fog/compute/parsers/slicehost/get_flavors.rb
  108. +2 −2 lib/fog/compute/parsers/slicehost/get_image.rb
  109. +2 −2 lib/fog/compute/parsers/slicehost/get_images.rb
  110. +4 −4 lib/fog/compute/parsers/slicehost/get_slice.rb
  111. +4 −4 lib/fog/compute/parsers/slicehost/get_slices.rb
  112. +12 −12 lib/fog/compute/parsers/voxel/devices_list.rb
  113. +5 −5 lib/fog/compute/parsers/voxel/images_list.rb
  114. +2 −2 lib/fog/compute/parsers/voxel/voxcloud_create.rb
  115. +2 −2 lib/fog/compute/parsers/voxel/voxcloud_status.rb
  116. +7 −3 lib/fog/core/parser.rb
  117. +2 −2 lib/fog/dns/parsers/aws/change_resource_record_sets.rb
  118. +5 −5 lib/fog/dns/parsers/aws/create_hosted_zone.rb
  119. +1 −1 lib/fog/dns/parsers/aws/delete_hosted_zone.rb
  120. +2 −2 lib/fog/dns/parsers/aws/get_change.rb
  121. +3 −3 lib/fog/dns/parsers/aws/get_hosted_zone.rb
  122. +4 −4 lib/fog/dns/parsers/aws/list_hosted_zones.rb
  123. +4 −4 lib/fog/dns/parsers/aws/list_resource_record_sets.rb
  124. +2 −2 lib/fog/dns/parsers/bluebox/create_record.rb
  125. +2 −2 lib/fog/dns/parsers/bluebox/create_zone.rb
  126. +1 −1 lib/fog/dns/parsers/bluebox/get_record.rb
  127. +1 −1 lib/fog/dns/parsers/bluebox/get_records.rb
  128. +2 −2 lib/fog/dns/parsers/bluebox/get_zone.rb
  129. +2 −2 lib/fog/dns/parsers/bluebox/get_zones.rb
  130. +2 −2 lib/fog/dns/parsers/slicehost/create_record.rb
  131. +2 −2 lib/fog/dns/parsers/slicehost/create_zone.rb
  132. +2 −2 lib/fog/dns/parsers/slicehost/get_record.rb
  133. +2 −2 lib/fog/dns/parsers/slicehost/get_records.rb
  134. +2 −2 lib/fog/dns/parsers/slicehost/get_zone.rb
  135. +2 −2 lib/fog/dns/parsers/slicehost/get_zones.rb
  136. +1 −1 lib/fog/dns/parsers/zerigo/count_hosts.rb
  137. +1 −1 lib/fog/dns/parsers/zerigo/count_zones.rb
  138. +2 −2 lib/fog/dns/parsers/zerigo/create_host.rb
  139. +2 −2 lib/fog/dns/parsers/zerigo/create_zone.rb
  140. +2 −2 lib/fog/dns/parsers/zerigo/find_hosts.rb
  141. +2 −2 lib/fog/dns/parsers/zerigo/get_host.rb
  142. +4 −4 lib/fog/dns/parsers/zerigo/get_zone.rb
  143. +2 −2 lib/fog/dns/parsers/zerigo/get_zone_stats.rb
  144. +2 −2 lib/fog/dns/parsers/zerigo/list_hosts.rb
  145. +2 −2 lib/fog/dns/parsers/zerigo/list_zones.rb
  146. +4 −4 lib/fog/storage/parsers/aws/access_control_list.rb
  147. +1 −1 lib/fog/storage/parsers/aws/complete_multipart_upload.rb
  148. +2 −2 lib/fog/storage/parsers/aws/copy_object.rb
  149. +10 −10 lib/fog/storage/parsers/aws/get_bucket.rb
  150. +1 −1 lib/fog/storage/parsers/aws/get_bucket_location.rb
  151. +5 −5 lib/fog/storage/parsers/aws/get_bucket_logging.rb
  152. +8 −8 lib/fog/storage/parsers/aws/get_bucket_object_versions.rb
  153. +1 −1 lib/fog/storage/parsers/aws/get_bucket_versioning.rb
  154. +2 −2 lib/fog/storage/parsers/aws/get_bucket_website.rb
  155. +1 −1 lib/fog/storage/parsers/aws/get_request_payment.rb
  156. +3 −3 lib/fog/storage/parsers/aws/get_service.rb
  157. +1 −1 lib/fog/storage/parsers/aws/initiate_multipart_upload.rb
  158. +7 −7 lib/fog/storage/parsers/aws/list_multipart_uploads.rb
  159. +7 −7 lib/fog/storage/parsers/aws/list_parts.rb
  160. +3 −3 lib/fog/storage/parsers/google/access_control_list.rb
  161. +2 −2 lib/fog/storage/parsers/google/copy_object.rb
  162. +10 −10 lib/fog/storage/parsers/google/get_bucket.rb
  163. +5 −5 lib/fog/storage/parsers/google/get_bucket_logging.rb
  164. +9 −9 lib/fog/storage/parsers/google/get_bucket_object_versions.rb
  165. +1 −1 lib/fog/storage/parsers/google/get_bucket_versioning.rb
  166. +1 −1 lib/fog/storage/parsers/google/get_request_payment.rb
  167. +3 −3 lib/fog/storage/parsers/google/get_service.rb
  168. +1 −1 lib/fog/terremark/parsers/shared/get_catalog.rb
  169. +1 −1 lib/fog/terremark/parsers/shared/get_catalog_item.rb
  170. +7 −7 lib/fog/terremark/parsers/shared/get_internet_services.rb
  171. +1 −1 lib/fog/terremark/parsers/shared/get_network_ips.rb
  172. +3 −3 lib/fog/terremark/parsers/shared/get_node_services.rb
  173. +1 −1 lib/fog/terremark/parsers/shared/get_organization.rb
  174. +2 −2 lib/fog/terremark/parsers/shared/get_public_ips.rb
  175. +1 −1 lib/fog/terremark/parsers/shared/get_vapp_template.rb
  176. +6 −6 lib/fog/terremark/parsers/shared/get_vdc.rb
  177. +7 −7 lib/fog/terremark/parsers/shared/internet_service.rb
  178. +1 −1 lib/fog/terremark/parsers/shared/network.rb
  179. +3 −3 lib/fog/terremark/parsers/shared/node_service.rb
  180. +2 −2 lib/fog/terremark/parsers/shared/public_ip.rb
  181. +7 −7 lib/fog/terremark/parsers/shared/vapp.rb
View
@@ -16,6 +16,7 @@ def reset
end
def characters(string)
+ @value ||= ''
@value << string.strip
end
@@ -29,10 +30,14 @@ def end_element(name)
@response[:items] << @item
@item = {}
when 'key'
- @item[:key] = @value
+ @item[:key] = value
end
end
+ def value
+ @value.dup
+ end
+
end
data = <<-DATA
@@ -43,18 +48,22 @@ def end_element(name)
</items>
DATA
-COUNT = 100
+COUNT = 10_000
Benchmark.bmbm(25) do |bench|
bench.report('parse') do
- parser = Parser.new
- Nokogiri::XML::SAX::Parser.new(parser).parse(data)
- parser.response
+ COUNT.times do
+ parser = Parser.new
+ Nokogiri::XML::SAX::Parser.new(parser).parse(data)
+ parser.response
+ end
end
bench.report('push') do
- parser = Parser.new
- Nokogiri::XML::SAX::PushParser.new(parser).write(data, true)
- parser.response
+ COUNT.times do
+ parser = Parser.new
+ Nokogiri::XML::SAX::PushParser.new(parser).write(data, true)
+ parser.response
+ end
end
end
@@ -8,7 +8,7 @@ class CreateStack < Fog::Parsers::Base
def end_element(name)
case name
when 'RequestId', 'StackId'
- @response[name] = @value
+ @response[name] = value
end
end
@@ -13,14 +13,14 @@ def reset
def end_element(name)
case name
when 'EventId', 'LogicalResourceId', 'PhysicalResourceId', 'ResourceProperties', 'ResourceStatus', 'ResourceStatusReason', 'ResourceType', 'StackId', 'StackName'
- @event[name] = @value
+ @event[name] = value
when 'member'
@response['StackEvents'] << @event
@event = {}
when 'RequestId'
- @response[name] = @value
+ @response[name] = value
when 'Timestamp'
- @event[name] = Time.parse(@value)
+ @event[name] = Time.parse(value)
end
end
@@ -13,14 +13,14 @@ def reset
def end_element(name)
case name
when 'StackId', 'StackName', 'LogicalResourceId', 'PhysicalResourceId', 'ResourceType', 'ResourceStatus'
- @resource[name] = @value
+ @resource[name] = value
when 'member'
@response['StackResources'] << @resource
@resource = {}
when 'RequestId'
- @response[name] = @value
+ @response[name] = value
when 'Timestamp'
- @resource[name] = Time.parse(@value)
+ @resource[name] = Time.parse(value)
end
end
@@ -26,7 +26,7 @@ def end_element(name)
if @in_outputs
case name
when 'OutputKey', 'OutputValue'
- @output[name] = @value
+ @output[name] = value
when 'member'
@stack['Outputs'] << @output
@output = {}
@@ -36,7 +36,7 @@ def end_element(name)
elsif @in_parameters
case name
when 'ParameterKey', 'ParameterValue'
- @parameter[name] = @value
+ @parameter[name] = value
when 'member'
@stack['Parameters'] << @parameter
@parameter = {}
@@ -49,18 +49,18 @@ def end_element(name)
@response['Stacks'] << @stack
@stack = { 'Outputs' => [], 'Parameters' => [] }
when 'RequestId'
- @response[name] = @value
+ @response[name] = value
when 'CreationTime'
- @stack[name] = Time.parse(@value)
+ @stack[name] = Time.parse(value)
when 'DisableRollback'
- case @value
+ case value
when 'false'
@stack[name] = false
when 'true'
@stack[name] = true
end
when 'StackName', 'StackId', 'StackStatus'
- @stack[name] = @value
+ @stack[name] = value
end
end
end
@@ -8,7 +8,7 @@ class GetTemplate < Fog::Parsers::Base
def end_element(name)
case name
when 'RequestId', 'TemplateBody'
- @response[name] = @value
+ @response[name] = value
end
end
@@ -21,20 +21,20 @@ def start_element(name, attrs = [])
def end_element(name)
case name
when 'DefaultValue', 'ParameterKey'
- @parameter[name] = @value
+ @parameter[name] = value
when 'Description'
if @in_parameters
- @parameter[name] = @value
+ @parameter[name] = value
else
- @response[name] = @value
+ @response[name] = value
end
when 'RequestId'
- @response[name] = @value
+ @response[name] = value
when 'member'
@response['Parameters'] << @parameter
@parameter = {}
when 'NoEcho'
- case @value
+ case value
when 'false'
@parameter[name] = false
when 'true'
@@ -17,15 +17,15 @@ def start_element(name, attrs = [])
def end_element(name)
case name
when 'Target'
- @health_check[name] = @value
+ @health_check[name] = value
when 'Interval', 'Timeout', 'UnhealthyThreshold', 'HealthyThreshold'
- @health_check[name] = @value.to_i
+ @health_check[name] = value.to_i
when 'HealthCheck'
@response['ConfigureHealthCheckResult'][name] = @health_check
when 'RequestId'
- @response['ResponseMetadata'][name] = @value
+ @response['ResponseMetadata'][name] = value
end
end
@@ -12,9 +12,9 @@ def reset
def end_element(name)
case name
when 'DNSName'
- @response['CreateLoadBalancerResult'][name] = @value
+ @response['CreateLoadBalancerResult'][name] = value
when 'RequestId'
- @response['ResponseMetadata'][name] = @value
+ @response['ResponseMetadata'][name] = value
end
end
@@ -12,7 +12,7 @@ def reset
def end_element(name)
case name
when 'RequestId'
- @response['ResponseMetadata'][name] = @value
+ @response['ResponseMetadata'][name] = value
end
end
@@ -12,9 +12,9 @@ def reset
def end_element(name)
case name
when 'InstanceId'
- @response['DeregisterInstancesFromLoadBalancerResult']['Instances'] << {name => @value}
+ @response['DeregisterInstancesFromLoadBalancerResult']['Instances'] << {name => value}
when 'RequestId'
- @response['ResponseMetadata'][name] = @value
+ @response['ResponseMetadata'][name] = value
end
end
@@ -13,12 +13,12 @@ def reset
def end_element(name)
case name
when 'Description', 'State', 'InstanceId', 'ReasonCode'
- @instance_state[name] = @value
+ @instance_state[name] = value
when 'member'
@response['DescribeInstanceHealthResult']['InstanceStates'] << @instance_state
@instance_state = {}
when 'RequestId'
- @response['ResponseMetadata'][name] = @value
+ @response['ResponseMetadata'][name] = value
end
end
@@ -49,9 +49,9 @@ def end_element(name)
case name
when 'member'
if @in_policy_names
- @listener_description['PolicyNames'] << @value
+ @listener_description['PolicyNames'] << value
elsif @in_availability_zones
- @load_balancer['AvailabilityZones'] << @value
+ @load_balancer['AvailabilityZones'] << value
elsif @in_listeners
@load_balancer['ListenerDescriptions'] << @listener_description
reset_listener_description
@@ -67,23 +67,23 @@ def end_element(name)
end
when 'LoadBalancerName', 'DNSName'
- @load_balancer[name] = @value
+ @load_balancer[name] = value
when 'CreatedTime'
- @load_balancer[name] = Time.parse(@value)
+ @load_balancer[name] = Time.parse(value)
when 'ListenerDescriptions'
@in_listeners = false
when 'PolicyNames'
@in_policy_names = false
when 'Protocol'
- @listener_description['Listener'][name] = @value
+ @listener_description['Listener'][name] = value
when 'LoadBalancerPort', 'InstancePort'
- @listener_description['Listener'][name] = @value.to_i
+ @listener_description['Listener'][name] = value.to_i
when 'Instances'
@in_instances = false
when 'InstanceId'
- @load_balancer['Instances'] << @value
+ @load_balancer['Instances'] << value
when 'AvailabilityZones'
@in_availability_zones = false
@@ -96,17 +96,17 @@ def end_element(name)
@in_lb_cookies = false
when 'Interval', 'HealthyThreshold', 'Timeout', 'UnhealthyThreshold'
- @load_balancer['HealthCheck'][name] = @value.to_i
+ @load_balancer['HealthCheck'][name] = value.to_i
when 'Target'
- @load_balancer['HealthCheck'][name] = @value
+ @load_balancer['HealthCheck'][name] = value
when 'PolicyName', 'CookieName'
- @policy[name] = @value
+ @policy[name] = value
when 'CookieExpirationPeriod'
- @policy[name] = @value.to_i
+ @policy[name] = value.to_i
when 'RequestId'
- @response['ResponseMetadata'][name] = @value
+ @response['ResponseMetadata'][name] = value
when 'DescribeLoadBalancersResponse'
@response['DescribeLoadBalancersResult'] = @results
@@ -12,9 +12,9 @@ def reset
def end_element(name)
case name
when 'member'
- @response['DisableAvailabilityZonesForLoadBalancerResult']['AvailabilityZones'] << @value
+ @response['DisableAvailabilityZonesForLoadBalancerResult']['AvailabilityZones'] << value
when 'RequestId'
- @response['ResponseMetadata'][name] = @value
+ @response['ResponseMetadata'][name] = value
end
end
@@ -16,7 +16,7 @@ def start_element(name, attrs = [])
def end_element(name)
case name
when 'RequestId'
- @response['ResponseMetadata'][name] = @value
+ @response['ResponseMetadata'][name] = value
end
end
@@ -12,9 +12,9 @@ def reset
def end_element(name)
case name
when 'member'
- @response['EnableAvailabilityZonesForLoadBalancerResult']['AvailabilityZones'] << @value
+ @response['EnableAvailabilityZonesForLoadBalancerResult']['AvailabilityZones'] << value
when 'RequestId'
- @response['ResponseMetadata'][name] = @value
+ @response['ResponseMetadata'][name] = value
end
end
@@ -12,9 +12,9 @@ def reset
def end_element(name)
case name
when 'InstanceId'
- @response['RegisterInstancesWithLoadBalancerResult']['Instances'] << {name => @value}
+ @response['RegisterInstancesWithLoadBalancerResult']['Instances'] << {name => value}
when 'RequestId'
- @response['ResponseMetadata'][name] = @value
+ @response['ResponseMetadata'][name] = value
end
end
@@ -8,7 +8,7 @@ class Basic < Fog::Parsers::Base
def end_element(name)
case name
when 'RequestId'
- @response[name] = @value
+ @response[name] = value
end
end
@@ -12,9 +12,9 @@ def reset
def end_element(name)
case name
when 'AccessKeyId', 'UserName', 'SecretAccessKey', 'Status'
- @response['AccessKey'][name] = @value
+ @response['AccessKey'][name] = value
when 'RequestId'
- @response[name] = @value
+ @response[name] = value
end
end
@@ -12,9 +12,9 @@ def reset
def end_element(name)
case name
when 'Arn', 'GroupId', 'GroupName', 'Path'
- @response['Group'][name] = @value
+ @response['Group'][name] = value
when 'RequestId'
- @response[name] = @value
+ @response[name] = value
end
end
@@ -12,9 +12,9 @@ def reset
def end_element(name)
case name
when 'Arn', 'UserId', 'UserName', 'Path'
- @response['User'][name] = @value
+ @response['User'][name] = value
when 'RequestId'
- @response[name] = @value
+ @response[name] = value
end
end
Oops, something went wrong.

0 comments on commit b452aa6

Please sign in to comment.