aws-ec2-list 0.1.0 → 0.1.1

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: 630994a36ff29213ba5c8b3f6bf69e2352812141
4
- data.tar.gz: 0f524ec0191d1c62597e490fff85418831e9fdb9
3
+ metadata.gz: 288213b6d0677699be342357a0505356c85a34e3
4
+ data.tar.gz: fe59d92cdb81cc58ea5af7fd6799b018b7bf0d24
5
5
  SHA512:
6
- metadata.gz: 984ffe07f156a1e036a92e6982bb66b65adee3afad2ad26bd01f0d6baf21db186bc7c1e892efb8005b04598e87dc9105cc741f176750225dd8f734f254855e78
7
- data.tar.gz: f333ea7d86565c2f2606341fd3f9147f4806a1c4f65d5752fd344b39a255dce158e378c5f47adff77e9e3d767ed585636a510396533ec26fb6a7ce1b09644f7a
6
+ metadata.gz: f62b85e549bb732d470343c3831e03252eae6252b911a26ead3e2514b8ec9c4b44e3f00920d0d602bf696a35a9ded16b30f9b6d693016e9ffc70d202f871671e
7
+ data.tar.gz: 30e39213e3f654a80cc96b86ad6bdabf561eb51a2f56bc674df874afd76f1e5ba7e5b7c3bfc95f0a1a53240f5a4d3b6c31d9ddc542b365b215d791fb29f30212
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "bundler/setup"
4
3
  require "aws_ec2_list"
5
4
 
6
5
  AwsEc2List.call
@@ -1,16 +1,11 @@
1
1
  require_relative 'instance'
2
2
 
3
3
  class AwsEc2List::Runner
4
- attr_reader :ec2, :credentials_path, :stdout, :env
4
+ attr_reader :ec2, :stdout
5
5
 
6
- def initialize(ec2: Aws::EC2::Client.new,
7
- credentials_path: "#{Dir.home}/.aws/credentials",
8
- stdout: $stdout,
9
- env: ENV)
10
- @ec2 = ec2
11
- @credentials_path = credentials_path
6
+ def initialize(ec2: Aws::EC2::Client, region: 'us-east-1', stdout: $stdout)
7
+ @ec2 = ec2.new(region: region)
12
8
  @stdout = stdout
13
- @env = env
14
9
  end
15
10
 
16
11
  def call
@@ -19,7 +14,7 @@ class AwsEc2List::Runner
19
14
  [d.project, d.stack_name, d.public_dns_name, d.launch_time, d.app_version, d.state]
20
15
  end
21
16
  data = data.insert(0, data_header)
22
- puts Tabularize.it(data, :align => :left).map { |row| row.join ' | ' }
17
+ stdout.puts Tabularize.it(data, :align => :left).map { |row| row.join ' | ' }
23
18
  end
24
19
 
25
20
  private
@@ -1,3 +1,3 @@
1
1
  module AwsEc2List
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-ec2-list
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - pauloancheta
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-16 00:00:00.000000000 Z
11
+ date: 2017-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk