elasticity 5.0.2 → 5.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.md +4 -0
- data/lib/elasticity/emr.rb +1 -3
- data/lib/elasticity/version.rb +1 -1
- data/spec/lib/elasticity/aws_request_v4_spec.rb +1 -1
- data/spec/lib/elasticity/emr_spec.rb +12 -20
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f55ef4c0da52c5540b84f2f5c443a481dc3b0f63
|
4
|
+
data.tar.gz: 24d3f7bf29a3b61e0775d343b19c27fce4da6150
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e790d9f3b835d039b2c1a8522981bff5dfa7eb167e2a04e944c5a11c96bf3b44e881e61bc43bedaa80e0810da027f2eadf3fbb39730ccf98cc8c82a62995baa6
|
7
|
+
data.tar.gz: 8397623a0f99f13f6407e6619a22b33185a7ad2f480177d7bcef075d6e83e6dc1e3b32d928881f0546510d06232c73d62aa7c94c4184979f3037b9bb3f4d96f2
|
data/HISTORY.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## 5.0.3 - July 8, 2015
|
2
|
+
|
3
|
+
- Fix for issue [#86](https://github.com/rslifka/elasticity/issues/86).
|
4
|
+
|
1
5
|
## 5.0.2 - April 27, 2015
|
2
6
|
|
3
7
|
- Fix for issue [#83](https://github.com/rslifka/elasticity/issues/83), `elasticity` has now transitioned to the AWS [Signature Version 4 Signing Process](http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html).
|
data/lib/elasticity/emr.rb
CHANGED
@@ -190,9 +190,7 @@ module Elasticity
|
|
190
190
|
}.merge!(job_flow_config)
|
191
191
|
aws_result = @aws_request.submit(params)
|
192
192
|
yield aws_result if block_given?
|
193
|
-
|
194
|
-
xml_doc.remove_namespaces!
|
195
|
-
xml_doc.xpath('/RunJobFlowResponse/RunJobFlowResult/JobFlowId').text
|
193
|
+
JSON.parse(aws_result)['JobFlowId']
|
196
194
|
end
|
197
195
|
|
198
196
|
# Enabled or disable "termination protection" on the specified job flows.
|
data/lib/elasticity/version.rb
CHANGED
@@ -73,7 +73,7 @@ describe Elasticity::AwsRequestV4 do
|
|
73
73
|
|
74
74
|
describe '.aws_v4_signature' do
|
75
75
|
it 'should create the proper signature' do
|
76
|
-
subject.send(:aws_v4_signature).should == '
|
76
|
+
subject.send(:aws_v4_signature).should == '05abf0e77ad6f8ce08449e678c2ba2822463599196abf0bdbdfef2ce21b5b6f3'
|
77
77
|
end
|
78
78
|
end
|
79
79
|
|
@@ -242,40 +242,32 @@ describe Elasticity::EMR do
|
|
242
242
|
|
243
243
|
describe '#run_jobflow' do
|
244
244
|
|
245
|
+
let(:json_response) {
|
246
|
+
<<-JSON
|
247
|
+
{"JobFlowId" : "TEST_JOBFLOW_ID"}
|
248
|
+
JSON
|
249
|
+
}
|
250
|
+
|
245
251
|
it 'should start the specified job flow' do
|
246
252
|
Elasticity::AwsSession.any_instance.should_receive(:submit).with({
|
247
253
|
:operation => 'RunJobFlow',
|
248
254
|
:jobflow_params => '_'
|
249
|
-
})
|
255
|
+
}).and_return(json_response)
|
250
256
|
subject.run_job_flow({:jobflow_params => '_'})
|
251
257
|
end
|
252
258
|
|
253
259
|
describe 'jobflow response handling' do
|
254
|
-
let(:jobflow_xml_response) do
|
255
|
-
<<-XML
|
256
|
-
<RunJobFlowResponse xmlns="http://elasticmapreduce.amazonaws.com/doc/2009-03-31">
|
257
|
-
<RunJobFlowResult>
|
258
|
-
<JobFlowId>j-G6N5HA528AD4</JobFlowId>
|
259
|
-
</RunJobFlowResult>
|
260
|
-
<ResponseMetadata>
|
261
|
-
<RequestId>b22f4aea-6a4b-11e0-9ddc-a168e244afdb</RequestId>
|
262
|
-
</ResponseMetadata>
|
263
|
-
</RunJobFlowResponse>
|
264
|
-
XML
|
265
|
-
end
|
266
|
-
|
267
260
|
it 'should return the ID of the running job flow' do
|
268
|
-
Elasticity::AwsSession.any_instance.should_receive(:submit).and_return(
|
269
|
-
subject.run_job_flow({}).should == '
|
261
|
+
Elasticity::AwsSession.any_instance.should_receive(:submit).and_return(json_response)
|
262
|
+
subject.run_job_flow({}).should == 'TEST_JOBFLOW_ID'
|
270
263
|
end
|
271
264
|
end
|
272
265
|
|
273
266
|
context 'when a block is given' do
|
274
|
-
let(:result) { '_' }
|
275
267
|
it 'should yield the submission results' do
|
276
|
-
Elasticity::AwsSession.any_instance.should_receive(:submit).and_return(
|
277
|
-
subject.run_job_flow({}) do |
|
278
|
-
|
268
|
+
Elasticity::AwsSession.any_instance.should_receive(:submit).and_return(json_response)
|
269
|
+
subject.run_job_flow({}) do |response|
|
270
|
+
response.should == json_response
|
279
271
|
end
|
280
272
|
end
|
281
273
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elasticity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Slifka
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|