deltavista_crif_dva_interface 0.2.4 → 1.0.0
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.
@@ -5,27 +5,27 @@ module DeltavistaCrifDvaInterface
|
|
5
5
|
class RestfulService
|
6
6
|
|
7
7
|
def get_http_response(url_string)
|
8
|
-
resp
|
8
|
+
resp = Net::HTTP.get_response(to_url(url_string))
|
9
9
|
##Impac::Logger.log.debug "GET Response: #{resp.inspect}\n #{data.inspect}"
|
10
10
|
check_response! resp
|
11
|
-
yield
|
11
|
+
yield resp.body
|
12
12
|
end
|
13
13
|
|
14
|
-
def post_http_request(url_string, data, headers =
|
14
|
+
def post_http_request(url_string, data, headers = {})
|
15
15
|
url = to_url url_string
|
16
16
|
http = create_http_request url
|
17
|
-
resp
|
17
|
+
resp = http.post(url.path, data, headers)
|
18
18
|
##Impac::Logger.log.debug "POST Response: #{resp.inspect}\n #{body.inspect}"
|
19
19
|
check_response! resp
|
20
|
-
yield body
|
20
|
+
yield resp.body
|
21
21
|
end
|
22
22
|
|
23
|
-
def put_http_request(url_string, data, headers =
|
23
|
+
def put_http_request(url_string, data, headers = {})
|
24
24
|
url = to_url url_string
|
25
25
|
http = create_http_request url
|
26
|
-
resp
|
27
|
-
check_response! resp
|
28
|
-
yield body
|
26
|
+
resp = http.put(url.path, data, headers)
|
27
|
+
check_response! resp.body
|
28
|
+
yield resp.body
|
29
29
|
end
|
30
30
|
|
31
31
|
def to_url(url_string)
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: deltavista_crif_dva_interface
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.
|
5
|
+
version: 1.0.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Marc Cadalbert
|
@@ -12,7 +12,7 @@ autorequire:
|
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
14
|
|
15
|
-
date: 2014-06-
|
15
|
+
date: 2014-06-06 00:00:00 +02:00
|
16
16
|
default_executable:
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|