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: 403b10401cf9e77b725c3cadcd758fe0797d35ec084675b63b59dff05fdc5f04
4
- data.tar.gz: 592c264df6aceffadb8993970fbc3a6077b1d283f5707f24d8a31e9c916ab79a
3
+ metadata.gz: acd792d3dc73de1d8eabdf890a23180731ed688350000fc03dec3ec7ca26c2b2
4
+ data.tar.gz: 27805804ca2cf78917d463d36003a837b9456b8248e6e774c064234ee122bd36
5
5
  SHA512:
6
- metadata.gz: 9f75af934fd1838ffe3cceced35be204c940a4bffa1dc78d5b1022ea69f3ad569d0c97d0fb872b24b721b7b2ec4328c5975b8fe115b7b5ba6d00d17c3c678bc5
7
- data.tar.gz: 437135b84e51fe271bbffda54f1fb9520b0afade25c09f5d782fb2fad86f5774e66ae42ebac6c31dac3cad34e38955d5b72d170e7b02bd6ffa5e902823a2467d
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WolfCore
4
- VERSION = "0.1.18"
4
+ VERSION = "0.1.20"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wolf_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.18
4
+ version: 0.1.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Roncallo