1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

Fixing version of jekyll

This commit is contained in:
Kir Shatrov 2013-08-19 00:37:50 +04:00
parent 781271c95c
commit 3f33beedb4
11 changed files with 98 additions and 96 deletions

View file

@ -1,7 +1,7 @@
source "https://rubygems.org" source "https://rubygems.org"
gem "debugger" gem "debugger"
gem "jekyll" gem "jekyll", "~> 1.1.2"
gem "redcarpet" gem "redcarpet"
gem "unindent" gem "unindent"
gem "git" gem "git"

View file

@ -17,18 +17,19 @@ GEM
fast-stemmer (1.0.2) fast-stemmer (1.0.2)
git (1.2.5) git (1.2.5)
highline (1.6.19) highline (1.6.19)
jekyll (1.0.2) jekyll (1.1.2)
classifier (~> 1.3) classifier (~> 1.3)
colorator (~> 0.1) colorator (~> 0.1)
commander (~> 4.1.3) commander (~> 4.1.3)
directory_watcher (~> 1.4.1) directory_watcher (~> 1.4.1)
kramdown (~> 1.0.2) kramdown (~> 1.0.2)
liquid (~> 2.3) liquid (~> 2.5.1)
maruku (~> 0.5) maruku (~> 0.5)
pygments.rb (~> 0.5.0) pygments.rb (~> 0.5.0)
redcarpet (~> 2.2.2)
safe_yaml (~> 0.7.0) safe_yaml (~> 0.7.0)
kramdown (1.0.2) kramdown (1.0.2)
liquid (2.5.0) liquid (2.5.1)
maruku (0.6.1) maruku (0.6.1)
syntax (>= 1.0.0) syntax (>= 1.0.0)
posix-spawn (0.3.6) posix-spawn (0.3.6)
@ -47,6 +48,6 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
debugger debugger
git git
jekyll jekyll (~> 1.1.2)
redcarpet redcarpet
unindent unindent

View file

@ -1,7 +1,7 @@
source "https://rubygems.org" source "https://rubygems.org"
gem "debugger" gem "debugger"
gem "jekyll" gem "jekyll", "~> 1.1.2"
gem "redcarpet" gem "redcarpet"
gem "unindent" gem "unindent"
gem "git" gem "git"

View file

@ -17,18 +17,19 @@ GEM
fast-stemmer (1.0.2) fast-stemmer (1.0.2)
git (1.2.5) git (1.2.5)
highline (1.6.19) highline (1.6.19)
jekyll (1.0.2) jekyll (1.1.2)
classifier (~> 1.3) classifier (~> 1.3)
colorator (~> 0.1) colorator (~> 0.1)
commander (~> 4.1.3) commander (~> 4.1.3)
directory_watcher (~> 1.4.1) directory_watcher (~> 1.4.1)
kramdown (~> 1.0.2) kramdown (~> 1.0.2)
liquid (~> 2.3) liquid (~> 2.5.1)
maruku (~> 0.5) maruku (~> 0.5)
pygments.rb (~> 0.5.0) pygments.rb (~> 0.5.0)
redcarpet (~> 2.2.2)
safe_yaml (~> 0.7.0) safe_yaml (~> 0.7.0)
kramdown (1.0.2) kramdown (1.0.2)
liquid (2.5.0) liquid (2.5.1)
maruku (0.6.1) maruku (0.6.1)
syntax (>= 1.0.0) syntax (>= 1.0.0)
posix-spawn (0.3.6) posix-spawn (0.3.6)
@ -47,6 +48,6 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
debugger debugger
git git
jekyll jekyll (~> 1.1.2)
redcarpet redcarpet
unindent unindent

View file

@ -170,9 +170,9 @@ what happens:</p>
<div> <div>
<pre data-line=''><code class='language-bash'>me@localhost $ ssh me@remote <pre data-line=''><code class='language-bash'>me@localhost $ ssh me@remote
me@remote $ [[ $- == *i* ]] &amp;&amp; echo &#39;Interactive&#39; || echo &#39;Not interactive&#39; me@remote $ [[ $- == *i* ]] &amp;&amp; echo 'Interactive' || echo 'Not interactive'
Interactive Interactive
me@remote $ shopt -q login_shell &amp;&amp; echo &#39;Login shell&#39; || echo &#39;Not login shell&#39; me@remote $ shopt -q login_shell &amp;&amp; echo 'Login shell' || echo 'Not login shell'
Login shell</code></pre> Login shell</code></pre>
</div> </div>
@ -180,9 +180,9 @@ Login shell</code></pre>
command line without logging in first...</p> command line without logging in first...</p>
<div> <div>
<pre data-line=''><code class='language-bash'>me@localhost $ ssh me@remote &quot;[[ $- == *i* ]] &amp;&amp; echo &#39;Interactive&#39; || echo &#39;Not interactive&#39;&quot; <pre data-line=''><code class='language-bash'>me@localhost $ ssh me@remote &quot;[[ $- == *i* ]] &amp;&amp; echo 'Interactive' || echo 'Not interactive'&quot;
Interactive Interactive
me@localhost $ ssh me@remote &quot;shopt -q login_shell &amp;&amp; echo &#39;Login shell&#39; || echo &#39;Not login shell&#39;&quot; me@localhost $ ssh me@remote &quot;shopt -q login_shell &amp;&amp; echo 'Login shell' || echo 'Not login shell'&quot;
Not login shell</code></pre> Not login shell</code></pre>
</div> </div>
@ -197,13 +197,13 @@ recipes to test this:</p>
<div> <div>
<pre data-line=''><code class='language-ruby'># Capistrano 3.0.x <pre data-line=''><code class='language-ruby'># Capistrano 3.0.x
task :query_interactive do task :query_interactive do
on &#39;me@remote&#39; do on 'me@remote' do
info capture(&quot;[[ $- == *i* ]] &amp;&amp; echo &#39;Interactive&#39; || echo &#39;Not interactive&#39;&quot;) info capture(&quot;[[ $- == *i* ]] &amp;&amp; echo 'Interactive' || echo 'Not interactive'&quot;)
end end
end end
task :query_login do task :query_login do
on &#39;me@remote&#39; do on 'me@remote' do
info capture(&quot;shopt -q login_shell &amp;&amp; echo &#39;Login shell&#39; || echo &#39;Not login shell&#39;&quot;) info capture(&quot;shopt -q login_shell &amp;&amp; echo 'Login shell' || echo 'Not login shell'&quot;)
end end
end</code></pre> end</code></pre>
</div> </div>
@ -298,9 +298,9 @@ what happens:</p>
<div> <div>
<pre data-line=''><code class='language-bash'>me@localhost $ ssh me@remote <pre data-line=''><code class='language-bash'>me@localhost $ ssh me@remote
me@remote $ [[ $- == *i* ]] &amp;&amp; echo &#39;Interactive&#39; || echo &#39;Not interactive&#39; me@remote $ [[ $- == *i* ]] &amp;&amp; echo 'Interactive' || echo 'Not interactive'
Interactive Interactive
me@remote $ shopt -q login_shell &amp;&amp; echo &#39;Login shell&#39; || echo &#39;Not login shell&#39; me@remote $ shopt -q login_shell &amp;&amp; echo 'Login shell' || echo 'Not login shell'
Login shell</code></pre> Login shell</code></pre>
</div> </div>
@ -308,9 +308,9 @@ Login shell</code></pre>
command line without logging in first...</p> command line without logging in first...</p>
<div> <div>
<pre data-line=''><code class='language-bash'>me@localhost $ ssh me@remote &quot;[[ $- == *i* ]] &amp;&amp; echo &#39;Interactive&#39; || echo &#39;Not interactive&#39;&quot; <pre data-line=''><code class='language-bash'>me@localhost $ ssh me@remote &quot;[[ $- == *i* ]] &amp;&amp; echo 'Interactive' || echo 'Not interactive'&quot;
Interactive Interactive
me@localhost $ ssh me@remote &quot;shopt -q login_shell &amp;&amp; echo &#39;Login shell&#39; || echo &#39;Not login shell&#39;&quot; me@localhost $ ssh me@remote &quot;shopt -q login_shell &amp;&amp; echo 'Login shell' || echo 'Not login shell'&quot;
Not login shell</code></pre> Not login shell</code></pre>
</div> </div>
@ -325,13 +325,13 @@ recipes to test this:</p>
<div> <div>
<pre data-line=''><code class='language-ruby'># Capistrano 3.0.x <pre data-line=''><code class='language-ruby'># Capistrano 3.0.x
task :query_interactive do task :query_interactive do
on &#39;me@remote&#39; do on 'me@remote' do
info capture(&quot;[[ $- == *i* ]] &amp;&amp; echo &#39;Interactive&#39; || echo &#39;Not interactive&#39;&quot;) info capture(&quot;[[ $- == *i* ]] &amp;&amp; echo 'Interactive' || echo 'Not interactive'&quot;)
end end
end end
task :query_login do task :query_login do
on &#39;me@remote&#39; do on 'me@remote' do
info capture(&quot;shopt -q login_shell &amp;&amp; echo &#39;Login shell&#39; || echo &#39;Not login shell&#39;&quot;) info capture(&quot;shopt -q login_shell &amp;&amp; echo 'Login shell' || echo 'Not login shell'&quot;)
end end
end</code></pre> end</code></pre>
</div> </div>

View file

@ -160,7 +160,7 @@ quits or gets fired, you can remove their key from that file, and the rest of
you can keep on shipping!</p> you can keep on shipping!</p>
<div> <div>
<pre data-line=''><code class='language-bash'>me@localhost $ ssh-keygen -t rsa -C &#39;me@my_email_address.com&#39;</code></pre> <pre data-line=''><code class='language-bash'>me@localhost $ ssh-keygen -t rsa -C 'me@my_email_address.com'</code></pre>
</div> </div>
<p>You&#39;ll be prompted for a passphrase, that&#39;s fine. Type one and keep it safe. <p>You&#39;ll be prompted for a passphrase, that&#39;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.
<p>If we did all that correctly, we should now be able to do something like this:</p> <p>If we did all that correctly, we should now be able to do something like this:</p>
<div> <div>
<pre data-line=''><code class='language-bash'>me@localhost $ ssh deploy@one-of-my-servers.com &#39;hostname; uptime&#39; <pre data-line=''><code class='language-bash'>me@localhost $ ssh deploy@one-of-my-servers.com 'hostname; uptime'
one-of-my-servers.com one-of-my-servers.com
19:23:32 up 62 days, 44 min, 1 user, load average: 0.00, 0.01, 0.05</code></pre> 19:23:32 up 62 days, 44 min, 1 user, load average: 0.00, 0.01, 0.05</code></pre>
</div> </div>
@ -298,9 +298,9 @@ Tutorials project.</p>
<div> <div>
<pre data-line=''><code class='language-bash'># List SSH keys that are loaded into the agent <pre data-line=''><code class='language-bash'># List SSH keys that are loaded into the agent
me@localhost $ ssh-add -l me@localhost $ ssh-add -l
# Make sure they key is loaded if &#39;ssh-add -l&#39; didn&#39;t show anything # Make sure they key is loaded if 'ssh-add -l' didn't show anything
me@localhost $ ssh-add me@localhost $ ssh-add
me@localhost $ ssh -A deploy@one-of-my-servers.com &#39;git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git</code></pre> me@localhost $ ssh -A deploy@one-of-my-servers.com 'git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git</code></pre>
</div> </div>
<p>We first check that the agent has the keys loaded. If not we simply load it <p>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.</p
specified on a per-host basis in a configuration file. specified on a per-host basis in a configuration file.
Agent forwarding should be enabled with caution. Users with the ability to Agent forwarding should be enabled with caution. Users with the ability to
bypass file permissions on the remote host (for the agent&#39;s UNIX-domain bypass file permissions on the remote host (for the agent's UNIX-domain
socket) can access the local agent through the forwarded connection. An socket) can access the local agent through the forwarded connection. An
attacker cannot obtain key material from the agent, however they can perform attacker cannot obtain key material from the agent, however they can perform
operations on the keys that enable them to authenticate using the identities operations on the keys that enable them to authenticate using the identities
@ -344,8 +344,8 @@ Github, we&#39;ll be prompted for a username and password:</p>
<div> <div>
<pre data-line=''><code class='language-bash'>me@localhost $ git ls-remote https://github.com/capistrano/rails3-bootstrap-devise-cancan.git <pre data-line=''><code class='language-bash'>me@localhost $ git ls-remote https://github.com/capistrano/rails3-bootstrap-devise-cancan.git
Username for &#39;https://github.com&#39;: myownusername Username for 'https://github.com': myownusername
Password for &#39;https://capistrano@github.com&#39;:</code></pre> Password for 'https://capistrano@github.com':</code></pre>
</div> </div>
<p>This challenge response prompt doesn&#39;t work well for automating things, so <p>This challenge response prompt doesn&#39;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:</
<div> <div>
<pre data-line=''><code class='language-bash'>me@localhost $ ssh root@remote <pre data-line=''><code class='language-bash'>me@localhost $ ssh root@remote
# Capistrano will use /var/www/....... where ... is the value set in # Capistrano will use /var/www/....... where ... is the value set in
# :application, you can override this by setting the &#39;:deploy_to&#39; 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 $ deploy_to=/var/www/rails3-bootstrap-devise-cancan-demo
root@remote $ mkdir ${deploy_to} root@remote $ mkdir ${deploy_to}
root@remote $ chown deploy:deploy ${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!</p> you can keep on shipping!</p>
<div> <div>
<pre data-line=''><code class='language-bash'>me@localhost $ ssh-keygen -t rsa -C &#39;me@my_email_address.com&#39;</code></pre> <pre data-line=''><code class='language-bash'>me@localhost $ ssh-keygen -t rsa -C 'me@my_email_address.com'</code></pre>
</div> </div>
<p>You&#39;ll be prompted for a passphrase, that&#39;s fine. Type one and keep it safe. <p>You&#39;ll be prompted for a passphrase, that&#39;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.
<p>If we did all that correctly, we should now be able to do something like this:</p> <p>If we did all that correctly, we should now be able to do something like this:</p>
<div> <div>
<pre data-line=''><code class='language-bash'>me@localhost $ ssh deploy@one-of-my-servers.com &#39;hostname; uptime&#39; <pre data-line=''><code class='language-bash'>me@localhost $ ssh deploy@one-of-my-servers.com 'hostname; uptime'
one-of-my-servers.com one-of-my-servers.com
19:23:32 up 62 days, 44 min, 1 user, load average: 0.00, 0.01, 0.05</code></pre> 19:23:32 up 62 days, 44 min, 1 user, load average: 0.00, 0.01, 0.05</code></pre>
</div> </div>
@ -658,9 +658,9 @@ Tutorials project.</p>
<div> <div>
<pre data-line=''><code class='language-bash'># List SSH keys that are loaded into the agent <pre data-line=''><code class='language-bash'># List SSH keys that are loaded into the agent
me@localhost $ ssh-add -l me@localhost $ ssh-add -l
# Make sure they key is loaded if &#39;ssh-add -l&#39; didn&#39;t show anything # Make sure they key is loaded if 'ssh-add -l' didn't show anything
me@localhost $ ssh-add me@localhost $ ssh-add
me@localhost $ ssh -A deploy@one-of-my-servers.com &#39;git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git</code></pre> me@localhost $ ssh -A deploy@one-of-my-servers.com 'git ls-remote git@github.com:capistrano/rails3-bootstrap-devise-cancan.git</code></pre>
</div> </div>
<p>We first check that the agent has the keys loaded. If not we simply load it <p>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.</p
specified on a per-host basis in a configuration file. specified on a per-host basis in a configuration file.
Agent forwarding should be enabled with caution. Users with the ability to Agent forwarding should be enabled with caution. Users with the ability to
bypass file permissions on the remote host (for the agent&#39;s UNIX-domain bypass file permissions on the remote host (for the agent's UNIX-domain
socket) can access the local agent through the forwarded connection. An socket) can access the local agent through the forwarded connection. An
attacker cannot obtain key material from the agent, however they can perform attacker cannot obtain key material from the agent, however they can perform
operations on the keys that enable them to authenticate using the identities operations on the keys that enable them to authenticate using the identities
@ -704,8 +704,8 @@ Github, we&#39;ll be prompted for a username and password:</p>
<div> <div>
<pre data-line=''><code class='language-bash'>me@localhost $ git ls-remote https://github.com/capistrano/rails3-bootstrap-devise-cancan.git <pre data-line=''><code class='language-bash'>me@localhost $ git ls-remote https://github.com/capistrano/rails3-bootstrap-devise-cancan.git
Username for &#39;https://github.com&#39;: myownusername Username for 'https://github.com': myownusername
Password for &#39;https://capistrano@github.com&#39;:</code></pre> Password for 'https://capistrano@github.com':</code></pre>
</div> </div>
<p>This challenge response prompt doesn&#39;t work well for automating things, so <p>This challenge response prompt doesn&#39;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:</
<div> <div>
<pre data-line=''><code class='language-bash'>me@localhost $ ssh root@remote <pre data-line=''><code class='language-bash'>me@localhost $ ssh root@remote
# Capistrano will use /var/www/....... where ... is the value set in # Capistrano will use /var/www/....... where ... is the value set in
# :application, you can override this by setting the &#39;:deploy_to&#39; 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 $ deploy_to=/var/www/rails3-bootstrap-devise-cancan-demo
root@remote $ mkdir ${deploy_to} root@remote $ mkdir ${deploy_to}
root@remote $ chown deploy:deploy ${deploy_to} root@remote $ chown deploy:deploy ${deploy_to}

View file

@ -127,7 +127,7 @@ technologies.</p>
<h3 id="toc_0">1. Checking the directory structure on the remote machine:</h3> <h3 id="toc_0">1. Checking the directory structure on the remote machine:</h3>
<div> <div>
<pre data-line=''><code class='language-bash'>me@localhost $ ssh deploy@remote &#39;ls -lR /var/www/my-application&#39; <pre data-line=''><code class='language-bash'>me@localhost $ ssh deploy@remote 'ls -lR /var/www/my-application'
my-application: my-application:
total 8 total 8
drwxrwsr-x 2 deploy deploy 4096 Jun 24 20:55 releases 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 [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 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] 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 &#39;github.com,204.232.175.90&#39; (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] Permission denied (publickey).
DEBUG [a996463f] fatal: The remote end hung up unexpectedly DEBUG [a996463f] fatal: The remote end hung up unexpectedly
cap aborted! cap aborted!
@ -295,7 +295,7 @@ DEBUG [f1269276] Finished in 0.453 seconds command successful.
<p>If you don&#39;t feel like writing a Capistrano task, one could simply do:</p> <p>If you don&#39;t feel like writing a Capistrano task, one could simply do:</p>
<div> <div>
<pre data-line=''><code class='language-bash'>me@localhost $ ssh -A example.com &#39;env | grep SSH_AUTH_SOCK&#39; <pre data-line=''><code class='language-bash'>me@localhost $ ssh -A example.com 'env | grep SSH_AUTH_SOCK'
SSH_AUTH_SOCK=/tmp/ssh-Tb6X8V53tm/agent.2934</code></pre> SSH_AUTH_SOCK=/tmp/ssh-Tb6X8V53tm/agent.2934</code></pre>
</div> </div>
@ -347,7 +347,7 @@ technologies.</p>
<h3 id="toc_0">1. Checking the directory structure on the remote machine:</h3> <h3 id="toc_0">1. Checking the directory structure on the remote machine:</h3>
<div> <div>
<pre data-line=''><code class='language-bash'>me@localhost $ ssh deploy@remote &#39;ls -lR /var/www/my-application&#39; <pre data-line=''><code class='language-bash'>me@localhost $ ssh deploy@remote 'ls -lR /var/www/my-application'
my-application: my-application:
total 8 total 8
drwxrwsr-x 2 deploy deploy 4096 Jun 24 20:55 releases 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 [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 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] 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 &#39;github.com,204.232.175.90&#39; (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] Permission denied (publickey).
DEBUG [a996463f] fatal: The remote end hung up unexpectedly DEBUG [a996463f] fatal: The remote end hung up unexpectedly
cap aborted! cap aborted!
@ -515,7 +515,7 @@ DEBUG [f1269276] Finished in 0.453 seconds command successful.
<p>If you don&#39;t feel like writing a Capistrano task, one could simply do:</p> <p>If you don&#39;t feel like writing a Capistrano task, one could simply do:</p>
<div> <div>
<pre data-line=''><code class='language-bash'>me@localhost $ ssh -A example.com &#39;env | grep SSH_AUTH_SOCK&#39; <pre data-line=''><code class='language-bash'>me@localhost $ ssh -A example.com 'env | grep SSH_AUTH_SOCK'
SSH_AUTH_SOCK=/tmp/ssh-Tb6X8V53tm/agent.2934</code></pre> SSH_AUTH_SOCK=/tmp/ssh-Tb6X8V53tm/agent.2934</code></pre>
</div> </div>

View file

@ -155,11 +155,11 @@ cleanup process is usually different from deploy flow.</p>
<div> <div>
<pre data-line=''><code class='language-ruby'># Capfile <pre data-line=''><code class='language-ruby'># Capfile
require &#39;capistrano/setup&#39; require 'capistrano/setup'
require &#39;capistrano/deploy&#39; require 'capistrano/deploy'
require &#39;capistrano/bundler&#39; require 'capistrano/bundler'
require &#39;capistrano/rails/migrations&#39; require 'capistrano/rails/migrations'
require &#39;capistrano/rails/assets&#39;</code></pre> require 'capistrano/rails/assets'</code></pre>
</div> </div>
<p>When you run <code>cap production deploy</code>, it runs these tasks:</p> <p>When you run <code>cap production deploy</code>, it runs these tasks:</p>
@ -273,11 +273,11 @@ cleanup process is usually different from deploy flow.</p>
<div> <div>
<pre data-line=''><code class='language-ruby'># Capfile <pre data-line=''><code class='language-ruby'># Capfile
require &#39;capistrano/setup&#39; require 'capistrano/setup'
require &#39;capistrano/deploy&#39; require 'capistrano/deploy'
require &#39;capistrano/bundler&#39; require 'capistrano/bundler'
require &#39;capistrano/rails/migrations&#39; require 'capistrano/rails/migrations'
require &#39;capistrano/rails/assets&#39;</code></pre> require 'capistrano/rails/assets'</code></pre>
</div> </div>
<p>When you run <code>cap production deploy</code>, it runs these tasks:</p> <p>When you run <code>cap production deploy</code>, it runs these tasks:</p>

View file

@ -168,7 +168,7 @@ gems</a>)</p>
<div> <div>
<pre data-line=''><code class='language-ruby'>group :development do <pre data-line=''><code class='language-ruby'>group :development do
gem &#39;capistrano-rails&#39;, &#39;~&gt; 0.0.7&#39; gem 'capistrano-rails', '~&gt; 0.0.7'
end</code></pre> end</code></pre>
</div> </div>
@ -194,9 +194,9 @@ part, to get the best, and most sensible results, simply <code>require</code> th
files:</p> files:</p>
<div> <div>
<pre data-line=''><code class='language-ruby'>require &#39;capistrano/rails/assets&#39; <pre data-line=''><code class='language-ruby'>require 'capistrano/rails/assets'
require &#39;capistrano/rails/gem-bundler&#39; require 'capistrano/rails/gem-bundler'
require &#39;capistrano/rails/database-migrations&#39;</code></pre> require 'capistrano/rails/database-migrations'</code></pre>
</div> </div>
<div class="alert alert-info"> <div class="alert alert-info">
@ -207,7 +207,7 @@ by mistake, then you can lock your Gem version for Capistrano at something
like: like:
<div> <div>
<pre data-line=''><code class='language-ruby'>gem &#39;capistrano&#39;, &#39;~&gt; 2.15&#39; # Or whatever patch release you are using</code></pre> <pre data-line=''><code class='language-ruby'>gem 'capistrano', '~&gt; 2.15' # Or whatever patch release you are using</code></pre>
</div> </div>
<p>This is the <a href="http://docs.rubygems.org/read/chapter/16#page74">pessimistic operator</a> which <p>This is the <a href="http://docs.rubygems.org/read/chapter/16#page74">pessimistic operator</a> which
@ -286,7 +286,7 @@ gems</a>)</p>
<div> <div>
<pre data-line=''><code class='language-ruby'>group :development do <pre data-line=''><code class='language-ruby'>group :development do
gem &#39;capistrano-rails&#39;, &#39;~&gt; 0.0.7&#39; gem 'capistrano-rails', '~&gt; 0.0.7'
end</code></pre> end</code></pre>
</div> </div>
@ -312,9 +312,9 @@ part, to get the best, and most sensible results, simply <code>require</code> th
files:</p> files:</p>
<div> <div>
<pre data-line=''><code class='language-ruby'>require &#39;capistrano/rails/assets&#39; <pre data-line=''><code class='language-ruby'>require 'capistrano/rails/assets'
require &#39;capistrano/rails/gem-bundler&#39; require 'capistrano/rails/gem-bundler'
require &#39;capistrano/rails/database-migrations&#39;</code></pre> require 'capistrano/rails/database-migrations'</code></pre>
</div> </div>
<div class="alert alert-info"> <div class="alert alert-info">
@ -325,7 +325,7 @@ by mistake, then you can lock your Gem version for Capistrano at something
like: like:
<div> <div>
<pre data-line=''><code class='language-ruby'>gem &#39;capistrano&#39;, &#39;~&gt; 2.15&#39; # Or whatever patch release you are using</code></pre> <pre data-line=''><code class='language-ruby'>gem 'capistrano', '~&gt; 2.15' # Or whatever patch release you are using</code></pre>
</div> </div>
<p>This is the <a href="http://docs.rubygems.org/read/chapter/16#page74">pessimistic operator</a> which <p>This is the <a href="http://docs.rubygems.org/read/chapter/16#page74">pessimistic operator</a> which

View file

@ -212,7 +212,7 @@ role :db, %w{example.com}
# definition into the server list. The second argument # definition into the server list. The second argument
# is something that quacks like a hash and can be used # is something that quacks like a hash and can be used
# to set extended properties on the server. # to set extended properties on the server.
server &#39;example.com&#39;, roles: %w{web app}, my_property: :my_value server 'example.com', roles: %w{web app}, my_property: :my_value
# set :rails_env, :staging</code></pre> # set :rails_env, :staging</code></pre>
</div> </div>
@ -237,8 +237,8 @@ server line after the comment:</p>
<div> <div>
<pre data-line=''><code class='language-ruby'>role :all, %w{hello@world.com example.com:1234} <pre data-line=''><code class='language-ruby'>role :all, %w{hello@world.com example.com:1234}
# ...is the same as doing... # ...is the same as doing...
server &#39;world.com&#39; roles: [:web], user: &#39;hello&#39; server 'world.com' roles: [:web], user: 'hello'
server &#39;example.com&#39;, roles: [:web], port: 1234</code></pre> server 'example.com', roles: [:web], port: 1234</code></pre>
</div> </div>
<h3 id="toc_4">5. Set the shared information in <code>deploy.rb</code>.</h3> <h3 id="toc_4">5. Set the shared information in <code>deploy.rb</code>.</h3>
@ -252,8 +252,8 @@ self-documenting, commented-out configuration options, feel free to play with
them a little:</p> them a little:</p>
<div> <div>
<pre data-line=''><code class='language-ruby'>set :application, &#39;my app name&#39; <pre data-line=''><code class='language-ruby'>set :application, 'my app name'
set :repo_url, &#39;git@example.com:me/my_repo.git&#39; set :repo_url, 'git@example.com:me/my_repo.git'
ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }</code></pre> ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }</code></pre>
</div> </div>
@ -275,9 +275,9 @@ forked to the Capistrano repository, but you can find the (unchanged) original
<a href="https://github.com/RailsApps/rails3-bootstrap-devise-cancan">here</a>.</p> <a href="https://github.com/RailsApps/rails3-bootstrap-devise-cancan">here</a>.</p>
<div> <div>
<pre data-line=''><code class='language-ruby'>set :application, &#39;rails3-bootstrap-devise-cancan-demo&#39; <pre data-line=''><code class='language-ruby'>set :application, 'rails3-bootstrap-devise-cancan-demo'
set :repo_url, &#39;https://github.com/capistrano/rails3-bootstrap-devise-cancan&#39; set :repo_url, 'https://github.com/capistrano/rails3-bootstrap-devise-cancan'
set :branch, &#39;master&#39;</code></pre> set :branch, 'master'</code></pre>
</div> </div>
<p>I&#39;ve simplified the <code>:branch</code> variable to simply be a <code>set</code> variable, not a <p>I&#39;ve simplified the <code>:branch</code> variable to simply be a <code>set</code> variable, not a
@ -404,7 +404,7 @@ role :db, %w{example.com}
# definition into the server list. The second argument # definition into the server list. The second argument
# is something that quacks like a hash and can be used # is something that quacks like a hash and can be used
# to set extended properties on the server. # to set extended properties on the server.
server &#39;example.com&#39;, roles: %w{web app}, my_property: :my_value server 'example.com', roles: %w{web app}, my_property: :my_value
# set :rails_env, :staging</code></pre> # set :rails_env, :staging</code></pre>
</div> </div>
@ -429,8 +429,8 @@ server line after the comment:</p>
<div> <div>
<pre data-line=''><code class='language-ruby'>role :all, %w{hello@world.com example.com:1234} <pre data-line=''><code class='language-ruby'>role :all, %w{hello@world.com example.com:1234}
# ...is the same as doing... # ...is the same as doing...
server &#39;world.com&#39; roles: [:web], user: &#39;hello&#39; server 'world.com' roles: [:web], user: 'hello'
server &#39;example.com&#39;, roles: [:web], port: 1234</code></pre> server 'example.com', roles: [:web], port: 1234</code></pre>
</div> </div>
<h3 id="toc_4">5. Set the shared information in <code>deploy.rb</code>.</h3> <h3 id="toc_4">5. Set the shared information in <code>deploy.rb</code>.</h3>
@ -444,8 +444,8 @@ self-documenting, commented-out configuration options, feel free to play with
them a little:</p> them a little:</p>
<div> <div>
<pre data-line=''><code class='language-ruby'>set :application, &#39;my app name&#39; <pre data-line=''><code class='language-ruby'>set :application, 'my app name'
set :repo_url, &#39;git@example.com:me/my_repo.git&#39; set :repo_url, 'git@example.com:me/my_repo.git'
ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }</code></pre> ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }</code></pre>
</div> </div>
@ -467,9 +467,9 @@ forked to the Capistrano repository, but you can find the (unchanged) original
<a href="https://github.com/RailsApps/rails3-bootstrap-devise-cancan">here</a>.</p> <a href="https://github.com/RailsApps/rails3-bootstrap-devise-cancan">here</a>.</p>
<div> <div>
<pre data-line=''><code class='language-ruby'>set :application, &#39;rails3-bootstrap-devise-cancan-demo&#39; <pre data-line=''><code class='language-ruby'>set :application, 'rails3-bootstrap-devise-cancan-demo'
set :repo_url, &#39;https://github.com/capistrano/rails3-bootstrap-devise-cancan&#39; set :repo_url, 'https://github.com/capistrano/rails3-bootstrap-devise-cancan'
set :branch, &#39;master&#39;</code></pre> set :branch, 'master'</code></pre>
</div> </div>
<p>I&#39;ve simplified the <code>:branch</code> variable to simply be a <code>set</code> variable, not a <p>I&#39;ve simplified the <code>:branch</code> variable to simply be a <code>set</code> variable, not a

