awful 0.0.117 → 0.0.118
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/awful.rb +10 -1
- data/lib/awful/cloudformation.rb +1 -1
- data/lib/awful/sqs.rb +2 -2
- data/lib/awful/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 09e5e40087f087c1a4093a20f44f5e9c6f119e55
|
4
|
+
data.tar.gz: c7f6ce10622d8587f98ea5ff628dfdede7afcc4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13908719df01ce7c541fcb3305ed7238a0b1129e3691050176e929388d2039c39488a559fd03a5d2ab1e3ce71fb72909e519e6576ee110bb662bd6a6aa5d5348
|
7
|
+
data.tar.gz: 8baea9667e705b1ef53394cf6fb7d448b4bf9e2433ed21271eeb50853519359a829f4b8074d9cafa1eb2ea6f40ab1f2263de98706840f81ef48cdcfc6dfd26ea
|
data/lib/awful.rb
CHANGED
@@ -6,14 +6,23 @@ require 'thor'
|
|
6
6
|
require 'yaml'
|
7
7
|
require 'erb'
|
8
8
|
|
9
|
+
## our implementation of tap for switchable output
|
10
|
+
class Object
|
11
|
+
def output
|
12
|
+
yield self unless $awful_quiet
|
13
|
+
self
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
9
17
|
module Awful
|
10
18
|
class Cli < Thor
|
11
19
|
class_option :env, aliases: '-e', default: nil, desc: 'Load environment variables from file'
|
12
|
-
class_option :quiet, aliases: '-q', default:
|
20
|
+
class_option :quiet, aliases: '-q', type: :boolean, default: false, desc: 'Quieten output'
|
13
21
|
class_option :region, default: nil, desc: 'Set region; can use AWS_REGION instead'
|
14
22
|
|
15
23
|
def initialize(args = [], local_options = {}, config = {})
|
16
24
|
super
|
25
|
+
$awful_quiet = options[:quiet] # turn off output
|
17
26
|
ENV['AWS_REGION'] = options[:region] if options[:region] #cmdline override for region
|
18
27
|
end
|
19
28
|
|
data/lib/awful/cloudformation.rb
CHANGED
@@ -194,7 +194,7 @@ module Awful
|
|
194
194
|
end
|
195
195
|
end
|
196
196
|
|
197
|
-
resources.
|
197
|
+
resources.output do |resources|
|
198
198
|
if options[:long]
|
199
199
|
print_table resources.map { |r| [r.logical_resource_id, r.physical_resource_id, r.resource_type, color(r.resource_status), r.resource_status_reason] }
|
200
200
|
else
|
data/lib/awful/sqs.rb
CHANGED
@@ -32,7 +32,7 @@ module Awful
|
|
32
32
|
if options[:long]
|
33
33
|
queues.map do |queue|
|
34
34
|
sqs.get_queue_attributes(queue_url: queue, attribute_names: attr).attributes
|
35
|
-
end.
|
35
|
+
end.output do |list|
|
36
36
|
print_table list.map { |q|
|
37
37
|
[
|
38
38
|
q['QueueArn'].split(':').last,
|
@@ -43,7 +43,7 @@ module Awful
|
|
43
43
|
}
|
44
44
|
end
|
45
45
|
else
|
46
|
-
queues.map { |q| q.split('/').last }.
|
46
|
+
queues.map { |q| q.split('/').last }.output(&method(:puts))
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
data/lib/awful/version.rb
CHANGED
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.
|
4
|
+
version: 0.0.118
|
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-06-
|
11
|
+
date: 2016-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|