http-client-generator 0.1.23 → 0.1.24
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f685763f801978967e103fadca27d8c086614b71e1b47ddf6929aead1bce8eb7
|
4
|
+
data.tar.gz: 116aafaf9d236c62c2aa5a627720f98c20b000cc20e51249e4c0e1e56b46fe97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a4ac673ad4adafa842e6877eb0ad989327801d71047981c95af0a021f9e9f6c2af8c1a2002fc9b14e276b89d696b45f4c5301b5edcc4acfb49417e1747712bc
|
7
|
+
data.tar.gz: 91a7be067d35bd83217715208884e80e773b22beb6da7ab3552dfd1f5ef48f232561f7482633743a1570fa454ce56ec547e1e0d4661c11fc269ca1cfacdbff2d
|
@@ -6,15 +6,24 @@ module HttpClientGenerator
|
|
6
6
|
Plugs.register :validate_response, self
|
7
7
|
|
8
8
|
module SchemaBuilder
|
9
|
-
def
|
9
|
+
def self.included(base)
|
10
|
+
super
|
11
|
+
|
10
12
|
require 'datacaster'
|
13
|
+
base.extend(self)
|
14
|
+
end
|
11
15
|
|
16
|
+
def schema_for(name, &block)
|
12
17
|
@schemas ||= {}
|
13
18
|
@schemas[name] = Datacaster.choosy_schema(&block)
|
14
19
|
|
15
20
|
define_singleton_method(name) do |params|
|
16
21
|
@schemas[name].(params)
|
17
22
|
end
|
23
|
+
|
24
|
+
define_method(name) do |params|
|
25
|
+
@schemas[name].(params)
|
26
|
+
end
|
18
27
|
end
|
19
28
|
end
|
20
29
|
|