From 6efd009569184e1a43f07939c6e0042f80b59014 Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Mon, 6 Mar 2006 03:48:35 +0000 Subject: [PATCH] part 2, rename switchtower -> capistrano git-svn-id: http://svn.rubyonrails.org/rails/tools/capistrano@3786 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- CHANGELOG | 2 ++ MIT-LICENSE | 2 +- README | 24 +++++++++---------- Rakefile | 8 +++---- bin/{switchtower => cap} | 4 ++-- switchtower.gemspec => capistrano.gemspec | 16 ++++++------- lib/capistrano.rb | 1 + lib/{switchtower => capistrano}/actor.rb | 0 lib/{switchtower => capistrano}/cli.rb | 0 lib/{switchtower => capistrano}/command.rb | 0 .../configuration.rb | 0 lib/{switchtower => capistrano}/extensions.rb | 0 lib/{switchtower => capistrano}/gateway.rb | 0 .../rails/deployment/deployment_generator.rb | 0 .../rails/deployment/templates/deploy.rb | 0 .../deployment/templates/switchtower.rake | 0 .../generators/rails/loader.rb | 0 lib/{switchtower => capistrano}/logger.rb | 0 .../recipes/standard.rb | 0 .../recipes/templates/maintenance.rhtml | 0 lib/{switchtower => capistrano}/scm/base.rb | 0 lib/{switchtower => capistrano}/scm/baz.rb | 0 lib/{switchtower => capistrano}/scm/bzr.rb | 0 lib/{switchtower => capistrano}/scm/cvs.rb | 0 lib/{switchtower => capistrano}/scm/darcs.rb | 0 .../scm/perforce.rb | 0 .../scm/subversion.rb | 0 lib/{switchtower => capistrano}/ssh.rb | 0 lib/{switchtower => capistrano}/transfer.rb | 0 lib/{switchtower => capistrano}/utils.rb | 0 lib/{switchtower => capistrano}/version.rb | 0 lib/switchtower.rb | 1 - test/actor_test.rb | 16 ++++++------- test/command_test.rb | 8 +++---- test/configuration_test.rb | 8 +++---- test/fixtures/custom.rb | 4 ++-- test/scm/cvs_test.rb | 4 ++-- test/scm/subversion_test.rb | 6 ++--- test/ssh_test.rb | 12 +++++----- 39 files changed, 59 insertions(+), 57 deletions(-) rename bin/{switchtower => cap} (69%) rename switchtower.gemspec => capistrano.gemspec (53%) create mode 100644 lib/capistrano.rb rename lib/{switchtower => capistrano}/actor.rb (100%) rename lib/{switchtower => capistrano}/cli.rb (100%) rename lib/{switchtower => capistrano}/command.rb (100%) rename lib/{switchtower => capistrano}/configuration.rb (100%) rename lib/{switchtower => capistrano}/extensions.rb (100%) rename lib/{switchtower => capistrano}/gateway.rb (100%) rename lib/{switchtower => capistrano}/generators/rails/deployment/deployment_generator.rb (100%) rename lib/{switchtower => capistrano}/generators/rails/deployment/templates/deploy.rb (100%) rename lib/{switchtower => capistrano}/generators/rails/deployment/templates/switchtower.rake (100%) rename lib/{switchtower => capistrano}/generators/rails/loader.rb (100%) rename lib/{switchtower => capistrano}/logger.rb (100%) rename lib/{switchtower => capistrano}/recipes/standard.rb (100%) rename lib/{switchtower => capistrano}/recipes/templates/maintenance.rhtml (100%) rename lib/{switchtower => capistrano}/scm/base.rb (100%) rename lib/{switchtower => capistrano}/scm/baz.rb (100%) rename lib/{switchtower => capistrano}/scm/bzr.rb (100%) rename lib/{switchtower => capistrano}/scm/cvs.rb (100%) rename lib/{switchtower => capistrano}/scm/darcs.rb (100%) rename lib/{switchtower => capistrano}/scm/perforce.rb (100%) rename lib/{switchtower => capistrano}/scm/subversion.rb (100%) rename lib/{switchtower => capistrano}/ssh.rb (100%) rename lib/{switchtower => capistrano}/transfer.rb (100%) rename lib/{switchtower => capistrano}/utils.rb (100%) rename lib/{switchtower => capistrano}/version.rb (100%) delete mode 100644 lib/switchtower.rb diff --git a/CHANGELOG b/CHANGELOG index 5727446eb..3d2bc30e3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,7 @@ *1.0.2* *SVN* +* Rename to capistrano + * Make the generated switchtower.rake file use rake namespaces, and include all default tasks * Look for config/deploy.rb and stasks file by default diff --git a/MIT-LICENSE b/MIT-LICENSE index 7968af4fc..660950cda 100644 --- a/MIT-LICENSE +++ b/MIT-LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2005 Jamis Buck +Copyright (c) 2005,2006 Jamis Buck Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/README b/README index 40bfb3f8c..d11c67aa0 100644 --- a/README +++ b/README @@ -1,35 +1,35 @@ -= SwitchTower += Capistrano -SwitchTower is a utility and framework for executing commands in parallel on multiple remote machines, via SSH. It uses a simple DSL (borrowed in part from Rake, http://rake.rubyforge.org/) that allows you to define _tasks_, which may be applied to machines in certain roles. It also supports tunneling connections via some gateway machine to allow operations to be performed behind VPN's and firewalls. +Capistrano is a utility and framework for executing commands in parallel on multiple remote machines, via SSH. It uses a simple DSL (borrowed in part from Rake, http://rake.rubyforge.org/) that allows you to define _tasks_, which may be applied to machines in certain roles. It also supports tunneling connections via some gateway machine to allow operations to be performed behind VPN's and firewalls. -SwitchTower was originally designed to simplify and automate deployment of web applications to distributed environments, and so it comes with many tasks predefined for that ("update_code" and "deploy", for instance). +Capistrano was originally designed to simplify and automate deployment of web applications to distributed environments, and so it comes with many tasks predefined for that ("update_code" and "deploy", for instance). == Dependencies -SwitchTower depends upon the Net::SSH library by Jamis Buck (http://net-ssh.rubyforge.org). Net::SSH itself depends on the Needle library (http://needle.rubyforge.org), also by Jamis Buck. +Capistrano depends upon the Net::SSH library by Jamis Buck (http://net-ssh.rubyforge.org). Net::SSH itself depends on the Needle library (http://needle.rubyforge.org), also by Jamis Buck. == Assumptions -In keeping with Rails' "convention over configuration", SwitchTower makes several assumptions about how you will use it (most, if not all, of which may be explicitly overridden): +In keeping with Rails' "convention over configuration", Capistrano makes several assumptions about how you will use it (most, if not all, of which may be explicitly overridden): -* You are writing web applications and want to use SwitchTower to deploy them. +* You are writing web applications and want to use Capistrano to deploy them. * You are using Ruby on Rails (http://www.rubyonrails.com) to build your apps. * You are using Subversion (http://subversion.tigris.org/) to manage your source code. * You are running your apps using FastCGI, together with Rails' spinner/reaper utilities. -As with the rest of Rails, if you can abide by these assumptions, you can use SwitchTower "out of the box". If any of these assumptions do not hold, you'll need to make some adjustments to your deployment recipe files. +As with the rest of Rails, if you can abide by these assumptions, you can use Capistrano "out of the box". If any of these assumptions do not hold, you'll need to make some adjustments to your deployment recipe files. == Usage More documentation is always pending, but you'll want to see the user manual for detailed usage instructions. (The manual is online at http://manuals.rubyonrails.org/read/book/17). -In general, you'll use SwitchTower as follows: +In general, you'll use Capistrano as follows: * Create a deployment recipe ("deploy.rb") for your application. You can use the sample recipe in examples/sample.rb as a starting point. -* Use the +switchtower+ script to execute your recipe (see below). +* Use the +cap+ script to execute your recipe (see below). -Use the +switchtower+ script as follows: +Use the +cap+ script as follows: - switchtower -r deploy -a someaction -vvv + cap -vvv someaction -The -r switch specifies the recipe to use, and the -a switch specifies which action you want to execute. You can the -v switch multiple times (as shown) to increase the verbosity of the output. +By default, the script will look for a file called one of config/deploy, config/deploy.rb, capistrano, or capistrano.rb. You can the -v switch multiple times (as shown) to increase the verbosity of the output. The +someaction+ text indicates which action to execute. diff --git a/Rakefile b/Rakefile index e21aceba7..fadebcd8d 100644 --- a/Rakefile +++ b/Rakefile @@ -5,11 +5,11 @@ require 'rake/packagetask' require 'rake/gempackagetask' require 'rake/contrib/rubyforgepublisher' -require "./lib/switchtower/version" +require "./lib/capistrano/version" -PKG_NAME = "switchtower" +PKG_NAME = "capistrano" PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : '' -PKG_VERSION = SwitchTower::Version::STRING + PKG_BUILD +PKG_VERSION = Capistrano::Version::STRING + PKG_BUILD PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}" desc "Default task" @@ -35,7 +35,7 @@ end desc "Build the RDoc API documentation" Rake::RDocTask.new do |rdoc| rdoc.rdoc_dir = "doc" - rdoc.title = "SwitchTower -- A framework for remote command execution" + rdoc.title = "Capistrano -- A framework for remote command execution" rdoc.options << '--line-numbers --inline-source --main README' rdoc.rdoc_files.include 'README' rdoc.rdoc_files.include 'lib/**/*.rb' diff --git a/bin/switchtower b/bin/cap similarity index 69% rename from bin/switchtower rename to bin/cap index 9a4f30017..4288dade0 100755 --- a/bin/switchtower +++ b/bin/cap @@ -6,6 +6,6 @@ rescue LoadError # no rubygems to load, so we fail silently end -require 'switchtower/cli' +require 'capistrano/cli' -SwitchTower::CLI.execute! +Capistrano::CLI.execute! diff --git a/switchtower.gemspec b/capistrano.gemspec similarity index 53% rename from switchtower.gemspec rename to capistrano.gemspec index a653719f3..2e171a508 100644 --- a/switchtower.gemspec +++ b/capistrano.gemspec @@ -1,12 +1,12 @@ -require './lib/switchtower/version' +require './lib/capistrano/version' Gem::Specification.new do |s| - s.name = 'switchtower' + s.name = 'capistrano' s.version = PKG_VERSION s.platform = Gem::Platform::RUBY s.summary = <<-DESC.strip.gsub(/\n/, " ") - SwitchTower is a framework and utility for executing commands in parallel + Capistrano is a framework and utility for executing commands in parallel on multiple remote machines, via SSH. The primary goal is to simplify and automate the deployment of web applications. DESC @@ -14,16 +14,16 @@ Gem::Specification.new do |s| s.files = Dir.glob("{bin,lib,examples,test}/**/*") s.files.concat %w(README MIT-LICENSE ChangeLog) s.require_path = 'lib' - s.autorequire = 'switchtower' + s.autorequire = 'capistrano' s.bindir = "bin" - s.executables << "switchtower" + s.executables << "cap" - s.add_dependency 'net-ssh', ">= #{SwitchTower::Version::SSH_REQUIRED.join(".")}" - s.add_dependency 'net-sftp', ">= #{SwitchTower::Version::SFTP_REQUIRED.join(".")}" + s.add_dependency 'net-ssh', ">= #{Capistrano::Version::SSH_REQUIRED.join(".")}" + s.add_dependency 'net-sftp', ">= #{Capistrano::Version::SFTP_REQUIRED.join(".")}" s.author = "Jamis Buck" s.email = "jamis@37signals.com" - s.homepage = "http://www.rubyonrails.com" + s.homepage = "http://www.rubyonrails.org" end diff --git a/lib/capistrano.rb b/lib/capistrano.rb new file mode 100644 index 000000000..ee3d500f8 --- /dev/null +++ b/lib/capistrano.rb @@ -0,0 +1 @@ +require 'capistrano/configuration' diff --git a/lib/switchtower/actor.rb b/lib/capistrano/actor.rb similarity index 100% rename from lib/switchtower/actor.rb rename to lib/capistrano/actor.rb diff --git a/lib/switchtower/cli.rb b/lib/capistrano/cli.rb similarity index 100% rename from lib/switchtower/cli.rb rename to lib/capistrano/cli.rb diff --git a/lib/switchtower/command.rb b/lib/capistrano/command.rb similarity index 100% rename from lib/switchtower/command.rb rename to lib/capistrano/command.rb diff --git a/lib/switchtower/configuration.rb b/lib/capistrano/configuration.rb similarity index 100% rename from lib/switchtower/configuration.rb rename to lib/capistrano/configuration.rb diff --git a/lib/switchtower/extensions.rb b/lib/capistrano/extensions.rb similarity index 100% rename from lib/switchtower/extensions.rb rename to lib/capistrano/extensions.rb diff --git a/lib/switchtower/gateway.rb b/lib/capistrano/gateway.rb similarity index 100% rename from lib/switchtower/gateway.rb rename to lib/capistrano/gateway.rb diff --git a/lib/switchtower/generators/rails/deployment/deployment_generator.rb b/lib/capistrano/generators/rails/deployment/deployment_generator.rb similarity index 100% rename from lib/switchtower/generators/rails/deployment/deployment_generator.rb rename to lib/capistrano/generators/rails/deployment/deployment_generator.rb diff --git a/lib/switchtower/generators/rails/deployment/templates/deploy.rb b/lib/capistrano/generators/rails/deployment/templates/deploy.rb similarity index 100% rename from lib/switchtower/generators/rails/deployment/templates/deploy.rb rename to lib/capistrano/generators/rails/deployment/templates/deploy.rb diff --git a/lib/switchtower/generators/rails/deployment/templates/switchtower.rake b/lib/capistrano/generators/rails/deployment/templates/switchtower.rake similarity index 100% rename from lib/switchtower/generators/rails/deployment/templates/switchtower.rake rename to lib/capistrano/generators/rails/deployment/templates/switchtower.rake diff --git a/lib/switchtower/generators/rails/loader.rb b/lib/capistrano/generators/rails/loader.rb similarity index 100% rename from lib/switchtower/generators/rails/loader.rb rename to lib/capistrano/generators/rails/loader.rb diff --git a/lib/switchtower/logger.rb b/lib/capistrano/logger.rb similarity index 100% rename from lib/switchtower/logger.rb rename to lib/capistrano/logger.rb diff --git a/lib/switchtower/recipes/standard.rb b/lib/capistrano/recipes/standard.rb similarity index 100% rename from lib/switchtower/recipes/standard.rb rename to lib/capistrano/recipes/standard.rb diff --git a/lib/switchtower/recipes/templates/maintenance.rhtml b/lib/capistrano/recipes/templates/maintenance.rhtml similarity index 100% rename from lib/switchtower/recipes/templates/maintenance.rhtml rename to lib/capistrano/recipes/templates/maintenance.rhtml diff --git a/lib/switchtower/scm/base.rb b/lib/capistrano/scm/base.rb similarity index 100% rename from lib/switchtower/scm/base.rb rename to lib/capistrano/scm/base.rb diff --git a/lib/switchtower/scm/baz.rb b/lib/capistrano/scm/baz.rb similarity index 100% rename from lib/switchtower/scm/baz.rb rename to lib/capistrano/scm/baz.rb diff --git a/lib/switchtower/scm/bzr.rb b/lib/capistrano/scm/bzr.rb similarity index 100% rename from lib/switchtower/scm/bzr.rb rename to lib/capistrano/scm/bzr.rb diff --git a/lib/switchtower/scm/cvs.rb b/lib/capistrano/scm/cvs.rb similarity index 100% rename from lib/switchtower/scm/cvs.rb rename to lib/capistrano/scm/cvs.rb diff --git a/lib/switchtower/scm/darcs.rb b/lib/capistrano/scm/darcs.rb similarity index 100% rename from lib/switchtower/scm/darcs.rb rename to lib/capistrano/scm/darcs.rb diff --git a/lib/switchtower/scm/perforce.rb b/lib/capistrano/scm/perforce.rb similarity index 100% rename from lib/switchtower/scm/perforce.rb rename to lib/capistrano/scm/perforce.rb diff --git a/lib/switchtower/scm/subversion.rb b/lib/capistrano/scm/subversion.rb similarity index 100% rename from lib/switchtower/scm/subversion.rb rename to lib/capistrano/scm/subversion.rb diff --git a/lib/switchtower/ssh.rb b/lib/capistrano/ssh.rb similarity index 100% rename from lib/switchtower/ssh.rb rename to lib/capistrano/ssh.rb diff --git a/lib/switchtower/transfer.rb b/lib/capistrano/transfer.rb similarity index 100% rename from lib/switchtower/transfer.rb rename to lib/capistrano/transfer.rb diff --git a/lib/switchtower/utils.rb b/lib/capistrano/utils.rb similarity index 100% rename from lib/switchtower/utils.rb rename to lib/capistrano/utils.rb diff --git a/lib/switchtower/version.rb b/lib/capistrano/version.rb similarity index 100% rename from lib/switchtower/version.rb rename to lib/capistrano/version.rb diff --git a/lib/switchtower.rb b/lib/switchtower.rb deleted file mode 100644 index d8458dc4a..000000000 --- a/lib/switchtower.rb +++ /dev/null @@ -1 +0,0 @@ -require 'switchtower/configuration' diff --git a/test/actor_test.rb b/test/actor_test.rb index 371abc802..8428bf48f 100644 --- a/test/actor_test.rb +++ b/test/actor_test.rb @@ -2,9 +2,9 @@ require 'stringio' require 'test/unit' -require 'switchtower/actor' -require 'switchtower/logger' -require 'switchtower/configuration' +require 'capistrano/actor' +require 'capistrano/logger' +require 'capistrano/configuration' class ActorTest < Test::Unit::TestCase @@ -44,7 +44,7 @@ def process! end end - class TestActor < SwitchTower::Actor + class TestActor < Capistrano::Actor attr_reader :factory self.connection_factory = TestingConnectionFactory @@ -80,7 +80,7 @@ def roles end def logger - @logger ||= SwitchTower::Logger.new(:output => StringIO.new) + @logger ||= Capistrano::Logger.new(:output => StringIO.new) end end @@ -267,7 +267,7 @@ def test_task_after_hook end def test_uppercase_variables - config = SwitchTower::Configuration.new(TestActor) + config = Capistrano::Configuration.new(TestActor) config.set :HELLO, "world" assert_equal "world", config.actor.instance_eval("HELLO") config.set :HELLO, "test" @@ -283,12 +283,12 @@ def test_connect_when_no_matching_servers end def test_custom_extension - assert SwitchTower.plugin(:custom, CustomExtension) + assert Capistrano.plugin(:custom, CustomExtension) @actor.define_task :foo, :roles => :db do custom.do_something_extra(1, 2, 3) end assert_nothing_raised { @actor.foo } assert TestingCommand.invoked? - assert SwitchTower.remove_plugin(:custom) + assert Capistrano.remove_plugin(:custom) end end diff --git a/test/command_test.rb b/test/command_test.rb index 7005ba0f2..d0a1c3c61 100644 --- a/test/command_test.rb +++ b/test/command_test.rb @@ -2,7 +2,7 @@ require 'stringio' require 'test/unit' -require 'switchtower/command' +require 'capistrano/command' class CommandTest < Test::Unit::TestCase class MockSession @@ -24,19 +24,19 @@ def setup end def test_command_executes_on_all_servers - command = SwitchTower::Command.new(%w(server1 server2 server3), + command = Capistrano::Command.new(%w(server1 server2 server3), "hello", nil, {}, @actor) assert_equal %w(server1 server2 server3), @actor.sessions.keys.sort end def test_command_with_newlines - command = SwitchTower::Command.new(%w(server1), "hello\nworld", nil, {}, + command = Capistrano::Command.new(%w(server1), "hello\nworld", nil, {}, @actor) assert_equal "hello\\\nworld", command.command end def test_command_with_windows_newlines - command = SwitchTower::Command.new(%w(server1), "hello\r\nworld", nil, {}, + command = Capistrano::Command.new(%w(server1), "hello\r\nworld", nil, {}, @actor) assert_equal "hello\\\nworld", command.command end diff --git a/test/configuration_test.rb b/test/configuration_test.rb index b69d8e8ee..fe5e326bd 100644 --- a/test/configuration_test.rb +++ b/test/configuration_test.rb @@ -1,7 +1,7 @@ $:.unshift File.dirname(__FILE__) + "/../lib" require 'test/unit' -require 'switchtower/configuration' +require 'capistrano/configuration' require 'flexmock' class ConfigurationTest < Test::Unit::TestCase @@ -25,7 +25,7 @@ def initialize(config) end def setup - @config = SwitchTower::Configuration.new(MockActor) + @config = Capistrano::Configuration.new(MockActor) @config.set :scm, MockSCM end @@ -210,12 +210,12 @@ def test_task_description def test_set_scm_to_darcs @config.set :scm, :darcs - assert_equal "SwitchTower::SCM::Darcs", @config.source.class.name + assert_equal "Capistrano::SCM::Darcs", @config.source.class.name end def test_set_scm_to_subversion @config.set :scm, :subversion - assert_equal "SwitchTower::SCM::Subversion", @config.source.class.name + assert_equal "Capistrano::SCM::Subversion", @config.source.class.name end def test_get_proc_variable_sets_original_value_hash diff --git a/test/fixtures/custom.rb b/test/fixtures/custom.rb index 809eb92b7..7b33223d1 100644 --- a/test/fixtures/custom.rb +++ b/test/fixtures/custom.rb @@ -1,3 +1,3 @@ -SwitchTower.configuration(:must_exist).load do +Capistrano.configuration(:must_exist).load do set :gateway, "foo" -end \ No newline at end of file +end diff --git a/test/scm/cvs_test.rb b/test/scm/cvs_test.rb index 50e0c6e77..2d998b7e5 100644 --- a/test/scm/cvs_test.rb +++ b/test/scm/cvs_test.rb @@ -2,10 +2,10 @@ require File.dirname(__FILE__) + "/../utils" require 'test/unit' -require 'switchtower/scm/cvs' +require 'capistrano/scm/cvs' class ScmCvsTest < Test::Unit::TestCase - class CvsTest < SwitchTower::SCM::Cvs + class CvsTest < Capistrano::SCM::Cvs attr_accessor :story attr_reader :last_path diff --git a/test/scm/subversion_test.rb b/test/scm/subversion_test.rb index 9af170591..30da6f62c 100644 --- a/test/scm/subversion_test.rb +++ b/test/scm/subversion_test.rb @@ -2,10 +2,10 @@ require File.dirname(__FILE__) + "/../utils" require 'test/unit' -require 'switchtower/scm/subversion' +require 'capistrano/scm/subversion' class ScmSubversionTest < Test::Unit::TestCase - class SubversionTest < SwitchTower::SCM::Subversion + class SubversionTest < Capistrano::SCM::Subversion attr_accessor :story attr_reader :last_path @@ -61,7 +61,7 @@ def setup ------------------------------------------------------------------------ r1967 | minam | 2005-08-03 06:59:03 -0600 (Wed, 03 Aug 2005) | 2 lines -Initial commit of the new switchtower utility +Initial commit of the new capistrano utility ------------------------------------------------------------------------ MSG diff --git a/test/ssh_test.rb b/test/ssh_test.rb index 60e791beb..0b5bada36 100644 --- a/test/ssh_test.rb +++ b/test/ssh_test.rb @@ -2,7 +2,7 @@ require File.dirname(__FILE__) + "/utils" require 'test/unit' -require 'switchtower/ssh' +require 'capistrano/ssh' class SSHTest < Test::Unit::TestCase class MockSSH @@ -30,7 +30,7 @@ def setup def test_publickey_auth_succeeds_default_port_no_block Net.const_during(:SSH, MockSSH) do - SwitchTower::SSH.connect('demo.server.i', @config) + Capistrano::SSH.connect('demo.server.i', @config) end assert_equal 1, MockSSH.invocations.length @@ -45,7 +45,7 @@ def test_publickey_auth_succeeds_default_port_no_block def test_publickey_auth_succeeds_explicit_port_no_block Net.const_during(:SSH, MockSSH) do - SwitchTower::SSH.connect('demo.server.i', @config, 23) + Capistrano::SSH.connect('demo.server.i', @config, 23) end assert_equal 1, MockSSH.invocations.length @@ -55,7 +55,7 @@ def test_publickey_auth_succeeds_explicit_port_no_block def test_publickey_auth_succeeds_with_block Net.const_during(:SSH, MockSSH) do - SwitchTower::SSH.connect('demo.server.i', @config) do |session| + Capistrano::SSH.connect('demo.server.i', @config) do |session| end end @@ -67,7 +67,7 @@ def test_publickey_auth_fails MockSSH.story << Net::SSH::AuthenticationFailed Net.const_during(:SSH, MockSSH) do - SwitchTower::SSH.connect('demo.server.i', @config) + Capistrano::SSH.connect('demo.server.i', @config) end assert_equal 2, MockSSH.invocations.length @@ -87,7 +87,7 @@ def test_password_auth_fails Net.const_during(:SSH, MockSSH) do assert_raises(Net::SSH::AuthenticationFailed) do - SwitchTower::SSH.connect('demo.server.i', @config) + Capistrano::SSH.connect('demo.server.i', @config) end end