cloud_front_interative_invalidator 0.0.1 → 0.0.2
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
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZGU2YjUyZDM1NzMzYTgyZTBjOTNiYTU3MGYwZmNmOGY3NWZiNWFjOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzZkNzc4OTkyMzdiMmI1MjU4YjAwMzFiMTEzZDdiODk2YzVjOTVkYg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YjcyN2ZjMzc4ZTc1MTdlOTY2NWFmN2NiZDdlYzE2OWU2NzIxNzA3Zjg4Y2Q3
|
10
|
+
NGIzM2YxNjQ0N2I2YjNkODFhMGFmM2I2YzQ1ODQyMTUxZjY5OWUzZjNmZGY1
|
11
|
+
NDYwZjUyNjNjNjAxOTU5ZWQwNzk0NTQ3NTZjYjRlZGFkZjcyNWQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YThjYjQ4NDA0YjU4ZTU0ZjgwODdmM2FkMTg0MWQ3MWQxNjBmY2JhMDhlYjZk
|
14
|
+
MGY4ZjRlZjMzZjE5NjQzY2QyNGIwZmM1Y2M2ZmY1MWRlNzM1MWI3NWYzNGZj
|
15
|
+
YjdlN2Q4YWVjYzNhMTFhZjJlOWJjYWJiZWEwZjk0MTQ4ODc4NGI=
|
@@ -3,15 +3,25 @@ require 'table_print'
|
|
3
3
|
|
4
4
|
require_relative "cloud_front_interative_invalidator/version"
|
5
5
|
|
6
|
-
tp.set :max_width, 100
|
7
|
-
|
8
|
-
AWS.config({
|
9
|
-
:access_key_id => ENV['AWS_ACCESS_KEY_ID'],
|
10
|
-
:secret_access_key => ENV['AWS_SECRET_ACCESS_KEY'],
|
11
|
-
})
|
12
|
-
|
13
6
|
module CloudFrontInterativeInvalidator
|
14
7
|
def self.start(params={})
|
8
|
+
tp.set :max_width, 100
|
9
|
+
|
10
|
+
if ENV['AWS_ACCESS_KEY_ID'].nil?
|
11
|
+
puts "Input AWS access key id:"
|
12
|
+
ENV['AWS_ACCESS_KEY_ID'] = gets.chomp
|
13
|
+
end
|
14
|
+
|
15
|
+
if ENV['AWS_SECRET_ACCESS_KEY'].nil?
|
16
|
+
puts "Input AWS secret access key:"
|
17
|
+
ENV['AWS_SECRET_ACCESS_KEY'] = gets.chomp
|
18
|
+
end
|
19
|
+
|
20
|
+
AWS.config({
|
21
|
+
:access_key_id => ENV['AWS_ACCESS_KEY_ID'],
|
22
|
+
:secret_access_key => ENV['AWS_SECRET_ACCESS_KEY'],
|
23
|
+
})
|
24
|
+
|
15
25
|
list_distributions
|
16
26
|
end
|
17
27
|
|
@@ -22,8 +32,12 @@ module CloudFrontInterativeInvalidator
|
|
22
32
|
end
|
23
33
|
tp distributions
|
24
34
|
|
25
|
-
|
26
|
-
|
35
|
+
begin
|
36
|
+
puts "Input the number of the distribution (or anything else to quit):"
|
37
|
+
distribution_input = gets.chomp
|
38
|
+
return unless distribution_input.match(/^[0-9]+$/)
|
39
|
+
distribution_index = distribution_input.to_i - 1
|
40
|
+
end until distribution_index < distributions.size && distribution_index > 0
|
27
41
|
distribution_id = distributions[distribution_index][:id]
|
28
42
|
show_distribution(distribution_id) if distribution_id
|
29
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloud_front_interative_invalidator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ming Liu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|