amazon-ec2 0.7.6 → 0.7.7

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.6
1
+ 0.7.7
data/amazon-ec2.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{amazon-ec2}
8
- s.version = "0.7.6"
8
+ s.version = "0.7.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Glenn Rempe"]
@@ -11,10 +11,10 @@ module AWS
11
11
  # @option options [optional,String] :restorable_by ('') Account ID of a user that can create volumes from the snapshot.
12
12
  #
13
13
  def describe_snapshots( options = {} )
14
- options = { :snapshot_id => [], :restorable_by => '', :owner => '' }.merge(options)
15
- params = pathlist("SnapshotId", options[:snapshot_id] )
16
- params["RestorableBy"] = options[:restorable_by]
17
- params["Owner"] = options[:owner]
14
+ params = {}
15
+ params.merge!(pathlist("SnapshotId", options[:snapshot_id] )) unless options[:snapshot_id].nil? || options[:snapshot_id] == []
16
+ params["RestorableBy"] = options[:restorable_by] unless options[:restorable_by].nil?
17
+ params["Owner"] = options[:owner] unless options[:owner].nil?
18
18
  return response_generator(:action => "DescribeSnapshots", :params => params)
19
19
  end
20
20
 
@@ -45,7 +45,7 @@ context "EC2 snaphots " do
45
45
 
46
46
 
47
47
  specify "should be able to be described with describe_snapshots" do
48
- @ec2.stubs(:make_request).with('DescribeSnapshots', {'Owner' => '', 'SnapshotId.1' => 'snap-78a54011', 'RestorableBy' => ''}).
48
+ @ec2.stubs(:make_request).with('DescribeSnapshots', {'SnapshotId.1' => 'snap-78a54011'}).
49
49
  returns stub(:body => @describe_snapshots_response_body, :is_a? => true)
50
50
 
51
51
  @ec2.describe_snapshots( :snapshot_id => "snap-78a54011" ).should.be.an.instance_of Hash
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amazon-ec2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.6
4
+ version: 0.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Glenn Rempe