Sha256: 49c6469a7a501def34c4d2c529f3fea4b5782256fb24557b9820ef2861f842f3

Contents?: true

Size: 637 Bytes

Versions: 14

Compression:

Stored size: 637 Bytes

Contents

require "thor"

module Dogids
  class Cli < Thor
    no_commands do
      def ssh_staging(vm_name = nil)
        staging_machines = get_config_url("staging")
        if staging_machines.has_key?(vm_name)
          ssh_address = get_config_url("staging",vm_name)
          if vm_name == "lb"
            puts "Running: `ssh root@#{ssh_address}`"
            exec("ssh root@#{ssh_address}")
          else
            puts "Running: `ssh -R 52698:localhost:52698 dogids@#{ssh_address}`"
            exec("ssh -R 52698:localhost:52698 dogids@#{ssh_address}")
          end
        else
          ssh
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
dogids-cli-0.0.33 lib/dogids/ssh/staging.rb
dogids-cli-0.0.32 lib/dogids/ssh/staging.rb
dogids-cli-0.0.31 lib/dogids/ssh/staging.rb
dogids-cli-0.0.30 lib/dogids/ssh/staging.rb
dogids-cli-0.0.29 lib/dogids/ssh/staging.rb
dogids-cli-0.0.28 lib/dogids/ssh/staging.rb
dogids-cli-0.0.27 lib/dogids/ssh/staging.rb
dogids-cli-0.0.26 lib/dogids/ssh/staging.rb
dogids-cli-0.0.25 lib/dogids/ssh/staging.rb
dogids-cli-0.0.24 lib/dogids/ssh/staging.rb
dogids-cli-0.0.23 lib/dogids/ssh/staging.rb
dogids-cli-0.0.22 lib/dogids/ssh/staging.rb
dogids-cli-0.0.21 lib/dogids/ssh/staging.rb
dogids-cli-0.0.20 lib/dogids/ssh/staging.rb