flexirest 1.3.34 → 1.3.35
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/flexirest/request.rb +1 -1
- data/lib/flexirest/version.rb +1 -1
- data/spec/lib/request_spec.rb +5 -0
- 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: e6b067ad0cc1312a876a41486f10d6368b3b34e0
|
|
4
|
+
data.tar.gz: e2dd9f61d27a472b42a05d7798b752fcf5682da0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 22af0afd6a7bbd09b14a7e816cd87cce96a966eac6495d3a6e78ee47532e000772261ebac173c9ebda037b1b306dd75a9aa06df7e2dbd48690591d17ca729bf1
|
|
7
|
+
data.tar.gz: 6bf3a1d2cae10e37486bca474a91d3cdf74a44d7183b3dd2620a0abee736955e147030b2f6b740074b977115c790419679933b657f78a3da1f8c051d2d8d2892
|
data/CHANGELOG.md
CHANGED
data/lib/flexirest/request.rb
CHANGED
|
@@ -307,7 +307,7 @@ module Flexirest
|
|
|
307
307
|
target = @get_params.delete(token.to_sym) || @post_params.delete(token.to_sym) || @get_params.delete(token.to_s) || @post_params.delete(token.to_s) || ""
|
|
308
308
|
# it's possible the URL path variable may not be part of the request, in that case, try to resolve it from the object attributes
|
|
309
309
|
target = @object._attributes[token.to_sym] || "" if target == ""
|
|
310
|
-
@url.gsub!(":#{token}", URI.escape(target.to_s))
|
|
310
|
+
@url.gsub!(":#{token}", URI.escape(target.to_s).gsub("/", "%2F"))
|
|
311
311
|
end
|
|
312
312
|
end
|
|
313
313
|
end
|
data/lib/flexirest/version.rb
CHANGED
data/spec/lib/request_spec.rb
CHANGED
|
@@ -200,6 +200,11 @@ describe Flexirest::Request do
|
|
|
200
200
|
ExampleClient.find id:"foo bar"
|
|
201
201
|
end
|
|
202
202
|
|
|
203
|
+
it "should pass URL-encode URL parameters including slashes" do
|
|
204
|
+
expect_any_instance_of(Flexirest::Connection).to receive(:get).with("/foo%2Fbar", an_instance_of(Hash)).and_return(::FaradayResponseMock.new(OpenStruct.new(body:'{"result":true}', response_headers:{})))
|
|
205
|
+
ExampleClient.find id:"foo/bar"
|
|
206
|
+
end
|
|
207
|
+
|
|
203
208
|
it "should accept an integer as the only parameter and use it as id" do
|
|
204
209
|
expect_any_instance_of(Flexirest::Connection).to receive(:get).with("/1234", an_instance_of(Hash)).and_return(::FaradayResponseMock.new(OpenStruct.new(body:'{"result":true}', response_headers:{})))
|
|
205
210
|
ExampleClient.find(1234)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: flexirest
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.35
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andy Jeffries
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-06-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|