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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0aefbb07885064fa794f6680446e48a678682a6a
4
- data.tar.gz: dae31dfd7a9522ac6e5f21b72037b1d4be9ed47c
3
+ metadata.gz: e6b067ad0cc1312a876a41486f10d6368b3b34e0
4
+ data.tar.gz: e2dd9f61d27a472b42a05d7798b752fcf5682da0
5
5
  SHA512:
6
- metadata.gz: 39aa00c5bc3ff7bce1ef08cfa646bf371dbeff2f13464c750cf462d2ee93cedbe90be9c4b3fa77788240c7a186568de55df382a7c287287fcd044dcc2dbfd49a
7
- data.tar.gz: 56f5bdabdfb819ea43a2ea209700d330d05548e174ef3343c5e7cc15a00b69fd6b0ba6c705502263609d03481b72812204632f141bd6f1a90a72ac120fdc2cf4
6
+ metadata.gz: 22af0afd6a7bbd09b14a7e816cd87cce96a966eac6495d3a6e78ee47532e000772261ebac173c9ebda037b1b306dd75a9aa06df7e2dbd48690591d17ca729bf1
7
+ data.tar.gz: 6bf3a1d2cae10e37486bca474a91d3cdf74a44d7183b3dd2620a0abee736955e147030b2f6b740074b977115c790419679933b657f78a3da1f8c051d2d8d2892
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.3.35
4
+
5
+ Bugfix:
6
+
7
+ - Slashes in URL params are now escaped to %2F (thanks to davidtolsma for the bug report)
8
+
3
9
  ## 1.3.34
4
10
 
5
11
  Feature:
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Flexirest
2
- VERSION = "1.3.34"
2
+ VERSION = "1.3.35"
3
3
  end
@@ -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.34
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-04-27 00:00:00.000000000 Z
11
+ date: 2017-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler