From 3f33beedb4816bd44d158b16c2b75180cc6346fd Mon Sep 17 00:00:00 2001
From: Kir Shatrov
me@localhost $ ssh me@remote
-me@remote $ [[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'
+me@remote $ [[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'
Interactive
-me@remote $ shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'
+me@remote $ shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'
Login shell
me@localhost $ ssh me@remote "[[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'"
+ me@localhost $ ssh me@remote "[[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'"
Interactive
-me@localhost $ ssh me@remote "shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'"
+me@localhost $ ssh me@remote "shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'"
Not login shell
# Capistrano 3.0.x
task :query_interactive do
- on 'me@remote' do
- info capture("[[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'")
+ on 'me@remote' do
+ info capture("[[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'")
end
end
task :query_login do
- on 'me@remote' do
- info capture("shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'")
+ on 'me@remote' do
+ info capture("shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'")
end
end
me@localhost $ ssh me@remote
-me@remote $ [[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'
+me@remote $ [[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'
Interactive
-me@remote $ shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'
+me@remote $ shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'
Login shell
me@localhost $ ssh me@remote "[[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'"
+ me@localhost $ ssh me@remote "[[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'"
Interactive
-me@localhost $ ssh me@remote "shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'"
+me@localhost $ ssh me@remote "shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'"
Not login shell
# Capistrano 3.0.x
task :query_interactive do
- on 'me@remote' do
- info capture("[[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'")
+ on 'me@remote' do
+ info capture("[[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive'")
end
end
task :query_login do
- on 'me@remote' do
- info capture("shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'")
+ on 'me@remote' do
+ info capture("shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'")
end
end
me@localhost $ ssh-keygen -t rsa -C 'me@my_email_address.com'
+ me@localhost $ ssh-keygen -t rsa -C 'me@my_email_address.com'
You'll be prompted for a passphrase, that's fine. Type one and keep it safe. @@ -238,7 +238,7 @@ use the same key for each one, but only one key per developer is recommended.
If we did all that correctly, we should now be able to do something like this:
me@localhost $ ssh deploy@one-of-my-servers.com 'hostname; uptime'
+ me@localhost $ ssh deploy@one-of-my-servers.com 'hostname; uptime'
one-of-my-servers.com
19:23:32 up 62 days, 44 min, 1 user, load average: 0.00, 0.01, 0.05
# List SSH keys that are loaded into the agent
me@localhost $ ssh-add -l
-# Make sure they key is loaded if 'ssh-add -l' didn't show anything
+# Make sure they key is loaded if 'ssh-add -l' didn't show anything
me@localhost $ ssh-add
-me@localhost $ ssh -A deploy@one-of-my-servers.com 'git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git
+me@localhost $ ssh -A deploy@one-of-my-servers.com 'git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git
We first check that the agent has the keys loaded. If not we simply load it @@ -318,7 +318,7 @@ it both ways just to know how your system treats agent forwarding by default.
me@localhost $ git ls-remote https://github.com/capistrano/rails3-bootstrap-devise-cancan.git
-Username for 'https://github.com': myownusername
-Password for 'https://capistrano@github.com':
+Username for 'https://github.com': myownusername
+Password for 'https://capistrano@github.com':
This challenge response prompt doesn't work well for automating things, so @@ -431,7 +431,7 @@ access that you may or may not need depending how well your servers are setup:
me@localhost $ ssh root@remote
# Capistrano will use /var/www/....... where ... is the value set in
-# :application, you can override this by setting the ':deploy_to' variable
+# :application, you can override this by setting the ':deploy_to' variable
root@remote $ deploy_to=/var/www/rails3-bootstrap-devise-cancan-demo
root@remote $ mkdir ${deploy_to}
root@remote $ chown deploy:deploy ${deploy_to}
@@ -520,7 +520,7 @@ quits or gets fired, you can remove their key from that file, and the rest of
you can keep on shipping!
- me@localhost $ ssh-keygen -t rsa -C 'me@my_email_address.com'
+ me@localhost $ ssh-keygen -t rsa -C 'me@my_email_address.com'
You'll be prompted for a passphrase, that's fine. Type one and keep it safe.
@@ -598,7 +598,7 @@ use the same key for each one, but only one key per developer is recommended.
If we did all that correctly, we should now be able to do something like this:
- me@localhost $ ssh deploy@one-of-my-servers.com 'hostname; uptime'
+ me@localhost $ ssh deploy@one-of-my-servers.com 'hostname; uptime'
one-of-my-servers.com
19:23:32 up 62 days, 44 min, 1 user, load average: 0.00, 0.01, 0.05
@@ -658,9 +658,9 @@ Tutorials project.
# List SSH keys that are loaded into the agent
me@localhost $ ssh-add -l
-# Make sure they key is loaded if 'ssh-add -l' didn't show anything
+# Make sure they key is loaded if 'ssh-add -l' didn't show anything
me@localhost $ ssh-add
-me@localhost $ ssh -A deploy@one-of-my-servers.com 'git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git
+me@localhost $ ssh -A deploy@one-of-my-servers.com 'git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git
We first check that the agent has the keys loaded. If not we simply load it
@@ -678,7 +678,7 @@ it both ways just to know how your system treats agent forwarding by default.
me@localhost $ git ls-remote https://github.com/capistrano/rails3-bootstrap-devise-cancan.git
-Username for 'https://github.com': myownusername
-Password for 'https://capistrano@github.com':
+Username for 'https://github.com': myownusername
+Password for 'https://capistrano@github.com':
This challenge response prompt doesn't work well for automating things, so
@@ -791,7 +791,7 @@ access that you may or may not need depending how well your servers are setup:
me@localhost $ ssh root@remote
# Capistrano will use /var/www/....... where ... is the value set in
-# :application, you can override this by setting the ':deploy_to' variable
+# :application, you can override this by setting the ':deploy_to' variable
root@remote $ deploy_to=/var/www/rails3-bootstrap-devise-cancan-demo
root@remote $ mkdir ${deploy_to}
root@remote $ chown deploy:deploy ${deploy_to}
diff --git a/_site/documentation/getting-started/cold-start/index.html b/_site/documentation/getting-started/cold-start/index.html
index 28268c5f..602b267a 100644
--- a/_site/documentation/getting-started/cold-start/index.html
+++ b/_site/documentation/getting-started/cold-start/index.html
@@ -127,7 +127,7 @@ technologies.
1. Checking the directory structure on the remote machine:
- me@localhost $ ssh deploy@remote 'ls -lR /var/www/my-application'
+ me@localhost $ ssh deploy@remote 'ls -lR /var/www/my-application'
my-application:
total 8
drwxrwsr-x 2 deploy deploy 4096 Jun 24 20:55 releases
@@ -229,7 +229,7 @@ DEBUG [118bd3e4] Command: /usr/bin/env chmod +x /tmp/git-ssh.sh
INFO [118bd3e4] Finished in 0.049 seconds command successful.
INFO [a996463f] Running /usr/bin/env git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git on harrow
DEBUG [a996463f] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/git-ssh.sh /usr/bin/env git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git )
-DEBUG [a996463f] Warning: Permanently added 'github.com,204.232.175.90' (RSA) to the list of known hosts.
+DEBUG [a996463f] Warning: Permanently added 'github.com,204.232.175.90' (RSA) to the list of known hosts.
DEBUG [a996463f] Permission denied (publickey).
DEBUG [a996463f] fatal: The remote end hung up unexpectedly
cap aborted!
@@ -295,7 +295,7 @@ DEBUG [f1269276] Finished in 0.453 seconds command successful.
If you don't feel like writing a Capistrano task, one could simply do:
- me@localhost $ ssh -A example.com 'env | grep SSH_AUTH_SOCK'
+ me@localhost $ ssh -A example.com 'env | grep SSH_AUTH_SOCK'
SSH_AUTH_SOCK=/tmp/ssh-Tb6X8V53tm/agent.2934
@@ -347,7 +347,7 @@ technologies.
1. Checking the directory structure on the remote machine:
- me@localhost $ ssh deploy@remote 'ls -lR /var/www/my-application'
+ me@localhost $ ssh deploy@remote 'ls -lR /var/www/my-application'
my-application:
total 8
drwxrwsr-x 2 deploy deploy 4096 Jun 24 20:55 releases
@@ -449,7 +449,7 @@ DEBUG [118bd3e4] Command: /usr/bin/env chmod +x /tmp/git-ssh.sh
INFO [118bd3e4] Finished in 0.049 seconds command successful.
INFO [a996463f] Running /usr/bin/env git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git on harrow
DEBUG [a996463f] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/git-ssh.sh /usr/bin/env git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git )
-DEBUG [a996463f] Warning: Permanently added 'github.com,204.232.175.90' (RSA) to the list of known hosts.
+DEBUG [a996463f] Warning: Permanently added 'github.com,204.232.175.90' (RSA) to the list of known hosts.
DEBUG [a996463f] Permission denied (publickey).
DEBUG [a996463f] fatal: The remote end hung up unexpectedly
cap aborted!
@@ -515,7 +515,7 @@ DEBUG [f1269276] Finished in 0.453 seconds command successful.
If you don't feel like writing a Capistrano task, one could simply do:
- me@localhost $ ssh -A example.com 'env | grep SSH_AUTH_SOCK'
+ me@localhost $ ssh -A example.com 'env | grep SSH_AUTH_SOCK'
SSH_AUTH_SOCK=/tmp/ssh-Tb6X8V53tm/agent.2934
diff --git a/_site/documentation/getting-started/flow/index.html b/_site/documentation/getting-started/flow/index.html
index 50b2af62..d2934042 100644
--- a/_site/documentation/getting-started/flow/index.html
+++ b/_site/documentation/getting-started/flow/index.html
@@ -155,11 +155,11 @@ cleanup process is usually different from deploy flow.
# Capfile
-require 'capistrano/setup'
-require 'capistrano/deploy'
-require 'capistrano/bundler'
-require 'capistrano/rails/migrations'
-require 'capistrano/rails/assets'
+require 'capistrano/setup'
+require 'capistrano/deploy'
+require 'capistrano/bundler'
+require 'capistrano/rails/migrations'
+require 'capistrano/rails/assets'
When you run cap production deploy
, it runs these tasks:
@@ -273,11 +273,11 @@ cleanup process is usually different from deploy flow.
# Capfile
-require 'capistrano/setup'
-require 'capistrano/deploy'
-require 'capistrano/bundler'
-require 'capistrano/rails/migrations'
-require 'capistrano/rails/assets'
+require 'capistrano/setup'
+require 'capistrano/deploy'
+require 'capistrano/bundler'
+require 'capistrano/rails/migrations'
+require 'capistrano/rails/assets'
When you run cap production deploy
, it runs these tasks:
diff --git a/_site/documentation/getting-started/installation/index.html b/_site/documentation/getting-started/installation/index.html
index ba7d5028..9c094daf 100644
--- a/_site/documentation/getting-started/installation/index.html
+++ b/_site/documentation/getting-started/installation/index.html
@@ -168,7 +168,7 @@ gems)
group :development do
- gem 'capistrano-rails', '~> 0.0.7'
+ gem 'capistrano-rails', '~> 0.0.7'
end
@@ -194,9 +194,9 @@ part, to get the best, and most sensible results, simply require
th
files:
- require 'capistrano/rails/assets'
-require 'capistrano/rails/gem-bundler'
-require 'capistrano/rails/database-migrations'
+ require 'capistrano/rails/assets'
+require 'capistrano/rails/gem-bundler'
+require 'capistrano/rails/database-migrations'
@@ -207,7 +207,7 @@ by mistake, then you can lock your Gem version for Capistrano at something
like:
- gem 'capistrano', '~> 2.15' # Or whatever patch release you are using
+ gem 'capistrano', '~> 2.15' # Or whatever patch release you are using
This is the pessimistic operator which
@@ -286,7 +286,7 @@ gems)
group :development do
- gem 'capistrano-rails', '~> 0.0.7'
+ gem 'capistrano-rails', '~> 0.0.7'
end
@@ -312,9 +312,9 @@ part, to get the best, and most sensible results, simply require
th
files:
- require 'capistrano/rails/assets'
-require 'capistrano/rails/gem-bundler'
-require 'capistrano/rails/database-migrations'
+ require 'capistrano/rails/assets'
+require 'capistrano/rails/gem-bundler'
+require 'capistrano/rails/database-migrations'
@@ -325,7 +325,7 @@ by mistake, then you can lock your Gem version for Capistrano at something
like:
- gem 'capistrano', '~> 2.15' # Or whatever patch release you are using
+ gem 'capistrano', '~> 2.15' # Or whatever patch release you are using
This is the pessimistic operator which
diff --git a/_site/documentation/getting-started/preparing-your-application/index.html b/_site/documentation/getting-started/preparing-your-application/index.html
index f7f6fab7..96935e3f 100644
--- a/_site/documentation/getting-started/preparing-your-application/index.html
+++ b/_site/documentation/getting-started/preparing-your-application/index.html
@@ -212,7 +212,7 @@ role :db, %w{example.com}
# definition into the server list. The second argument
# is something that quacks like a hash and can be used
# to set extended properties on the server.
-server 'example.com', roles: %w{web app}, my_property: :my_value
+server 'example.com', roles: %w{web app}, my_property: :my_value
# set :rails_env, :staging
@@ -237,8 +237,8 @@ server line after the comment:
role :all, %w{hello@world.com example.com:1234}
# ...is the same as doing...
-server 'world.com' roles: [:web], user: 'hello'
-server 'example.com', roles: [:web], port: 1234
+server 'world.com' roles: [:web], user: 'hello'
+server 'example.com', roles: [:web], port: 1234
5. Set the shared information in deploy.rb
.
@@ -252,8 +252,8 @@ self-documenting, commented-out configuration options, feel free to play with
them a little:
- set :application, 'my app name'
-set :repo_url, 'git@example.com:me/my_repo.git'
+ set :application, 'my app name'
+set :repo_url, 'git@example.com:me/my_repo.git'
ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }
@@ -275,9 +275,9 @@ forked to the Capistrano repository, but you can find the (unchanged) original
here.
- set :application, 'rails3-bootstrap-devise-cancan-demo'
-set :repo_url, 'https://github.com/capistrano/rails3-bootstrap-devise-cancan'
-set :branch, 'master'
+ set :application, 'rails3-bootstrap-devise-cancan-demo'
+set :repo_url, 'https://github.com/capistrano/rails3-bootstrap-devise-cancan'
+set :branch, 'master'
I've simplified the :branch
variable to simply be a set
variable, not a
@@ -404,7 +404,7 @@ role :db, %w{example.com}
# definition into the server list. The second argument
# is something that quacks like a hash and can be used
# to set extended properties on the server.
-server 'example.com', roles: %w{web app}, my_property: :my_value
+server 'example.com', roles: %w{web app}, my_property: :my_value
# set :rails_env, :staging
@@ -429,8 +429,8 @@ server line after the comment:
role :all, %w{hello@world.com example.com:1234}
# ...is the same as doing...
-server 'world.com' roles: [:web], user: 'hello'
-server 'example.com', roles: [:web], port: 1234
+server 'world.com' roles: [:web], user: 'hello'
+server 'example.com', roles: [:web], port: 1234
5. Set the shared information in deploy.rb
.
@@ -444,8 +444,8 @@ self-documenting, commented-out configuration options, feel free to play with
them a little:
- set :application, 'my app name'
-set :repo_url, 'git@example.com:me/my_repo.git'
+ set :application, 'my app name'
+set :repo_url, 'git@example.com:me/my_repo.git'
ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }
@@ -467,9 +467,9 @@ forked to the Capistrano repository, but you can find the (unchanged) original
here.
- set :application, 'rails3-bootstrap-devise-cancan-demo'
-set :repo_url, 'https://github.com/capistrano/rails3-bootstrap-devise-cancan'
-set :branch, 'master'
+ set :application, 'rails3-bootstrap-devise-cancan-demo'
+set :repo_url, 'https://github.com/capistrano/rails3-bootstrap-devise-cancan'
+set :branch, 'master'
I've simplified the :branch
variable to simply be a set
variable, not a
diff --git a/_site/documentation/overview/what-is-capistrano/index.html b/_site/documentation/overview/what-is-capistrano/index.html
index 64b08f3e..d218b319 100644
--- a/_site/documentation/overview/what-is-capistrano/index.html
+++ b/_site/documentation/overview/what-is-capistrano/index.html
@@ -217,7 +217,7 @@ task :ditty do
# we can reflect on the `host` object passed to the block
# and use the `info` logger method to benefit from the
# output formatter that is selected.
- uptime = capture('uptime')
+ uptime = capture('uptime')
if host.roles.include?(:web)
info "Your webserver #{host} has uptime: #{uptime}"
end
@@ -228,8 +228,8 @@ task :ditty do
# and move the process into a directoy, executing arbitrary tasks
# such as letting Rails do some heavy lifting.
with({:rails_env => :production}) do
- within('/var/www/my/rails/app') do
- execute :rails, :runner, 'MyModel.something'
+ within('/var/www/my/rails/app') do
+ execute :rails, :runner, 'MyModel.something'
end
end
end
@@ -238,8 +238,8 @@ task :ditty do
# We can even switch users, provided we have support on the remote
# server for switching to that user without being prompted for a
# passphrase.
- as 'postgres' do
- widgets = capture "echo 'SELECT * FROM widgets;' | psql my_database"
+ as 'postgres' do
+ widgets = capture "echo 'SELECT * FROM widgets;' | psql my_database"
if widgets.to_i < 50
warn "There are fewer than 50 widgets in the database on #{host}!"
end
@@ -249,7 +249,7 @@ task :ditty do
on roles(:all) do
# We can even use `test` the way the Unix gods intended
if test("[ -d /some/directory ]")
- info "Phew, it's ok, the directory exists!"
+ info "Phew, it's ok, the directory exists!"
end
end
@@ -373,7 +373,7 @@ task :ditty do
# we can reflect on the `host` object passed to the block
# and use the `info` logger method to benefit from the
# output formatter that is selected.
- uptime = capture('uptime')
+ uptime = capture('uptime')
if host.roles.include?(:web)
info "Your webserver #{host} has uptime: #{uptime}"
end
@@ -384,8 +384,8 @@ task :ditty do
# and move the process into a directoy, executing arbitrary tasks
# such as letting Rails do some heavy lifting.
with({:rails_env => :production}) do
- within('/var/www/my/rails/app') do
- execute :rails, :runner, 'MyModel.something'
+ within('/var/www/my/rails/app') do
+ execute :rails, :runner, 'MyModel.something'
end
end
end
@@ -394,8 +394,8 @@ task :ditty do
# We can even switch users, provided we have support on the remote
# server for switching to that user without being prompted for a
# passphrase.
- as 'postgres' do
- widgets = capture "echo 'SELECT * FROM widgets;' | psql my_database"
+ as 'postgres' do
+ widgets = capture "echo 'SELECT * FROM widgets;' | psql my_database"
if widgets.to_i < 50
warn "There are fewer than 50 widgets in the database on #{host}!"
end
@@ -405,7 +405,7 @@ task :ditty do
on roles(:all) do
# We can even use `test` the way the Unix gods intended
if test("[ -d /some/directory ]")
- info "Phew, it's ok, the directory exists!"
+ info "Phew, it's ok, the directory exists!"
end
end