awful 0.0.17 → 0.0.18

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: b4d782409620eec745893663d7e44bb094b21cc8
4
- data.tar.gz: 0d104de3eab159ce24bb5f5f65654312239a9d6e
3
+ metadata.gz: 63e2c2d2613cc6d46e8381310a6f6472cb23c7e8
4
+ data.tar.gz: 72c0e79eb528599b66356a6a6867a5ca0571c959
5
5
  SHA512:
6
- metadata.gz: 5dc60b5d54103f20abdef43fb434c02ec109a63d9bc04800db1624e955c15de913cf3a622b3610d70fdf7f8f3bf713b0e21afd8007a7538a36165e7b1ebea89b
7
- data.tar.gz: 9e3b1f3a1c96ada14657d2599f0e0a24dd2992c33dad750d99f4df6b87251198923d572e24d84f26615268284d7d70642df35cfab5bf5ce43d8a1cd000a7d7fd
6
+ metadata.gz: d5ff883d31896a42ae60e6319f38cef5a52e6ddd4684eb8963e73338c9ccd5d4b6da9cb0100c6100252cb0dbf917159031b5cf1e82fa92a2e917edea0c87fefa
7
+ data.tar.gz: e5568b15699fee31554ad0a908f42e52656ab4ee915aa273814e0be1bdb166623e29cba22fbdaefb5d031a9d778d6223dac63bd0d82376ada197471955cf8bd4
data/bin/dp ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/ruby
2
+ #-*- mode: ruby; -*-
3
+
4
+ require 'awful'
5
+ require 'awful/datapipeline'
6
+
7
+ Awful::DataPipeline.start(ARGV)
@@ -24,7 +24,11 @@ module Awful
24
24
  end
25
25
 
26
26
  def rds
27
- @rds || Aws::RDS::Client.new
27
+ @rds ||= Aws::RDS::Client.new
28
+ end
29
+
30
+ def datapipeline
31
+ @datapipeline ||= Aws::DataPipeline::Client.new
28
32
  end
29
33
 
30
34
  def symbolize_keys(thing)
@@ -106,7 +110,6 @@ module Awful
106
110
  end
107
111
  end
108
112
 
109
-
110
113
  end
111
114
  end
112
115
  end
@@ -0,0 +1,29 @@
1
+ require 'pp'
2
+ module Awful
3
+
4
+ class DataPipeline < Cli
5
+
6
+ desc 'ls [PATTERN]', 'list data pipelines'
7
+ method_option :long, aliases: '-l', default: false, desc: 'Long listing'
8
+ def ls(name = /./)
9
+ dps = datapipeline.list_pipelines.pipeline_id_list.select do |dp|
10
+ dp.name.match(name)
11
+ end
12
+
13
+ if options[:long]
14
+ fields = %w[ @name @creationTime ]
15
+ datapipeline.describe_pipelines(pipeline_ids: dps.map(&:id)).pipeline_description_list.map do |dp|
16
+ dp.fields.each_with_object({}) do |f, h|
17
+ h[f.key] = f.string_value # convert array of structs to hash
18
+ end
19
+ end.tap do |list|
20
+ print_table list.map { |d| d.values_at('@creationTime', 'name', '@pipelineState', '@healthStatus') }.sort
21
+ end
22
+ else
23
+ puts dps.map(&:name).sort
24
+ end
25
+ end
26
+
27
+ end
28
+
29
+ end
@@ -1,3 +1,3 @@
1
1
  module Awful
2
- VERSION = "0.0.17"
2
+ VERSION = "0.0.18"
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.17
4
+ version: 0.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ric Lister
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-09 00:00:00.000000000 Z
11
+ date: 2015-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -86,6 +86,7 @@ email:
86
86
  executables:
87
87
  - ami
88
88
  - asg
89
+ - dp
89
90
  - ec2
90
91
  - elb
91
92
  - lc
@@ -105,6 +106,7 @@ files:
105
106
  - awful.gemspec
106
107
  - bin/ami
107
108
  - bin/asg
109
+ - bin/dp
108
110
  - bin/ec2
109
111
  - bin/elb
110
112
  - bin/lc
@@ -116,6 +118,7 @@ files:
116
118
  - lib/awful.rb
117
119
  - lib/awful/ami.rb
118
120
  - lib/awful/auto_scaling.rb
121
+ - lib/awful/datapipeline.rb
119
122
  - lib/awful/ec2.rb
120
123
  - lib/awful/elb.rb
121
124
  - lib/awful/launch_config.rb