wolf_core 0.1.17 → 0.1.18
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: 403b10401cf9e77b725c3cadcd758fe0797d35ec084675b63b59dff05fdc5f04
|
4
|
+
data.tar.gz: 592c264df6aceffadb8993970fbc3a6077b1d283f5707f24d8a31e9c916ab79a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f75af934fd1838ffe3cceced35be204c940a4bffa1dc78d5b1022ea69f3ad569d0c97d0fb872b24b721b7b2ec4328c5975b8fe115b7b5ba6d00d17c3c678bc5
|
7
|
+
data.tar.gz: 437135b84e51fe271bbffda54f1fb9520b0afade25c09f5d782fb2fad86f5774e66ae42ebac6c31dac3cad34e38955d5b72d170e7b02bd6ffa5e902823a2467d
|
@@ -3,12 +3,21 @@ module WolfCore
|
|
3
3
|
module_function
|
4
4
|
|
5
5
|
def init
|
6
|
+
endpoint = ENV.fetch('AWS_LAMBDA_FUNCTION_ENDPOINT', nil)
|
6
7
|
client_config = {
|
7
8
|
access_key_id: ENV.fetch('AWS_KEY_ID', nil),
|
8
9
|
secret_access_key: ENV.fetch('AWS_SECRET_ACCESS_KEY', nil),
|
9
|
-
|
10
|
-
|
10
|
+
}
|
11
|
+
|
12
|
+
if endpoint.present?
|
13
|
+
client_config[:endpoint] = endpoint
|
14
|
+
else
|
15
|
+
client_config[:region] = ENV.fetch('AWS_REGION', nil)
|
16
|
+
end
|
17
|
+
|
18
|
+
client_config = client_config.compact
|
11
19
|
return if client_config.empty?
|
20
|
+
|
12
21
|
@@client = Aws::Lambda::Client.new(client_config)
|
13
22
|
end
|
14
23
|
|
data/lib/wolf_core/version.rb
CHANGED