awful 0.0.85 → 0.0.86

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
  SHA1:
3
- metadata.gz: 5ea847fc9ccbe41557aa03a8c907026ec7db9863
4
- data.tar.gz: a6ce1b258f5b1f3e7037d928a51bdb893847ee6c
3
+ metadata.gz: e8da5ea4f8afc4049b5d8d58f9f1e6a52b828313
4
+ data.tar.gz: b52e3d63e2f66c77f764a678bb7391c98d0f3f7a
5
5
  SHA512:
6
- metadata.gz: 0783b62e7b7420ef52d7eecc670944479deee1e47d912bca2360a21f42a87ce3cf000f027bfbfaf287b3441a86d86c7695b39dfb56056bf03008b53224dc8765
7
- data.tar.gz: 0bd451ebadc45a1057db2a5e0d8c616746301a4af3e63110da1367424ccebbda486ae08939fbc388bf4b3df22efb2c0db7bc733e0f6c9b987fe769f2452d81b2
6
+ metadata.gz: fb73b79fc2ef0c404397651cca64c48a0681afc9aac2cba4c69b1f0c408d5a32e92e890851ad89bcce5979d86b3ba7a3d4eac53c751110d51363e6bc7801dc8c
7
+ data.tar.gz: 543464df3ebaf303d640899c098f755577cb09feae7dbfaf869d67b14470f05094f262d95dc06e89fd65a80bb373bff5a59a9d91cfcff390c9bc23757e000dfe
data/bin/dyn CHANGED
@@ -1,7 +1,4 @@
1
1
  #!/usr/bin/ruby
2
2
  #-*- mode: ruby; -*-
3
-
4
- require 'awful'
5
3
  require 'awful/dynamodb'
6
-
7
4
  Awful::DynamoDB.start(ARGV)
data/lib/awful/ami.rb CHANGED
@@ -1,8 +1,13 @@
1
1
  module Awful
2
+ module Short
3
+ def ami(*args)
4
+ Awful::Ami.new.invoke(*args)
5
+ end
6
+ end
2
7
 
3
8
  class Ami < Cli
4
- class_option :owners, aliases: '-o', type: :string, default: 'self', desc: 'List images with this owner'
5
- class_option :filters, aliases: 'f', type: :array, default: [], desc: 'Filter using name=value, eg tag:Foo=bar, multiples are ANDed'
9
+ class_option :owners, aliases: '-o', type: :string, default: 'self', desc: 'List images with this owner'
10
+ class_option :filters, aliases: '-f', type: :array, default: [], desc: 'Filter using name=value, eg tag:Foo=bar, multiples are ANDed'
6
11
 
