cloudformation-ruby-dsl 1.2.0 → 1.2.1
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/bin/aws-sdk-patch +3 -0
- data/lib/cloudformation-ruby-dsl/version.rb +1 -1
- data/share/aws-sdk-patch.sh +108 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a74e2b70195129a44e2605f4fc8c5291d34abb0
|
4
|
+
data.tar.gz: 1e51275b59645a9d6106912c33ace46d917e8ffc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e63740f584fbedb37fdb6c0187e5561ad025e063c58a0fb646b4600d48a0ddc60bc5520141e832bb5e46cbe7e0d97c7bd9da9ce370f9989c7f72c195d5539696
|
7
|
+
data.tar.gz: 339b178f440f20ad06ad3467356e11a81b37c65e01c57f2c01fbefb9c852f5c130b5822f657743dd54f127afa1d022d9d5212cdde1423efd7117ea63f2ef57b0
|
data/bin/aws-sdk-patch
ADDED
@@ -0,0 +1,108 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
# There is the temporary solution allows to use the Assume Role parameter in aws-ruby-sdk.
|
4
|
+
# This script contains patch and allows to apply or revert it.
|
5
|
+
|
6
|
+
# Put the patch content to the variable $PATCH
|
7
|
+
read -r -d '' PATCH <<EOP
|
8
|
+
70c70
|
9
|
+
< @credentials = Credentials.new(
|
10
|
+
---
|
11
|
+
> credentials = Credentials.new(
|
12
|
+
74a75,83
|
13
|
+
> @credentials = if role_arn = profile['role_arn']
|
14
|
+
> AssumeRoleCredentials.new(
|
15
|
+
> role_session_name: [*('A'..'Z')].sample(16).join,
|
16
|
+
> role_arn: role_arn,
|
17
|
+
> credentials: credentials
|
18
|
+
> ).credentials
|
19
|
+
> else
|
20
|
+
> credentials
|
21
|
+
> end
|
22
|
+
79c88,92
|
23
|
+
< profile
|
24
|
+
---
|
25
|
+
> if source = profile.delete('source_profile')
|
26
|
+
> profiles[source].merge(profile)
|
27
|
+
> else
|
28
|
+
> profile
|
29
|
+
> end
|
30
|
+
EOP
|
31
|
+
|
32
|
+
# Define the target gem and file
|
33
|
+
GEM_NAME='aws-sdk-core'
|
34
|
+
FILE_NAME='shared_credentials.rb'
|
35
|
+
|
36
|
+
# Find the latest version of gem file
|
37
|
+
GEM_FILE=$(gem contents "${GEM_NAME}" | grep "${FILE_NAME}")
|
38
|
+
|
39
|
+
# Define the commands
|
40
|
+
TEST_COMMAND='echo "${PATCH}" | patch --dry-run --force --silent '"${GEM_FILE} $@"
|
41
|
+
PATCH_COMMAND='echo "${PATCH}" | patch '"${GEM_FILE} $@"
|
42
|
+
|
43
|
+
# Parse arguments
|
44
|
+
while [ $# -gt 0 ]
|
45
|
+
do
|
46
|
+
case "$1" in
|
47
|
+
--help|-h|-\?) pod2usage -verbose 1 "$0"; exit 0 ;;
|
48
|
+
--man) pod2usage -verbose 2 "$0"; exit 0 ;;
|
49
|
+
--dry-run) shift; echo == Command: ==; echo "$PATCH_COMMAND"; exit 0 ;;
|
50
|
+
-R|--reverse) shift ;;
|
51
|
+
*) echo "Unknown option: $1" >&2; exit 2 ;;
|
52
|
+
esac
|
53
|
+
done
|
54
|
+
|
55
|
+
eval $TEST_COMMAND && eval $PATCH_COMMAND
|
56
|
+
exit $?
|
57
|
+
|
58
|
+
__END__
|
59
|
+
|
60
|
+
=pod
|
61
|
+
|
62
|
+
=head1 NAME
|
63
|
+
|
64
|
+
aws-sdk-patch.sh - Apply or revert patch to aws-ruby-sdk to enable the support of Assume roles
|
65
|
+
|
66
|
+
=head1 SYNOPSIS
|
67
|
+
|
68
|
+
aws-sdk-patch.sh [OPTIONS]
|
69
|
+
|
70
|
+
=head1 OPTIONS
|
71
|
+
|
72
|
+
=over 4
|
73
|
+
|
74
|
+
=item B<--help> | B<-h>
|
75
|
+
|
76
|
+
Print the brief help message and exit.
|
77
|
+
|
78
|
+
=item B<--man>
|
79
|
+
|
80
|
+
Print the manual page and exit.
|
81
|
+
|
82
|
+
=item B<-R> | B<--reverse>
|
83
|
+
|
84
|
+
Revert the previously applied patch
|
85
|
+
|
86
|
+
=item B<--dry-run>
|
87
|
+
|
88
|
+
Print the command and results of applying the patches without actually changing any files.
|
89
|
+
|
90
|
+
=back
|
91
|
+
|
92
|
+
=head1 ARGUMENTS
|
93
|
+
|
94
|
+
Arguments are not allowed.
|
95
|
+
|
96
|
+
=head1 DESCRIPTION
|
97
|
+
|
98
|
+
There is the temporary solution allows to use the Assume Role parameter in aws-ruby-sdk. This script contains patch and allows to apply or revert it.
|
99
|
+
|
100
|
+
=head1 SEE ALSO
|
101
|
+
|
102
|
+
GIT PR #1092, https://github.com/aws/aws-sdk-ruby/pull/1092
|
103
|
+
|
104
|
+
=head1 AUTHOR
|
105
|
+
|
106
|
+
Serhiy Suprun <serhiy.suprun@bazaarvoice.com>
|
107
|
+
|
108
|
+
=cut
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudformation-ruby-dsl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shawn Smith
|
@@ -15,7 +15,7 @@ authors:
|
|
15
15
|
autorequire:
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
|
-
date: 2016-
|
18
|
+
date: 2016-04-04 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: detabulator
|
@@ -126,6 +126,7 @@ email:
|
|
126
126
|
- Jona.Fenocchi@bazaarvoice.com
|
127
127
|
- Tony.Cui@bazaarvoice.com
|
128
128
|
executables:
|
129
|
+
- aws-sdk-patch
|
129
130
|
- cfntemplate-to-ruby
|
130
131
|
extensions: []
|
131
132
|
extra_rdoc_files: []
|
@@ -136,6 +137,7 @@ files:
|
|
136
137
|
- OWNERS
|
137
138
|
- README.md
|
138
139
|
- Rakefile
|
140
|
+
- bin/aws-sdk-patch
|
139
141
|
- bin/cfntemplate-to-ruby
|
140
142
|
- cloudformation-ruby-dsl.gemspec
|
141
143
|
- docs/Contributing.md
|
@@ -158,6 +160,7 @@ files:
|
|
158
160
|
- lib/cloudformation-ruby-dsl/spotprice.rb
|
159
161
|
- lib/cloudformation-ruby-dsl/table.rb
|
160
162
|
- lib/cloudformation-ruby-dsl/version.rb
|
163
|
+
- share/aws-sdk-patch.sh
|
161
164
|
homepage: http://github.com/bazaarvoice/cloudformation-ruby-dsl
|
162
165
|
licenses: []
|
163
166
|
metadata: {}
|