aws-sdk-core 2.0.0.rc11 → 2.0.0.rc12

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: ad05ed7728328d0816faecf10a68027da6092e8f
4
- data.tar.gz: 9a5804d0434b230a8f0d3bebac334cb67dfd0295
3
+ metadata.gz: fc2fcddc0e117326fd78ed6ecefe20a5d49e3636
4
+ data.tar.gz: 730e5c963495118949300043710f029e2fde7438
5
5
  SHA512:
6
- metadata.gz: 57ce3f7ea88edf95bd0138b47de54cd180a7dcd0d5e09b24c7afa69dc700c5c44b73d2edeb134c99a1ece4d1e07b664a48fe3653ce761c4add490fb4f13b56fe
7
- data.tar.gz: ec3778c763eb0ac6bf9fd0177dba954f3900a2a5d05e9fd7f3efc7b8f17f64bc41e8532bb1980be0f412c91e221d4041269b82716a3d639c274eecab72d5291a
6
+ metadata.gz: e43285a3965dda1a9992923c357719c5144bb3fd71cbd95cf688c6fec037ee02680c6d4c5c9e1b827bbeddfe813e6bca95d5093c2ed72855d0e83118007e3121
7
+ data.tar.gz: 5cc07358f3866ddc6c52e2bd63bd3adda47bd127765d6d94d66f9c9b7bd0c95db991b3b4765e05cfa9146bfe196b9da10825cc0152f177ff4865c544d5e4678e
data/Gemfile CHANGED
@@ -7,10 +7,9 @@ gem 'rake', require: false
7
7
  gem 'oj' if ENV['OJ']
8
8
  gem 'ox' if ENV['OX']
9
9
  gem 'nokogiri' if ENV['NOKOGIRI']
10
- gem 'uri_template'
11
10
 
12
11
  group :test do
13
- gem 'rspec', '~> 3.0.0.beta2'
12
+ gem 'rspec', '~> 3.0.0'
14
13
  gem 'cucumber'
15
14
  gem 'webmock'
16
15
  gem 'simplecov', require: false
data/README.md CHANGED
@@ -9,6 +9,26 @@ than the clients in version 1 of the Ruby SDK.
9
9
 
10
10
  For version 1.0 of the Ruby SDK, see [aws/aws-sdk-ruby](http://github.com/aws/aws-sdk-ruby).
11
11
 
12
+ ## 2.0.0.rc11 Upgrading Notes
13
+
14
+ RC 11 requires a few minor updates. These should be the final public-facing
15
+ changes before 2.0.0 final.
16
+
17
+ * The prefered constructor for services is now using the client
18
+ class, example:
19
+
20
+ # deprecated, will be removed for 2.0.0 final
21
+ Aws::S3.new
22
+
23
+ # preferred
24
+ Aws::S3::Client.new
25
+
26
+ * The `:raw_json` option for JSON protocol based services has been
27
+ renamed to `:simple_json`
28
+
29
+ * The short name for Aws::SimpleDB has been renamed from `sdb` to
30
+ `simpledb`.
31
+
12
32
  ## Links of Interest
13
33
 
14
34
  * [Documentation](http://docs.amazonwebservices.com/sdkforruby/api/frames.html)
@@ -74,15 +74,12 @@ module Aws
74
74
  # @yieldparam [Response] response
75
75
  # @return [Enumerable,nil] Returns a new Enumerable if no block is given.
76
76
  def each_page(&block)
77
- if block_given?
78
- response = self
77
+ return enum_for(:each_page) unless block_given?
78
+ response = self
79
+ yield(response)
80
+ until response.last_page?
81
+ response = response.next_page
79
82
  yield(response)
80
- until response.last_page?
81
- response = response.next_page
82
- yield(response)
83
- end
84
- else
85
- to_enum(__method__)
86
83
  end
87
84
  end
88
85
  alias each each_page
@@ -1,3 +1,3 @@
1
1
  module Aws
2
- VERSION = '2.0.0.rc11'
2
+ VERSION = '2.0.0.rc12'
3
3
  end
@@ -17,7 +17,11 @@ module Aws
17
17
  }}
18
18
 
19
19
  before(:each) do
