awsutils 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.editorconfig +28 -0
- data/.rubocop.yml +1 -1
- data/.travis.yml +5 -0
- data/README.md +2 -0
- data/awsutils.gemspec +8 -2
- data/lib/awsutils/awslogs.rb +3 -3
- data/lib/awsutils/ec2addsg.rb +2 -2
- data/lib/awsutils/ec2info.rb +2 -0
- data/lib/awsutils/ec2latestimage.rb +2 -2
- data/lib/awsutils/ec2listmachines.rb +2 -2
- data/lib/awsutils/ec2lsgrp.rb +2 -2
- data/lib/awsutils/r53addrr.rb +3 -3
- data/lib/awsutils/r53ls.rb +2 -2
- data/lib/awsutils/version.rb +1 -1
- metadata +27 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aade832f94a08899c4528262137fad5b5afdf141e1d7b427ccf7d38d05741326
|
4
|
+
data.tar.gz: 5d9e8063ab2851a637c664a7728230b6e4f3289d3567d8b7659f693c2bbd5b6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0dd07b2e0918f1c0feb0e66b569c3f3161897c0fba73836f23907a5f09b585cae59801a1755bab9e81abd156f513caeff48001e462a22e58f90fa58b44ad73c
|
7
|
+
data.tar.gz: 7b649d4a58f98b8205dd94f7de44cf24e8b08021cf48b3e350ae048225d4f6a8cf43f653714cb9d4016e3c5a82d4f577107b12aafb572514d1d63e5b1ecb32ac
|
data/.editorconfig
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
; EditorConfig is awesome: http://EditorConfig.org
|
2
|
+
|
3
|
+
root = true
|
4
|
+
|
5
|
+
; Ruby/JS style
|
6
|
+
; UTF-8 charset
|
7
|
+
; Unix-style newlines with a newline ending every file
|
8
|
+
; 2 space indent
|
9
|
+
; Trim trailing whitespace
|
10
|
+
[*]
|
11
|
+
indent_style = space
|
12
|
+
indent_size = 2
|
13
|
+
end_of_line = lf
|
14
|
+
charset = utf-8
|
15
|
+
trim_trailing_whitespace = true
|
16
|
+
insert_final_newline = true
|
17
|
+
|
18
|
+
; Markdown
|
19
|
+
; 4 space indent
|
20
|
+
; Trailing whitespace is potentially meaningful, leave it
|
21
|
+
[*.md]
|
22
|
+
indent_size = 4
|
23
|
+
trim_trailing_whitespace = false
|
24
|
+
|
25
|
+
; Shell scripts
|
26
|
+
; 4 space indent
|
27
|
+
[*.sh]
|
28
|
+
indent_size = 4
|
data/.rubocop.yml
CHANGED
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
# Awsutils
|
2
|
+
[![Travis (.org)](https://img.shields.io/travis/org/evertrue/awsutils.svg)](https://travis-ci.org/evertrue/awsutils)
|
3
|
+
[![Gem](https://img.shields.io/gem/v/awsutils.svg)](https://rubygems.org/gems/awsutils)
|
2
4
|
|
3
5
|
A set of useful tools for interacting with Amazon Web Services (AWS)
|
4
6
|
|
data/awsutils.gemspec
CHANGED
@@ -10,8 +10,13 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ['eric.rubygems@herot.com']
|
11
11
|
spec.description = %q{A set of tools for interacting with AWS}
|
12
12
|
spec.summary = %q{A set of tools for interacting with AWS (summary)}
|
13
|
-
spec.homepage = 'http://github.com/
|
13
|
+
spec.homepage = 'http://github.com/evertrue/awsutils'
|
14
14
|
spec.license = 'MIT'
|
15
|
+
spec.metadata = {
|
16
|
+
'bug_tracker_uri' => 'https://github.com/evertrue/awsutils/issues',
|
17
|
+
'changelog_uri' => 'https://github.com/evertrue/awsutils/releases',
|
18
|
+
'source_code_uri' => 'https://github.com/evertrue/awsutils'
|
19
|
+
}
|
15
20
|
|
16
21
|
spec.files = `git ls-files`.split($RS)
|
17
22
|
spec.executables = spec.files.grep(/^bin\//) { |f| File.basename(f) }
|
@@ -26,9 +31,10 @@ Gem::Specification.new do |spec|
|
|
26
31
|
spec.add_development_dependency 'simplecov'
|
27
32
|
spec.add_development_dependency 'byebug'
|
28
33
|
|
34
|
+
spec.add_dependency 'awesome_print', '~> 1'
|
29
35
|
spec.add_dependency 'facets', '~> 2.9'
|
30
36
|
spec.add_dependency 'rainbow', '~> 2.0'
|
31
37
|
spec.add_dependency 'fog-aws', '~> 0.11.0'
|
32
|
-
spec.add_dependency '
|
38
|
+
spec.add_dependency 'optimist', '~> 3.0'
|
33
39
|
spec.add_dependency 'aws-sdk'
|
34
40
|
end
|
data/lib/awsutils/awslogs.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'optimist'
|
2
2
|
require 'aws-sdk'
|
3
3
|
require 'time'
|
4
4
|
|
@@ -38,7 +38,7 @@ module AwsUtils
|
|
38
38
|
private
|
39
39
|
|
40
40
|
def opts
|
41
|
-
@opts ||=
|
41
|
+
@opts ||= Optimist.options do
|
42
42
|
opt :age,
|
43
43
|
'Max age in seconds',
|
44
44
|
short: 'a',
|
@@ -79,7 +79,7 @@ module AwsUtils
|
|
79
79
|
end
|
80
80
|
|
81
81
|
def log_group_name
|
82
|
-
@
|
82
|
+
@log_group_name ||= begin
|
83
83
|
r = cloudwatchlogs.describe_log_groups log_group_name_prefix: opts[:group]
|
84
84
|
return r.log_groups.first.log_group_name if r.log_groups.count == 1
|
85
85
|
raise LogGroupNotFoundError if r.log_groups.empty?
|
data/lib/awsutils/ec2addsg.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/ruby
|
2
2
|
|
3
3
|
require 'awsutils/ec2sg'
|
4
|
-
require '
|
4
|
+
require 'optimist'
|
5
5
|
|
6
6
|
module AwsUtils
|
7
7
|
class Ec2AddSecurityGroup < Ec2SecurityGroup
|
@@ -167,7 +167,7 @@ module AwsUtils
|
|
167
167
|
def parse_opts
|
168
168
|
fail 'AWS_OWNER_ID is not set!' unless ENV['AWS_OWNER_ID']
|
169
169
|
|
170
|
-
@opts =
|
170
|
+
@opts = Optimist.options do
|
171
171
|
opt :security_group,
|
172
172
|
'New Security Group Name',
|
173
173
|
short: 'N',
|
data/lib/awsutils/ec2info.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'json'
|
2
2
|
require 'net/http'
|
3
|
-
require '
|
3
|
+
require 'optimist'
|
4
4
|
# require 'aws-sdk' # see the comment on `image_details` below
|
5
5
|
|
6
6
|
module AwsUtils
|
@@ -108,7 +108,7 @@ module AwsUtils
|
|
108
108
|
end
|
109
109
|
|
110
110
|
def opts
|
111
|
-
@opts ||=
|
111
|
+
@opts ||= Optimist.options do
|
112
112
|
opt :release, 'Ubuntu release', short: 'r', default: '16.04 LTS'
|
113
113
|
opt :ownedbyme, 'Images owned by $AWS_OWNER_ID', short: 'o', default: false
|
114
114
|
opt :region, 'Image region', short: 'R', default: 'us-east-1'
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'rubygems'
|
2
|
-
require '
|
2
|
+
require 'optimist'
|
3
3
|
require 'fog'
|
4
4
|
|
5
5
|
gem 'fog', '>= 1.6.0'
|
@@ -380,7 +380,7 @@ module AwsUtils
|
|
380
380
|
end
|
381
381
|
|
382
382
|
def parse_opts
|
383
|
-
opts =
|
383
|
+
opts = Optimist.options do
|
384
384
|
opt :sort, 'Sort order', short: 's', type: String
|
385
385
|
opt :state, 'State', short: 'S', type: String
|
386
386
|
opt :flavor, 'Flavor', short: 'F', type: String
|
data/lib/awsutils/ec2lsgrp.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'awsutils/ec2sg'
|
2
|
-
require '
|
2
|
+
require 'optimist'
|
3
3
|
|
4
4
|
gem 'fog-aws', '>= 0.7.6'
|
5
5
|
|
@@ -87,7 +87,7 @@ module AwsUtils
|
|
87
87
|
end
|
88
88
|
|
89
89
|
def parse_opts
|
90
|
-
|
90
|
+
Optimist.options do
|
91
91
|
opt :list_refs,
|
92
92
|
'List groups referencing this group',
|
93
93
|
short: 'r',
|
data/lib/awsutils/r53addrr.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'fog'
|
3
|
-
require '
|
3
|
+
require 'optimist'
|
4
4
|
|
5
5
|
module AwsUtils
|
6
6
|
|
@@ -11,12 +11,12 @@ module AwsUtils
|
|
11
11
|
end # def connection
|
12
12
|
|
13
13
|
def parse_opts
|
14
|
-
opts =
|
14
|
+
opts = Optimist::options do
|
15
15
|
opt :name, "The name", :short => 'n', :type => String, :required => true
|
16
16
|
opt :type, "Record type (e.g. CNAME or A)", :short => 'T', :type => String, :required => true
|
17
17
|
opt :ttl, "Time-to-live", :short => 't', :type => String, :default => "300"
|
18
18
|
opt :value, "Record Value", :short => 'v', :type => String, :required => true
|
19
|
-
end # opts =
|
19
|
+
end # opts = Optimist::options
|
20
20
|
end # def parse_opts
|
21
21
|
|
22
22
|
def initialize
|
data/lib/awsutils/r53ls.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'fog'
|
3
|
-
require '
|
3
|
+
require 'optimist'
|
4
4
|
require 'json'
|
5
5
|
|
6
6
|
module AwsUtils
|
@@ -10,7 +10,7 @@ module AwsUtils
|
|
10
10
|
end # def connection
|
11
11
|
|
12
12
|
def parse_opts
|
13
|
-
opts =
|
13
|
+
opts = Optimist.options do
|
14
14
|
opt :format, 'Output format', default: 'table'
|
15
15
|
end
|
16
16
|
opts[:name] = ARGV.last
|
data/lib/awsutils/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: awsutils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Herot
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: awesome_print
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '1'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '1'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: facets
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -151,19 +165,19 @@ dependencies:
|
|
151
165
|
- !ruby/object:Gem::Version
|
152
166
|
version: 0.11.0
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
168
|
+
name: optimist
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
156
170
|
requirements:
|
157
|
-
- - "
|
171
|
+
- - "~>"
|
158
172
|
- !ruby/object:Gem::Version
|
159
|
-
version: '0'
|
173
|
+
version: '3.0'
|
160
174
|
type: :runtime
|
161
175
|
prerelease: false
|
162
176
|
version_requirements: !ruby/object:Gem::Requirement
|
163
177
|
requirements:
|
164
|
-
- - "
|
178
|
+
- - "~>"
|
165
179
|
- !ruby/object:Gem::Version
|
166
|
-
version: '0'
|
180
|
+
version: '3.0'
|
167
181
|
- !ruby/object:Gem::Dependency
|
168
182
|
name: aws-sdk
|
169
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -194,8 +208,10 @@ executables:
|
|
194
208
|
extensions: []
|
195
209
|
extra_rdoc_files: []
|
196
210
|
files:
|
211
|
+
- ".editorconfig"
|
197
212
|
- ".gitignore"
|
198
213
|
- ".rubocop.yml"
|
214
|
+
- ".travis.yml"
|
199
215
|
- Gemfile
|
200
216
|
- LICENSE.txt
|
201
217
|
- README.md
|
@@ -226,10 +242,13 @@ files:
|
|
226
242
|
- spec/lib/awsutils/ec2addsg_spec.rb
|
227
243
|
- spec/lib/awsutils/ec2lsgrp_spec.rb
|
228
244
|
- spec/spec_helper.rb
|
229
|
-
homepage: http://github.com/
|
245
|
+
homepage: http://github.com/evertrue/awsutils
|
230
246
|
licenses:
|
231
247
|
- MIT
|
232
|
-
metadata:
|
248
|
+
metadata:
|
249
|
+
bug_tracker_uri: https://github.com/evertrue/awsutils/issues
|
250
|
+
changelog_uri: https://github.com/evertrue/awsutils/releases
|
251
|
+
source_code_uri: https://github.com/evertrue/awsutils
|
233
252
|
post_install_message:
|
234
253
|
rdoc_options: []
|
235
254
|
require_paths:
|