ec2-ssh 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 987c004d8dac2ca4e6b4f20c3bf0d1d079c7c136
4
- data.tar.gz: 741ecc46e8f800b86d894897a2ad1cfc88733dab
3
+ metadata.gz: afbba5cbe939567b1f63393203a199dc4dfb6af0
4
+ data.tar.gz: cba9421b063dc23950abe74b9c9bd0dbfda48416
5
5
  SHA512:
6
- metadata.gz: 10eb625aa0e1417c00359b28c9dbb93dd037bc612fbb7bdeb8bd7f8bba6c6a1d2d6e0f94727288e5b7a9592be6911c0c5d3cabf8a7b4c125c494150971d0913d
7
- data.tar.gz: 52d2e44474cc5b74ef08e3a23b0ac444e3e522b5bf729cf76ad6c73e9896beee6d183995e67fd1ae391526a6dcdac7d3191a1287db31b0b008c4ab62c3a84790
6
+ metadata.gz: 67f9050141bc3e1dd5276bd2b016b33192721360cfca46b3cf58062a62d7ac6ee63310eee3f1c9c73ee68915c84dd5a37ea066b9280e844d9134501f42e42d83
7
+ data.tar.gz: 722989fab66908b5124737b66584e925f3b27569d420057d2af768a77629d245f31bc8b0e403a37526f9ece5f4eff610ea1fac451667ce644dfb9417c3ee520a
data/lib/ec2-ssh/aws.rb CHANGED
@@ -1,4 +1,3 @@
1
- require 'pry'
2
1
  module Ec2Ssh::Cli::Aws
3
2
  def aws_init(profile, region)
4
3
  ENV['AWS_PROFILE'] = profile
data/lib/ec2-ssh/cli.rb CHANGED
@@ -30,6 +30,7 @@ class Ec2Ssh::Cli < Thor
30
30
  method_option :tag_key, :desc => 'tag key to filter instances by', :default => 'Name'
31
31
  method_option :tag_value, :desc => 'tag value to filter instances by'
32
32
  method_option :terminal, :aliases => 't', :desc => 'open terminal tabs for all servers'
33
+ method_option :capture_output, :aliases => 'c', :desc => 'capture output'
33
34
  def connect
34
35
  extend Aws
35
36
  extend Ssh
@@ -67,7 +68,7 @@ class Ec2Ssh::Cli < Thor
67
68
  dsl_options[:limit] = options[:groups_limit] if options[:groups_limit]
68
69
 
69
70
  say "dsl opts: #{dsl_options}", color = :cyan
70
- ssh_to(options[:user], dsl_options, options[:cmd])
71
+ ssh_to(options[:user], dsl_options, options[:cmd], options[:capture_output])
71
72
  end
72
73
  end
73
74
 
data/lib/ec2-ssh/ssh.rb CHANGED
@@ -12,10 +12,14 @@ module Ec2Ssh::Cli::Ssh
12
12
  }
13
13
  end
14
14
 
15
- def ssh_to(user, dsl_options, cmd)
15
+ def ssh_to(user, dsl_options, cmd, capture_output)
16
16
  say "Running #{cmd} via ssh in #{dsl_options}", color = :cyan
17
17
  on @all_servers, dsl_options do |host|
18
+ if capture_output
19
+ puts capture cmd
20
+ else
18
21
  execute cmd
22
+ end
19
23
  end
20
24
  end
21
25
  end
data/lib/ec2-ssh.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Ec2Ssh
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.4"
3
3
  ABOUT = "ec2-ssh v#{VERSION} (c) #{Time.now.strftime("2015-%Y")} @innovia"
4
4
 
5
5
  $:.unshift File.expand_path(File.join(File.dirname(__FILE__), %w[.. lib]))
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ec2-ssh
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ami Mahloof
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-12 00:00:00.000000000 Z
11
+ date: 2015-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor