soapy_cake 1.23.0 → 1.23.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/soapy_cake/client.rb +17 -3
- data/lib/soapy_cake/version.rb +1 -1
- data/lib/soapy_cake.rb +1 -1
- data/soapy_cake.gemspec +0 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3709fcadb320803e1d0ca6dc207e0824c42a882e
|
4
|
+
data.tar.gz: dbf854e7043d65559bc22ad9b4c7d7fb33472935
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 947e3659ed6e8cde1e0d4901da4cf8235e23bc0af6542dee020f6907d892f27863f0a4ed8b4ab89e08cb3f8ef5591457771ac85e9a9d5222ed13e507181db22f
|
7
|
+
data.tar.gz: 3f3f1d695178a8881ee75a06200e7e6cc269b5c7f8f242f07347fe07e3cf8f7329de373995e4e9f59966293b45df193f4261233d91465ef2801fb7cd43ce62a4
|
data/lib/soapy_cake/client.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
require 'net/http'
|
3
|
+
|
2
4
|
module SoapyCake
|
3
5
|
class Client
|
4
6
|
HEADERS = { 'Content-Type' => 'application/soap+xml;charset=UTF-8' }.freeze
|
@@ -63,9 +65,21 @@ module SoapyCake
|
|
63
65
|
def http_response(request)
|
64
66
|
logger.info("soapy_cake:request #{request}") if logger
|
65
67
|
|
66
|
-
|
67
|
-
|
68
|
-
|
68
|
+
http_request = Net::HTTP::Post.new(request.path, HEADERS)
|
69
|
+
http_request.body = request.xml
|
70
|
+
response = perform_http_request(http_request)
|
71
|
+
|
72
|
+
unless response.is_a?(Net::HTTPSuccess)
|
73
|
+
raise RequestFailed, "Request failed with HTTP #{response.code}: #{response.body}"
|
74
|
+
end
|
75
|
+
|
76
|
+
response.body
|
77
|
+
end
|
78
|
+
|
79
|
+
def perform_http_request(http_request)
|
80
|
+
Net::HTTP.start(domain,
|
81
|
+
use_ssl: true, open_timeout: NET_TIMEOUT, read_timeout: NET_TIMEOUT) do |http|
|
82
|
+
http.request(http_request)
|
69
83
|
end
|
70
84
|
end
|
71
85
|
end
|
data/lib/soapy_cake/version.rb
CHANGED
data/lib/soapy_cake.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
require 'yaml'
|
2
3
|
require 'logger'
|
3
4
|
require 'nokogiri'
|
4
5
|
require 'saxerator'
|
5
|
-
require 'httparty'
|
6
6
|
require 'retryable'
|
7
7
|
require 'active_support/core_ext/hash/reverse_merge'
|
8
8
|
require 'active_support/core_ext/hash/transform_values'
|
data/soapy_cake.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soapy_cake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.23.
|
4
|
+
version: 1.23.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ad2games GmbH
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -52,20 +52,6 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: httparty
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: retryable
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|