Skip to content
This repository has been archived by the owner on Jan 20, 2019. It is now read-only.

Hi! I cleaned up your code for you! #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ You can redistribute it and/or modify it under either the terms of the GPL
files under the ./missing directory. See each file for the copying
condition.

5. The scripts and library files supplied as input to or produced as
5. The scripts and library files supplied as input to or produced as
output from the software do not automatically fall under the
copyright of the software, but belong to whomever generated them,
copyright of the software, but belong to whomever generated them,
and may be sold commercially, and may be aggregated with this
software.

Expand Down
2 changes: 1 addition & 1 deletion deps.rip
Original file line number Diff line number Diff line change
@@ -1 +1 @@
xml-simple 1.0.12
xml-simple 1.0.12
2 changes: 1 addition & 1 deletion lib/AWS.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def AWS.canonical_string(params, host, method="POST", base="/")
"=" + CGI::escape(p[1].to_s))
# Ensure spaces are encoded as '%20', not '+'
encoded = encoded.gsub('+', '%20')
# According to RFC3986 (the scheme for values expected by signing requests), '~'
# According to RFC3986 (the scheme for values expected by signing requests), '~'
# should not be encoded
encoded = encoded.gsub('%7E', '~')
end
Expand Down
6 changes: 3 additions & 3 deletions lib/AWS/EC2/images.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ def register_image( options = {} )
#
# Deregistered images will be included in the returned results for an unspecified interval subsequent to
# deregistration.
#
#
# The results can be filtered using the filter argument. The EC2 API reference for a full description of
# filter types and arguments.
#
# @example
#
# @example
# @ec2.describe_images(:owner_id => ['self'], :filter => [{"tag:Role" => "App"}])
#
# @option options [Array] :image_id ([])
Expand Down
4 changes: 2 additions & 2 deletions lib/AWS/EC2/spot_prices.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ module EC2
class Base < AWS::Base

# This method returns historical information about spot prices.
#
# Amazon periodically sets the spot price for each instance type based on
#
# Amazon periodically sets the spot price for each instance type based on
# available capacity and current spot instance requests.
#
# @option options [Time] :start_time (nil)
Expand Down
6 changes: 3 additions & 3 deletions lib/AWS/ELB.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module ELB

# Which host FQDN will we connect to for all API calls to AWS?
# If ELB_URL is defined in the users ENV we can override the default with that.
#
#
# @example
# export ELB_URL='https://elasticloadbalancing.amazonaws.com'
if ENV['ELB_URL']
Expand All @@ -24,7 +24,7 @@ def api_version
def default_host
DEFAULT_HOST
end

# Raises the appropriate error if the specified Net::HTTPResponse object
# contains an Amazon EC2 error; returns +false+ otherwise.
def aws_error?(response)
Expand Down Expand Up @@ -62,7 +62,7 @@ def aws_error?(response)
end

end

end

end
Expand Down
2 changes: 1 addition & 1 deletion test/test_Autoscaling_groups.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
'UpperThreshold' => "1.5",
'UpperBreachScaleIncrement' => "1",
'BreachDuration' => "120",
'Namespace' => "AWS/EC2",
'Namespace' => "AWS/EC2",
}).returns stub(:body => @create_or_update_trigger_response, :is_a? => true)

valid_create_or_update_scaling_trigger_params = {:autoscaling_group_name => "AutoScalingGroupName", :dimensions => {:name => "AutoScalingGroupName", :value => "Bob"}, :unit => "Seconds", :measure_name => "CPUUtilization", :namespace => "AWS/EC2", :statistic => "Average", :period => 120, :trigger_name => "AFunNameForATrigger", :lower_threshold => 0.2, :lower_breach_scale_increment => "-1", :upper_threshold => 1.5, :upper_breach_scale_increment => 1, :breach_duration => 120}
Expand Down
6 changes: 3 additions & 3 deletions test/test_EC2_security_groups.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,13 @@


specify "permissions should be able to be added to a security group with authorize_security_group_ingress." do
@ec2.stubs(:make_request).with('AuthorizeSecurityGroupIngress',
@ec2.stubs(:make_request).with('AuthorizeSecurityGroupIngress',
{ "GroupName" => "WebServers",
"IpPermissions.1.IpProtocol" => "tcp",
"IpPermissions.1.FromPort" => "8000",
"IpPermissions.1.ToPort" => "80",
"IpPermissions.1.IpRanges.1" => "0.0.0.0/24",
"IpPermissions.1.Groups.1.GroupName" => "Source SG Name",
"IpPermissions.1.Groups.1.GroupName" => "Source SG Name",
"IpPermissions.1.Groups.1.UserId" => "123"}).
returns stub(:body => @authorize_security_group_ingress_response_body, :is_a? => true)

Expand All @@ -190,7 +190,7 @@
"IpPermissions.1.FromPort" => "8000",
"IpPermissions.1.ToPort" => "80",
"IpPermissions.1.IpRanges.1" => "0.0.0.0/24",
"IpPermissions.1.Groups.1.GroupName" => "Source SG Name",
"IpPermissions.1.Groups.1.GroupName" => "Source SG Name",
"IpPermissions.1.Groups.1.UserId" => "123"}).
returns stub(:body => @revoke_security_group_ingress_response_body, :is_a? => true)

Expand Down