View file

@ -217,7 +217,7 @@ task :ditty do
# we can reflect on the `host` object passed to the block # we can reflect on the `host` object passed to the block
# and use the `info` logger method to benefit from the # and use the `info` logger method to benefit from the
# output formatter that is selected. # output formatter that is selected.
uptime = capture(&#39;uptime&#39;) uptime = capture('uptime')
if host.roles.include?(:web) if host.roles.include?(:web)
info &quot;Your webserver #{host} has uptime: #{uptime}&quot; info &quot;Your webserver #{host} has uptime: #{uptime}&quot;
end end
@ -228,8 +228,8 @@ task :ditty do
# and move the process into a directoy, executing arbitrary tasks # and move the process into a directoy, executing arbitrary tasks
# such as letting Rails do some heavy lifting. # such as letting Rails do some heavy lifting.
with({:rails_env =&gt; :production}) do with({:rails_env =&gt; :production}) do
within(&#39;/var/www/my/rails/app&#39;) do within('/var/www/my/rails/app') do
execute :rails, :runner, &#39;MyModel.something&#39; execute :rails, :runner, 'MyModel.something'
end end
end end
end end
@ -238,8 +238,8 @@ task :ditty do
# We can even switch users, provided we have support on the remote # We can even switch users, provided we have support on the remote
# server for switching to that user without being prompted for a # server for switching to that user without being prompted for a
# passphrase. # passphrase.
as &#39;postgres&#39; do as 'postgres' do
widgets = capture &quot;echo &#39;SELECT * FROM widgets;&#39; | psql my_database&quot; widgets = capture &quot;echo 'SELECT * FROM widgets;' | psql my_database&quot;
if widgets.to_i &lt; 50 if widgets.to_i &lt; 50
warn &quot;There are fewer than 50 widgets in the database on #{host}!&quot; warn &quot;There are fewer than 50 widgets in the database on #{host}!&quot;
end end
@ -249,7 +249,7 @@ task :ditty do
on roles(:all) do on roles(:all) do
# We can even use `test` the way the Unix gods intended # We can even use `test` the way the Unix gods intended
if test(&quot;[ -d /some/directory ]&quot;) if test(&quot;[ -d /some/directory ]&quot;)
info &quot;Phew, it&#39;s ok, the directory exists!&quot; info &quot;Phew, it's ok, the directory exists!&quot;
end end
end end
@ -373,7 +373,7 @@ task :ditty do
# we can reflect on the `host` object passed to the block # we can reflect on the `host` object passed to the block
# and use the `info` logger method to benefit from the # and use the `info` logger method to benefit from the
# output formatter that is selected. # output formatter that is selected.
uptime = capture(&#39;uptime&#39;) uptime = capture('uptime')
if host.roles.include?(:web) if host.roles.include?(:web)
info &quot;Your webserver #{host} has uptime: #{uptime}&quot; info &quot;Your webserver #{host} has uptime: #{uptime}&quot;
end end
@ -384,8 +384,8 @@ task :ditty do
# and move the process into a directoy, executing arbitrary tasks # and move the process into a directoy, executing arbitrary tasks
# such as letting Rails do some heavy lifting. # such as letting Rails do some heavy lifting.
with({:rails_env =&gt; :production}) do with({:rails_env =&gt; :production}) do
within(&#39;/var/www/my/rails/app&#39;) do within('/var/www/my/rails/app') do
execute :rails, :runner, &#39;MyModel.something&#39; execute :rails, :runner, 'MyModel.something'
end end
end end
end end
@ -394,8 +394,8 @@ task :ditty do
# We can even switch users, provided we have support on the remote # We can even switch users, provided we have support on the remote
# server for switching to that user without being prompted for a # server for switching to that user without being prompted for a
# passphrase. # passphrase.
as &#39;postgres&#39; do as 'postgres' do
widgets = capture &quot;echo &#39;SELECT * FROM widgets;&#39; | psql my_database&quot; widgets = capture &quot;echo 'SELECT * FROM widgets;' | psql my_database&quot;
if widgets.to_i &lt; 50 if widgets.to_i &lt; 50
warn &quot;There are fewer than 50 widgets in the database on #{host}!&quot; warn &quot;There are fewer than 50 widgets in the database on #{host}!&quot;
end end
@ -405,7 +405,7 @@ task :ditty do
on roles(:all) do on roles(:all) do
# We can even use `test` the way the Unix gods intended # We can even use `test` the way the Unix gods intended
if test(&quot;[ -d /some/directory ]&quot;) if test(&quot;[ -d /some/directory ]&quot;)
info &quot;Phew, it&#39;s ok, the directory exists!&quot; info &quot;Phew, it's ok, the directory exists!&quot;
end end
end end