restful_resource 0.8.17 → 0.8.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/restful_resource/base.rb +1 -1
- data/lib/restful_resource/version.rb +1 -1
- data/spec/restful_resource/base_spec.rb +2 -2
- 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: 4333040aefc4230aa100dbd68d871a44e2920ba9
|
4
|
+
data.tar.gz: ac2b15eeac7f8c1a18d200b4745bb6df543994d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cf0775238a03d37776b352b1b3c524261e209d76d41ccd7f74ea79b0becc9e2be137ccef78f91cfdabe3b1ad3f9227d6211c86015f0dd9db46b9a0c91178502
|
7
|
+
data.tar.gz: 1052de7c40ac072b0f3bdc16941b2df243d386971f8327455e8e9c2490b39ab36cbddb3068a64726e46e09bd208f2821339a29e672097ecb6e645563f2b3b768
|
@@ -81,7 +81,7 @@ module RestfulResource
|
|
81
81
|
end
|
82
82
|
|
83
83
|
def self.member_url(id, params)
|
84
|
-
url = merge_url_paths(base_url, @resource_path, id, @action_prefix)
|
84
|
+
url = merge_url_paths(base_url, @resource_path, CGI.escape(id.to_s), @action_prefix)
|
85
85
|
replace_parameters(url, params)
|
86
86
|
end
|
87
87
|
|
@@ -39,9 +39,9 @@ describe RestfulResource::Base do
|
|
39
39
|
|
40
40
|
it "should encode parameters correctly in the url" do
|
41
41
|
expected_response = RestfulResource::Response.new(body: {name: 'Golf', price: 15000}.to_json)
|
42
|
-
expect_get("http://api.carwow.co.uk/groups/xxx+yyy%3Fl%3D7/makes/Land+Rover%3Fx%3D0.123/models/Golf", expected_response)
|
42
|
+
expect_get("http://api.carwow.co.uk/groups/xxx+yyy%3Fl%3D7/makes/Land+Rover%3Fx%3D0.123/models/Golf+Cabriolet%3Ftest", expected_response)
|
43
43
|
|
44
|
-
object = Model.find('Golf', make_slug: 'Land Rover?x=0.123', group_id: 'xxx yyy?l=7')
|
44
|
+
object = Model.find('Golf Cabriolet?test', make_slug: 'Land Rover?x=0.123', group_id: 'xxx yyy?l=7')
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|