http_api_tools 0.3.1 → 0.3.2
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
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjNhODk0NjM2YmI4OTliZjcxMjM5NWY2ZDE0YTgxZWFjMzg0NGFkYQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MjdmODZiMGYxNWUwM2U2ODIxYjRhYmRlYzA0OWNjYmVhYjJjMjExOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZmI5NDVjZDI2OTQyM2MyZjZmM2ZmYWUzYWM1OTYzNDMwMTQ4Y2I4OThiOTVk
|
10
|
+
NTY3ZjUyMzU0OTI5MTdhZjBlOGUwM2MwOTRmZWQ0M2Q4NmYyZmRiOWI0ZGQz
|
11
|
+
ZTA0ZGE3MGU4Zjc4ZTI2MWFjMzE0OGVlNjA2ODgyNDgyYWU0ODA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OGQ1MDJkY2RkOGFhMGQxNzllMTNmNThhY2ZiMzhjOGYzNmY2ZTcyNjcxM2Yy
|
14
|
+
MjQ2NmQ2ZjI2NGVmMDFiNjI5YTNlYjcxMGFjYTU3ZTUzM2M4MmI0ZjFkMGE5
|
15
|
+
MTNjNjI0Yzg0MDg2ZjNiNjEzZDAwZDg3NTFkMzc5NmIyYTZiNWY=
|
data/lib/http_api_tools.rb
CHANGED
@@ -4,9 +4,9 @@ require 'http_api_tools/sideloading/json_serializer'
|
|
4
4
|
require 'http_api_tools/sideloading/json_deserializer'
|
5
5
|
require 'http_api_tools/model'
|
6
6
|
require 'http_api_tools/relation_includes'
|
7
|
+
require 'http_api_tools/serializer_loader'
|
7
8
|
|
8
9
|
module HttpApiTools
|
9
10
|
|
10
|
-
|
11
|
-
SerializerLoader.load_serializers
|
11
|
+
|
12
12
|
end
|
@@ -1,10 +1,16 @@
|
|
1
1
|
require 'singleton'
|
2
|
+
require 'http_api_tools/serializer_loader'
|
2
3
|
|
3
4
|
module HttpApiTools
|
4
5
|
class SerializerRegistry
|
5
6
|
|
6
7
|
include Singleton
|
7
8
|
|
9
|
+
def initialize
|
10
|
+
#Make sure all serializers have been loaded so that relationships can be properly resolved
|
11
|
+
HttpApiTools::SerializerLoader.load_serializers
|
12
|
+
end
|
13
|
+
|
8
14
|
def get(type, class_name)
|
9
15
|
registry.fetch(type.to_sym, {})[class_name]
|
10
16
|
end
|
@@ -25,3 +31,5 @@ module HttpApiTools
|
|
25
31
|
|
26
32
|
end
|
27
33
|
end
|
34
|
+
|
35
|
+
|