flexirest 1.3.8 → 1.3.9
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/proxy_base.rb +4 -0
- data/lib/flexirest/version.rb +1 -1
- data/spec/lib/proxy_spec.rb +12 -1
- 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: 8a9faf13ef3eccc8b4e00f771eac639c048eebac
|
4
|
+
data.tar.gz: 97436ce0b23e2edf6c56c88cf32f3bea86f86d3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01e5b88653f5b6f0c943dd0c742dd1320b27371b244bda060ad7af86cf5ec0df8f41ce9a2a42137a7849e4460af72f3c85bf379eb923592003d061c964319b30
|
7
|
+
data.tar.gz: cd4c7b5d05801455c9956d0edd64134471525f8900d594b0d0b9b99b1042059f2db7009f7b56d85d5b14f7ef65708be42b2c10118c5dba86b8d13fefbc01406b
|
data/CHANGELOG.md
CHANGED
data/lib/flexirest/proxy_base.rb
CHANGED
data/lib/flexirest/version.rb
CHANGED
data/spec/lib/proxy_spec.rb
CHANGED
@@ -30,6 +30,11 @@ class ProxyExample < Flexirest::ProxyBase
|
|
30
30
|
body "MY-BODY-CONTENT"
|
31
31
|
passthrough
|
32
32
|
end
|
33
|
+
|
34
|
+
patch "/partial_update" do
|
35
|
+
body "MY-BODY-CONTENT"
|
36
|
+
passthrough
|
37
|
+
end
|
33
38
|
|
34
39
|
delete '/remove' do
|
35
40
|
passthrough
|
@@ -81,6 +86,7 @@ class ProxyClientExample < Flexirest::Base
|
|
81
86
|
get :change_xml_format, "/change-xml-format"
|
82
87
|
post :create, "/create"
|
83
88
|
put :update, "/update"
|
89
|
+
patch :partial_update, "/partial_update"
|
84
90
|
get :not_proxied, "/not_proxied"
|
85
91
|
delete :remove, "/remove"
|
86
92
|
get :hal_test, "/hal_test/:id"
|
@@ -106,8 +112,13 @@ describe Flexirest::Base do
|
|
106
112
|
expect_any_instance_of(Flexirest::Connection).to receive(:post).with("/create", {age:12, first_name:"John"}.to_query, instance_of(Hash)).and_return(OpenStruct.new(body:"{\"result\":true}", status:200, headers:{}))
|
107
113
|
ProxyClientExample.create(fname:"John", lname:"Smith")
|
108
114
|
end
|
115
|
+
|
116
|
+
it "has access to raw body content for PATCH requests" do
|
117
|
+
expect_any_instance_of(Flexirest::Connection).to receive(:patch).with("/partial_update", "MY-BODY-CONTENT", instance_of(Hash)).and_return(::FaradayResponseMock.new(OpenStruct.new(body:"{\"result\":true}", status:200, response_headers:{})))
|
118
|
+
ProxyClientExample.partial_update(fname:"John", lname:"Smith")
|
119
|
+
end
|
109
120
|
|
110
|
-
it "has access to raw body content for requests" do
|
121
|
+
it "has access to raw body content for PUT requests" do
|
111
122
|
expect_any_instance_of(Flexirest::Connection).to receive(:put).with("/update", "MY-BODY-CONTENT", instance_of(Hash)).and_return(::FaradayResponseMock.new(OpenStruct.new(body:"{\"result\":true}", status:200, response_headers:{})))
|
112
123
|
ProxyClientExample.update(fname:"John", lname:"Smith")
|
113
124
|
end
|
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.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Jeffries
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|