Sha256: 588284b06c6a47a7a9015a121a4ef3a536634d3b4cd421645910de3211dfe6a5

Contents?: true

Size: 775 Bytes

Versions: 5

Compression:

Stored size: 775 Bytes

Contents

require "thor"

module Dogids
  class Cli < Thor
    no_commands do
      def ssh_production(vm_name = nil)
        case vm_name
        when "db"
          puts "Running: `ssh -R 52698:localhost:52698 dogids@db1.dogids.codelation.net`"
          exec("ssh -R 52698:localhost:52698 dogids@db1.dogids.codelation.net")
        when "web"
          puts "Running: `ssh -R 52698:localhost:52698 dogids@web2.dogids.codelation.net`"
          exec("ssh -R 52698:localhost:52698 dogids@web2.dogids.codelation.net")
        when "worker"
          puts "Running: `ssh -R 52698:localhost:52698 dogids@worker1.dogids.codelation.net`"
          exec("ssh -R 52698:localhost:52698 dogids@worker1.dogids.codelation.net")
        else
          ssh
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
dogids-cli-0.0.15 lib/dogids/ssh/production.rb
dogids-cli-0.0.14 lib/dogids/ssh/production.rb
dogids-cli-0.0.13 lib/dogids/ssh/production.rb
dogids-cli-0.0.12 lib/dogids/ssh/production.rb
dogids-cli-0.0.11 lib/dogids/ssh/production.rb