aws 1.11.9 → 1.11.36

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.
@@ -0,0 +1,87 @@
1
+ =begin
2
+ Copyright (c) 2007 RightScale, Inc.
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining
5
+ a copy of this software and associated documentation files (the
6
+ 'Software'), to deal in the Software without restriction, including
7
+ without limitation the rights to use, copy, modify, merge, publish,
8
+ distribute, sublicense, and/or sell copies of the Software, and to
9
+ permit persons to whom the Software is furnished to do so, subject to
10
+ the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+ =end
23
+
24
+ # Stub extension/redefinition of RightHttpConnection for testing purposes.
25
+ require 'net/http'
26
+ require 'rubygems'
27
+ require 'right_http_connection'
28
+
29
+ module Net
30
+ class HTTPResponse
31
+ alias_method :real_body, :body
32
+ def setmsg(msg)
33
+ @mymsg = msg
34
+ end
35
+
36
+ def body
37
+ # defined?() helps us to get rid of a bunch of 'warnings'
38
+ (defined?(@mymsg) && @mymsg) ? @mymsg : real_body
39
+ end
40
+ end
41
+ end
42
+
43
+ module Rightscale
44
+
45
+ class HttpConnection
46
+ @@response_stack = []
47
+
48
+ alias_method :real_request, :request
49
+
50
+ def request(request_params, &block)
51
+ if(@@response_stack.length == 0)
52
+ return real_request(request_params, &block)
53
+ end
54
+
55
+ if(block)
56
+ # Do something special
57
+ else
58
+ next_response = HttpConnection::pop()
59
+ classname = Net::HTTPResponse::CODE_TO_OBJ["#{next_response[:code]}"]
60
+ response = classname.new("1.1", next_response[:code], next_response[:msg])
61
+ if(next_response[:msg])
62
+ response.setmsg(next_response[:msg])
63
+ end
64
+ response
65
+ end
66
+ end
67
+
68
+ def self.reset
69
+ @@response_stack = []
70
+ end
71
+
72
+ def self.push(code, msg=nil)
73
+ response = {:code => code, :msg => msg}
74
+ @@response_stack << response
75
+ end
76
+
77
+ def self.pop
78
+ @@response_stack.pop
79
+ end
80
+
81
+ def self.length
82
+ @@response_stack.length
83
+ end
84
+
85
+ end
86
+
87
+ end
@@ -1,4 +1,5 @@
1
1
  require File.dirname(__FILE__) + '/test_helper.rb'
2
+ require '../test_credentials'
2
3
 
3
4
  class TestSdb < Test::Unit::TestCase
4
5
 
@@ -23,15 +23,22 @@ class TestCredentials
23
23
  @@aws_secret_access_key = newval
24
24
  end
25
25
 
26
+ require 'yaml'
26
27
  def self.get_credentials
27
- Dir.chdir do
28
+ #Dir.chdir do
28
29
  begin
29
- Dir.chdir('./.rightscale') do
30
- require 'testcredentials'
30
+ puts Dir.chdir
31
+ Dir.chdir('.amazon') do
32
+ credentials = YAML::load(File.open("testcredentials.yml"))
33
+ puts credentials.inspect
34
+ self.aws_access_key_id = credentials["access_key"]
35
+ self.aws_secret_access_key = credentials["secret_key"]
36
+ puts 'akey=' + self.aws_access_key_id
31
37
  end
32
38
  rescue Exception => e
33
- puts "Couldn't chdir to ~/.rightscale: #{e.message}"
39
+ puts "Couldn't chdir to ~/.amazon: #{e.message}"
40
+ raise e
34
41
  end
35
- end
42
+ #end
36
43
  end
37
44
  end
@@ -0,0 +1,13 @@
1
+ require 'test/unit'
2
+ $: << File.dirname(__FILE__)
3
+ require 'test_credentials'
4
+ TestCredentials.get_credentials
5
+
6
+ require 'http_connection'
7
+ require 'ec2/test_right_ec2.rb'
8
+ require 's3/test_right_s3.rb'
9
+ require 's3/test_right_s3_stubbed.rb'
10
+ require 'sqs/test_right_sqs.rb'
11
+ require 'sqs/test_right_sqs_gen2.rb'
12
+ require 'sdb/test_right_sdb.rb'
13
+ require 'acf/test_right_acf.rb'
metadata CHANGED
@@ -1,76 +1,51 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.9
4
+ version: 1.11.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - Travis Reeder
8
+ - Chad Arimura
9
+ - RightScale
8
10
  autorequire:
