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: bc4fd458f25e3c811fe10cc530624099b49c6fa48c98c83ce34168e811e4b2f3
4
- data.tar.gz: 7d27d6bf1f70548aff6e8f4f667562fcf5538641a6a7d279c89566a7739b1a40
3
+ metadata.gz: 403b10401cf9e77b725c3cadcd758fe0797d35ec084675b63b59dff05fdc5f04
4
+ data.tar.gz: 592c264df6aceffadb8993970fbc3a6077b1d283f5707f24d8a31e9c916ab79a
5
5
  SHA512:
6
- metadata.gz: 5fa3c4785a823a2c65fd3437cc2abc973405cbd06e26ce91355da3afb8478a78bd1e2d069c97a8059509aef0db94bf0b49f1372f7e9e35e864d863c04e8ad2eb
7
- data.tar.gz: f0de3112e7546b400bd985eaa3e2ef6b1bbdd954e84fb25a6e61b2719fa727ad305bb15ede314023785def7b186d54c09e2a1bce45abd6563db983241cf59625
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
- region: ENV.fetch('AWS_REGION', nil)
10
- }.compact
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WolfCore
4
- VERSION = "0.1.17"
4
+ VERSION = "0.1.18"
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.17
4
+ version: 0.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Roncallo