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 +4 -4
- data/Gemfile.lock +1 -1
- data/em_aws.gemspec +2 -1
- data/lib/aws/core/http/em_http_handler.rb +1 -1
- data/lib/em-aws.rb +0 -1
- data/lib/em-aws/http_handler.rb +1 -5
- data/lib/em-aws/version.rb +1 -1
- data/spec/em-aws/http_handler_spec.rb +1 -0
- data/spec/em-aws/patches_spec.rb +1 -1
- data/spec/integration/dynamo_db_spec.rb +1 -3
- data/spec/integration/s3_spec.rb +1 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7ac6736ba63183559f61a5cf2d1858e97bb2818
|
4
|
+
data.tar.gz: 8f7494ac9378243b03af8ddca2e9ea9ccc4cafe1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b74918ce622a15fa4d0d6d0ddb1ddda390d16835ce0e43ad821e1be327d92611508d0317b8783b748b9ae55ec33541c59c1f09a00d789526a9379dba3d56c5fb
|
7
|
+
data.tar.gz: 9306d680ae8110026192e31c992e7d39bdb028d829af1665049963b3f897f10406af69887155fba4c1c350a0364e465bad6fcabf3a5101b3f1fcb92c13c7bf28
|
data/Gemfile.lock
CHANGED
data/em_aws.gemspec
CHANGED
@@ -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"
|
data/lib/em-aws.rb
CHANGED
data/lib/em-aws/http_handler.rb
CHANGED
@@ -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
|
data/lib/em-aws/version.rb
CHANGED
data/spec/em-aws/patches_spec.rb
CHANGED
@@ -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.
|
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::
|
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
|
|
data/spec/integration/s3_spec.rb
CHANGED
@@ -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::
|
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.
|
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-
|
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-
|
42
|
+
name: em-synchrony
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|