9
11
  bindir: bin
10
12
  cert_chain: []
11
13
 
12
- date: 2009-06-06 00:00:00 -07:00
14
+ date: 2009-09-29 00:00:00 -07:00
13
15
  default_executable:
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: hoe
17
- type: :development
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: 2.0.0
24
- version:
25
- description: |-
26
- The RightScale AWS gems have been designed to provide a robust, fast, and secure interface to Amazon EC2, EBS, S3, SQS, SDB, and CloudFront.
27
- These gems have been used in production by RightScale since late 2006 and are being maintained to track enhancements made by Amazon.
28
- The RightScale AWS gems comprise:
29
-
30
- - RightAws::Ec2 -- interface to Amazon EC2 (Elastic Compute Cloud) and the
31
- associated EBS (Elastic Block Store)
32
- - RightAws::S3 and RightAws::S3Interface -- interface to Amazon S3 (Simple Storage Service)
33
- - RightAws::Sqs and RightAws::SqsInterface -- interface to first-generation Amazon SQS (Simple Queue Service) (API version 2007-05-01)
34
- - RightAws::SqsGen2 and RightAws::SqsGen2Interface -- interface to second-generation Amazon SQS (Simple Queue Service) (API version 2008-01-01)
35
- - RightAws::SdbInterface and RightAws::ActiveSdb -- interface to Amazon SDB (SimpleDB)
36
- - RightAws::AcfInterface -- interface to Amazon CloudFront, a content distribution service
37
- email:
38
- - travis@appoxy.com
16
+ dependencies: []
17
+
18
+ description: AWS Ruby Library for interfacing with Amazon Web Services.
19
+ email: travis@appoxy.com
39
20
  executables: []
40
21
 
41
22
  extensions: []
42
23
 
43
24
  extra_rdoc_files:
44
- - History.txt
45
- - Manifest.txt
46
- - README.txt
25
+ - README.markdown
47
26
  files:
48
- - History.txt
49
- - Manifest.txt
50
- - README.txt
51
- - Rakefile
27
+ - lib/acf/right_acf_interface.rb
52
28
  - lib/awsbase/benchmark_fix.rb
53
29
  - lib/awsbase/right_awsbase.rb
54
30
  - lib/awsbase/support.rb
55
31
  - lib/ec2/right_ec2.rb
32
+ - lib/ec2/right_mon_interface.rb
33
+ - lib/elb/right_elb_interface.rb
56
34
  - lib/right_aws.rb
57
35
  - lib/s3/right_s3.rb
58
36
  - lib/s3/right_s3_interface.rb
59
37
  - lib/sdb/active_sdb.rb
60
38
  - lib/sdb/right_sdb_interface.rb
61
39
  - lib/sqs/right_sqs.rb
62
- - lib/sqs/right_sqs_gen2.rb
63
- - lib/sqs/right_sqs_gen2_interface.rb
64
40
  - lib/sqs/right_sqs_interface.rb
65
- - lib/acf/right_acf_interface.rb
41
+ - README.markdown
66
42
  has_rdoc: true
67
- homepage: http://code.google.com/p/simple-record/
43
+ homepage: http://github.com/appoxy/aws/
68
44
  licenses: []
69
45
 
70
46
  post_install_message:
71
47
  rdoc_options:
72
- - --main
73
- - README.txt
48
+ - --charset=UTF-8
74
49
  require_paths:
75
50
  - lib
76
51
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -87,16 +62,17 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
62
  version:
88
63
  requirements: []
89
64
 
90
- rubyforge_project: spacegems
91
- rubygems_version: 1.3.2
65
+ rubyforge_project:
66
+ rubygems_version: 1.3.5
92
67
  signing_key:
93
- specification_version: 3
94
- summary: The RightScale AWS gems have been designed to provide a robust, fast, and secure interface to Amazon EC2, EBS, S3, SQS, SDB, and CloudFront
68
+ specification_version: 2
69
+ summary: AWS Ruby Library for interfacing with Amazon Web Services.
95
70
  test_files:
