right_aws 3.0.3 → 3.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -339,3 +339,10 @@ the source key.
339
339
  - Fixed:
340
340
  - S3 Content-Type not set in Ruby 1.9.2
341
341
  - error in rds_interface describe_db_snapshots in Ruby 1.9.2
342
+
343
+
344
+ === 3.0.4
345
+ Release Notes:
346
+ - Fixed:
347
+ - #125 - fixes redirect bug in file PUT requests (Cary)
348
+ - some other minor fixes
@@ -1101,19 +1101,21 @@ module RightAws
1101
1101
  sleep @reiteration_delay
1102
1102
  @reiteration_delay *= 2
1103
1103
 
1104
- # Always make sure that the fp is set to point to the beginning(?)
1105
- # of the File/IO. TODO: it assumes that offset is 0, which is bad.
1106
- if(request[:request].body_stream && request[:request].body_stream.respond_to?(:pos))
1107
- begin
1108
- request[:request].body_stream.pos = 0
1109
- rescue Exception => e
1110
- @logger.warn("Retry may fail due to unable to reset the file pointer" +
1111
- " -- #{self.class.name} : #{e.inspect}")
1112
- end
1113
- end
1114
1104
  else
1115
1105
  @aws.logger.info("##### Retry ##{@retries} is being performed due to a redirect. ####")
1116
1106
  end
1107
+
1108
+ # Always make sure that the fp is set to point to the beginning(?)
1109
+ # of the File/IO. TODO: it assumes that offset is 0, which is bad.
1110
+ if(request[:request].body_stream && request[:request].body_stream.respond_to?(:pos))
1111
+ begin
1112
+ request[:request].body_stream.pos = 0
1113
+ rescue Exception => e
1114
+ @logger.warn("Retry may fail due to unable to reset the file pointer" +
1115
+ " -- #{self.class.name} : #{e.inspect}")
1116
+ end
1117
+ end
1118
+
1117
1119
  result = @aws.request_info(request, @parser)
1118
1120
  else
1119
1121
  @aws.logger.warn("##### Ooops, time is over... ####")
@@ -2,7 +2,7 @@ module RightAws #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 3 unless defined?(MAJOR)
4
4
  MINOR = 0 unless defined?(MINOR)
5
- TINY = 3 unless defined?(TINY)
5
+ TINY = 4 unless defined?(TINY)
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.') unless defined?(STRING)
8
8
  end
@@ -81,9 +81,19 @@ module RightAws
81
81
  # Amazon EC2 Instance Types : http://www.amazon.com/b?ie=UTF8&node=370375011
82
82
  # Default EC2 instance type (platform)
83
83
  DEFAULT_INSTANCE_TYPE = 'm1.small'
84
- INSTANCE_TYPES = ['t1.micro','m1.small','c1.medium','m1.large','m1.xlarge',
85
- 'c1.xlarge', 'm2.xlarge', 'm2.2xlarge', 'm2.4xlarge',
86
- 'cc1.4xlarge', 'cg1.4xlarge']
84
+ INSTANCE_TYPES = [ 't1.micro' ,
85
+ 'm1.small' ,
86
+ 'm1.medium' ,
87
+ 'm1.large' ,
88
+ 'm1.xlarge' ,
89
+ 'c1.medium' ,
90
+ 'c1.xlarge' ,
91
+ 'm2.xlarge' ,
92
+ 'm2.2xlarge',
93
+ 'm2.4xlarge',
94
+ 'cc1.4xlarge',
95
+ 'cg1.4xlarge',
96
+ 'cc2.8xlarge']
87
97
 
88
98
  @@bench = AwsBenchmarkingBlock.new
89
99
  def self.bench_xml
@@ -377,10 +377,15 @@ module RightAws
377
377
  when :revoke, :remove then action = "RevokeSecurityGroupIngress"
378
378
  else raise "Unknown action #{action.inspect}!"
379
379
  end
380
- hash['GroupName'] = group_name
381
- hash['SourceSecurityGroupName'] = params[:source_group] unless params[:source_group].right_blank?
382
- hash['SourceSecurityGroupOwnerId'] = params[:source_group_owner].to_s.gsub(/-/,'') unless params[:source_group_owner].right_blank?
383
- hash['IpProtocol'] = params[:protocol] unless params[:protocol].right_blank?
380
+ hash['GroupName'] = group_name
381
+ hash['SourceSecurityGroupName'] = params[:source_group] unless params[:source_group].right_blank?
382
+ hash['IpProtocol'] = params[:protocol] unless params[:protocol].right_blank?
383
+ unless params[:source_group_owner].right_blank?
384
+ # Do remove dashes only if the source owner is in format of "7011-0219-8268"
385
+ source_group_owner = params[:source_group_owner].to_s
386
+ source_group_owner.gsub!(/-/,'') if source_group_owner[/^\d{4}-\d{4}-\d{4}$/]
387
+ hash['SourceSecurityGroupOwnerId'] = source_group_owner
388
+ end
384
389
  unless params[:port].right_blank?
385
390
  hash['FromPort'] = params[:port]
386
391
  hash['ToPort'] = params[:port]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: right_aws
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
- - 3
10
- version: 3.0.3
9
+ - 4
10
+ version: 3.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - RightScale, Inc.
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-03-08 00:00:00 Z
18
+ date: 2012-04-10 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: right_http_connection