right_aws 1.9.0 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. data/History.txt +164 -13
  2. data/Manifest.txt +28 -1
  3. data/README.txt +12 -10
  4. data/Rakefile +56 -29
  5. data/lib/acf/right_acf_interface.rb +343 -172
  6. data/lib/acf/right_acf_invalidations.rb +144 -0
  7. data/lib/acf/right_acf_origin_access_identities.rb +230 -0
  8. data/lib/acf/right_acf_streaming_interface.rb +229 -0
  9. data/lib/acw/right_acw_interface.rb +248 -0
  10. data/lib/as/right_as_interface.rb +698 -0
  11. data/lib/awsbase/right_awsbase.rb +755 -115
  12. data/lib/awsbase/support.rb +2 -78
  13. data/lib/awsbase/version.rb +9 -0
  14. data/lib/ec2/right_ec2.rb +274 -1294
  15. data/lib/ec2/right_ec2_ebs.rb +514 -0
  16. data/lib/ec2/right_ec2_images.rb +444 -0
  17. data/lib/ec2/right_ec2_instances.rb +797 -0
  18. data/lib/ec2/right_ec2_monitoring.rb +70 -0
  19. data/lib/ec2/right_ec2_placement_groups.rb +108 -0
  20. data/lib/ec2/right_ec2_reserved_instances.rb +243 -0
  21. data/lib/ec2/right_ec2_security_groups.rb +496 -0
  22. data/lib/ec2/right_ec2_spot_instances.rb +422 -0
  23. data/lib/ec2/right_ec2_tags.rb +139 -0
  24. data/lib/ec2/right_ec2_vpc.rb +598 -0
  25. data/lib/ec2/right_ec2_vpc2.rb +382 -0
  26. data/lib/ec2/right_ec2_windows_mobility.rb +84 -0
  27. data/lib/elb/right_elb_interface.rb +573 -0
  28. data/lib/emr/right_emr_interface.rb +728 -0
  29. data/lib/iam/right_iam_access_keys.rb +71 -0
  30. data/lib/iam/right_iam_groups.rb +195 -0
  31. data/lib/iam/right_iam_interface.rb +341 -0
  32. data/lib/iam/right_iam_mfa_devices.rb +67 -0
  33. data/lib/iam/right_iam_users.rb +251 -0
  34. data/lib/rds/right_rds_interface.rb +1657 -0
  35. data/lib/right_aws.rb +30 -13
  36. data/lib/route_53/right_route_53_interface.rb +641 -0
  37. data/lib/s3/right_s3.rb +108 -41
  38. data/lib/s3/right_s3_interface.rb +349 -118
  39. data/lib/sdb/active_sdb.rb +388 -54
  40. data/lib/sdb/right_sdb_interface.rb +323 -64
  41. data/lib/sns/right_sns_interface.rb +286 -0
  42. data/lib/sqs/right_sqs.rb +1 -2
  43. data/lib/sqs/right_sqs_gen2.rb +73 -17
  44. data/lib/sqs/right_sqs_gen2_interface.rb +146 -73
  45. data/lib/sqs/right_sqs_interface.rb +12 -22
  46. data/right_aws.gemspec +91 -0
  47. data/test/README.mdown +39 -0
  48. data/test/acf/test_right_acf.rb +11 -19
  49. data/test/awsbase/test_helper.rb +2 -0
  50. data/test/awsbase/test_right_awsbase.rb +11 -0
  51. data/test/ec2/test_right_ec2.rb +32 -1
  52. data/test/elb/test_helper.rb +2 -0
  53. data/test/elb/test_right_elb.rb +43 -0
  54. data/test/rds/test_helper.rb +2 -0
  55. data/test/rds/test_right_rds.rb +120 -0
  56. data/test/route_53/fixtures/a_record.xml +18 -0
  57. data/test/route_53/fixtures/alias_record.xml +18 -0
  58. data/test/route_53/test_helper.rb +2 -0
  59. data/test/route_53/test_right_route_53.rb +141 -0
  60. data/test/s3/test_right_s3.rb +176 -42
  61. data/test/s3/test_right_s3_stubbed.rb +6 -4
  62. data/test/sdb/test_active_sdb.rb +120 -19
  63. data/test/sdb/test_batch_put_attributes.rb +54 -0
  64. data/test/sdb/test_right_sdb.rb +71 -16
  65. data/test/sns/test_helper.rb +2 -0
  66. data/test/sns/test_right_sns.rb +153 -0
  67. data/test/sqs/test_right_sqs.rb +0 -6
  68. data/test/sqs/test_right_sqs_gen2.rb +104 -49
  69. data/test/ts_right_aws.rb +1 -0
  70. metadata +181 -22
