elasticity 6.0.13 → 6.0.14

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: 790344a0151805b2c9d98ab1a5550da16098a618
4
- data.tar.gz: ac2ca4a93b59437f4fdb904bc5d7985c3914c4e2
3
+ metadata.gz: d0a395a4a9c25b64d7b72d6d040447d78e79487f
4
+ data.tar.gz: b43561880727ae216eeddecaa04d41182725448c
5
5
  SHA512:
6
- metadata.gz: 027b587b86c8065a88b6cf614a646677c5ed36c317a88ce90b43c22bbc52ea39fe8b2e4cb12f77b02694a5992261b744721b872dfbe0650610c439063aeb5de6
7
- data.tar.gz: d54e84b75052fcf456cfb4a98f8532e7328b45479551064a3cacbd6d0eeaa4356447accc85ff67ffd613d5a1246796a6a260317b5acd1afb4ff9ea19bea54641
6
+ metadata.gz: 2ab1e6f986e03e46d15f37eced3fd5f1e8a39eb311676a1063b594744217332ca072f4f909882d3d52f892c77745e46c363d3d06eab177bcec84018a9fae681d
7
+ data.tar.gz: 60ec85de1e8b589f64dabfcd5e52acb93ce425a81458352f4d74798c9282e5916be40af0d33bd970121ff80ca7034129d0bd3f9ee2a6522fd7364cbfedca9e5d
data/HISTORY.md CHANGED
@@ -1,6 +1,10 @@
1
+ ## 6.0.14 - January 18, 2019
2
+
3
+ - Including PR [#142](https://github.com/rslifka/elasticity/pull/142) - "Use Request.execute to make HTTP requests". Thank you [@BenFradet ](https://github.com/BenFradet )!
4
+
1
5
  ## 6.0.13 - January 17, 2019
2
6
 
3
- - Including PR [#141](https://github.com/rslifka/elasticity/pull/140) - "Add the ability to customize timeouts ". Thank you [@BenFradet ](https://github.com/BenFradet )!
7
+ - Including PR [#141](https://github.com/rslifka/elasticity/pull/141) - "Add the ability to customize timeouts". Thank you [@BenFradet ](https://github.com/BenFradet )!
4
8
 
5
9
  ## 6.0.12 - February 7, 2017
6
10
 
@@ -31,7 +31,7 @@ module Elasticity
31
31
  def submit(ruby_service_hash)
32
32
  aws_request = AwsRequestV4.new(self, ruby_service_hash)
33
33
  begin
34
- RestClient.execute(
34
+ RestClient::Request.execute(
35
35
  :method => :post,
36
36
  :url => aws_request.url,
37
37
  :payload => aws_request.payload,
@@ -1,3 +1,3 @@
1
1
  module Elasticity
2
- VERSION = '6.0.13'
2
+ VERSION = '6.0.14'
3
3
  end
@@ -144,7 +144,7 @@ describe Elasticity::AwsRequestV4 do
144
144
 
145
145
  describe '.aws_v4_signature' do
146
146
  it 'should create the proper signature' do
147
- subject.send(:aws_v4_signature).should == '86798537f9f4310015aac337d493c4b4abb5113109e04a9898c845d09d2d8bdf'
147
+ subject.send(:aws_v4_signature).should == '121479f023ad04263baf24fd358aa5bf07bcb75b2ed108cea3d72cb52cc2e8f0'
148
148
  end
149
149
  end
150
150
 
@@ -14,7 +14,6 @@ describe Elasticity::AwsSession do
14
14
  end
15
15
 
16
16
  describe '#initialize' do
17
-
18
17
  context 'when access and/or secret keys are provided' do
19
18
  it 'should set them to the provided values' do
20
19
  subject.region.should == 'us-east-1'
@@ -75,14 +74,14 @@ describe Elasticity::AwsSession do
75
74
  @request = Elasticity::AwsRequestV4.new(subject, {})
76
75
  @request.should_receive(:url).and_return('TEST_URL')
77
76
  @request.should_receive(:payload).and_return('TEST_PAYLOAD')
78
- @request.should_receive(:headers).and_return('TEST_HEADERS')
77
+ @request.should_receive(:headers).and_return({:header => 'TEST_HEADERS'})
79
78
 
80
79
  Elasticity::AwsRequestV4.should_receive(:new).with(subject, {}).and_return(@request)
81
- RestClient.should_receive(:execute).with(
80
+ RestClient::Request.should_receive(:execute).with(
82
81
  :method => :post,
83
82
  :url => 'TEST_URL',
84
83
  :payload => 'TEST_PAYLOAD',
85
- :headers => 'TEST_HEADERS',
84
+ :headers => {:header => 'TEST_HEADERS'},
86
85
  :timeout => 60
87
86
  )
88
87
  end
@@ -107,7 +106,7 @@ describe Elasticity::AwsSession do
107
106
  end
108
107
 
109
108
  it 'should raise an Argument error with the body of the error' do
110
- RestClient.should_receive(:execute).and_raise(error)
109
+ RestClient::Request.should_receive(:execute).and_raise(error)
111
110
  expect {
112
111
  subject.submit({})
113
112
  }.to raise_error(ArgumentError, "AWS EMR API Error (#{error_type}): #{error_message}")
@@ -116,7 +115,7 @@ describe Elasticity::AwsSession do
116
115
  context 'EMR API rate limit hit' do
117
116
  let(:error_type) { 'ThrottlingException' }
118
117
  it 'should raise a Throttling error with the body of the error' do
119
- RestClient.should_receive(:execute).and_raise(error)
118
+ RestClient::Request.should_receive(:execute).and_raise(error)
120
119
  expect {
121
120
  subject.submit({})
122
121
  }.to raise_error(Elasticity::ThrottlingException, "AWS EMR API Error (#{error_type}): #{error_message}")
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: 6.0.13
4
+ version: 6.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Slifka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-17 00:00:00.000000000 Z
11
+ date: 2019-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client