openstax_aws 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6f32242082668d657cf21a1344ac2bd5420988967cdb77a2d58a25bfc4af05d
4
- data.tar.gz: 2dbfb47ea6aaaec7582f6f62f7c98b2062dae791bc49bd10b1c343d18b9ed9bb
3
+ metadata.gz: 5a062d5bb4d0c5c73fd23b6ed4c1d1b36e18d24143e6a74c7a51e4e3c552048d
4
+ data.tar.gz: a7fcc57860108b12434d66f5e5ccc90e27494bf892a67a1f961aba942398ab8e
5
5
  SHA512:
6
- metadata.gz: 1a6b20b2acc14b976fa4c76e3588aa34cb0ad81cefc21ed9b90402b4c9dbd73b8f0b652313cc606852ab4dbcd996d19ad939e111bc543e975cb45fff53d749c5
7
- data.tar.gz: 7e351d427170af5cb02d814cd79bcc675e2e4cb6174d2a598618cae647a524b84f46ba0a140d1f9ef9966d1cd0477f91224f7c956fbf7887209825c6d5625e86
6
+ metadata.gz: 3be0e6e5c49c30f40e98575d0957fad14e025c6297f7276bcc71b8f42f427b0b349ff47b1c60ca3089a1901be4f9643afe68275aa468bb04e2a1412f426d5b37
7
+ data.tar.gz: a369f3fb8b8a8f39165358cc24352b0a1b21c6af2fa1baf4bd4fc816877cf3ae8d2fa3e4bff67e49e7930ceb7e42e61942f31ee78c3e00bc92605fa3cb30dee8
data/.gitignore CHANGED
@@ -16,4 +16,6 @@
16
16
 
17
17
  *.byebug_history
18
18
 
19
+ Gemfile.lock
20
+
19
21
  .env
@@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.1.0] - 2020-10-20
10
+
11
+ Fixed Packer debug mode by reading and printing each character from Packer instead of each line.
12
+
13
+ Restricted AMI search to images owned by the same account to prevent a potential security flaw.
14
+
15
+ Gitignored Gemfile.lock.
16
+
17
+ Removed development dependency on bundler 1.
18
+
9
19
  ## [1.0.0] - 2020-10-03
10
20
 
11
21
  First official version.
data/README.md CHANGED
@@ -922,6 +922,21 @@ your changes.
922
922
 
923
923
  Don't forget to delete your stack (from the console) when you are finished!
924
924
 
925
+ ## Gem Release Process
926
+
927
+ When making a PR with a new feature or bug fix, add a changelog describing the change in
928
+ CHANGELOG.md, under the Unreleased section.
929
+
930
+ When releasing a new version, update lib/openstax/aws/version.rb, following semantic versioning.
931
+ Then rename the Unreleased section on the changelog to the same version,
932
+ adding the current date next to it.
933
+ Finally, create a new Unreleased section at the top of the changelog.
934
+ These steps can either be performed in a separate PR or in the same PR,
935
+ if a new version is due for immediate release.
936
+
937
+ After the PR is merged, pull the master branch, run tests to confirm that everything looks OK,
938
+ then run `rake release` to push aws-ruby to rubygems.
939
+
925
940
  ## README Todos
926
941
 
927
942
  1. Discuss use of multiple secrets objects
@@ -25,9 +25,9 @@ module OpenStax::Aws
25
25
  get_tag(key: "sha")
26
26
  end
27
27
 
28
- def self.find_by_sha(sha:, region:)
28
+ def self.find_by_sha(sha:, region:)
29
29
  Aws::EC2::Client.new(region: region).describe_images({
30
- filters: [{name: "tag:sha", values: [sha]}]
30
+ owners: ['self'], filters: [{name: "tag:sha", values: [sha]}]
31
31
  }).images.map{|aws_image| new(aws_image: aws_image)}
32
32
  end
33
33
  end
@@ -52,8 +52,10 @@ module OpenStax::Aws
52
52
  @logger.info("Printing stderr for desired verbosity")
53
53
 
54
54
  Open3.popen2e(command) do |stdin, stdout_err, wait_thr|