data/History.txt CHANGED
@@ -4,7 +4,7 @@ Initial release.
4
4
  == 1.2.0 2007-09-12
5
5
 
6
6
  * r1718, todd, 2007-09-12 15:34:37
7
- * # 458, Extensive documentation review, rework, and expansion. Also added
7
+ * # 458, Extensive documentation review, rework, and expansion. Also added
8
8
  coverage analysis to the test suite using RCov.
9
9
 
10
10
  * r1690, todd, 2007-09-07 15:23:11
@@ -39,7 +39,7 @@ Initial release.
39
39
  * # 487, # 488, Consolidate a lot of code that was repeated in three places.
40
40
  Fix error handling path when using streaming GET interfaces with S3.
41
41
  Also add a stub for RightHttpConnection which allows more control over the
42
- unit tests. Expand the unit tests and coverage tests.
42
+ unit tests. Expand the unit tests and coverage tests.
43
43
 
44
44
  * r1755, todd, 2007-09-19 14:29:19
45
45
  * # 487, RDoc fixes after code consolidation
@@ -59,13 +59,13 @@ Initial release.
59
59
  * # 524, blocks added to ec2_describe_xxx to support aws_cache
60
60
 
61
61
  * r1924, konstantin, 2007-10-12 11:35:06
62
- * # 536, user_data bug fix
62
+ * # 536, user_data bug fix
63
63
 
64
64
  * r1929, tve, 2007-10-15 00:00:11
65
65
  * Fix libxml/rexml selection bug
66
66
 
67
67
  * r1938, konstantin, 2007-10-16 10:53:56
68
- * instance type support is set to default
68
+ * instance type support is set to default
69
69
 
70
70
  == 1.4.3 2007-10-25
71
71
 
@@ -82,11 +82,11 @@ Initial release.
82
82
  * r2001, konstantin, 2007-11-01 12:03:13 +0300
83
83
  * Fixed multiple permissions assignment on Grantee#grant/revoke