96
71
  - test/acf/test_helper.rb
97
72
  - test/acf/test_right_acf.rb
98
73
  - test/ec2/test_helper.rb
99
74
  - test/ec2/test_right_ec2.rb
75
+ - test/http_connection.rb
100
76
  - test/s3/test_helper.rb
101
77
  - test/s3/test_right_s3.rb
102
78
  - test/s3/test_right_s3_stubbed.rb
@@ -107,3 +83,4 @@ test_files:
107
83
  - test/sqs/test_right_sqs.rb
108
84
  - test/sqs/test_right_sqs_gen2.rb
109
85
  - test/test_credentials.rb
86
+ - test/ts_right_aws.rb
@@ -1,254 +0,0 @@
1
- == 1.1.0 2007-08-10
2
- Initial release.
3
-
4
- == 1.2.0 2007-09-12
5
-
6
- * r1718, todd, 2007-09-12 15:34:37
7
- * # 458, Extensive documentation review, rework, and expansion. Also added
8
- coverage analysis to the test suite using RCov.
9
-
10
- * r1690, todd, 2007-09-07 15:23:11
11
- * # 447, Add support.rb to manifest
12
-
13
- * r1688, todd, 2007-09-07 13:57:39
14
- * # 447, Use Active Support if available, but don't require it. Load our own
15
- extensions if it's not present. This keeps us from overloading ActiveSupport if
16
- a user's already using it.
17
-
18
- * r1687, todd, 2007-09-07 11:36:43
19
- * # 447, Removed dependency on activesupport
20
-
21
- * r1676, konstantin, 2007-09-06 01:27:09
22
- * paid AMIs, small fix
23
-
24
- * r1667, konstantin, 2007-09-05 12:58:10
25
- * # 427, paid AMI support for ec2_instances
26
-
27
- * r1658, konstantin, 2007-09-05 01:02:25
28
- * params improvements for ec2.describe_xxx, now ones can use a String as well as an Array.
29
-
30
- * r1653, konstantin, 2007-09-04 12:31:19
31
- * libxml and paid AMI support added
32
-
33
- * r1581, tve, 2007-08-24 16:21:45
34
- * Improved RightAws documentation
35
-
36
- == 1.3.0 2007-09-26
37
-
38
- * r1754, todd, 2007-09-19 13:48:34
39
- * # 487, # 488, Consolidate a lot of code that was repeated in three places.
40
- Fix error handling path when using streaming GET interfaces with S3.
41
- Also add a stub for RightHttpConnection which allows more control over the
42
- unit tests. Expand the unit tests and coverage tests.
43
-
44
- * r1755, todd, 2007-09-19 14:29:19
45
- * # 487, RDoc fixes after code consolidation
46
-
47
- * r1866, konstantin, 2007-10-05 06:17:36
48
- * # 220, close connection on HTTP 5xx/4xx errors
49
-
50
- == 1.4.0 2007-10-10
51
-
52
- * r1868, konstantin, 2007-10-05 06:38:37
53
- * # 220, inst_type branch merge into 1.3.0 release
54
-
55
- * r1869, konstantin, 2007-10-05 07:32:34
56
- * right_http_connection 1.1.1 requirements fixed
57
-
58
- * r1879, konstantin, 2007-10-07 02:11:24
59
- * # 524, blocks added to ec2_describe_xxx to support aws_cache
60
-
61
- * r1924, konstantin, 2007-10-12 11:35:06
62
- * # 536, user_data bug fix
63
-
64
- * r1929, tve, 2007-10-15 00:00:11
65
- * Fix libxml/rexml selection bug
66
-
67
- * r1938, konstantin, 2007-10-16 10:53:56
68
- * instance type support is set to default
69
-
70
- == 1.4.3 2007-10-25
71
-
72
- * r1983, konstantin, 2007-10-25 22:33:00 +0400
73
- * Fixed ActiveSupport requirement bug (thanks to Toby)
74
- * Fixed HttpConnection logging to stdout bug (thanks to Toby)
75
-
76
- == 1.4.4
77
-
78
- * r1999, tve, 2007-11-01 00:07:00 -0700
79
- * Fixed escaping issue affecting key names in S3 gem
80
- * Fixed duplicate marker in S3 incremental bucket listing
81
-
82
- * r2001, konstantin, 2007-11-01 12:03:13 +0300
83
- * Fixed multiple permissions assignment on Grantee#grant/revoke
84
- * Fixed new grantee permissions set ingnore (Grantee#apply)
85
- * S3::Grantee#exists? method added
86
-
87
- * r2109, konstantin, 2007-11-12 21:49:36 +0300
88
- * RightAwsBaseInterface: caching implemented.
89
- (The Ec2 functions are being cached: describe_images, describe_instances,
90
- describe_security_groups and describe_key_pairs)
91
-
92
- == 1.4.5 - 1.4.6
93
- * r 2619, konstantin, 01-17-08 16:18:36 +0300
94
- * S3 Location constraints support added.
95
- * Fixed bug with trailing '/' in the bucket name for 'EU' located buckets
96
- * Added: S3Interface#bucket_location, S3::Bucket#location
97
-
98
- == 1.4.7
99
- * r 2622, konstantin, 01-18-08 13:52:20 +0300
100
- * Virtual domains doc added
101
- * S3 Query API fixed to support virtual domains.
102
-
103
- == 1.4.8
104
- * r 2650, konstantin, 01-24-08 11:12:00 +0300
105
- * net_fix.rb moved to right_http_connection
106
-
107
- == 1.5.0
108
- * r 2688, konstantin, 02-30-08 15:42:00 +0300
109
- * SDB support added.
110
- * RightAws::S3::bucket and RightAws::S3::Bucket.create methods behaviour
111
- changed: param +create+ is set to +false+ by default.
112
-
113
- == 1.6.0
114
-
115
- * r2780, todd, 2008-02-11 11:41:07 -0800 (Mon, 11 Feb 2008), 4 lines
116
- * Some doc updates & tweaks: we now support ultra-large PUTs to S3, small SDB
117
- cleanups, add SDB to the list of interfaces in RightAws, update some copyrights,
118
- warn about loading attachment_fu AFTER right_aws (big no-no).
119
-
120
- * r2784, todd, 2008-02-11 13:46:47 -0800 (Mon, 11 Feb 2008), 2 lines
121
- * One final clarification: you may get a Net::HTTP bad monkey patch exception
122
-
123
- * r2880, todd, 2008-02-25 18:06:22 -0800 (Mon, 25 Feb 2008), 2 lines
124
- * Add SQS 'Gen 2' interface implementation
125
-
126
- * r2913, todd, 2008-02-29 16:57:07 -0800 (Fri, 29 Feb 2008), 3 lines
127
- * SqsGen2 (object interface), unit tests for both interfaces, documentation updates.
128
-
129
- * r2922, todd, 2008-03-03 15:26:42 -0800 (Mon, 03 Mar 2008), 2 lines
130
- * couple of documentation tweaks in prep for 1.6.0
131
-
132
- == 1.6.1
133
-
134
- * r2963, todd, 2008-03-06 19:10:23 -0800 (Thu, 06 Mar 2008), 3 lines
135
- * (#950) Many minor fixes in incrementally_list_bucket to prevent a death loop
136
- in certain rare conditions
137
-
138
- == 1.7.0
139
-
140
- * r3051, konstantin, 2008-03-14 21:26:12 +0300 (Fri, 14 Mar 2008), 1 line
141
- * #897, ActiveSdb alpha release
142
-
143
- == 1.7.1
144
-
145
- Do not autoload right_sdb with the rest of the modules; it requires uuidtools.
146
- We want the user to explicly request ActiveSdb, at least as long as it is
147
- alpha/beta.
148
-
149
- Fix escaping problem in SqsGen2Interface: POST bodies did not properly escape the '&' character
150
-
151
- == 1.7.2
152
-
153
- Release Notes:
154
-
155
- RightAws includes some new features, including:
156
- - Support in RightAws::S3 and RightAws::S3Interface for S3 key copy, move, and rename
157
- - Support for signature version 0 request authentication to EC2, SQS, and SDB
158
- - Enhanced S3 object meta-header read and update
159
- - Interoperability with clouds running Eucalyptus (http://eucalyptus.cs.ucsb.edu)
160
- [ Contributed by the Eucalyptus group ]
161
- - Support for c1.medium and c1.xlarge instance types
162
-
163
- Bug fixes include:
164
- - Corrected the failure, under certain conditions, of retries of streaming PUTs to S3.
165
- We now reset the seek pointer of the streaming IO object to its initial position.
166
- - Removal of an accidental dependency on ActiveSupport in RightAws::S3Interface.get_link().
167
- - Monkey-patch of the Ruby File class on Windows platforms to correct a problem in lstat.
168
- The lstat bug was causing failure of very large file uploads on Windows [ Contributed by Benjamin Allfree ]
169
- - Fixed parsing of the ETag field for S3 objects
170
-
171
- == 1.7.3
172
-
173
- Release Notes:
174
-
175
- - Removed the 1.7.2 monkey-patch of the Ruby File class on Windows. This patch broke Rails 2.0.
176
- The patch is now included in the README for anyone to use at their own risk.
177
-
178
- == 1.8.0
179
-
180
- Release Notes:
181
-
182
- This release adds major new features to RightAws to support Amazon's new
183
- Elastic Block Store (EBS). Via the RightAws::Ec2 module, users can create
184
- and delete EBS volumes, attach and detach them from instances, snapshot
185
- volumes, and list the available volumes and snapshots.
186
-
187
- Bug fixes include correction of RightAws::S3 copy's failure to url-encode
188
- the source key.
189
-
190
- == 1.8.1
191
-
192
- Release Notes:
193
-
194
- RightScale::SdbInterface & ::ActiveSdb have several enhancements, including:
195
- - RightAws::SdbInterface#last_query_expression added for debug puposes
196
- - RightAws::ActiveSdb::Base#query :order and :auto_load options added to support query
197
- result sorting and attributes auto loading
198
- - RightAws::ActiveSdb::Base#find_all_by_ and find_by_ helpers improved to support
199
- :order, :auto_load, :limit and :next_token options
200
- - RightAws::SdbInterface#delete_attributes bug fixed
201
- - SdbInterface allows specification of a string value to use for
202
- representing Ruby nil in SDB.
203
- - Sdb tests fixed and improved
204
-
205
- The ::S3 interface now has support for S3's server access logging.
206
- Amazon considers server access logging to be a beta or provisional feature.
207
-
208
- === 1.9.0
209
-
210
- Release Notes:
211
- - RightAws::Ec2 now supports Windows instances. Added:
212
- - Ec2::get_initial_password
213
- - Ec2::bundle_instance
214
- - Ec2::describe_bundle_tasks
215
- - Ec::cancel_bundle_task
216
-
217
- - Full Amazon CloudFront support added with RightAws::AcfInterface
218
- - Bug fixes to S3Interface::store_object_and_verify and
219
- S3Interface::retrieve_object_and_verify (thanks to numerous user reports)
220
- - Updates to caching for Ec2::describe_images_by methods
221
- - Ec2 now has Ec2::last_request_id
222
-
223
- === 1.10.0
224
-
225
- Release Notes:
226
-
227
- The big new features are SDB's SQL-like query and query_with_attributes
228
- support as well as signature v2 support for all services. There are also
229
- numerous bug fixes, many of them reported and patched by users and
230
- customers.
231
-
232
- - AwsBase: signature v2 support added
233
- - AwsBase: fix the regex matching for xmlpath which didn't work in Ruby
234
- 1.8.7 (thanks to a customer report)
235
- - Ec2: describe_availability_zones improved to support regions
236
- - Ec2: Disabled retries when EC2 returns "ServiceUnavailable: Request limit
237
- exceeded"
238
- - Ec2: Use POST for large queries; this avoids truncation of large user data
239
- when launching instances (thanks to Bob for the report)
240
- - CloudFront: docs fixes
241
- - SDB: added: SQL-like query, select and query_with_attributes support
242
- - SDB: fixed no method error when searching for id that doesn't exist
243
- (thanks to multiple users for reporting this)
244
- - S3: Fixed overzealous URL-encoding when generating URLs for S3 keys
245
- (thanks to a bug report on the RubyForge forum)
246
-
247
- === 1.10.1
248
-
249
- Release Notes:
250
-
251
- First fork release.
252
-
253
- - Fixed to_a warnings
254
- - Added different connection modes.