ruby_aem_aws 2.0.1 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/conf/gem.yaml +1 -1
- data/lib/ruby_aem_aws/constants.rb +2 -1
- data/lib/ruby_aem_aws/error.rb +1 -1
- data/lib/ruby_aem_aws.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: edf9ceb92a749def70b1e6e77657080a4757495f
|
4
|
+
data.tar.gz: a8d1f5d6c776d8a9be4d0d9b59e16e8279ceb289
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dcc5fe4b4d0a0e197b6f743a3c63532b4e069b5c50b038b2545acd649bc1d7cf7f49b780c3d16c3a7d0bb28318a55b248d29ce9aaf77c164b4b8315ad4aafb10
|
7
|
+
data.tar.gz: 7ef88b57050e47973b5c122ea46ec87400e665f92f305183dc34f1ba1ac743cf1d0e323f5312b7eda6414a5c135954ad5b31460fe051f7927616bcfee769aa72
|
data/conf/gem.yaml
CHANGED
@@ -1 +1 @@
|
|
1
|
-
version: 2.0
|
1
|
+
version: 2.1.0
|
@@ -48,7 +48,8 @@ module RubyAemAws
|
|
48
48
|
class Constants
|
49
49
|
REGION_DEFAULT = ENV['AWS_DEFAULT_REGION'] || ENV['aws_default_region'] || ENV['AWS_REGION'] || ENV['aws_region'] || 'ap-southeast-2'.freeze
|
50
50
|
ACCESS_KEY_ID = ENV['AWS_ACCESS_KEY_ID'] || ENV['aws_access_key_id']
|
51
|
-
SECRET_ACCESS_KEY = ENV['AWS_SECRET_ACCESS_KEY'] || ENV['
|
51
|
+
SECRET_ACCESS_KEY = ENV['AWS_SECRET_ACCESS_KEY'] || ENV['aws_secret_access_key']
|
52
|
+
SESSION_TOKEN = ENV['AWS_SESSION_TOKEN'] || ENV['aws_session_token']
|
52
53
|
PROFILE = ENV['AWS_PROFILE']
|
53
54
|
INSTANCE_STATE_HEALTHY = RubyAemAws::InstanceState::RUNNING.freeze
|
54
55
|
INSTANCE_STATE_CODE_RUNNING = RubyAemAws::InstanceStateCode::RUNNING
|
data/lib/ruby_aem_aws/error.rb
CHANGED
@@ -53,7 +53,7 @@ module RubyAemAws
|
|
53
53
|
def initialize(msg = "No credentials found!
|
54
54
|
Set environment variable AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY or AWS_PROFILE.
|
55
55
|
Alternative use following syntax:
|
56
|
-
RubyAemAws::AemAws.new(aws_access_key_id,
|
56
|
+
RubyAemAws::AemAws.new(aws_access_key_id, aws_secret_access_key) or
|
57
57
|
RubyAemAws::AemAws.new(credentials_profile_name)")
|
58
58
|
super
|
59
59
|
end
|
data/lib/ruby_aem_aws.rb
CHANGED
@@ -29,11 +29,12 @@ module RubyAemAws
|
|
29
29
|
conf[:aws_region] ||= Constants::REGION_DEFAULT
|
30
30
|
conf[:aws_access_key_id] ||= Constants::ACCESS_KEY_ID
|
31
31
|
conf[:aws_secret_access_key] ||= Constants::SECRET_ACCESS_KEY
|
32
|
+
conf[:aws_session_token] ||= Constants::SESSION_TOKEN
|
32
33
|
conf[:aws_profile] ||= Constants::PROFILE
|
33
34
|
|
34
35
|
Aws.config.update(region: conf[:aws_region])
|
35
36
|
|
36
|
-
credentials = Aws::Credentials.new(conf[:aws_access_key_id], conf[:aws_secret_access_key]) unless conf[:aws_access_key_id].nil?
|
37
|
+
credentials = Aws::Credentials.new(conf[:aws_access_key_id], conf[:aws_secret_access_key], conf[:aws_session_token]) unless conf[:aws_access_key_id].nil?
|
37
38
|
credentials = Aws::SharedCredentials.new(profile_name: conf[:aws_profile]) unless conf[:aws_profile].nil?
|
38
39
|
credentials = Aws::InstanceProfileCredentials.new if conf[:aws_profile].nil? && conf[:aws_access_key_id].nil?
|
39
40
|
raise RubyAemAws::ArgumentError unless defined? credentials
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_aem_aws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shine Solutions
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|