prx-ruby-aws-creds 0.1.4 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/prx-ruby-aws-creds.rb +21 -0
  3. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63e43d0e7590085a8a237f23b02e623fcb648971be073af91cb0e1756ed541c2
4
- data.tar.gz: 9e0c5ecb9158a8932a65fdbd08a02e2296c49463f219bab834178aac7c73431a
3
+ metadata.gz: 8e03288063d2999775ce03029bcbf2e3be1ff12095d90812dd22127058b1c7b2
4
+ data.tar.gz: d919adc2def0ebfe1469d3d1a58bb8d7b4fdb4227969a8cc03bd4d2f2e3b20dc
5
5
  SHA512:
6
- metadata.gz: ca82a7b69d121c0412fba3ab08b02d1bb5d702fc48a0788fe3af42ed0bd11205343cec5f53f588b5629d5b2c82398f4550b8d2f6d83bc792fe023f498f57a993
7
- data.tar.gz: 572806c15188079c030df7a9924c670d3d76d6a7027bb62d27ec838abff7e5dcc50da7fcac249826d4c1cfbc6db00c8388eb3eadf17d8c67a3d8559acf653c16
6
+ metadata.gz: abe3afa00b828ad17696254c05ba83ca446de9bb2679fd5aa57544b31fd17705f3b190688b4ee3ef46302b5d3f1e4617343cd4c1b5daf13c34cd56784bf63335
7
+ data.tar.gz: 4c173dbbfaeef9dc4e240418f327325335a8130000c425aef3bd261f7bb9e71a892f5af6661210b57b7ac8548a0a7e83295c2dfc3548ce92ecb37e00a4d98748
@@ -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
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-04-11 00:00:00.000000000 Z
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: []