aws-sdk-core 2.2.1 → 2.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Aws
2
- VERSION = '2.2.1'
2
+ VERSION = '2.2.2'
3
3
  end
@@ -66,21 +66,23 @@ module Aws
66
66
  end
67
67
 
68
68
  def matches_path?(acceptor, response)
69
- JMESPath.search(path(acceptor), response.data) == acceptor['expected']
69
+ if response.data
70
+ JMESPath.search(path(acceptor), response.data) == acceptor['expected']
71
+ else
72
+ false
73
+ end
70
74
  end
71
75
 
72
76
  def matches_pathAll?(acceptor, response)
73
- values = JMESPath.search(path(acceptor), response.data)
74
- Array === values &&
75
- values.count > 0 &&
77
+ non_empty_array(acceptor, response) do |values|
76
78
  values.all? { |value| value == acceptor['expected'] }
79
+ end
77
80
  end
78
81
 
79
82
  def matches_pathAny?(acceptor, response)
80
- values = JMESPath.search(path(acceptor), response.data)
81
- Array === values &&
82
- values.count > 0 &&
83
+ non_empty_array(acceptor, response) do |values|
83
84
  values.any? { |value| value == acceptor['expected'] }
85
+ end
84
86
  end
85
87
 
86
88
  def matches_status?(acceptor, response)
@@ -96,6 +98,15 @@ module Aws
96
98
  acceptor['argument'].gsub(/\w+/) { |s| Seahorse::Util.underscore(s) }
97
99
  end
98
100
 
101
+ def non_empty_array(acceptor, response, &block)
102
+ if response.data
103
+ values = JMESPath.search(path(acceptor), response.data)
104
+ Array === values && values.count > 0 ? yield(values) : false
105
+ else
106
+ false
107
+ end
108
+ end
109
+
99
110
  def underscore(str)
100
111
  Seahorse::Util.underscore(str)
101
112
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.2.2
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: 2015-11-19 00:00:00.000000000 Z
11
+ date: 2015-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath
@@ -58,6 +58,7 @@ files:
58
58
  - apis/cognito-identity/2014-06-30/api-2.json
59
59
  - apis/cognito-sync/2014-06-30/api-2.json
60
60
  - apis/config/2014-11-12/api-2.json
61
+ - apis/config/2014-11-12/examples-1.json
61
62
  - apis/config/2014-11-12/paginators-1.json
62
63
  - apis/datapipeline/2012-10-29/api-2.json
63
64
  - apis/datapipeline/2012-10-29/paginators-1.json
@@ -72,16 +73,19 @@ files:
72
73
  - apis/dynamodb/2012-08-10/resources-1.json
73
74
  - apis/dynamodb/2012-08-10/waiters-2.json
74
75
  - apis/ec2/2015-10-01/api-2.json
76
+ - apis/ec2/2015-10-01/examples-1.json
75
77
  - apis/ec2/2015-10-01/paginators-1.json
76
78
  - apis/ec2/2015-10-01/resources-1.json
77
79
  - apis/ec2/2015-10-01/waiters-2.json
78
80
  - apis/ecs/2014-11-13/api-2.json
81
+ - apis/ecs/2014-11-13/examples-1.json
79
82
  - apis/ecs/2014-11-13/paginators-1.json
80
83
  - apis/ecs/2014-11-13/waiters-2.json
81
84
  - apis/elasticache/2015-02-02/api-2.json
82
85
  - apis/elasticache/2015-02-02/paginators-1.json
83
86
  - apis/elasticache/2015-02-02/waiters-2.json
84
87
  - apis/elasticbeanstalk/2010-12-01/api-2.json
88
+ - apis/elasticbeanstalk/2010-12-01/examples-1.json
85
89
  - apis/elasticbeanstalk/2010-12-01/paginators-1.json
86
90
  - apis/elasticfilesystem/2015-02-01/api-2.json
87
91
  - apis/elasticloadbalancing/2012-06-01/api-2.json
@@ -153,6 +157,7 @@ files:
153
157
  - apis/sns/2010-03-31/paginators-1.json
154
158
  - apis/sns/2010-03-31/resources-1.json
155
159
  - apis/sqs/2012-11-05/api-2.json
160
+ - apis/sqs/2012-11-05/examples-1.json
156
161
  - apis/sqs/2012-11-05/paginators-1.json
157
162
  - apis/ssm/2014-11-06/api-2.json
158
163
  - apis/storagegateway/2013-06-30/api-2.json
@@ -425,7 +430,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
425
430
  version: '0'
426
431
  requirements: []
427
432
  rubyforge_project:
428
- rubygems_version: 2.4.6
433
+ rubygems_version: 2.2.2
429
434
  signing_key:
430
435
  specification_version: 4
431
436
  summary: AWS SDK for Ruby - Core