mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
commit
9926b99a6f
23 changed files with 30 additions and 26 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -6,6 +6,9 @@
|
|||
.bundle
|
||||
.DS_Store
|
||||
.idea
|
||||
bin/*
|
||||
!bin/fog
|
||||
!bin/rdoc
|
||||
coverage
|
||||
doc/*
|
||||
docs/_site/*
|
||||
|
@ -14,3 +17,4 @@ Gemfile.lock
|
|||
rdoc
|
||||
pkg
|
||||
spec/credentials.yml
|
||||
vendor/*
|
||||
|
|
|
@ -53,7 +53,7 @@ module Fog
|
|||
:auto_minor_version_upgrade => auto_upgrade,
|
||||
:engine => engine,
|
||||
:engine_version => engine_version,
|
||||
:notification_topic_arn => notification_config['TopicArn'],
|
||||
:notification_topic_arn => (notification_config['TopicArn']).strip,
|
||||
:port => port,
|
||||
:preferred_availablility_zone => zone,
|
||||
:preferred_maintenance_window => maintenance_window,
|
||||
|
|
|
@ -12,7 +12,7 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'SubscriptionArn', 'RequestId'
|
||||
@response[name] = @value.rstrip
|
||||
@response[name] = @value.strip
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'TopicArn', 'RequestId'
|
||||
@response[name] = @value.rstrip
|
||||
@response[name] = @value.strip
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -13,12 +13,12 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when "TopicArn", "Protocol", "SubscriptionArn", "Owner", "Endpoint"
|
||||
@subscription[name] = @value.rstrip
|
||||
@subscription[name] = @value.strip
|
||||
when "member"
|
||||
@response['Subscriptions'] << @subscription
|
||||
@subscription = {}
|
||||
when 'RequestId', 'NextToken'
|
||||
@response[name] = @value.rstrip
|
||||
@response[name] = @value.strip
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -12,7 +12,7 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'TopicArn'
|
||||
@response['Topics'] << @value
|
||||
@response['Topics'] << @value.strip
|
||||
when 'NextToken', 'RequestId'
|
||||
response[name] = @value
|
||||
end
|
||||
|
|
|
@ -12,7 +12,7 @@ module Fog
|
|||
def end_element(name)
|
||||
case name
|
||||
when 'SubscriptionArn', 'RequestId'
|
||||
@response[name] = @value.rstrip
|
||||
@response[name] = @value.strip
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ module Fog
|
|||
when 'SessionToken', 'SecretAccessKey', 'Expiration', 'AccessKeyId'
|
||||
@response[name] = @value.strip
|
||||
when 'Arn', 'FederatedUserId'
|
||||
@response[name] = @value
|
||||
@response[name] = @value.strip
|
||||
when 'PackedPolicySize'
|
||||
@response[name] = @value
|
||||
when 'RequestId'
|
||||
|
|
|
@ -36,14 +36,14 @@ module Fog
|
|||
# Merge the Cache Security Group parameters with the normal options
|
||||
request(sec_group_params.merge(
|
||||
'Action' => 'CreateCacheCluster',
|
||||
'CacheClusterId' => id,
|
||||
'CacheClusterId' => id.strip,
|
||||
'CacheNodeType' => options[:node_type] || 'cache.m1.large',
|
||||
'Engine' => options[:engine] || 'memcached',
|
||||
'NumCacheNodes' => options[:num_nodes] || 1,
|
||||
'AutoMinorVersionUpgrade' => options[:auto_minor_version_upgrade],
|
||||
'CacheParameterGroupName' => options[:parameter_group_name],
|
||||
'EngineVersion' => options[:engine_version],
|
||||
'NotificationTopicArn' => options[:notification_topic_arn],
|
||||
'NotificationTopicArn' => (options[:notification_topic_arn]).strip,
|
||||
'Port' => options[:port],
|
||||
'PreferredAvailabilityZone' => options[:preferred_availablility_zone],
|
||||
'PreferredMaintenanceWindow' => options[:preferred_maintenance_window],
|
||||
|
|
|
@ -45,13 +45,13 @@ module Fog
|
|||
# Merge the Cache Security Group parameters with the normal options
|
||||
request(node_id_params.merge(sec_group_params.merge(
|
||||
'Action' => 'ModifyCacheCluster',
|
||||
'CacheClusterId' => id,
|
||||
'CacheClusterId' => id.strip,
|
||||
'ApplyImmediately' => options[:apply_immediately],
|
||||
'NumCacheNodes' => options[:num_nodes],
|
||||
'AutoMinorVersionUpgrade' => options[:auto_minor_version_upgrade],
|
||||
'CacheParameterGroupName' => options[:parameter_group_name],
|
||||
'EngineVersion' => options[:engine_version],
|
||||
'NotificationTopicArn' => options[:notification_topic_arn],
|
||||
'NotificationTopicArn' => (options[:notification_topic_arn]).strip,
|
||||
'NotificationTopicStatus' => options[:notification_topic_status],
|
||||
'PreferredMaintenanceWindow' => options[:preferred_maintenance_window],
|
||||
:parser => Fog::Parsers::AWS::Elasticache::SingleCacheCluster.new
|
||||
|
|
|
@ -44,10 +44,10 @@ module Fog
|
|||
data[:groups][group_name][:path] = path
|
||||
Excon::Response.new.tap do |response|
|
||||
response.body = { 'Group' => {
|
||||
'GroupId' => data[:groups][group_name][:group_id],
|
||||
'GroupId' => (data[:groups][group_name][:group_id]).strip,
|
||||
'GroupName' => group_name,
|
||||
'Path' => path,
|
||||
'Arn' => data[:groups][group_name][:arn] },
|
||||
'Arn' => (data[:groups][group_name][:arn]).strip },
|
||||
'RequestId' => Fog::AWS::Mock.request_id }
|
||||
response.status = 200
|
||||
end
|
||||
|
|
|
@ -47,7 +47,7 @@ module Fog
|
|||
"UserId" => data[:users][user_name][:user_id],
|
||||
"Path" => path,
|
||||
"UserName" => user_name,
|
||||
"Arn" => data[:users][user_name][:arn]
|
||||
"Arn" => (data[:users][user_name][:arn]).strip
|
||||
},
|
||||
'RequestId' => Fog::AWS::Mock.request_id
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ module Fog
|
|||
{ 'GroupId' => group[:group_id],
|
||||
'GroupName' => name,
|
||||
'Path' => group[:path],
|
||||
'Arn' => group[:arn] }
|
||||
'Arn' => (group[:arn]).strip }
|
||||
end,
|
||||
'IsTruncated' => false,
|
||||
'RequestId' => Fog::AWS::Mock.request_id }
|
||||
|
|
|
@ -51,7 +51,7 @@ module Fog
|
|||
{ 'GroupId' => group[:group_id],
|
||||
'GroupName' => name,
|
||||
'Path' => group[:path],
|
||||
'Arn' => group[:arn] }
|
||||
'Arn' => (group[:arn]).strip }
|
||||
end,
|
||||
'IsTruncated' => false,
|
||||
'RequestId' => Fog::AWS::Mock.request_id
|
||||
|
|
|
@ -46,7 +46,7 @@ module Fog
|
|||
{ 'UserId' => data[:user_id],
|
||||
'Path' => data[:path],
|
||||
'UserName' => user,
|
||||
'Arn' => data[:arn] }
|
||||
'Arn' => (data[:arn]).strip }
|
||||
end,
|
||||
'IsTruncated' => false,
|
||||
'RequestId' => Fog::AWS::Mock.request_id }
|
||||
|
|
|
@ -21,7 +21,7 @@ module Fog
|
|||
request({
|
||||
'Action' => 'ConfirmSubscription',
|
||||
'Token' => token,
|
||||
'TopicArn' => arn,
|
||||
'TopicArn' => arn.strip,
|
||||
:parser => Fog::Parsers::AWS::SNS::ConfirmSubscription.new
|
||||
}.merge!(options))
|
||||
end
|
||||
|
|
|
@ -17,7 +17,7 @@ module Fog
|
|||
def delete_topic(arn)
|
||||
request({
|
||||
'Action' => 'DeleteTopic',
|
||||
'TopicArn' => arn,
|
||||
'TopicArn' => arn.strip,
|
||||
:parser => Fog::Parsers::AWS::SNS::DeleteTopic.new
|
||||
})
|
||||
end
|
||||
|
|
|
@ -17,7 +17,7 @@ module Fog
|
|||
def get_topic_attributes(arn)
|
||||
request({
|
||||
'Action' => 'GetTopicAttributes',
|
||||
'TopicArn' => arn,
|
||||
'TopicArn' => arn.strip,
|
||||
:parser => Fog::Parsers::AWS::SNS::GetTopicAttributes.new
|
||||
})
|
||||
end
|
||||
|
|
|
@ -19,7 +19,7 @@ module Fog
|
|||
def list_subscriptions_by_topic(arn, options = {})
|
||||
request({
|
||||
'Action' => 'ListSubscriptionsByTopic',
|
||||
'TopicArn' => arn,
|
||||
'TopicArn' => arn.strip,
|
||||
:parser => Fog::Parsers::AWS::SNS::ListSubscriptions.new
|
||||
}.merge!(options))
|
||||
end
|
||||
|
|
|
@ -22,7 +22,7 @@ module Fog
|
|||
request({
|
||||
'Action' => 'Publish',
|
||||
'Message' => message,
|
||||
'TopicArn' => arn,
|
||||
'TopicArn' => arn.strip,
|
||||
:parser => Fog::Parsers::AWS::SNS::Publish.new
|
||||
}.merge!(options))
|
||||
end
|
||||
|
|
|
@ -21,7 +21,7 @@ module Fog
|
|||
'Action' => 'SetTopicAttributes',
|
||||
'AttributeName' => attribute_name,
|
||||
'AttributeValue' => attribute_value,
|
||||
'TopicArn' => arn,
|
||||
'TopicArn' => arn.strip,
|
||||
:parser => Fog::Parsers::AWS::SNS::SetTopicAttributes.new
|
||||
})
|
||||
end
|
||||
|
|
|
@ -21,7 +21,7 @@ module Fog
|
|||
'Action' => 'Subscribe',
|
||||
'Endpoint' => endpoint,
|
||||
'Protocol' => protocol,
|
||||
'TopicArn' => arn,
|
||||
'TopicArn' => arn.strip,
|
||||
:parser => Fog::Parsers::AWS::SNS::Subscribe.new
|
||||
})
|
||||
end
|
||||
|
|
|
@ -17,7 +17,7 @@ module Fog
|
|||
def unsubscribe(arn)
|
||||
request({
|
||||
'Action' => 'Unsubscribe',
|
||||
'SubscriptionArn' => arn,
|
||||
'SubscriptionArn' => arn.strip,
|
||||
:parser => Fog::Parsers::AWS::SNS::Unsubscribe.new
|
||||
})
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue