prx-ruby-aws-creds 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/prx-ruby-aws-creds.rb +21 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e03288063d2999775ce03029bcbf2e3be1ff12095d90812dd22127058b1c7b2
|
4
|
+
data.tar.gz: d919adc2def0ebfe1469d3d1a58bb8d7b4fdb4227969a8cc03bd4d2f2e3b20dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: abe3afa00b828ad17696254c05ba83ca446de9bb2679fd5aa57544b31fd17705f3b190688b4ee3ef46302b5d3f1e4617343cd4c1b5daf13c34cd56784bf63335
|
7
|
+
data.tar.gz: 4c173dbbfaeef9dc4e240418f327325335a8130000c425aef3bd261f7bb9e71a892f5af6661210b57b7ac8548a0a7e83295c2dfc3548ce92ecb37e00a4d98748
|
data/lib/prx-ruby-aws-creds.rb
CHANGED
@@ -11,6 +11,27 @@ require "aws-sdk-sso"
|
|
11
11
|
CACHE_DIRECTORY = "#{Dir.home}/.aws/ruby/cache"
|
12
12
|
AWS_CONFIG_FILE = ENV["AWS_CONFIG_FILE"] || "#{Dir.home}/.aws/config"
|
13
13
|
|
14
|
+
# Normally IniFile tries to be clever about detecting number values in the file
|
15
|
+
# and casting them to Integers and Floats. This breaks on a value like
|
16
|
+
# 048723829744, becuase Integer() tries to treat that as an octal, but fails
|
17
|
+
# since it includes 8s and 9s, but Float(048723829744) treats it like a decimal
|
18
|
+
# and returns 48723829744.0. Even if Integer() didn't fail it would drop the
|
19
|
+
# leading zero. We need to just treat these values as strings, so this gets
|
20
|
+
# rid of the fancy typecasting.
|
21
|
+
class IniFile
|
22
|
+
class Parser
|
23
|
+
def typecast( value )
|
24
|
+
case value
|
25
|
+
when %r/\Atrue\z/i; true
|
26
|
+
when %r/\Afalse\z/i; false
|
27
|
+
when %r/\A\s*\z/i; nil
|
28
|
+
else
|
29
|
+
unescape_value(value)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
14
35
|
class PrxRubyAwsCreds
|
15
36
|
class << self
|
16
37
|
# The cache key is based on the parameters used to request temporary
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prx-ruby-aws-creds
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Kalafarski
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inifile
|
@@ -91,7 +91,7 @@ homepage: https://github.com/PRX/homebrew-dev-tools/tree/main/lib/prx-ruby-aws-c
|
|
91
91
|
licenses:
|
92
92
|
- MIT
|
93
93
|
metadata: {}
|
94
|
-
post_install_message:
|
94
|
+
post_install_message:
|
95
95
|
rdoc_options: []
|
96
96
|
require_paths:
|
97
97
|
- lib
|
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
107
|
version: '0'
|
108
108
|
requirements: []
|
109
109
|
rubygems_version: 3.4.10
|
110
|
-
signing_key:
|
110
|
+
signing_key:
|
111
111
|
specification_version: 4
|
112
112
|
summary: tktk
|
113
113
|
test_files: []
|