aws-sdk-resources 2.2.37 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 69d6e6fadbf5af3918c4c84dc00e4379199baf12
4
- data.tar.gz: f3b33407c5468baa1e4e5b3b21e942dc54417680
3
+ metadata.gz: f5feb5c0974eb3d0f3d9fc091cf4eca4c46d426c
4
+ data.tar.gz: aa891b85232c4262ccc635015ff9aeb30171c8f1
5
5
  SHA512:
6
- metadata.gz: 1dd0b0a31fb29694f8f409a2cdd550dd14b1d6f25da1c9997e3b8daa37f0bee25ecbc0fd98993b3a25ec86c943a4c328f3e171109ea934903f1af7492b975e5c
7
- data.tar.gz: 37af458a83e300e12cb075e240e4590cb2549401b88b1f4a5cfd17870a7865e306575de9fcca1950b2e74070dfe708d3bb6047488d375eb728182f896d45a37d
6
+ metadata.gz: 368a81c1c35199b32f6392f97e7e0f071a8f4b821fa66a24880aa3ac013c77c8ab2e4ef3f176c3d7467b9c0deb7bfc47e022cd6b2910ef3b435ea3c4abd2f7c7
7
+ data.tar.gz: c99696cff9c18f0a238938dda4bcb753489100ddaebc33a36de3c3379e0b81df569843330b51674504ae45cdc7804dd4bfbdb0039dc33c694bce22b8bb803807
@@ -108,6 +108,7 @@ module Aws
108
108
  # @option (see Base#call)
109
109
  # @return [Collection]
110
110
  def call(options)
111
+ validate_args!(options)
111
112
  Collection.new(self, options)
112
113
  end
113
114
 
@@ -123,6 +124,17 @@ module Aws
123
124
 
124
125
  private
125
126
 
127
+ def validate_args!(options)
128
+ args = options[:args]
129
+ unless args.count == 0 || args.count == 1
130
+ msg = "wrong number of arguments (given #{args.count}, expected 0..1)"
131
+ raise ArgumentError, msg
132
+ end
133
+ unless args[0].nil? || Hash === args[0]
134
+ raise ArgumentError, "expected Hash, got #{args[0].class}"
135
+ end
136
+ end
137
+
126
138
  def all_batches(options, &block)
127
139
  resp = @request.call(options)
128
140
  if resp.respond_to?(:each)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-resources
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.37
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-26 00:00:00.000000000 Z
11
+ date: 2016-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 2.2.37
19
+ version: 2.3.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 2.2.37
26
+ version: 2.3.0
27
27
  description: Provides resource oriented interfaces and other higher-level abstractions
28
28
  for many AWS services. This gem is part of the official AWS SDK for Ruby.
29
29
  email: