flexirest 1.3.21 → 1.3.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/flexirest/version.rb +1 -1
- data/spec/lib/proxy_spec.rb +5 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29350285d51cfadb0d0bb29a4ad1478a3ed9d0b3
|
4
|
+
data.tar.gz: be31ecfbb8f375e175eb62f6357dc6e2d67b3851
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90d4c4027ae57dcdf6bac75d9f00284404bd4654aebc00883f4f25aa99a9dc88e72b79b1eb5248206ae02c3b54630d9522c5cea811383109a4558633f1619e32
|
7
|
+
data.tar.gz: 223e2016d360ee3fd7ef70aa7e648c7d7c4a2bc5f33dd3fcf35354c1dae40cd3c2a6f18033690aaf19dd0d52684da238c688a08aec138d863058fb11e7a30ddb
|
data/CHANGELOG.md
CHANGED
data/lib/flexirest/version.rb
CHANGED
data/spec/lib/proxy_spec.rb
CHANGED
@@ -194,7 +194,7 @@ describe Flexirest::Base do
|
|
194
194
|
expect(ret.name).to eq("Johnny")
|
195
195
|
end
|
196
196
|
|
197
|
-
it "can force the URL from a
|
197
|
+
it "can force the URL from a filter without it being passed through URL replacement" do
|
198
198
|
expect_any_instance_of(Flexirest::Connection).to receive(:get).with("/hal_test/1", instance_of(Hash)).and_return(::FaradayResponseMock.new(OpenStruct.new(body:"{\"result\":true}", status:200, response_headers:{})))
|
199
199
|
expect_any_instance_of(Flexirest::Connection).to receive(:get).with("/this/is/a/test", instance_of(Hash)).and_return(::FaradayResponseMock.new(OpenStruct.new(body:"{\"result\":true}", status:200, response_headers:{})))
|
200
200
|
expect(ProxyClientExample.hal_test(id:1).test.result).to eq(true)
|
@@ -203,8 +203,10 @@ describe Flexirest::Base do
|
|
203
203
|
it "properly passes basic HTTP auth credentials" do
|
204
204
|
host, credentials, url_path = 'www.example.com', 'user:pass', '/getAll?id=1'
|
205
205
|
ProxyClientExample.base_url "http://#{credentials}@#{host}"
|
206
|
-
stub_request(:get, "
|
206
|
+
stub_request(:get, "#{host}#{url_path}")
|
207
207
|
ProxyClientExample.all(id:1)
|
208
|
-
expect(a_request(:get, "#{
|
208
|
+
expect(a_request(:get, "#{host}#{url_path}").with(headers: {
|
209
|
+
'Authorization'=>"Basic #{Base64.strict_encode64(credentials)}"
|
210
|
+
})).to have_been_made
|
209
211
|
end
|
210
212
|
end
|