wolf_core 0.1.18 → 0.1.20
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,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acd792d3dc73de1d8eabdf890a23180731ed688350000fc03dec3ec7ca26c2b2
|
4
|
+
data.tar.gz: 27805804ca2cf78917d463d36003a837b9456b8248e6e774c064234ee122bd36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23439fb5b879807ffd2d3409fc7d03cd7b1dbb8f9214515201118a92bdad2a66e2df9c04b9b4eb0bdda5e465e920144915a4bc5c2bd8ade9e66a654e3ee7cf98
|
7
|
+
data.tar.gz: c023e26ce8cbada2460d470a1886b2cfa5641dc373f70d833a101a4a03dfc2897ef7270b4f1377d0bc404acfcdb6f076203b3e6808ff9fd9577438ed5c801ce8
|
@@ -2,14 +2,26 @@ module WolfCore
|
|
2
2
|
module HttpOperations
|
3
3
|
include WolfCore::ExceptionOperations
|
4
4
|
|
5
|
+
def async_http_get(**args)
|
6
|
+
fork { http_get(**args) }
|
7
|
+
end
|
8
|
+
|
5
9
|
def http_get(url:, headers: {}, query: nil)
|
6
10
|
WolfCore::HttpDataSource.http_get(url: url, headers: headers, query: query)
|
7
11
|
end
|
8
12
|
|
13
|
+
def async_http_post(**args)
|
14
|
+
fork { http_post(**args) }
|
15
|
+
end
|
16
|
+
|
9
17
|
def http_post(url:, headers: {}, body: nil, query: nil)
|
10
18
|
WolfCore::HttpDataSource.http_post(url: url, headers: headers, query: query, body: body)
|
11
19
|
end
|
12
20
|
|
21
|
+
def async_http_put(**args)
|
22
|
+
fork { http_put(**args) }
|
23
|
+
end
|
24
|
+
|
13
25
|
def http_put(url:, headers: {}, body: nil, query: nil)
|
14
26
|
WolfCore::HttpDataSource.http_put(url: url, headers: headers, query: query, body: body)
|
15
27
|
end
|
@@ -3,18 +3,13 @@ module WolfCore
|
|
3
3
|
module_function
|
4
4
|
|
5
5
|
def init
|
6
|
-
endpoint = ENV.fetch('AWS_LAMBDA_FUNCTION_ENDPOINT', nil)
|
7
6
|
client_config = {
|
8
7
|
access_key_id: ENV.fetch('AWS_KEY_ID', nil),
|
9
8
|
secret_access_key: ENV.fetch('AWS_SECRET_ACCESS_KEY', nil),
|
9
|
+
region: ENV.fetch('AWS_REGION', nil),
|
10
|
+
endpoint: ENV.fetch('AWS_LAMBDA_FUNCTION_ENDPOINT', nil),
|
10
11
|
}
|
11
12
|
|
12
|
-
if endpoint.present?
|
13
|
-
client_config[:endpoint] = endpoint
|
14
|
-
else
|
15
|
-
client_config[:region] = ENV.fetch('AWS_REGION', nil)
|
16
|
-
end
|
17
|
-
|
18
13
|
client_config = client_config.compact
|
19
14
|
return if client_config.empty?
|
20
15
|
|
data/lib/wolf_core/version.rb
CHANGED