omc 0.0.8 → 0.0.9

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: a6f0467e39b53057c023904b1d13696c2959bf9f
4
- data.tar.gz: 89ca19b9cf793ca0a38e6dc1e0f9353457a26f7e
3
+ metadata.gz: 05ac333f0451e2a68edda9fd7081a0763d1c9926
4
+ data.tar.gz: 232653f29a7dd2899e976e4b30f90d5c532dd48e
5
5
  SHA512:
6
- metadata.gz: 642d1acc7fdc9fc3e06c0c45cd75ac4bf6a875b60c4e65cae90aed0a059c1f636ca4638819ceaba636942b23c50cf9ee012569c37d69d07d58efa06810358d77
7
- data.tar.gz: ebe7a0e6e7fb88a09732835b0ce89ee50088e2147945f74bf1b2aea8c5306bea8eca53c4941db0cf2347c6523b97659f686080c5240ccb0b567cce2f55a2a9a6
6
+ metadata.gz: cba81e8dc716ab5acba20e33e7e661213a1b655b8651c8f3a108fcbaebf41630ad67b4d0d6a7c21facbf1d62adc149dcc03c02177c9e597a42874ab8c3078b7b
7
+ data.tar.gz: 6261c3311a56c8fd3628a761898d0ac9d8e89553eca79cc9633992c7aadcbab52f76f314c6968fac2b766add013f56a9ae603ec82d8e8157404663be5d6e03f5
@@ -6,12 +6,19 @@ require "omc/config"
6
6
 
7
7
  module Omc
8
8
  class Cli < Thor
9
- class_option :account, aliases: '-a', optional: true
10
- class_option :layer, aliases: '-l', optional: true
9
+ class_option :account, aliases: '-a'
10
+ class_option :layer, aliases: '-l'
11
+ class_option :forward_agent, aliases: "-A", type: :boolean, default: false
11
12
 
12
13
  desc 'ssh STACK', 'Connect to an instance on a stack on an account'
13
14
  def ssh(stack)
14
- command = StackCommand.new(aws_account, user, stack, layer: options[:layer])
15
+ command = StackCommand.new(
16
+ aws_account,
17
+ user,
18
+ stack,
19
+ layer: options[:layer],
20
+ forward_agent: options[:forward_agent]
21
+ )
15
22
  command.ssh
16
23
  end
17
24
 
@@ -3,12 +3,13 @@ require 'omc/account'
3
3
 
4
4
  module Omc
5
5
  class StackCommand
6
- def initialize aws_account, user, stack_name, app: nil, layer: nil
6
+ def initialize aws_account, user, stack_name, app: nil, layer: nil, forward_agent: false
7
7
  @aws_account = aws_account
8
8
  @user = user
9
9
  @stack_name = stack_name
10
10
  @app_name = app
11
11
  @layer_name = layer
12
+ @forward_agent = forward_agent
12
13
  end
13
14
 
14
15
  def ssh
@@ -98,7 +99,10 @@ module Omc
98
99
  end
99
100
 
100
101
  def default_ssh_args
101
- bastion ? [ '-o', "ProxyCommand ssh -W %h:%p #{bastion.host}" ] : []
102
+ [].tap do |args|
103
+ args.push("-o", "ProxyCommand ssh -W %h:%p #{bastion.host}") if bastion
104
+ args.push("-A") if @forward_agent
105
+ end
102
106
  end
103
107
 
104
108
  def get_by_name collection, name, key: :name
@@ -1,3 +1,3 @@
1
1
  module Omc
2
- VERSION = '0.0.8'
2
+ VERSION = '0.0.9'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clarke Brunsdon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-06 00:00:00.000000000 Z
11
+ date: 2016-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  version: '0'
140
140
  requirements: []
141
141
  rubyforge_project:
142
- rubygems_version: 2.4.5
142
+ rubygems_version: 2.4.5.1
143
143
  signing_key:
144
144
  specification_version: 4
145
145
  summary: Opsworks Missing Console - Useful Commands for Opsworks