20
- allow(Aws).to receive(:config).and_return({ region: 'us-east-1' })
20
+ allow(Aws).to receive(:config).and_return({
21
+ region: 'us-east-1',
22
+ access_key_id: 'akid',
23
+ secret_access_key: 'secret',
24
+ })
21
25
  end
22
26
 
23
27
  describe 'default_client_class' do
@@ -20,6 +20,11 @@ module Aws
20
20
  cfg
21
21
  }
22
22
 
23
+ before(:each) do
24
+ path = '/latest/meta-data/iam/security-credentials/'
25
+ stub_request(:get, "http://169.254.169.254#{path}").to_raise(SocketError)
26
+ end
27
+
23
28
  it 'raises an error if you construct a client without credentials' do
24
29
  # remove env credentials
25
30
  stub_const("ENV", {})
@@ -65,7 +65,7 @@ module Aws
65
65
 
66
66
  it 'adds a helper method that constructs a service and client object' do
67
67
  Aws.add_service('DummyService', {
68
- '2006-03-01' => { 'api' => 'apis/S3-2006-03-01.api.json' },
68
+ '2006-03-01' => { 'api' => 'apis/s3-2006-03-01.api.json' },
69
69
  })
70
70
  svc = Aws.dummyservice(http_wire_trace: true, credentials: dummy_credentials)
71
71
  expect(Aws::DummyService::Client.api_versions).to eq(['2006-03-01'])
@@ -75,14 +75,14 @@ module Aws
75
75
  end
76
76
 
77
77
  it 'adds the helper method to Aws (not Module)' do
78
- Aws.add_service(:DummyService, ['apis/S3-2006-03-01.json'])
78
+ Aws.add_service(:DummyService, ['apis/s3-2006-03-01.json'])
79
79
  expect(Aws).to respond_to(:dummyservice)
80
80
  expect(Aws.class).not_to respond_to(:dummyservice)
81
81
  end
82
82
 
83
83
  it 'filters the :api_version option from the client constructor' do
84
84
  Aws.add_service('DummyService', {
85
- '2006-03-01' => { 'api' => 'apis/S3-2006-03-01.api.json' },
85
+ '2006-03-01' => { 'api' => 'apis/s3-2006-03-01.api.json' },
86
86
  })
87
87
  Aws.config[:api_version] = '2007-01-01'
88
88
  Aws.config[:credentials] = dummy_credentials
@@ -19,8 +19,8 @@ def each_test_case(context, fixture_path)
19
19
  MultiJson.load(File.read(fixture_path)).each do |suite|
20
20
  describe(suite['description'].inspect) do
21
21
  suite['cases'].each.with_index do |test_case,n|
22
- describe("case: #{n}") do |group|
23
- yield(group, suite, test_case, n)
22
+ describe("case: #{n}") do
23
+ yield(self, suite, test_case, n)
24
24
  end
25
25
  end
26
26
  end
@@ -48,7 +48,11 @@ module Seahorse
48
48
  # @return [Enumerator] Returns an enumerable object that yields
49
49
  # registered type names and shape classes.
50
50
  def types
51
- @types.enum_for(:each)
51
+ Enumerator.new do |y|
52
+ @types.each do |name, shape_class|
53
+ y.yield(name, shape_class)
54
+ end
55
+ end
52
56
  end
53
57
 
54
58
  end
@@ -231,7 +235,11 @@ module Seahorse
231
235
  # @return [Enumerable<Symbol,Shape>] Returns an enumerator that yields
232
236
  # member names and shapes.
233
237
  def members
234
- enum_for(:each_member) { |*args| member_names.size }
238
+ Enumerator.new do |y|
239
+ member_names.map do |member_name|
240
+ y.yield(member_name, member(member_name))
241
+ end
242
+ end
235
243
  end
236
244
 
237
245
  # Searches the structure members for a shape with the given
@@ -258,12 +266,6 @@ module Seahorse
258
266
 
259
267
  private
260
268
 
261
- def each_member(&block)
262
- member_names.each do |member_name|
263
- yield(member_name, member(member_name))
264
- end
265
- end
266
-
267
269
  def index_members_by_location_name
268
270
  members.each.with_object({}) do |(name, shape), hash|
269
271
  hash[shape.location_name] = [name, shape]
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.0.0.rc11
4
+ version: 2.0.0.rc12
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: 2014-07-10 00:00:00.000000000 Z
11
+ date: 2014-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json