rest_framework 0.5.4 → 0.5.5
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/VERSION +1 -1
- data/lib/rest_framework/serializers.rb +2 -0
- data/lib/rest_framework/utils.rb +2 -2
- 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: 237449a323a14356f20e47cd2cbab3591aa749fc7e6f43bc06587995ff1041dc
|
4
|
+
data.tar.gz: 98ff07d840fca2fd09ab608a08a2814c5fe17c9ded1a7476c176941224c75e53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5219df61d409aeda527a61508694cf5b46dba856f03db4d7a2432d8d208a89eb5ccaccee2d7da88472d5b2735a77b235127d903497b9bb3fb19b740f2eb5df05
|
7
|
+
data.tar.gz: afbc3a40c39d312a0ebaaade7ce8c1d4d00b99fbd3da4168b0e9706d63d2fb59aa6d0f1d56cc4832a6eca10b783f43c20a2f9cf8d1015ef817293ba5852a7a62
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.5
|
@@ -13,10 +13,12 @@ class RESTFramework::BaseSerializer
|
|
13
13
|
raise NotImplementedError
|
14
14
|
end
|
15
15
|
|
16
|
+
# :nocov:
|
16
17
|
# Synonym for `serializable_hash` or compatibility with ActiveModelSerializers.
|
17
18
|
def serializable_hash(**kwargs)
|
18
19
|
return self.serialize(**kwargs)
|
19
20
|
end
|
21
|
+
# :nocov:
|
20
22
|
end
|
21
23
|
|
22
24
|
# This serializer uses `.serializable_hash` to convert objects to Ruby primitives (with the
|
data/lib/rest_framework/utils.rb
CHANGED
@@ -9,7 +9,7 @@ module RESTFramework::Utils
|
|
9
9
|
path = k
|
10
10
|
|
11
11
|
# Convert structure to path/methods/kwargs.
|
12
|
-
if v.is_a?(Hash) #
|
12
|
+
if v.is_a?(Hash) # Allow kwargs to be used to define path differently from the key.
|
13
13
|
v = v.symbolize_keys
|
14
14
|
|
15
15
|
# Ensure methods is an array.
|
@@ -87,7 +87,7 @@ module RESTFramework::Utils
|
|
87
87
|
}
|
88
88
|
}.select { |r|
|
89
89
|
(
|
90
|
-
r[:subdomain] == request.subdomain.presence &&
|
90
|
+
(!r[:subdomain] || r[:subdomain] == request.subdomain.presence) &&
|
91
91
|
r[:normalized_path].start_with?(current_normalized_path) &&
|
92
92
|
r[:controller] &&
|
93
93
|
r[:action]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rest_framework
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregory N. Schmit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|