84
84
  * Fixed new grantee permissions set ingnore (Grantee#apply)
85
- * S3::Grantee#exists? method added
85
+ * S3::Grantee#exists? method added
86
86
 
87
87
  * r2109, konstantin, 2007-11-12 21:49:36 +0300
88
88
  * RightAwsBaseInterface: caching implemented.
89
- (The Ec2 functions are being cached: describe_images, describe_instances,
89
+ (The Ec2 functions are being cached: describe_images, describe_instances,
90
90
  describe_security_groups and describe_key_pairs)
91
91
 
92
92
  == 1.4.5 - 1.4.6
@@ -107,7 +107,7 @@ Initial release.
107
107
  == 1.5.0
108
108
  * r 2688, konstantin, 02-30-08 15:42:00 +0300
109
109
  * SDB support added.
110
- * RightAws::S3::bucket and RightAws::S3::Bucket.create methods behaviour
110
+ * RightAws::S3::bucket and RightAws::S3::Bucket.create methods behaviour
111
111
  changed: param +create+ is set to +false+ by default.
112
112
 
113
113
  == 1.6.0
@@ -151,7 +151,7 @@ Initial release.
151
151
  == 1.7.2
152
152
 
153
153
  Release Notes:
154
-
154
+
155
155
  RightAws includes some new features, including:
156
156
  - Support in RightAws::S3 and RightAws::S3Interface for S3 key copy, move, and rename
157
157
  - Support for signature version 0 request authentication to EC2, SQS, and SDB
@@ -165,7 +165,7 @@ Initial release.
165
165
  We now reset the seek pointer of the streaming IO object to its initial position.
166
166
  - Removal of an accidental dependency on ActiveSupport in RightAws::S3Interface.get_link().
167
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 ]
168
+ The lstat bug was causing failure of very large file uploads on Windows [ Contributed by Benjamin Allfree ]
169
169
  - Fixed parsing of the ETag field for S3 objects
170
170
 
171
171
  == 1.7.3
@@ -174,7 +174,7 @@ Initial release.
174
174
 
175
175
  - Removed the 1.7.2 monkey-patch of the Ruby File class on Windows. This patch broke Rails 2.0.
176
176
  The patch is now included in the README for anyone to use at their own risk.
177
-
177
+
178
178
  == 1.8.0
179
179
 
180
180
  Release Notes:
@@ -186,7 +186,7 @@ Initial release.
186
186
 
187
187
  Bug fixes include correction of RightAws::S3 copy's failure to url-encode
188
188
  the source key.
189
-
189
+
190
190
  == 1.8.1
191
191
 
192
192
  Release Notes:
@@ -197,7 +197,7 @@ the source key.
197
197
  result sorting and attributes auto loading
198
198
  - RightAws::ActiveSdb::Base#find_all_by_ and find_by_ helpers improved to support
199
199
  :order, :auto_load, :limit and :next_token options
200
- - RightAws::SdbInterface#delete_attributes bug fixed
200
+ - RightAws::SdbInterface#delete_attributes bug fixed
201
201
  - SdbInterface allows specification of a string value to use for
202
202
  representing Ruby nil in SDB.
203
203
  - Sdb tests fixed and improved
@@ -215,7 +215,158 @@ the source key.
215
215
  - Ec::cancel_bundle_task
216
216
 
217
217
  - Full Amazon CloudFront support added with RightAws::AcfInterface
218
- - Bug fixes to S3Interface::store_object_and_verify and
218
+ - Bug fixes to S3Interface::store_object_and_verify and
219
219
  S3Interface::retrieve_object_and_verify (thanks to numerous user reports)
220
220
  - Updates to caching for Ec2::describe_images_by methods
221
221
  - Ec2 now has Ec2::last_request_id
222
+
223
+ === 1.10.0
224
+
225
+ Release Notes:
226
+ - AwsBase: signature v2 support added
227
+ - Ec2: describe_availability_zones improved to support regions
228
+ - CloudFront: docs fixes
229
+ - SDB: added: SQL-like query, select and query_with_attributes support
230
+ - SDB: fixed no method error when searching for id that doesn't exist
231
+
232
+ === 1.11.0
233
+
234
+ Release Notes:
235
+ - Full Amazon RDS instances support added with RightAws::RdsInterface
236
+ - Boot from EBS support added
237
+ - VPC support added
238
+ - Latest EC2 API 2009-10-31 support added
239
+ - Some of bugs fixed
240
+
241
+ === 2.0.0
242
+
243
+ Release Notes:
244
+ - Added:
245
+ - Ruby 1.9 support
246
+ - Ec2:
247
+ - SpotInstances support
248
+ - m2.xlarge instances
249
+ - GetPasswordData API call (see get_password_data_v2)
250
+ - SecurityGroups support for Eucalyptus clouds
251
+ - EBS:
252
+ - :delete_on_termination field for volumes
253
+ - SimpleDB:
254
+ - BatchPutAttributes support
255
+ - ActiveSDB:
256
+ - Dynamic attribute accessors
257
+ - "Columns" support
258
+ - Simple Type Casting support
259
+ - ELB:
260
+ - API '2009-11-25' support (stickiness policies)
261
+ - ACF:
262
+ - API '2010-03-01' support (origin access policy and streaming distributions)
263
+ - Bunch of small issues were fixed
264
+ - Time objects were replaced by Strings (as Amazon returns them) to make the gem more consistent:
265
+ - :last_modified_time in:
266
+ RightAws::AcfInterface#incrementally_list_distributions,
267
+ RightAws::AcfInterface#create_distribution_by_config,
268
+ RightAws::AcfInterface#get_distribution,
269
+ RightAws::AcfInterface#get_distribution_config
270
+ - :timestamp in:
271
+ RightAws::AcwInterface#get_metric_statistics
272
+ - :aws_created_at in:
273
+ RightAws::Ec2#create_volume,
274
+ RightAws::Ec2#describe_volumes
275
+ - :aws_attached_at in:
276
+ RightAws::Ec2#attach_volume,
277
+ RightAws::Ec2#detach_volume,
278
+ RightAws::Ec2#describe_volumes
279
+ - :aws_started_at in:
280
+ RightAws::Ec2#describe_snapshots,
281
+ RightAws::Ec2#create_snapshot,
282
+ RightAws::Ec2#try_create_snapshot
283
+ - :created_time in:
284
+ RightAws::ElbInterface#describe_load_balancers
285
+
286
+ === 2.1.0
287
+ Release Notes:
288
+ - Added:
289
+ - Route 53: API '2010-10-01'
290
+ - ACF: API '2010-11-01'
291
+ - EC2:
292
+ - API '2010-08-31'
293
+ - Port based group permissions support
294
+ - HPC Support
295
+ - Tags Suport
296
+ - ClientToken support added on instance launch
297
+ - RDS: API "2010-07-28"
298
+ - ELB: API '2010-07-01' (SSL support)
299
+ - IAM: API '2010-05-08' (AWS Identity and Access Management interface)
300
+ - 301 Redirect support added
301
+ - Removed:
302
+ - ActiveSupport dependency
303
+ - SDB: uuid gem dependency
304
+ - this gem requires right_http_connection 0bc3343232133bdb38c237d8285525d74495d3f5 or later
305
+ - "Raise On Timeout On Action" feature added to avoid duplicate resources creation if a timeout error occures and a retry is performed
306
+
307
+ === 3.0.0
308
+ Release Notes:
309
+ - Fixed/Added:
310
+ - ClientToken (launch_instances, run_instances) is not used for Eucalyptus clouds
311
+ - VPC2, stage1. Next methods were updated:
312
+ - associate_address, modify_security_group, create_security_group, create_vpc, delete_security_group,
313
+ describe_addresses, describe_images, describe_instance_attribute, describe_regions, describe_reserved_instances_offerings,
314
+ describe_security_groups, describe_snapshots, describe_spot_instance_requests, describe_spot_price_history,
315
+ describe_vpcs, disassociate_address, modify_image_attribute, modify_snapshot_attribute, release_address,
316
+ request_spot_instances, stop_instances
317
+ - EC2: ClientToken (launch_instances, run_instances) is not used for Eucalyptus clouds
318
+ - RDS:
319
+ - RDS: API 2011-04-01
320
+ - Make :instance_class param more consistent: :db_instance_class --> :instance_class
321
+ - Issue 53: regression in latest master version of right_rds_interface
322
+ - Issue 73: Can't get list of instances with RdsInterface
323
+ - EBS: Issue 54: regression in right_ec2_ebs.rb
324
+ - Add the port number with server name in the v2 signature string if it is not the RFC standard number (author: unakatsuo).
325
+ - EMR (Elastic Map Reduce) support
326
+ - SNS (Simple Notification Service) support
327
+ - SDB: ConsistentRead support
328
+ - bunch of micro bugs
329
+
330
+ === 3.0.1
331
+ Release Notes:
332
+ - Fixed:
333
+ - SignatureDoesNotMatch on file download via get_link()
334
+ - S3#bucket should not fail for non admin creds
335
+ - couple doc typos
336
+
337
+ === 3.0.2
338
+ Release Notes:
339
+ - Fixed:
340
+ - S3 Content-Type not set in Ruby 1.9.2
341
+ - error in rds_interface describe_db_snapshots in Ruby 1.9.2
342
+
343
+ === 3.0.4
344
+ Release Notes:
345
+ - Fixed:
346
+ - #125 - fixes redirect bug in file PUT requests (Cary)
347
+ - some other minor fixes
348
+
349
+ === 3.0.5
350
+ Release Notes:
351
+ - Added: API '2012-06-15' support for CreateVolume and DescribeVolumes API calls (to support IOPS)
352
+ - Fixed:
353
+ - Single-threaded multipart upload support (https://github.com/rightscale/right_aws/pull/116)
354
+ - S3 multi object delete (https://github.com/rightscale/right_aws/pull/106)
355
+ - Support for "ami_version" added in emr interface (https://github.com/rightscale/right_aws/pull/129)
356
+ - S3: Added block references to several methods (https://github.com/rightscale/right_aws/pull/130)
357
+ - Some other minor changes
358
+
359
+ === 3.1.0
360
+ Release Notes:
361
+ - Added:
362
+ - EC2:
363
+ - hs1.8xlarge, cr1.8xlarge instance types
364
+ - API version '2012-10-01' support for ReservedInstances and ReservedInstancesOfferings
365
+ - API version '2012-10-15' for some of VPC calls (including new DescribeAccountAttributes)
366
+ - Removed: UUID dependency
367
+ - Fixed:
368
+ - EC2:
369
+ - describe_reserved_instances_offerings was fixed to support pagination
370
+ - typo in create_vpc
371
+ - RDS: instances types list
372
+ - Some other minor bugs
data/Manifest.txt CHANGED
@@ -2,12 +2,27 @@ History.txt
2
2
  Manifest.txt
3
3
  README.txt
4
4
  Rakefile
5
+ lib/awsbase/support.rb
5
6
  lib/awsbase/benchmark_fix.rb
6
7
  lib/awsbase/right_awsbase.rb
7
- lib/awsbase/support.rb
8
8
  lib/ec2/right_ec2.rb
9
+ lib/ec2/right_ec2_images.rb
10
+ lib/ec2/right_ec2_instances.rb
11
+ lib/ec2/right_ec2_security_groups.rb
12
+ lib/ec2/right_ec2_spot_instances.rb
13
+ lib/ec2/right_ec2_ebs.rb
14
+ lib/ec2/right_ec2_reserved_instances.rb
15
+ lib/ec2/right_ec2_vpc.rb
16
+ lib/ec2/right_ec2_vpc2.rb
17
+ lib/ec2/right_ec2_monitoring.rb
18
+ lib/ec2/right_ec2_placement_groups.rb
19
+ lib/ec2/right_ec2_windows_mobility.rb
20
+ lib/ec2/right_ec2_tags.rb
9
21
  lib/right_aws.rb
10
22
  lib/s3/right_s3.rb
23
+ lib/acw/right_acw_interface.rb
24
+ lib/elb/right_elb_interface.rb
25
+ lib/as/right_as_interface.rb
11
26
  lib/s3/right_s3_interface.rb
12
27
  lib/sdb/active_sdb.rb
13
28
  lib/sdb/right_sdb_interface.rb
@@ -16,6 +31,16 @@ lib/sqs/right_sqs_gen2.rb
16
31
  lib/sqs/right_sqs_gen2_interface.rb
17
32
  lib/sqs/right_sqs_interface.rb
18
33
  lib/acf/right_acf_interface.rb
34
+ lib/acf/right_acf_streaming_interface.rb
35
+ lib/acf/right_acf_origin_access_identities.rb
36
+ lib/acf/right_acf_invalidations.rb
37
+ lib/rds/right_rds_interface.rb
38
+ lib/iam/right_iam_interface.rb
39
+ lib/iam/right_iam_groups.rb
40
+ lib/iam/right_iam_users.rb
41
+ lib/iam/right_iam_access_keys.rb
42
+ lib/iam/right_iam_mfa_devices.rb
43
+ lib/route_53/right_route_53_interface.rb
19
44
  test/ec2/test_helper.rb
20
45
  test/ec2/test_right_ec2.rb
21
46
  test/http_connection.rb
@@ -32,3 +57,5 @@ test/test_credentials.rb
32
57
  test/ts_right_aws.rb
33
58
  test/acf/test_helper.rb
34
59
  test/acf/test_right_acf.rb
60
+ test/rds/test_helper.rb
61
+ test/rds/test_right_rds.rb
data/README.txt CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  Published by RightScale, Inc. under the MIT License.
4
4
  For information about RightScale, see http://www.rightscale.com
5
+ Maintained by the RightScale “Orange_team”
6
+
7
+ Maintained by the RightScale "Orange_team"
5
8
 
6
9
  == DESCRIPTION:
7
10
 
@@ -9,17 +12,20 @@ The RightScale AWS gems have been designed to provide a robust, fast, and secure
9
12
  These gems have been used in production by RightScale since late 2006 and are being maintained to track enhancements made by Amazon.
10
13
  The RightScale AWS gems comprise:
11
14
 
12
- - RightAws::Ec2 -- interface to Amazon EC2 (Elastic Compute Cloud) and the
13
- associated EBS (Elastic Block Store)
15
+ - RightAws::Ec2 -- interface to Amazon EC2 (Elastic Compute Cloud), VPC (Virtual Private Cloud) and the associated EBS (Elastic Block Store)
14
16
  - RightAws::S3 and RightAws::S3Interface -- interface to Amazon S3 (Simple Storage Service)
15
- - RightAws::Sqs and RightAws::SqsInterface -- interface to first-generation Amazon SQS (Simple Queue Service) (API version 2007-05-01)
16
- - RightAws::SqsGen2 and RightAws::SqsGen2Interface -- interface to second-generation Amazon SQS (Simple Queue Service) (API version 2008-01-01)
17
+ - RightAws::Sqs and RightAws::SqsInterface -- interface to first-generation Amazon SQS (Simple Queue Service)
18
+ - RightAws::SqsGen2 and RightAws::SqsGen2Interface -- interface to second-generation Amazon SQS (Simple Queue Service)
17
19
  - RightAws::SdbInterface and RightAws::ActiveSdb -- interface to Amazon SDB (SimpleDB)
18
20
  - RightAws::AcfInterface -- interface to Amazon CloudFront, a content distribution service
21
+ - RightAws::AsInterface -- interface to Amazon Auto Scaling
22
+ - RightAws::AcwInterface -- interface to Amazon Cloud Watch
23
+ - RightAws::ElbInterface -- interface to Amazon Elastic Load Balancer
24
+ - RightAws::RdsInterface -- interface to Amazon RDS instances
19
25
 
20
26
  == FEATURES:
21
27
 
22
- - Full programmmatic access to EC2, EBS, S3, SQS, SDB, and CloudFront.
28
+ - Full programmmatic access to EC2, EBS, S3, SQS, SDB, CloudFront, AS, ACW, ELB and RDS.
23
29
  - Complete error handling: all operations check for errors and report complete
24
30
  error information by raising an AwsError.
25
31
  - Persistent HTTP connections with robust network-level retry layer using
@@ -65,10 +71,6 @@ concurrent requests to AWS. The way this plays out in practice is:
65
71
  Note that due to limitations in the I/O of the Ruby interpreter you
66
72
  may not get the degree of parallelism you may expect with the multi-threaded setting.
67
73
 
68
- By default, EC2/S3/SQS/SDB/ACF interface instances are created in single-threaded mode. Set
69
- "params[:multi_thread]" to "true" in the initialization arguments to use
70
- multithreaded mode.
71
-
72
74
  == GETTING STARTED:
73
75
 
74
76
  * For EC2 read RightAws::Ec2 and consult the Amazon EC2 API documentation at
@@ -142,7 +144,7 @@ sudo gem install right_aws
142
144
 
143
145
  == LICENSE:
144
146
 
145
- Copyright (c) 2007-2008 RightScale, Inc.
147
+ Copyright (c) 2007-2013 RightScale, Inc.
146
148
 
147
149
  Permission is hereby granted, free of charge, to any person obtaining
148
150
  a copy of this software and associated documentation files (the
data/Rakefile CHANGED
@@ -1,45 +1,44 @@
1
1
  # -*- ruby -*-
2
2
 
3
3
  require 'rubygems'
4
- require 'hoe'
5
4
  require "rake/testtask"
6
- require 'rcov/rcovtask'
5
+ require 'rake/gempackagetask'
6
+ require 'rake/clean'
7
7
  $: << File.dirname(__FILE__)
8
- require 'lib/right_aws.rb'
9
-
10
8
  testglobs = ["test/ts_right_aws.rb"]
11
9
 
10
+ begin
11
+ require 'bundler'
12
+ rescue LoadError => e
13
+ STDERR.puts("Bundler is not available, some rake tasks will not be defined: #{e.message}")
14
+ else
15
+ Bundler::GemHelper.install_tasks :name => 'right_aws'
16
+ end
12
17
 
13
- # Suppress Hoe's self-inclusion as a dependency for our Gem. This also keeps
14
- # Rake & rubyforge out of the dependency list. Users must manually install
15
- # these gems to run tests, etc.
16
- class Hoe
17
- def extra_deps
18
- @extra_deps.reject do |x|
19
- Array(x).first == 'hoe'
20
- end
18
+ begin
19
+ require 'rcov/rcovtask'
20
+ rescue LoadError => e
21
+ STDERR.puts("RCov is not available, some rake tasks will not be defined: #{e.message}")
22
+ else
23
+ desc "Analyze code coverage of the unit tests."
24
+ Rcov::RcovTask.new do |t|
25
+ t.test_files = FileList[testglobs]
26
+ #t.verbose = true # uncomment to see the executed command
21
27
  end
22
28
  end
23
29
 
24
- Hoe.new('right_aws', RightAws::VERSION::STRING) do |p|
25
- p.rubyforge_name = 'rightaws'
26
- p.author = 'RightScale, Inc.'
27
- p.email = 'support@rightscale.com'
28
- p.summary = 'Interface classes for the Amazon EC2, SQS, and S3 Web Services'
29
- p.description = p.paragraphs_of('README.txt', 2..5).join("\n\n")
30
- p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[1..-1]
31
- p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
32
- p.remote_rdoc_dir = "/right_aws_gem_doc"
33
- p.extra_deps = [['right_http_connection','>= 1.2.1']]
34
- p.test_globs = testglobs
35
- end
30
+ # == Gem == #
36
31
 
37
- desc "Analyze code coverage of the unit tests."
38
- Rcov::RcovTask.new do |t|
39
- t.test_files = FileList[testglobs]
40
- #t.verbose = true # uncomment to see the executed command
32
+ gemtask = Rake::GemPackageTask.new(Gem::Specification.load("right_aws.gemspec")) do |package|
33
+ package.package_dir = ENV['PACKAGE_DIR'] || 'pkg'
34
+ package.need_zip = true
35
+ package.need_tar = true
41
36
  end
42
-
37
+
38
+ directory gemtask.package_dir
39
+
40
+ CLEAN.include(gemtask.package_dir)
41
+
43
42
  desc "Test just the SQS interface"
44
43
  task :testsqs do
45
44
  require 'test/test_credentials'
@@ -100,4 +99,32 @@ task :testacf do
100
99
  require 'test/acf/test_right_acf.rb'
101
100
  end
102
101
 
102
+ desc "Test RDS interface"
103
+ task :testrds do
104
+ require 'test/test_credentials'
105
+ TestCredentials.get_credentials
106
+ require 'test/rds/test_right_rds.rb'
107
+ end
108
+
109
+ desc "Test just the SNS interface"
110
+ task :testsns do
111
+ require 'test/test_credentials'
112
+ TestCredentials.get_credentials
113
+ require 'test/sns/test_right_sns.rb'
114
+ end
115
+
116
+ desc "Test Route 53 interface"
117
+ task :testroute53 do
118
+ require 'test/test_credentials'
119
+ TestCredentials.get_credentials
120
+ require 'test/route_53/test_right_route_53'
121
+ end
122
+
123
+ desc "Test ELB interface"
124
+ task :testelb do
125
+ require 'test/test_credentials'
126
+ TestCredentials.get_credentials
127
+ require 'test/elb/test_right_elb'
128
+ end
129
+
103
130
  # vim: syntax=Ruby