awful 0.0.141 → 0.0.142

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: 32967d3c353628878e0e68835842ca72a4184f08
4
- data.tar.gz: f67a4ca5b77a51c05dd0816eb0ad2b8c4d6d4f1b
3
+ metadata.gz: bbb2a2c6eeaf50228815c6c922823d437d78d0dd
4
+ data.tar.gz: d847f35ad7ddae5100424861fc21c4f250866dcf
5
5
  SHA512:
6
- metadata.gz: e9132709fb02a3cbc69bd664eef409336cbaca3e3f0fd0cc8510738c16e70d26493611a45333e9712810b60c1fe1588cd259039c5d7fc81978a9fdf92e9d458a
7
- data.tar.gz: 80619e51be54afc305081ba9d87d8199a3dd0c0645bb9e43a17e993110ab58720732e91573c95949016b39ad5bb1c509097c8040c06998eab880b5831797fbe9
6
+ metadata.gz: 9b875ab0fb98dcfc83bd152bae983940242bf1f3b1411fed25fb0e1e7c2adce4bddc605a8111d1e73b654f8056c62ff0ab107665af9c26d5850e65aed4517343
7
+ data.tar.gz: e019bd2948dffa74237f0b9f9dfda0642b22cea7a9381cfbad7abbff660bb1b25dfa35fcd26e73ac265e451923dd4b6c674ea9e195194699ed8b3bca3b3080b8
data/lib/awful/ecr.rb CHANGED
@@ -32,9 +32,9 @@ module Awful
32
32
  def ls
33
33
  ecr.describe_repositories.repositories.output do |repos|
34
34
  if options[:long]
35
- print_table repos.map { |r| [r.repository_name, r.registry_id, r.repository_arn] }
35
+ print_table repos.map { |r| [r.repository_name, r.registry_id, r.repository_arn] }.sort
36
36
  else
37
- puts repos.map(&:repository_name)
37
+ puts repos.map(&:repository_name).sort
38
38
  end
39
39
  end
40
40
  end
data/lib/awful/ecs.rb CHANGED
@@ -102,6 +102,31 @@ module Awful
102
102
  end.output(&method(:puts))
103
103
  end
104
104
 
105
+ desc 'families', 'list task definition families'
106
+ def families(prefix = nil)
107
+ next_token = nil
108
+ families = []
109
+ loop do
110
+ response = ecs.list_task_definition_families(family_prefix: prefix, next_token: next_token)
111
+ families += response.families
112
+ next_token = response.next_token
113
+ break unless next_token
114
+ end
115
+ families.output(&method(:puts))
116
+ end
117
+
118
+ desc 'register TASKDEF_FAMILY', 'new task definition from the given family, copying current most recent'
119
+ def register(family)
120
+ taskdef = ecs.describe_task_definition(task_definition: family).task_definition # get current newest
121
+ ecs.register_task_definition(
122
+ family: family,
123
+ container_definitions: taskdef.container_definitions,
124
+ volumes: taskdef.volumes
125
+ ).task_definition.output do |td|
126
+ puts td.task_definition_arn
127
+ end
128
+ end
129
+
105
130
  desc 'deregister TASK_DEFINITION', 'mark a task definition as INACTIVE'
106
131
  def deregister(task)
107
132
  ecs.deregister_task_definition(task_definition: task)
@@ -182,9 +207,7 @@ module Awful
182
207
  task_definition: options[:task_definition],
183
208
  }.reject { |k,v| v.nil? }
184
209
 
185
- ecs.update_service(params).service.output do |response|
186
- puts YAML.dump(stringify_keys(response.to_h))
187
- end
210
+ ecs.update_service(params).service
188
211
  end
189
212
 
190
213
  desc 'events', 'list events for given CLUSTER and SERVICE'
data/lib/awful/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Awful
2
- VERSION = '0.0.141'
2
+ VERSION = '0.0.142'
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.141
4
+ version: 0.0.142
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-09-07 00:00:00.000000000 Z
11
+ date: 2016-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler