From 3cca59847493041984c9adf9cf638fab54cfadd0 Mon Sep 17 00:00:00 2001 From: Philipp Pahl Date: Wed, 28 Sep 2011 10:14:58 +0200 Subject: [PATCH 1/2] Converting empty uri path to / in aws_options --- lib/cloud_providers/ec2/ec2.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cloud_providers/ec2/ec2.rb b/lib/cloud_providers/ec2/ec2.rb index 0967d2e6f..4749539e0 100644 --- a/lib/cloud_providers/ec2/ec2.rb +++ b/lib/cloud_providers/ec2/ec2.rb @@ -386,7 +386,7 @@ def aws_options(opts={}) { :access_key_id => access_key, :secret_access_key=> secret_access_key, :use_ssl => (uri.scheme=='https'), - :path => uri.path, + :path => (uri.path.empty? ? '/' : uri.path), :host => uri.host, :port => uri.port }.merge(opts) From 5ec80dfdf0a31e901663f1376200a615fe6b13a8 Mon Sep 17 00:00:00 2001 From: Philipp Pahl Date: Fri, 30 Sep 2011 14:12:38 +0200 Subject: [PATCH 2/2] In function maybe the user decision did not have an effect since the value for line was set outside the appropriate scope. This is fixed now. --- lib/cloud_providers/cloud_provider.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/cloud_providers/cloud_provider.rb b/lib/cloud_providers/cloud_provider.rb index f02bc0f56..5d70e9c5d 100644 --- a/lib/cloud_providers/cloud_provider.rb +++ b/lib/cloud_providers/cloud_provider.rb @@ -63,6 +63,7 @@ def cloud def maybe(action_description, default='Y', &block) puts "About to #{action_description}. Type 'Y' to do this, 'N' to skip. #{default} will be chosen within 10 seconds." + line = nil begin Timeout::timeout(10) do line = $stdin.readline