7
12
  COLORS = {
8
13
  available: :green,
@@ -103,7 +108,5 @@ module Awful
103
108
  puts list
104
109
  end
105
110
  end
106
-
107
111
  end
108
-
109
112
  end
@@ -1,7 +1,11 @@
1
1
  module Awful
2
+ module Short
3
+ def asg(*args)
4
+ Awful::AutoScaling.new.invoke(*args)
5
+ end
6
+ end
2
7
 
3
8
  class AutoScaling < Cli
4
-
5
9
  COLORS = {
6
10
  ## lifecycle states
7
11
  Pending: :yellow,
@@ -348,5 +352,4 @@ module Awful
348
352
  end
349
353
  end
350
354
  end
351
-
352
- end
355
+ end
@@ -1,4 +1,9 @@
1
1
  module Awful
2
+ module Short
3
+ def cf(*args)
4
+ Awful::CloudFormation.new.invoke(*args)
5
+ end
6
+ end
2
7
 
3
8
  class CloudFormation < Cli
4
9
 
@@ -1,6 +1,12 @@
1
1
  require 'awful/dynamodb_streams'
2
2
 
3
3
  module Awful
4
+ module Short
5
+ def dyn(*args)
6
+ Awful::DynamoDB.new.invoke(*args)
7
+ end
8
+ end
9
+
4
10
  class DynamoDB < Cli
5
11
  COLORS = {
6
12
  CREATING: :yellow,
@@ -1,4 +1,10 @@
1
1
  module Awful
2
+ module Short
3
+ def dyn_streams(*args)
4
+ Awful::Streams.new.invoke(*args)
5
+ end
6
+ end
7
+
2
8
  class Streams < Cli
3
9
  no_commands do
4
10
  def streams
data/lib/awful/ecs.rb CHANGED
@@ -1,7 +1,11 @@
1
1
  module Awful
2
+ module Short
3
+ def ecs(*args)
4
+ Awful::Ecs.new.invoke(*args)
5
+ end
6
+ end
2
7
 
3
8
  class Ecs < Cli
4
-
5
9
  COLORS = {
6
10
  ACTIVE: :green,
7
11
  INACTIVE: :red,
@@ -184,7 +188,5 @@ module Awful
184
188
  puts YAML.dump(stringify_keys(response.to_h))
185
189
  end
186
190
  end
187
-
188
191
  end
189
-
190
192
  end
data/lib/awful/elb.rb CHANGED
@@ -1,7 +1,11 @@
1
1
  module Awful
2
+ module Short
3
+ def elb(*args)
4
+ Awful::Elb.new.invoke(*args)
5
+ end
6
+ end
2
7
 
3
8
  class Elb < Cli
4
-
5
9
  COLORS = {
6
10
  InService: :green,
7
11
  OutOfService: :red,
@@ -146,7 +150,5 @@ module Awful
146
150
  end
147
151
  end
148
152
  end
149
-
150
153
  end
151
-
152
- end
154
+ end
@@ -1,4 +1,10 @@
1
1
  module Awful
2
+ module Short
3
+ def lambda_events(*args)
4
+ Awful::Events.new.invoke(*args)
5
+ end
6
+ end
7
+
2
8
  class Events < Cli
3
9
  COLORS = {
4
10
  OK: :green,
data/lib/awful/route53.rb CHANGED
@@ -1,7 +1,11 @@
1
1
  module Awful
2
+ module Short
3
+ def r53(*args)
4
+ Awful::Route53.new.invoke(*args)
5
+ end
6
+ end
2
7
 
3
8
  class Route53 < Cli
4
-
5
9
  no_commands do
6
10
  def route53
7
11
  @route53 ||= Aws::Route53::Client.new
@@ -91,6 +95,69 @@ module Awful
91
95
  end
92
96
  end
93
97
 
94
- end
98
+ # desc 'update NAME', 'change a record set'
99
+ # method_option :type, aliases: '-t', type: :string, default: 'A', desc: 'Type of record: SOA, A, TXT, NS, CNAME, MX, PTR, SRV, SPF, AAAA'
100
+ # method_option :alias, aliases: '-a', type: :boolean, default: false, desc: 'Create an ALIAS record'
101
+ # def update(name, target)
102
+ # zone = name.split('.').last(2).join('.')
103
+ # hosted_zone_id = get_zone_by_name(zone)
104
+ # rrset = {
105
+ # name: name,
106
+ # type: options[:type].upcase
107
+ # }
108
+ # if options[:alias]
109
+ # rrset.merge!(
110
+ # alias_target: {
111
+ # hosted_zone_id: 'Z35SXDOTRQ7X7K',
112
+ # # dns_name: 'dualstack.release-1-elbadmin-uhcp4ix1utqo-918434006.us-east-1.elb.amazonaws.com.',
113
+ # dns_name: target,
114
+ # evaluate_target_health: false
115
+ # }
116
+ # )
117
+ # else
118
+ # rrset.merge!(
119
+ # ttl: 180, # required for non-alias, not allowed for alias
120
+ # resource_records: [{value: target}]
121
+ # )
122
+ # end
95
123
 
96
- end
124
+ # params = {
125
+ # hosted_zone_id: hosted_zone_id,
126
+ # change_batch: {
127
+ # changes: [
128
+ # {
129
+ # action: 'UPSERT',
130
+ # resource_record_set: rrset
131
+ # # {
132
+ # # name: name,
133
+ # # type: options[:type].upcase,
134
+ # # ttl: 180, # required for non-alias, not allowed for alias
135
+ # # # resource_records: [
136
+ # # # {value: target}
137
+ # # # ]
138
+ # # alias_target: {
139
+ # # hosted_zone_id: 'Z35SXDOTRQ7X7K',
140
+ # # dns_name: 'dualstack.release-1-elbadmin-uhcp4ix1utqo-918434006.us-east-1.elb.amazonaws.com.',
141
+ # # evaluate_target_health: false
142
+ # # }
143
+ # # }
144
+ # }
145
+ # ]
146
+ # }
147
+ # }
148
+ # # if options[:alias]
149
+ # # params[:change_batch][:changes][0][:alias_target] = {
150
+ # # # hosted_zone_id: '/hostedzone/Z3DZXE0Q79N41H',
151
+ # # hosted_zone_id: 'Z35SXDOTRQ7X7K',
152
+ # # # dns_name: target,
153
+ # # dns_name: 'dualstack.release-1-elbadmin-uhcp4ix1utqo-918434006.us-east-1.elb.amazonaws.com.',
154
+ # # evaluate_target_health: false
155
+ # # }
156
+ # # end
157
+ # p params
158
+ # route53.change_resource_record_sets(params).tap do |response|
159
+ # puts YAML.dump(stringify_keys(response.change_info.to_hash))
160
+ # end
161
+ # end
162
+ end
163
+ end
data/lib/awful/s3.rb CHANGED
@@ -1,14 +1,16 @@
1
1
  module Awful
2
+ module Short
3
+ def s3(*args)
4
+ Awful::S3.new.invoke(*args)
5
+ end
6
+ end
2
7
 
3
8
  class S3 < Cli
4
-
5
9
  no_commands do
6
-
7
10
  ## resource interface to S3 commands
8
11
  def s3_resource
9
12
  Aws::S3::Resource.new(client: s3)
10
13
  end
11
-
12
14
  end
13
15
 
14
16
  desc 'ls PATTERN', 'list buckets or objects'
@@ -95,5 +97,4 @@ module Awful
95
97
  end
96
98
  end
97
99
  end
98
-
99
- end
100
+ end
data/lib/awful/ssm.rb CHANGED
@@ -1,7 +1,11 @@
1
1
  module Awful
2
+ module Short
3
+ def ssm(*args)
4
+ Awful::Ssm.new.invoke(*args)
5
+ end
6
+ end
2
7
 
3
8
  class Ssm < Cli
4
-
5
9
  COLORS = {
6
10
  Success: :green,
7
11
  TimedOut: :red,
@@ -86,7 +90,5 @@ module Awful
86
90
  puts response.command.command_id
87
91
  end
88
92
  end
89
-
90
93
  end
91
-
92
94
  end
data/lib/awful/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Awful
2
- VERSION = '0.0.85'
2
+ VERSION = '0.0.86'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awful
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.85
4
+ version: 0.0.86
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ric Lister
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-13 00:00:00.000000000 Z
11
+ date: 2016-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler