aws-sdk-core 2.6.23 → 2.6.24

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,4 +3,5 @@ Aws.add_service(:SQS, {
3
3
  docs: "#{Aws::API_DIR}/sqs/2012-11-05/docs-2.json",
4
4
  examples: "#{Aws::API_DIR}/sqs/2012-11-05/examples-1.json",
5
5
  paginators: "#{Aws::API_DIR}/sqs/2012-11-05/paginators-1.json",
6
+ resources: "#{Aws::API_DIR}/sqs/2012-11-05/resources-1.json",
6
7
  })
@@ -1,3 +1,3 @@
1
1
  module Aws
2
- VERSION = '2.6.23'
2
+ VERSION = '2.6.24'
3
3
  end
@@ -36,10 +36,7 @@ module Seahorse
36
36
  instance_variable_set("@#{opt_name}", value)
37
37
  end
38
38
  @pool_mutex = Mutex.new
39
- @pool = Hash.new do |pool, endpoint|
40
- pool[endpoint] = []
41
- pool[endpoint]
42
- end
39
+ @pool = {}
43
40
  end
44
41
 
45
42
  OPTIONS.keys.each do |attr_name|
@@ -86,7 +83,9 @@ module Seahorse
86
83
  # attempt to recycle an already open session
87
84
  @pool_mutex.synchronize do
88
85
  _clean
89
- session = @pool[endpoint].shift
86
+ if @pool.key?(endpoint)
87
+ session = @pool[endpoint].shift
88
+ end
90
89
  end
91
90
 
92
91
  begin
@@ -100,7 +99,10 @@ module Seahorse
100
99
  raise
101
100
  else
102
101
  # No error raised? Good, check the session into the pool.
103
- @pool_mutex.synchronize { @pool[endpoint] << session }
102
+ @pool_mutex.synchronize do
103
+ @pool[endpoint] = [] unless @pool.key?(endpoint)
104
+ @pool[endpoint] << session
105
+ end
104
106
  end
105
107
  nil
106
108
  end
@@ -214,7 +216,9 @@ module Seahorse
214
216
  # @return [Array<ConnectionPool>] Returns a list of of the
215
217
  # constructed connection pools.
216
218
  def pools
217
- @pools.values
219
+ @pools_mutex.synchronize do
220
+ @pools.values
221
+ end
218
222
  end
219
223
 
220
224
  private
@@ -1,6 +1,8 @@
1
+ require 'delegate'
2
+
1
3
  module Seahorse
2
4
  module Client
3
- class Response
5
+ class Response < Delegator
4
6
 
5
7
  # @option options [RequestContext] :context (nil)
6
8
  # @option options [Integer] :status_code (nil)
@@ -63,29 +65,16 @@ module Seahorse
63
65
  self
64
66
  end
65
67
 
68
+ # Necessary to define as a subclass of Delegator
66
69
  # @api private
67
- def inspect
68
- @data.inspect
69
- end
70
-
71
- # @api private
72
- def pretty_print(q)
73
- @data.pretty_print(q)
70
+ def __getobj__
71
+ @data
74
72
  end
75
73
 
74
+ # Necessary to define as a subclass of Delegator
76
75
  # @api private
77
- def respond_to?(*args)
78
- @data.respond_to?(args.first, false) || super
79
- end
80
-
81
- private
82
-
83
- def method_missing(*args, &block)
84
- if @data.respond_to?(args.first, false)
85
- @data.send(*args, &block)
86
- else
87
- super
88
- end
76
+ def __setobj__(obj)
77
+ @data = obj
89
78
  end
90
79
 
91
80
  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.6.23
4
+ version: 2.6.24
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-11-16 00:00:00.000000000 Z
11
+ date: 2016-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath
@@ -275,6 +275,7 @@ files:
275
275
  - apis/sqs/2012-11-05/api-2.json
276
276
  - apis/sqs/2012-11-05/examples-1.json
277
277
  - apis/sqs/2012-11-05/paginators-1.json
278
+ - apis/sqs/2012-11-05/resources-1.json
278
279
  - apis/ssm/2014-11-06/api-2.json
279
280
  - apis/ssm/2014-11-06/examples-1.json
280
281
  - apis/ssm/2014-11-06/paginators-1.json
@@ -463,6 +464,7 @@ files:
463
464
  - lib/aws-sdk-core/rest/request/builder.rb
464
465
  - lib/aws-sdk-core/rest/request/endpoint.rb
465
466
  - lib/aws-sdk-core/rest/request/headers.rb
467
+ - lib/aws-sdk-core/rest/request/querystring_builder.rb
466
468
  - lib/aws-sdk-core/rest/response/body.rb
467
469
  - lib/aws-sdk-core/rest/response/headers.rb
468
470
  - lib/aws-sdk-core/rest/response/parser.rb