55
- while line=stdout_err.gets do
56
- puts(line)
55
+ stdout_err.sync = true
56
+
57
+ while char = stdout_err.getc do
58
+ print char
57
59
  end
58
60
  end
59
61
  end
@@ -53,10 +53,20 @@ module OpenStax::Aws
53
53
  ami = ""
54
54
 
55
55
  Open3.popen2e(command) do |stdin, stdout_err, wait_thr|
56
- while line=stdout_err.gets do
57
- STDERR.puts(line)
56
+ stdout_err.sync = true
57
+
58
+ line = ''
59
+
60
+ while char = stdout_err.getc do
61
+ line << char
62
+ print char
63
+
64
+ next unless char == "\n"
65
+
58
66
  matchami = line.match(/AMI: (ami-[0-9\-a-z]*)/i)
59
67
  ami = matchami.captures[0] if matchami
68
+
69
+ line = ''
60
70
  end
61
71
  end
62
72
 
@@ -1,5 +1,5 @@
1
1
  module OpenStax
2
2
  module Aws
3
- VERSION = "1.0.0"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
@@ -1,4 +1,3 @@
1
-
2
1
  lib = File.expand_path("../lib", __FILE__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require "openstax/aws/version"
@@ -42,7 +41,7 @@ Gem::Specification.new do |spec|
42
41
  spec.add_dependency 'git'
43
42
  spec.add_dependency "activesupport"
44
43
 
45
- spec.add_development_dependency "bundler", "~> 1.16"
44
+ spec.add_development_dependency "bundler"
46
45
  spec.add_development_dependency "rake", "~> 13.0"
47
46
  spec.add_development_dependency "rspec", "~> 3.0"
48
47
  spec.add_development_dependency "byebug"
@@ -50,9 +49,4 @@ Gem::Specification.new do |spec|
50
49
  spec.add_development_dependency "vcr"
51
50
  spec.add_development_dependency "webmock"
52
51
  spec.add_development_dependency "dotenv"
53
-
54
52
  end
55
-
56
-
57
-
58
-
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openstax_aws
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - JP Slavinsky
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-03 00:00:00.000000000 Z
11
+ date: 2020-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-autoscaling
@@ -154,16 +154,16 @@ dependencies:
154
154
  name: bundler
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - "~>"
157
+ - - ">="
158
158
  - !ruby/object:Gem::Version
159
- version: '1.16'
159
+ version: '0'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - "~>"
164
+ - - ">="
165
165
  - !ruby/object:Gem::Version
166
- version: '1.16'
166
+ version: '0'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: rake
169
169
  requirement: !ruby/object:Gem::Requirement
@@ -277,7 +277,6 @@ files:
277
277
  - ".travis.yml"
278
278
  - CHANGELOG.md
279
279
  - Gemfile
280
- - Gemfile.lock
281
280
  - LICENSE.txt
282
281
  - README.md
283
282
  - Rakefile
@@ -343,7 +342,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
343
342
  - !ruby/object:Gem::Version
344
343
  version: '0'
345
344
  requirements: []
346
- rubygems_version: 3.0.3
345
+ rubygems_version: 3.1.4
347
346
  signing_key:
348
347
  specification_version: 4
349
348
  summary: openstax IaC
@@ -1,120 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- openstax_aws (1.0.0)
5
- activesupport
6
- aws-sdk-autoscaling (~> 1)
7
- aws-sdk-cloudformation (~> 1)
8
- aws-sdk-cloudfront (~> 1)
9
- aws-sdk-ec2 (~> 1)
10
- aws-sdk-kafka (~> 1)
11
- aws-sdk-rds (~> 1)
12
- aws-sdk-s3 (~> 1)
13
- aws-sdk-ssm (~> 1)
14
- git
15
-
16
- GEM
17
- remote: https://rubygems.org/
18
- specs:
19
- activesupport (6.0.3.3)
20
- concurrent-ruby (~> 1.0, >= 1.0.2)
21
- i18n (>= 0.7, < 2)
22
- minitest (~> 5.1)
23
- tzinfo (~> 1.1)
24
- zeitwerk (~> 2.2, >= 2.2.2)
25
- addressable (2.7.0)
26
- public_suffix (>= 2.0.2, < 5.0)
27
- awesome_print (1.8.0)
28
- aws-eventstream (1.1.0)
29
- aws-partitions (1.380.0)
30
- aws-sdk-autoscaling (1.47.0)
31
- aws-sdk-core (~> 3, >= 3.109.0)
32
- aws-sigv4 (~> 1.1)
33
- aws-sdk-cloudformation (1.44.0)
34
- aws-sdk-core (~> 3, >= 3.109.0)
35
- aws-sigv4 (~> 1.1)
36
- aws-sdk-cloudfront (1.43.0)
37
- aws-sdk-core (~> 3, >= 3.109.0)
38
- aws-sigv4 (~> 1.1)
39
- aws-sdk-core (3.109.0)
40
- aws-eventstream (~> 1, >= 1.0.2)
41
- aws-partitions (~> 1, >= 1.239.0)
42
- aws-sigv4 (~> 1.1)
43
- jmespath (~> 1.0)
44
- aws-sdk-ec2 (1.198.0)
45
- aws-sdk-core (~> 3, >= 3.109.0)
46
- aws-sigv4 (~> 1.1)
47
- aws-sdk-kafka (1.29.0)
48
- aws-sdk-core (~> 3, >= 3.109.0)
49
- aws-sigv4 (~> 1.1)
50
- aws-sdk-kms (1.39.0)
51
- aws-sdk-core (~> 3, >= 3.109.0)
52
- aws-sigv4 (~> 1.1)
53
- aws-sdk-rds (1.102.0)
54
- aws-sdk-core (~> 3, >= 3.109.0)
55
- aws-sigv4 (~> 1.1)
56
- aws-sdk-s3 (1.83.0)
57
- aws-sdk-core (~> 3, >= 3.109.0)
58
- aws-sdk-kms (~> 1)
59
- aws-sigv4 (~> 1.1)
60
- aws-sdk-ssm (1.93.0)
61
- aws-sdk-core (~> 3, >= 3.109.0)
62
- aws-sigv4 (~> 1.1)
63
- aws-sigv4 (1.2.2)
64
- aws-eventstream (~> 1, >= 1.0.2)
65
- byebug (11.1.1)
66
- concurrent-ruby (1.1.7)
67
- crack (0.4.3)
68
- safe_yaml (~> 1.0.0)
69
- diff-lcs (1.3)
70
- dotenv (2.7.5)
71
- git (1.7.0)
72
- rchardet (~> 1.8)
73
- hashdiff (1.0.1)
74
- i18n (1.8.5)
75
- concurrent-ruby (~> 1.0)
76
- jmespath (1.4.0)
77
- minitest (5.14.2)
78
- public_suffix (4.0.4)
79
- rake (13.0.1)
80
- rchardet (1.8.0)
81
- rspec (3.9.0)
82
- rspec-core (~> 3.9.0)
83
- rspec-expectations (~> 3.9.0)
84
- rspec-mocks (~> 3.9.0)
85
- rspec-core (3.9.1)
86
- rspec-support (~> 3.9.1)
87
- rspec-expectations (3.9.1)
88
- diff-lcs (>= 1.2.0, < 2.0)
89
- rspec-support (~> 3.9.0)
90
- rspec-mocks (3.9.1)
91
- diff-lcs (>= 1.2.0, < 2.0)
92
- rspec-support (~> 3.9.0)
93
- rspec-support (3.9.2)
94
- safe_yaml (1.0.5)
95
- thread_safe (0.3.6)
96
- tzinfo (1.2.7)
97
- thread_safe (~> 0.1)
98
- vcr (5.1.0)
99
- webmock (3.8.3)
100
- addressable (>= 2.3.6)
101
- crack (>= 0.3.2)
102
- hashdiff (>= 0.4.0, < 2.0.0)
103
- zeitwerk (2.4.0)
104
-
105
- PLATFORMS
106
- ruby
107
-
108
- DEPENDENCIES
109
- awesome_print
110
- bundler (~> 1.16)
111
- byebug
112
- dotenv
113
- openstax_aws!
114
- rake (~> 13.0)
115
- rspec (~> 3.0)
116
- vcr
117
- webmock
118
-
119
- BUNDLED WITH
120
- 1.17.3