oneaws 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/oneaws/client.rb +15 -4
- data/lib/oneaws/version.rb +1 -1
- data/oneaws.gemspec +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af998829b0bd0674ee923e173025684f16c92be665ebccbad6064627ba8d90d7
|
4
|
+
data.tar.gz: c6710c75bf309c0d9dc1d4208815eebff4c01e5f3e057cee07a41ecf08626fac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9053ce65d3d2f182e7c0a9c704fcf605cae97785779733c2820d1b171681c847d542a87ddd8c736e8c967faa33f0e8177525f65603c167a2e6a53c5c3071eb2a
|
7
|
+
data.tar.gz: e1030899f630dd449337bca924dbb878f8a64950539c9cb94b2f5152779c9e6a29b4b58c482ace512e406155a9ed3651389dc5abec0e7f7d85dc06f1fb90afd1
|
data/lib/oneaws/client.rb
CHANGED
@@ -31,12 +31,23 @@ module Oneaws
|
|
31
31
|
end
|
32
32
|
|
33
33
|
mfa = response.mfa
|
34
|
+
|
35
|
+
if mfa.devices.length == 1
|
36
|
+
mfa_device = mfa.devices.first
|
37
|
+
else
|
38
|
+
puts "\nAvailable MFA devices:"
|
39
|
+
mfa.devices.each_with_index do |device, index|
|
40
|
+
puts "#{index + 1}. #{device.type} (ID: #{device.id})"
|
41
|
+
end
|
34
42
|
|
35
|
-
|
36
|
-
|
43
|
+
print "\nSelect MFA device (1-#{mfa.devices.length}): "
|
44
|
+
selection = STDIN.gets.chomp.to_i
|
45
|
+
|
46
|
+
if selection < 1 || selection > mfa.devices.length
|
47
|
+
raise MfaDeviceNotFoundError.new("Invalid device selection.")
|
48
|
+
end
|
37
49
|
|
38
|
-
|
39
|
-
raise MfaDeviceNotFoundError.new("MFA device not found.")
|
50
|
+
mfa_device = mfa.devices[selection - 1]
|
40
51
|
end
|
41
52
|
|
42
53
|
device_types_that_do_not_require_token = [
|
data/lib/oneaws/version.rb
CHANGED
data/oneaws.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
25
|
spec.require_paths = ['lib']
|
26
26
|
|
27
|
-
spec.add_dependency 'aws-sdk-core'
|
27
|
+
spec.add_dependency 'aws-sdk-core', '~> 3.206.0'
|
28
28
|
spec.add_dependency 'inifile'
|
29
29
|
spec.add_dependency 'onelogin', '~> 1.6'
|
30
30
|
spec.add_dependency 'thor'
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oneaws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuki Koya
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 3.206.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 3.206.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: inifile
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
|
-
rubygems_version: 3.
|
111
|
+
rubygems_version: 3.5.16
|
112
112
|
signing_key:
|
113
113
|
specification_version: 4
|
114
114
|
summary: Issue temporary credentials using OneLogin and AWS STS.
|