herdst_worker 0.1.15 → 0.1.16

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: 50cad009fea342f5f2147973c292ecf89fbbb65f983b33339b6c6855d0d8bda7
4
- data.tar.gz: f8fb82c44f454d776b6290253d61e3fe01aa0f31ee360850d5a0b0987f054d0a
3
+ metadata.gz: e6b16f6978e9ae1f573c171ed88dc37c7780fe9c320c42e6471f693b723bc23a
4
+ data.tar.gz: 48e44a51345d0caa11c424e547ab35e56165ca7acfd105b738860175700a8097
5
5
  SHA512:
6
- metadata.gz: e3739b02330d9775b7730793ebdc1beffc29e65e4c799cb4a85be82491d972442165f1451d9c06a3877a307c5046dac007b5f2ab92a1c6d03b568131cf5f9d86
7
- data.tar.gz: d2e59aa54ef5d07ac44425757f63e99f32078ae3e91cd01a47d1f64d08dc27a51f8d8d04cb9d076be8b97106b957685ca8f338ec76c33abad97cc7bcd9e6e3fd
6
+ metadata.gz: 6682d0b3b950d385405f1180a011c8245fec09c96236c18afdfe1332e38d36c2c0095ad1e047a985eb39d5d69776f96e3563b26055c831f215035e40a7e3fcb5
7
+ data.tar.gz: 25a0be1ce27f3d3363cd7a662c91a96f8eb47ed106ac9d1ea6d64c92243429ebeb836cb18c71cac5d00ec6f0d0d1ee8aebe2cfc57a683e7ae9feed2e95ce5b15
data/ReadMe.md ADDED
File without changes
@@ -74,7 +74,7 @@ module HerdstWorker
74
74
  )
75
75
 
76
76
  Aws.config.update(
77
- region: self.get_aws_region,
77
+ region: self.get_aws_region(credentials),
78
78
  credentials: self.aws_credentials
79
79
  )
80
80
 
@@ -82,10 +82,14 @@ module HerdstWorker
82
82
  end
83
83
 
84
84
 
85
- def get_aws_region
86
- # "ap-southeast-2"
85
+ def get_aws_region(credentials = nil)
86
+ default_region = "ap-southeast-2"
87
87
 
88
- self["AWS_REGION"] = (ENV["AWS_REGION"] || "us-east-1")
88
+ if self.is_prod?
89
+ self["AWS_REGION"] = (ENV["AWS_REGION"] || default_region)
90
+ else
91
+ self["AWS_REGION"] = credentials && credentials["Region"] || default_region
92
+ end
89
93
  end
90
94
 
91
95
 
@@ -1,3 +1,3 @@
1
1
  module HerdstWorker
2
- VERSION = '0.1.15'
2
+ VERSION = '0.1.16'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: herdst_worker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.15
4
+ version: 0.1.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Herd.St
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-21 00:00:00.000000000 Z
11
+ date: 2023-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -230,6 +230,7 @@ extensions: []
230
230
  extra_rdoc_files: []
231
231
  files:
232
232
  - Rakefile
233
+ - ReadMe.md
233
234
  - bin/herdst_worker
234
235
  - bin/herdst_worker_console
235
236
  - lib/herdst_worker.rb