owssh 0.0.20 → 0.0.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/owssh.rb +12 -11
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7221dddfa2ad3f3485d227fede880a2bf1934af1
4
- data.tar.gz: 98ea134bf194d5833f1b906ee7a7cda30281c572
3
+ metadata.gz: 13b08097506be739ae1141781e8c65f7dc81dddb
4
+ data.tar.gz: 4213409533df11503d7f6484f136e389b0b268c1
5
5
  SHA512:
6
- metadata.gz: 19d2a1e81ddd71555166cf57aa87b8893e107d738a50a191b0f564750150da2bb8e4697fbdf7d1d03869d3560ec7a26ab45929437de24be971087976ac4d67c5
7
- data.tar.gz: ac27448595151c13448025ecf03e84fca72e707be427b2285ec2c151ad83b5f16c33a01f0f459e626bc1abd0953e08a10f266b7bb9c43f5cc0af2437ac53e075
6
+ metadata.gz: e9f98b212f6f840c1c8431c611380095e51e625aec8bd9e985deee722fc555f3a3b365647098fcc5aebfbb64b3347dbb0212d9ae4134ca96efb256a4f30e97e5
7
+ data.tar.gz: 832c8eea6453072da837f9e59dfe2ebf98d86aa7f31127ca2df344ae09ab67e9bc188f9320102c9ae40d7eb8c7842db8e74f8bfac19f5b7548f3c8e5140827ba
data/lib/owssh.rb CHANGED
@@ -8,8 +8,6 @@ require 'command_line_reporter'
8
8
  class Owssh
9
9
  include CommandLineReporter
10
10
 
11
- $aws_profile = "default"
12
- $aws_config_file = "~/.aws/config.owssh"
13
11
 
14
12
  def get_stacks
15
13
  my_stacks = {}
@@ -75,23 +73,26 @@ class Owssh
75
73
  end
76
74
 
77
75
  def print_help
76
+ puts "Version #{Gem.loaded_specs['owssh'].version}"
77
+ puts ""
78
78
  puts "Usage:"
79
- puts "owssh list - List all environments"
80
- puts "owssh describe - Show details of hosts in all stacks"
81
- puts "owssh describe [Stack Name] - Show details of a specific stack"
82
- puts "owssh [Stack Name] [Hostname or Type] - SSH to a host in a stack"
83
- puts "owssh [Stack Name] [Hostname or Type] \"Your command here\" - SSH to a host in a stack and run a command"
79
+ puts "owssh list - List all environments"
80
+ puts "owssh describe - Show details of hosts in all stacks"
81
+ puts "owssh describe [Stack Name] - Show details of a specific stack"
82
+ puts "owssh [Stack Name] [Hostname or Type] - SSH to a host in a stack"
83
+ puts "owssh [Stack Name] [Hostname or Type] \"Your command here\" - SSH to a host in a stack and run a command"
84
84
  puts ""
85
- puts " Type - The type of host. I.E. rails-app, resque, etc..."
86
- puts " Hostname - The name of the host. I.E. rails-app1, resque1, etc..."
85
+ puts " Type - The type of host. I.E. rails-app, resque, etc..."
86
+ puts " Hostname - The name of the host. I.E. rails-app1, resque1, etc..."
87
87
  exit
88
88
  end
89
89
 
90
90
  def owssh
91
91
  # Export environment variables for AWS CLI here
92
92
  $debug = false
93
- $ssh_key_file = "~/.ssh/id_rsa_dev"
94
- $owssh_config = "~/.owssh_conf"
93
+ $aws_profile = ENV['AWS_DEFAULT_PROFILE'] || "default"
94
+ $ssh_key_file = ENV['OWSSH_SSH_KEY_FILE'] || "~/.ssh/id_rsa_owssh"
95
+ $aws_config_file = ENV['OWSSH_AWS_CONFIG_FILE'] || ENV['AWS_CONFIG_FILE'] || "~/.aws/config.owssh"
95
96
 
96
97
  if ARGV.empty?
97
98
  puts "Please supply some options. Try 'owssh help' for available commands"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: owssh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20
4
+ version: 0.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philip Hutchins