em_aws 1.0.0 → 1.0.1

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: 49361cc87da75f49666ef20b60d0d82d36355a07
4
- data.tar.gz: 920d28d847758295a211b65ce4ed0b673d6e8672
3
+ metadata.gz: b7ac6736ba63183559f61a5cf2d1858e97bb2818
4
+ data.tar.gz: 8f7494ac9378243b03af8ddca2e9ea9ccc4cafe1
5
5
  SHA512:
6
- metadata.gz: f60b1eb1b144e118c1abe09efbd7a79f31a11296886a3b85ab8f0affb401ad5ff503df971504340fd005583aeef844b10a711717c176d394270960435d09a779
7
- data.tar.gz: 3a39e0d232ae95e67fe6085f9df28de7985b0d651c71d3546f088a3395c94d0b8cfed2ecece1c8425fe6243dedbc79a448b053cddb3796ce6763bf12d92d4a84
6
+ metadata.gz: b74918ce622a15fa4d0d6d0ddb1ddda390d16835ce0e43ad821e1be327d92611508d0317b8783b748b9ae55ec33541c59c1f09a00d789526a9379dba3d56c5fb
7
+ data.tar.gz: 9306d680ae8110026192e31c992e7d39bdb028d829af1665049963b3f897f10406af69887155fba4c1c350a0364e465bad6fcabf3a5101b3f1fcb92c13c7bf28
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- em_aws (0.4.0.beta)
4
+ em_aws (1.0.0)
5
5
  aws-sdk-v1
6
6
  em-hot_tub (~> 1.1.0)
7
7
  em-http-request
@@ -16,9 +16,10 @@ Gem::Specification.new do |s|
16
16
  s.rubyforge_project = "em_aws"
17
17
 
18
18
  s.add_runtime_dependency 'aws-sdk-v1'
19
- s.add_runtime_dependency "em-synchrony"
20
19
  s.add_runtime_dependency "em-http-request"
20
+ s.add_runtime_dependency "em-synchrony"
21
21
  s.add_runtime_dependency "em-hot_tub", "~> 1.1.0"
22
+
22
23
  s.add_development_dependency "bundler", "~> 1.7"
23
24
  s.add_development_dependency "rspec"
24
25
  s.add_development_dependency "rspec-autotest"
@@ -11,6 +11,6 @@ module AWS
11
11
  # previous default handler to remain accessible from its old namespace
12
12
  # @private
13
13
  module Http
14
- class EMHttpHandler < Core::Http::EMHttpHandler; end
14
+ class EMHttpHandler < AWS::Core::Http::EMHttpHandler; end
15
15
  end
16
16
  end
@@ -1,4 +1,3 @@
1
- require 'em-http'
2
1
  require 'em-synchrony'
3
2
  require 'em-synchrony/em-http'
4
3
  require 'em-hot_tub'
@@ -1,8 +1,4 @@
1
1
  # http://docs.amazonwebservices.com/AWSRubySDK/latest/
2
- require 'hot_tub'
3
- require 'em-synchrony'
4
- require 'em-synchrony/em-http'
5
- require 'em-synchrony/thread'
6
2
  module EventMachine
7
3
  module AWS
8
4
 
@@ -170,7 +166,7 @@ module EventMachine
170
166
  response.status = http_response.response_header.status.to_i
171
167
  raise Timeout::Error if response.status == 0
172
168
  response.headers = fetch_response_headers(http_response)
173
- response.body = http_response.response
169
+ response.body = http_response.response unless block_given?
174
170
  end
175
171
 
176
172
  run_check = exp_length && request.http_method != "HEAD" && @verify_content_length
@@ -1,5 +1,5 @@
1
1
  module EventMachine
2
2
  module AWS
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  end
5
5
  end
@@ -14,6 +14,7 @@
14
14
  require 'spec_helper'
15
15
  require 'eventmachine'
16
16
  require 'evma_httpserver'
17
+ require 'aws/core/http/em_http_handler'
17
18
  module AWS::Core
18
19
  module Http
19
20
  class EMFooIO
@@ -24,7 +24,7 @@ describe Kernel, '#sleep' do
24
24
 
25
25
  it "should be a fiber safe sleep from with AWS module" do
26
26
  EM.synchrony do
27
- EM::Synchrony.stub(:sleep).and_return("fiber safe")
27
+ allow(EM::Synchrony).to receive(:sleep).and_return("fiber safe")
28
28
  expect(Kernel.sleep(1)).to eql("fiber safe")
29
29
  EM.stop
30
30
  end
@@ -1,6 +1,4 @@
1
1
  require 'spec_helper'
2
- require 'aws-sdk-v1'
3
- require 'aws/core/http/em_http_handler'
4
2
 
5
3
  describe AWS::DynamoDB do
6
4
  if ENV['AWS_ACCESS_KEY_ID'] && ENV['AWS_SECRET_ACCESS_KEY']
@@ -14,7 +12,7 @@ describe AWS::DynamoDB do
14
12
 
15
13
  it "should work" do
16
14
  begin
17
- AWS.config( :http_handler => AWS::Http::EMHttpHandler.new(:pool_size => 20))
15
+ AWS.config( :http_handler => EM::AWS::HttpHandler.new(:pool_size => 20))
18
16
  dynamo_db = AWS::DynamoDB.new
19
17
  dynamo_db.tables['mytable'].delete if dynamo_db.tables['mytable'].exists?
20
18
 
@@ -1,6 +1,4 @@
1
1
  require 'spec_helper'
2
- require 'aws-sdk-v1'
3
- require 'aws/core/http/em_http_handler'
4
2
 
5
3
  describe AWS::S3 do
6
4
  if ENV['AWS_ACCESS_KEY_ID'] && ENV['AWS_SECRET_ACCESS_KEY']
@@ -14,7 +12,7 @@ describe AWS::S3 do
14
12
 
15
13
  it "should work" do
16
14
  begin
17
- AWS.config( :http_handler => AWS::Http::EMHttpHandler.new )
15
+ AWS.config( :http_handler => EM::AWS::HttpHandler.new )
18
16
  s3 = AWS::S3.new
19
17
 
20
18
  # Create bucket
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: em_aws
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Mckinney
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: em-synchrony
28
+ name: em-http-request
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: em-http-request
42
+ name: em-synchrony
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="