umbrellio-utils 0.7.3 → 0.7.4
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/Gemfile.lock +1 -1
- data/lib/umbrellio_utils/request_wrapper.rb +4 -3
- data/lib/umbrellio_utils/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0fbbcbcfd7e518b7673e46222b16b7b1bd34043e6ce41daeab68be72061a0c02
|
4
|
+
data.tar.gz: 77c3e024673156610281bcb81cbdaf25ec86e1034ab32c02975f0afa39ef7f06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79ed5bc2a2c4c1c1271fb7f9ed026b7993d22d426e11a25dc6af9c0f950d24f10a92cbd4820a84704f49c4af42696a8382bb9d5d3354684d2565509dd8cc356e
|
7
|
+
data.tar.gz: 2d38414441ef3aeceab73d7089c2656dcffaf78c4a9f4142f9ce091ad058a0a816882b0a1e0b1d99388822100e1042489e68c689f14c75090b37e40144a2dc0d
|
data/Gemfile.lock
CHANGED
@@ -4,8 +4,9 @@ module UmbrellioUtils
|
|
4
4
|
class RequestWrapper
|
5
5
|
include Memery
|
6
6
|
|
7
|
-
def initialize(request)
|
7
|
+
def initialize(request, remove_xml_attributes: true)
|
8
8
|
self.request = request
|
9
|
+
self.remove_xml_attributes = remove_xml_attributes
|
9
10
|
end
|
10
11
|
|
11
12
|
memoize def params
|
@@ -50,14 +51,14 @@ module UmbrellioUtils
|
|
50
51
|
|
51
52
|
private
|
52
53
|
|
53
|
-
attr_accessor :request
|
54
|
+
attr_accessor :request, :remove_xml_attributes
|
54
55
|
|
55
56
|
def parse_params
|
56
57
|
case request.media_type
|
57
58
|
when "application/json", /\+json\z/
|
58
59
|
Parsing.safely_parse_json(body)
|
59
60
|
when "application/xml"
|
60
|
-
Parsing.parse_xml(body)
|
61
|
+
Parsing.parse_xml(body, remove_attributes: remove_xml_attributes)
|
61
62
|
else
|
62
63
|
request.get? ? request.GET : request.POST
|
63
64
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: umbrellio-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JustAnotherDude
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: memery
|
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
86
|
- !ruby/object:Gem::Version
|
87
87
|
version: '0'
|
88
88
|
requirements: []
|
89
|
-
rubygems_version: 3.4.
|
89
|
+
rubygems_version: 3.4.21
|
90
90
|
signing_key:
|
91
91
|
specification_version: 4
|
92
92
|
summary: A set of utilities that speed up development
|