ezapi_client 1.0.2 → 1.0.3
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 +5 -0
- data/lib/ezapi_client/responses/base_response.rb +3 -0
- data/lib/ezapi_client/services/gen_data.rb +2 -2
- data/lib/ezapi_client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b722d7d9408b1bd107cb6e9030377697bcc10dd60f3f13629f596b0423da53a
|
4
|
+
data.tar.gz: bf780364b5b1ed143f10236ac85c53471f1b7bd8b991d32b46a5709274b9a655
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ef972672fe065716c03140d8db738b51294fc0335e52548cd497415e7f65248c77c558a1aa79f6daafae50a30567ebda67f15f241da87634d0d830b164a8037
|
7
|
+
data.tar.gz: 8c89dc1ce80a906688a4ec4b1172869875003ae57d9f06a217dfb87ca062d584f873124d24fc16d5b5bab8349169fb50e5769930be57f4d9a3fd33365b54c12b
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
4
4
|
|
5
|
+
## [1.0.3] - 2019-05-27
|
6
|
+
### Fixed
|
7
|
+
- EZAPI server couldn't parse escaped JSON; escape values instead of whole JSON instead
|
8
|
+
- Response `#success` is false if response is not valid JSON
|
9
|
+
|
5
10
|
## [1.0.2] - 2019-05-14
|
6
11
|
### Fixed
|
7
12
|
- Shell command to java blows up when sender/recipient name or address includes `'`
|
@@ -14,11 +14,14 @@ module EZAPIClient
|
|
14
14
|
private
|
15
15
|
|
16
16
|
def default_success
|
17
|
+
return false if response_body.nil?
|
17
18
|
response_body[:success]
|
18
19
|
end
|
19
20
|
|
20
21
|
def default_response_body
|
21
22
|
JSON.parse(raw_response.body)
|
23
|
+
rescue JSON::ParserError
|
24
|
+
nil
|
22
25
|
end
|
23
26
|
|
24
27
|
def default_code
|
@@ -36,13 +36,13 @@ module EZAPIClient
|
|
36
36
|
username,
|
37
37
|
password,
|
38
38
|
reference_no,
|
39
|
-
"'#{
|
39
|
+
"'#{json}'",
|
40
40
|
].join(" ")
|
41
41
|
end
|
42
42
|
|
43
43
|
def default_json
|
44
44
|
message.each_with_object({}) do |(key, value), hash|
|
45
|
-
hash[key.to_s.camelcase(:lower)] = value
|
45
|
+
hash[key.to_s.camelcase(:lower)] = Shellwords.escape(value)
|
46
46
|
end.to_json
|
47
47
|
end
|
48
48
|
|
data/lib/ezapi_client/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ezapi_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ramon Tayag
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-05-
|
11
|
+
date: 2019-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|