elasticity 5.0.2 → 5.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fd9e39257ac81bf6cb0a18f38d680bc0e6bdc5f1
4
- data.tar.gz: d6f3dd0970a81a164e548e52707b29419f3ce107
3
+ metadata.gz: f55ef4c0da52c5540b84f2f5c443a481dc3b0f63
4
+ data.tar.gz: 24d3f7bf29a3b61e0775d343b19c27fce4da6150
5
5
  SHA512:
6
- metadata.gz: b47d9a75474f3afb40a34c9f0f7bd846fa250e0e15551b3106cd92cd804a710e8c818ac2770b65f9c57e5760d985c5a641db668094dcb9c57f0c2a694866634e
7
- data.tar.gz: c6d00853cf474fb771bde33fdb50828ec9923d9918d059b06409fdd6ab7709184bf71db78943df23df1b30a7710504b574ccb3687b0cdf7bbf3d6c961752a8e1
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).
@@ -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
- xml_doc = Nokogiri::XML(aws_result)
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.
@@ -1,3 +1,3 @@
1
1
  module Elasticity
2
- VERSION = '5.0.2'
2
+ VERSION = '5.0.3'
3
3
  end
@@ -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 == '3e88b95410e6828f80b4ec476bcf7e23ab8dd380b22ffcb1d5f7e86390346f68'
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(jobflow_xml_response)
269
- subject.run_job_flow({}).should == 'j-G6N5HA528AD4'
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(result)
277
- subject.run_job_flow({}) do |xml|
278
- xml.should == '_'
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.2
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-04-28 00:00:00.000000000 Z
11
+ date: 2015-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client