http-client-generator 0.1.29 → 0.1.31
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/http_client_generator/version.rb +1 -1
- data/lib/http_client_generator.rb +4 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be3eb6ef45916a7b1b90b8b34950392ef0b99078ad7c9b8fbe4b7d93a0106d4f
|
4
|
+
data.tar.gz: 607b434cd895cd29d3b32dab40e63f6ef17b78395c7b07dfa48296987a9974a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca1b2793f3ddbc32253b700364be7fc779aea3fee0d18067c74f6d01cc2bcf2b81573a464ed93bdb7a101d305fcd7cdbd6301674cefbf102d5a7de54a86e7be1
|
7
|
+
data.tar.gz: 02dd797c99e5eb112939d6a4b9a4f5ec4ba9f2c23d828eac1081afc359f3e186109268d092b1a55280a7c1fb1116847a41341a431770dbb6709a078786207c2e
|
@@ -2,6 +2,9 @@
|
|
2
2
|
|
3
3
|
require 'zeitwerk'
|
4
4
|
|
5
|
+
require 'active_support/core_ext/string/inflections'
|
6
|
+
require 'active_support/core_ext/hash/keys'
|
7
|
+
|
5
8
|
Zeitwerk::Loader.for_gem.setup
|
6
9
|
|
7
10
|
Dir["#{__dir__}/http_client_generator/plugs/*.rb"].each { |f| require f }
|
@@ -25,7 +28,7 @@ module HttpClientGenerator
|
|
25
28
|
resources = resources_definition.resources
|
26
29
|
|
27
30
|
resources.each do |resource|
|
28
|
-
method_name = :"#{resource.
|
31
|
+
method_name = :"#{resource.verb}_#{resource.name}"
|
29
32
|
|
30
33
|
define_singleton_method(method_name) do |url_options = {}, body: nil, **rest_args|
|
31
34
|
resource.perform_request(@url_helper, url_options, body, rest_args)
|