cap_gun 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +2 -0
- data/README.markdown +1 -1
- data/apple-touch-icon.png +0 -0
- data/cap_gun.gemspec +26 -2
- data/classes/CapGun.html +119 -0
- data/classes/CapGun/Mailer.html +174 -0
- data/classes/CapGun/Presenter.html +824 -0
- data/created.rid +1 -0
- data/css/main.css +263 -0
- data/css/panel.css +383 -0
- data/css/reset.css +53 -0
- data/examples/presenter_example.rb +38 -20
- data/favicon.ico +0 -0
- data/files/LICENSE.html +81 -0
- data/files/README_markdown.html +171 -0
- data/files/lib/cap_gun/presenter_rb.html +66 -0
- data/files/lib/cap_gun_rb.html +66 -0
- data/i/arrows.png +0 -0
- data/i/results_bg.png +0 -0
- data/i/tree_bg.png +0 -0
- data/index.html +14 -0
- data/js/jquery-1.3.2.min.js +19 -0
- data/js/jquery-effect.js +593 -0
- data/js/main.js +22 -0
- data/js/searchdoc.js +628 -0
- data/lib/cap_gun/presenter.rb +17 -10
- data/panel/index.html +71 -0
- data/panel/search_index.js +1 -0
- data/panel/tree.js +1 -0
- data/version.yml +2 -2
- metadata +26 -2
data/CHANGELOG
CHANGED
data/README.markdown
CHANGED
@@ -69,7 +69,7 @@ Just include a comment in the cap command like so, and CapGun will add the comme
|
|
69
69
|
* Log bugs, issues, and suggestions at GitHub: http://github.com/relevance/cap_gun/issues
|
70
70
|
* View source: http://github.com/relevance/cap_gun
|
71
71
|
* Continuos Integration: http://runcoderun.com/relevance/cap_gun
|
72
|
-
*
|
72
|
+
* SDocs: http://relevance.github.com/cap_gun/
|
73
73
|
|
74
74
|
== LICENSE
|
75
75
|
|
Binary file
|
data/cap_gun.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{cap_gun}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Rob Sanheim", "Muness Alrubaie", "Relevance"]
|
12
|
-
s.date = %q{2009-
|
12
|
+
s.date = %q{2009-11-05}
|
13
13
|
s.description = %q{Super simple capistrano deployment notifications.}
|
14
14
|
s.email = %q{opensource@thinkrelevance.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -24,15 +24,39 @@ Gem::Specification.new do |s|
|
|
24
24
|
"README.markdown",
|
25
25
|
"Rakefile",
|
26
26
|
"VERSION",
|
27
|
+
"apple-touch-icon.png",
|
27
28
|
"cap_gun.gemspec",
|
29
|
+
"classes/CapGun.html",
|
30
|
+
"classes/CapGun/Mailer.html",
|
31
|
+
"classes/CapGun/Presenter.html",
|
32
|
+
"created.rid",
|
33
|
+
"css/main.css",
|
34
|
+
"css/panel.css",
|
35
|
+
"css/reset.css",
|
28
36
|
"examples/cap_gun_example.rb",
|
29
37
|
"examples/example_helper.rb",
|
30
38
|
"examples/presenter_example.rb",
|
39
|
+
"favicon.ico",
|
40
|
+
"files/LICENSE.html",
|
41
|
+
"files/README_markdown.html",
|
42
|
+
"files/lib/cap_gun/presenter_rb.html",
|
43
|
+
"files/lib/cap_gun_rb.html",
|
44
|
+
"i/arrows.png",
|
45
|
+
"i/results_bg.png",
|
46
|
+
"i/tree_bg.png",
|
47
|
+
"index.html",
|
31
48
|
"init.rb",
|
32
49
|
"install.rb",
|
50
|
+
"js/jquery-1.3.2.min.js",
|
51
|
+
"js/jquery-effect.js",
|
52
|
+
"js/main.js",
|
53
|
+
"js/searchdoc.js",
|
33
54
|
"lib/cap_gun.rb",
|
34
55
|
"lib/cap_gun/presenter.rb",
|
35
56
|
"manifest.txt",
|
57
|
+
"panel/index.html",
|
58
|
+
"panel/search_index.js",
|
59
|
+
"panel/tree.js",
|
36
60
|
"tasks/cap_bot_tasks.rake",
|
37
61
|
"vendor/action_mailer_tls/README",
|
38
62
|
"vendor/action_mailer_tls/init.rb",
|
data/classes/CapGun.html
ADDED
@@ -0,0 +1,119 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<title>CapGun</title>
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
8
|
+
<link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" />
|
9
|
+
<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" />
|
10
|
+
<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
|
11
|
+
<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
|
12
|
+
<script src="../js/main.js" type="text/javascript" charset="utf-8"></script>
|
13
|
+
</head>
|
14
|
+
|
15
|
+
<body>
|
16
|
+
<div class="banner">
|
17
|
+
<h1>
|
18
|
+
<span class="type">Module</span>
|
19
|
+
CapGun
|
20
|
+
|
21
|
+
</h1>
|
22
|
+
<ul class="files">
|
23
|
+
|
24
|
+
<li><a href="../files/lib/cap_gun/presenter_rb.html">lib/cap_gun/presenter.rb</a></li>
|
25
|
+
|
26
|
+
<li><a href="../files/lib/cap_gun_rb.html">lib/cap_gun.rb</a></li>
|
27
|
+
|
28
|
+
</ul>
|
29
|
+
</div>
|
30
|
+
<div id="bodyContent">
|
31
|
+
<div id="content">
|
32
|
+
|
33
|
+
<div class="description">
|
34
|
+
<p>
|
35
|
+
Tell everyone about your releases! Send email notification after Capistrano
|
36
|
+
deployments! Rule the world!
|
37
|
+
</p>
|
38
|
+
<p>
|
39
|
+
We include the ActionMailer hack to play nice with Gmail, so that’s a
|
40
|
+
super easy way to do this without setting up your own MTA.
|
41
|
+
</p>
|
42
|
+
<p>
|
43
|
+
Example:
|
44
|
+
</p>
|
45
|
+
<p>
|
46
|
+
Want to just shoot everyone an email about the latest status?
|
47
|
+
</p>
|
48
|
+
<pre>
|
49
|
+
cap cap_gun:email
|
50
|
+
</pre>
|
51
|
+
<p>
|
52
|
+
Include comments?
|
53
|
+
</p>
|
54
|
+
<pre>
|
55
|
+
cap -s comment="hi mom" cap_gun:email
|
56
|
+
</pre>
|
57
|
+
<p>
|
58
|
+
Enable emails after every deploy by adding this to your deploy.rb:
|
59
|
+
</p>
|
60
|
+
<pre>
|
61
|
+
after "deploy", "cap_gun:email"
|
62
|
+
</pre>
|
63
|
+
<p>
|
64
|
+
Now, next time you deploy, you can optionally include comments:
|
65
|
+
</p>
|
66
|
+
<pre>
|
67
|
+
cap -s comment="fix for bug #303" deploy
|
68
|
+
</pre>
|
69
|
+
<p>
|
70
|
+
See README for full install/config instructions.
|
71
|
+
</p>
|
72
|
+
|
73
|
+
</div>
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
<div class="sectiontitle">Classes and Modules</div>
|
90
|
+
<ul>
|
91
|
+
|
92
|
+
<li><span class="type">CLASS</span> <a href="CapGun/Mailer.html">CapGun::Mailer</a></li>
|
93
|
+
|
94
|
+
<li><span class="type">CLASS</span> <a href="CapGun/Presenter.html">CapGun::Presenter</a></li>
|
95
|
+
|
96
|
+
</ul>
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<div class="sectiontitle">Constants</div>
|
101
|
+
<table border='0' cellpadding='5'>
|
102
|
+
|
103
|
+
<tr valign='top'>
|
104
|
+
<td class="attr-name">VERSION</td>
|
105
|
+
<td>=</td>
|
106
|
+
<td class="attr-value">'0.0.11'</td>
|
107
|
+
</tr>
|
108
|
+
|
109
|
+
|
110
|
+
</table>
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
</div>
|
117
|
+
</div>
|
118
|
+
</body>
|
119
|
+
</html>
|
@@ -0,0 +1,174 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<title>CapGun::Mailer</title>
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
8
|
+
<link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
|
9
|
+
<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
|
10
|
+
<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
|
11
|
+
<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
|
12
|
+
<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
|
13
|
+
</head>
|
14
|
+
|
15
|
+
<body>
|
16
|
+
<div class="banner">
|
17
|
+
<h1>
|
18
|
+
<span class="type">Class</span>
|
19
|
+
CapGun::Mailer
|
20
|
+
|
21
|
+
<span class="parent"><
|
22
|
+
|
23
|
+
ActionMailer::Base
|
24
|
+
|
25
|
+
</span>
|
26
|
+
|
27
|
+
</h1>
|
28
|
+
<ul class="files">
|
29
|
+
|
30
|
+
<li><a href="../../files/lib/cap_gun_rb.html">lib/cap_gun.rb</a></li>
|
31
|
+
|
32
|
+
</ul>
|
33
|
+
</div>
|
34
|
+
<div id="bodyContent">
|
35
|
+
<div id="content">
|
36
|
+
|
37
|
+
<div class="description">
|
38
|
+
<p>
|
39
|
+
This mailer is configured with a capistrano variable called
|
40
|
+
“cap_gun_email_envelope“
|
41
|
+
</p>
|
42
|
+
|
43
|
+
</div>
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
<div class="sectiontitle">Methods</div>
|
54
|
+
<dl class="methods">
|
55
|
+
|
56
|
+
<dt>D</dt>
|
57
|
+
<dd>
|
58
|
+
<ul>
|
59
|
+
|
60
|
+
<li><a href="#M000016">deployment_notification</a></li>
|
61
|
+
|
62
|
+
</ul>
|
63
|
+
</dd>
|
64
|
+
|
65
|
+
<dt>L</dt>
|
66
|
+
<dd>
|
67
|
+
<ul>
|
68
|
+
|
69
|
+
<li><a href="#M000013">load_mailer_config</a></li>
|
70
|
+
|
71
|
+
</ul>
|
72
|
+
</dd>
|
73
|
+
|
74
|
+
</dl>
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
<div class="sectiontitle">Class Public methods</div>
|
89
|
+
|
90
|
+
<div class="method">
|
91
|
+
<div class="title" id="M000013">
|
92
|
+
|
93
|
+
<a name="M000013"></a><b>load_mailer_config</b>(cap)
|
94
|
+
|
95
|
+
</div>
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<div class="sourcecode">
|
101
|
+
<p class="source-link">
|
102
|
+
Source: <a href="javascript:toggleSource('M000013_source')" id="l_M000013_source">show</a>
|
103
|
+
|
104
|
+
| <a href="http://github.com/relevance/cap_gun/blob/dbe6b4574dadaa34dbb2a1f4a87c9c7a07064d7e/lib/cap_gun.rb#L36" target="_blank" class="github_url">on GitHub</a>
|
105
|
+
|
106
|
+
</p>
|
107
|
+
<div id="M000013_source" class="dyn-source">
|
108
|
+
<pre><span class="ruby-comment cmt"># File lib/cap_gun.rb, line 36</span>
|
109
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">load_mailer_config</span>(<span class="ruby-identifier">cap</span>)
|
110
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"You must define ActionMailer settings in 'cap_gun_action_mailer_config'"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">cap</span>.<span class="ruby-identifier">cap_gun_action_mailer_config</span>
|
111
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"Need at least one recipient."</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">cap</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">:cap_gun_email_envelope</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">cap</span>[<span class="ruby-identifier">:cap_gun_email_envelope</span>][<span class="ruby-identifier">:recipients</span>].<span class="ruby-identifier">blank?</span>
|
112
|
+
|
113
|
+
<span class="ruby-constant">ActionMailer</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">smtp_settings</span> = <span class="ruby-identifier">cap</span>.<span class="ruby-identifier">cap_gun_action_mailer_config</span>
|
114
|
+
<span class="ruby-keyword kw">end</span></pre>
|
115
|
+
</div>
|
116
|
+
</div>
|
117
|
+
|
118
|
+
</div>
|
119
|
+
|
120
|
+
<div class="sectiontitle">Instance Public methods</div>
|
121
|
+
|
122
|
+
<div class="method">
|
123
|
+
<div class="title" id="M000016">
|
124
|
+
|
125
|
+
<a name="M000016"></a><b>deployment_notification</b>(capistrano)
|
126
|
+
|
127
|
+
</div>
|
128
|
+
|
129
|
+
<div class="description">
|
130
|
+
<p>
|
131
|
+
Grab the options for emailing from capistrano[:cap_gun_email_envelope]
|
132
|
+
(should be set in your deploy file)
|
133
|
+
</p>
|
134
|
+
<p>
|
135
|
+
Valid options:
|
136
|
+
</p>
|
137
|
+
<pre>
|
138
|
+
:recipients (required) an array or string of email address(es) that should get notifications
|
139
|
+
:from the sender of the notification, defaults to cap_gun@example.com
|
140
|
+
:email_prefix subject prefix, defaults to [DEPLOY]
|
141
|
+
</pre>
|
142
|
+
|
143
|
+
</div>
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
<div class="sourcecode">
|
149
|
+
<p class="source-link">
|
150
|
+
Source: <a href="javascript:toggleSource('M000016_source')" id="l_M000016_source">show</a>
|
151
|
+
|
152
|
+
| <a href="http://github.com/relevance/cap_gun/blob/dbe6b4574dadaa34dbb2a1f4a87c9c7a07064d7e/lib/cap_gun.rb#L49" target="_blank" class="github_url">on GitHub</a>
|
153
|
+
|
154
|
+
</p>
|
155
|
+
<div id="M000016_source" class="dyn-source">
|
156
|
+
<pre><span class="ruby-comment cmt"># File lib/cap_gun.rb, line 49</span>
|
157
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">deployment_notification</span>(<span class="ruby-identifier">capistrano</span>)
|
158
|
+
<span class="ruby-identifier">presenter</span> = <span class="ruby-constant">Presenter</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">capistrano</span>)
|
159
|
+
|
160
|
+
<span class="ruby-identifier">content_type</span> <span class="ruby-value str">"text/plain"</span>
|
161
|
+
<span class="ruby-identifier">from</span> <span class="ruby-identifier">presenter</span>.<span class="ruby-identifier">from</span>
|
162
|
+
<span class="ruby-identifier">recipients</span> <span class="ruby-identifier">presenter</span>.<span class="ruby-identifier">recipients</span>
|
163
|
+
<span class="ruby-identifier">subject</span> <span class="ruby-identifier">presenter</span>.<span class="ruby-identifier">subject</span>
|
164
|
+
<span class="ruby-identifier">body</span> <span class="ruby-identifier">presenter</span>.<span class="ruby-identifier">body</span>
|
165
|
+
<span class="ruby-keyword kw">end</span></pre>
|
166
|
+
</div>
|
167
|
+
</div>
|
168
|
+
|
169
|
+
</div>
|
170
|
+
|
171
|
+
</div>
|
172
|
+
</div>
|
173
|
+
</body>
|
174
|
+
</html>
|
@@ -0,0 +1,824 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<title>CapGun::Presenter</title>
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
8
|
+
<link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
|
9
|
+
<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
|
10
|
+
<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
|
11
|
+
<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
|
12
|
+
<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
|
13
|
+
</head>
|
14
|
+
|
15
|
+
<body>
|
16
|
+
<div class="banner">
|
17
|
+
<h1>
|
18
|
+
<span class="type">Class</span>
|
19
|
+
CapGun::Presenter
|
20
|
+
|
21
|
+
<span class="parent"><
|
22
|
+
|
23
|
+
Object
|
24
|
+
|
25
|
+
</span>
|
26
|
+
|
27
|
+
</h1>
|
28
|
+
<ul class="files">
|
29
|
+
|
30
|
+
<li><a href="../../files/lib/cap_gun/presenter_rb.html">lib/cap_gun/presenter.rb</a></li>
|
31
|
+
|
32
|
+
</ul>
|
33
|
+
</div>
|
34
|
+
<div id="bodyContent">
|
35
|
+
<div id="content">
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
<div class="sectiontitle">Methods</div>
|
46
|
+
<dl class="methods">
|
47
|
+
|
48
|
+
<dt>B</dt>
|
49
|
+
<dd>
|
50
|
+
<ul>
|
51
|
+
|
52
|
+
<li><a href="#M000022">body</a>,</li>
|
53
|
+
|
54
|
+
<li><a href="#M000007">branch</a></li>
|
55
|
+
|
56
|
+
</ul>
|
57
|
+
</dd>
|
58
|
+
|
59
|
+
<dt>C</dt>
|
60
|
+
<dd>
|
61
|
+
<ul>
|
62
|
+
|
63
|
+
<li><a href="#M000021">comment</a>,</li>
|
64
|
+
|
65
|
+
<li><a href="#M000014">convert_from_utc</a>,</li>
|
66
|
+
|
67
|
+
<li><a href="#M000004">current_user</a></li>
|
68
|
+
|
69
|
+
</ul>
|
70
|
+
</dd>
|
71
|
+
|
72
|
+
<dt>D</dt>
|
73
|
+
<dd>
|
74
|
+
<ul>
|
75
|
+
|
76
|
+
<li><a href="#M000006">deployed_to</a></li>
|
77
|
+
|
78
|
+
</ul>
|
79
|
+
</dd>
|
80
|
+
|
81
|
+
<dt>E</dt>
|
82
|
+
<dd>
|
83
|
+
<ul>
|
84
|
+
|
85
|
+
<li><a href="#M000002">email_prefix</a>,</li>
|
86
|
+
|
87
|
+
<li><a href="#M000011">exit_code</a></li>
|
88
|
+
|
89
|
+
</ul>
|
90
|
+
</dd>
|
91
|
+
|
92
|
+
<dt>F</dt>
|
93
|
+
<dd>
|
94
|
+
<ul>
|
95
|
+
|
96
|
+
<li><a href="#M000003">from</a></li>
|
97
|
+
|
98
|
+
</ul>
|
99
|
+
</dd>
|
100
|
+
|
101
|
+
<dt>G</dt>
|
102
|
+
<dd>
|
103
|
+
<ul>
|
104
|
+
|
105
|
+
<li><a href="#M000008">git_details</a>,</li>
|
106
|
+
|
107
|
+
<li><a href="#M000009">git_log</a>,</li>
|
108
|
+
|
109
|
+
<li><a href="#M000010">git_log_messages</a></li>
|
110
|
+
|
111
|
+
</ul>
|
112
|
+
</dd>
|
113
|
+
|
114
|
+
<dt>H</dt>
|
115
|
+
<dd>
|
116
|
+
<ul>
|
117
|
+
|
118
|
+
<li><a href="#M000012">humanize_release_time</a></li>
|
119
|
+
|
120
|
+
</ul>
|
121
|
+
</dd>
|
122
|
+
|
123
|
+
<dt>L</dt>
|
124
|
+
<dd>
|
125
|
+
<ul>
|
126
|
+
|
127
|
+
<li><a href="#M000015">local_datetime_zone_offset</a>,</li>
|
128
|
+
|
129
|
+
<li><a href="#M000017">local_timezone</a></li>
|
130
|
+
|
131
|
+
</ul>
|
132
|
+
</dd>
|
133
|
+
|
134
|
+
<dt>N</dt>
|
135
|
+
<dd>
|
136
|
+
<ul>
|
137
|
+
|
138
|
+
<li><a href="#M000000">new</a></li>
|
139
|
+
|
140
|
+
</ul>
|
141
|
+
</dd>
|
142
|
+
|
143
|
+
<dt>P</dt>
|
144
|
+
<dd>
|
145
|
+
<ul>
|
146
|
+
|
147
|
+
<li><a href="#M000019">previous_release_time</a></li>
|
148
|
+
|
149
|
+
</ul>
|
150
|
+
</dd>
|
151
|
+
|
152
|
+
<dt>R</dt>
|
153
|
+
<dd>
|
154
|
+
<ul>
|
155
|
+
|
156
|
+
<li><a href="#M000001">recipients</a>,</li>
|
157
|
+
|
158
|
+
<li><a href="#M000018">release_time</a></li>
|
159
|
+
|
160
|
+
</ul>
|
161
|
+
</dd>
|
162
|
+
|
163
|
+
<dt>S</dt>
|
164
|
+
<dd>
|
165
|
+
<ul>
|
166
|
+
|
167
|
+
<li><a href="#M000020">subject</a>,</li>
|
168
|
+
|
169
|
+
<li><a href="#M000005">summary</a></li>
|
170
|
+
|
171
|
+
</ul>
|
172
|
+
</dd>
|
173
|
+
|
174
|
+
</dl>
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
<div class="sectiontitle">Constants</div>
|
185
|
+
<table border='0' cellpadding='5'>
|
186
|
+
|
187
|
+
<tr valign='top'>
|
188
|
+
<td class="attr-name">DEFAULT_SENDER</td>
|
189
|
+
<td>=</td>
|
190
|
+
<td class="attr-value">%("CapGun" <cap_gun@example.com>)</td>
|
191
|
+
</tr>
|
192
|
+
|
193
|
+
|
194
|
+
<tr valign='top'>
|
195
|
+
<td class="attr-name">DEFAULT_EMAIL_PREFIX</td>
|
196
|
+
<td>=</td>
|
197
|
+
<td class="attr-value">"[DEPLOY]"</td>
|
198
|
+
</tr>
|
199
|
+
|
200
|
+
|
201
|
+
</table>
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
<div class="sectiontitle">Attributes</div>
|
206
|
+
<table border='0' cellpadding='5'>
|
207
|
+
|
208
|
+
<tr valign='top'>
|
209
|
+
<td class='attr-rw'>
|
210
|
+
[RW]
|
211
|
+
</td>
|
212
|
+
<td class='attr-name'>capistrano</td>
|
213
|
+
<td class='attr-desc'></td>
|
214
|
+
</tr>
|
215
|
+
|
216
|
+
</table>
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
<div class="sectiontitle">Class Public methods</div>
|
221
|
+
|
222
|
+
<div class="method">
|
223
|
+
<div class="title" id="M000000">
|
224
|
+
|
225
|
+
<a name="M000000"></a><b>new</b>(capistrano)
|
226
|
+
|
227
|
+
</div>
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
<div class="sourcecode">
|
233
|
+
<p class="source-link">
|
234
|
+
Source: <a href="javascript:toggleSource('M000000_source')" id="l_M000000_source">show</a>
|
235
|
+
|
236
|
+
| <a href="http://github.com/relevance/cap_gun/blob/31891bcc6756c572860ebaa872e13aea5445b2dc/lib/cap_gun/presenter.rb#L10" target="_blank" class="github_url">on GitHub</a>
|
237
|
+
|
238
|
+
</p>
|
239
|
+
<div id="M000000_source" class="dyn-source">
|
240
|
+
<pre><span class="ruby-comment cmt"># File lib/cap_gun/presenter.rb, line 10</span>
|
241
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">capistrano</span>)
|
242
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">capistrano</span> = <span class="ruby-identifier">capistrano</span>
|
243
|
+
<span class="ruby-keyword kw">end</span></pre>
|
244
|
+
</div>
|
245
|
+
</div>
|
246
|
+
|
247
|
+
</div>
|
248
|
+
|
249
|
+
<div class="sectiontitle">Instance Public methods</div>
|
250
|
+
|
251
|
+
<div class="method">
|
252
|
+
<div class="title" id="M000022">
|
253
|
+
|
254
|
+
<a name="M000022"></a><b>body</b>()
|
255
|
+
|
256
|
+
</div>
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
<div class="sourcecode">
|
262
|
+
<p class="source-link">
|
263
|
+
Source: <a href="javascript:toggleSource('M000022_source')" id="l_M000022_source">show</a>
|
264
|
+
|
265
|
+
| <a href="http://github.com/relevance/cap_gun/blob/31891bcc6756c572860ebaa872e13aea5445b2dc/lib/cap_gun/presenter.rb#L112" target="_blank" class="github_url">on GitHub</a>
|
266
|
+
|
267
|
+
</p>
|
268
|
+
<div id="M000022_source" class="dyn-source">
|
269
|
+
<pre><span class="ruby-comment cmt"># File lib/cap_gun/presenter.rb, line 112</span>
|
270
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">body</span>
|
271
|
+
<span class="ruby-value str">"\#{summary}\n\#{comment}\nDeployment details\n==================\nRelease: \#{capistrano[:current_release]}\nRelease Time: \#{release_time}\nRelease Revision: \#{capistrano[:current_revision]}\n\nPrevious Release: \#{capistrano[:previous_release]}\nPrevious Release Time: \#{previous_release_time}\nPrevious Release Revision: \#{capistrano[:previous_revision]}\n\nRepository: \#{capistrano[:repository]}\nDeploy path: \#{capistrano[:deploy_to]}\nDomain: \#{capistrano[:domain]}\n\#{git_details}\n"</span>
|
272
|
+
<span class="ruby-keyword kw">end</span></pre>
|
273
|
+
</div>
|
274
|
+
</div>
|
275
|
+
|
276
|
+
</div>
|
277
|
+
|
278
|
+
<div class="method">
|
279
|
+
<div class="title" id="M000007">
|
280
|
+
|
281
|
+
<a name="M000007"></a><b>branch</b>()
|
282
|
+
|
283
|
+
</div>
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
<div class="sourcecode">
|
289
|
+
<p class="source-link">
|
290
|
+
Source: <a href="javascript:toggleSource('M000007_source')" id="l_M000007_source">show</a>
|
291
|
+
|
292
|
+
| <a href="http://github.com/relevance/cap_gun/blob/31891bcc6756c572860ebaa872e13aea5445b2dc/lib/cap_gun/presenter.rb#L40" target="_blank" class="github_url">on GitHub</a>
|
293
|
+
|
294
|
+
</p>
|
295
|
+
<div id="M000007_source" class="dyn-source">
|
296
|
+
<pre><span class="ruby-comment cmt"># File lib/cap_gun/presenter.rb, line 40</span>
|
297
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">branch</span>
|
298
|
+
<span class="ruby-node">"Branch: #{capistrano[:branch]}"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">capistrano</span>[<span class="ruby-identifier">:branch</span>].<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">capistrano</span>[<span class="ruby-identifier">:branch</span>].<span class="ruby-identifier">empty?</span>
|
299
|
+
<span class="ruby-keyword kw">end</span></pre>
|
300
|
+
</div>
|
301
|
+
</div>
|
302
|
+
|
303
|
+
</div>
|
304
|
+
|
305
|
+
<div class="method">
|
306
|
+
<div class="title" id="M000021">
|
307
|
+
|
308
|
+
<a name="M000021"></a><b>comment</b>()
|
309
|
+
|
310
|
+
</div>
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
<div class="sourcecode">
|
316
|
+
<p class="source-link">
|
317
|
+
Source: <a href="javascript:toggleSource('M000021_source')" id="l_M000021_source">show</a>
|
318
|
+
|
319
|
+
| <a href="http://github.com/relevance/cap_gun/blob/31891bcc6756c572860ebaa872e13aea5445b2dc/lib/cap_gun/presenter.rb#L108" target="_blank" class="github_url">on GitHub</a>
|
320
|
+
|
321
|
+
</p>
|
322
|
+
<div id="M000021_source" class="dyn-source">
|
323
|
+
<pre><span class="ruby-comment cmt"># File lib/cap_gun/presenter.rb, line 108</span>
|
324
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">comment</span>
|
325
|
+
<span class="ruby-node">"Comment: #{capistrano[:comment]}.\n"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">capistrano</span>[<span class="ruby-identifier">:comment</span>]
|
326
|
+
<span class="ruby-keyword kw">end</span></pre>
|
327
|
+
</div>
|
328
|
+
</div>
|
329
|
+
|
330
|
+
</div>
|
331
|
+
|
332
|
+
<div class="method">
|
333
|
+
<div class="title" id="M000014">
|
334
|
+
|
335
|
+
<a name="M000014"></a><b>convert_from_utc</b>(timestamp)
|
336
|
+
|
337
|
+
</div>
|
338
|
+
|
339
|
+
<div class="description">
|
340
|
+
<p>
|
341
|
+
Use some DateTime magicrey to convert UTC to the current time zone When the
|
342
|
+
whole world is on Rails 2.1 (and therefore new ActiveSupport) we can use
|
343
|
+
the magic timezone support there.
|
344
|
+
</p>
|
345
|
+
|
346
|
+
</div>
|
347
|
+
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
<div class="sourcecode">
|
352
|
+
<p class="source-link">
|
353
|
+
Source: <a href="javascript:toggleSource('M000014_source')" id="l_M000014_source">show</a>
|
354
|
+
|
355
|
+
| <a href="http://github.com/relevance/cap_gun/blob/31891bcc6756c572860ebaa872e13aea5445b2dc/lib/cap_gun/presenter.rb#L81" target="_blank" class="github_url">on GitHub</a>
|
356
|
+
|
357
|
+
</p>
|
358
|
+
<div id="M000014_source" class="dyn-source">
|
359
|
+
<pre><span class="ruby-comment cmt"># File lib/cap_gun/presenter.rb, line 81</span>
|
360
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">convert_from_utc</span>(<span class="ruby-identifier">timestamp</span>)
|
361
|
+
<span class="ruby-comment cmt"># we know Capistrano release timestamps are UTC, but Ruby doesn't, so make it explicit</span>
|
362
|
+
<span class="ruby-identifier">utc_time</span> = <span class="ruby-identifier">timestamp</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"UTC"</span>
|
363
|
+
<span class="ruby-identifier">datetime</span> = <span class="ruby-constant">DateTime</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">utc_time</span>)
|
364
|
+
<span class="ruby-identifier">datetime</span>.<span class="ruby-identifier">new_offset</span>(<span class="ruby-identifier">local_datetime_zone_offset</span>)
|
365
|
+
<span class="ruby-keyword kw">end</span></pre>
|
366
|
+
</div>
|
367
|
+
</div>
|
368
|
+
|
369
|
+
</div>
|
370
|
+
|
371
|
+
<div class="method">
|
372
|
+
<div class="title" id="M000004">
|
373
|
+
|
374
|
+
<a name="M000004"></a><b>current_user</b>()
|
375
|
+
|
376
|
+
</div>
|
377
|
+
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
<div class="sourcecode">
|
382
|
+
<p class="source-link">
|
383
|
+
Source: <a href="javascript:toggleSource('M000004_source')" id="l_M000004_source">show</a>
|
384
|
+
|
385
|
+
| <a href="http://github.com/relevance/cap_gun/blob/31891bcc6756c572860ebaa872e13aea5445b2dc/lib/cap_gun/presenter.rb#L27" target="_blank" class="github_url">on GitHub</a>
|
386
|
+
|
387
|
+
</p>
|
388
|
+
<div id="M000004_source" class="dyn-source">
|
389
|
+
<pre><span class="ruby-comment cmt"># File lib/cap_gun/presenter.rb, line 27</span>
|
390
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_user</span>
|
391
|
+
<span class="ruby-constant">Etc</span>.<span class="ruby-identifier">getlogin</span>
|
392
|
+
<span class="ruby-keyword kw">end</span></pre>
|
393
|
+
</div>
|
394
|
+
</div>
|
395
|
+
|
396
|
+
</div>
|
397
|
+
|
398
|
+
<div class="method">
|
399
|
+
<div class="title" id="M000006">
|
400
|
+
|
401
|
+
<a name="M000006"></a><b>deployed_to</b>()
|
402
|
+
|
403
|
+
</div>
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
|
408
|
+
<div class="sourcecode">
|
409
|
+
<p class="source-link">
|
410
|
+
Source: <a href="javascript:toggleSource('M000006_source')" id="l_M000006_source">show</a>
|
411
|
+
|
412
|
+
| <a href="http://github.com/relevance/cap_gun/blob/31891bcc6756c572860ebaa872e13aea5445b2dc/lib/cap_gun/presenter.rb#L35" target="_blank" class="github_url">on GitHub</a>
|
413
|
+
|
414
|
+
</p>
|
415
|
+
<div id="M000006_source" class="dyn-source">
|
416
|
+
<pre><span class="ruby-comment cmt"># File lib/cap_gun/presenter.rb, line 35</span>
|
417
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">deployed_to</span>
|
418
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"deployed to #{capistrano[:rails_env]}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">capistrano</span>[<span class="ruby-identifier">:rails_env</span>]
|
419
|
+
<span class="ruby-value str">"deployed"</span>
|
420
|
+
<span class="ruby-keyword kw">end</span></pre>
|
421
|
+
</div>
|
422
|
+
</div>
|
423
|
+
|
424
|
+
</div>
|
425
|
+
|
426
|
+
<div class="method">
|
427
|
+
<div class="title" id="M000002">
|
428
|
+
|
429
|
+
<a name="M000002"></a><b>email_prefix</b>()
|
430
|
+
|
431
|
+
</div>
|
432
|
+
|
433
|
+
|
434
|
+
|
435
|
+
|
436
|
+
<div class="sourcecode">
|
437
|
+
<p class="source-link">
|
438
|
+
Source: <a href="javascript:toggleSource('M000002_source')" id="l_M000002_source">show</a>
|
439
|
+
|
440
|
+
| <a href="http://github.com/relevance/cap_gun/blob/31891bcc6756c572860ebaa872e13aea5445b2dc/lib/cap_gun/presenter.rb#L19" target="_blank" class="github_url">on GitHub</a>
|
441
|
+
|
442
|
+
</p>
|
443
|
+
<div id="M000002_source" class="dyn-source">
|
444
|
+
<pre><span class="ruby-comment cmt"># File lib/cap_gun/presenter.rb, line 19</span>
|
445
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">email_prefix</span>
|
446
|
+
<span class="ruby-identifier">capistrano</span>[<span class="ruby-identifier">:cap_gun_email_envelope</span>][<span class="ruby-identifier">:email_prefix</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">DEFAULT_EMAIL_PREFIX</span>
|
447
|
+
<span class="ruby-keyword kw">end</span></pre>
|
448
|
+
</div>
|
449
|
+
</div>
|
450
|
+
|
451
|
+
</div>
|
452
|
+
|
453
|
+
<div class="method">
|
454
|
+
<div class="title" id="M000011">
|
455
|
+
|
456
|
+
<a name="M000011"></a><b>exit_code</b>()
|
457
|
+
|
458
|
+
</div>
|
459
|
+
|
460
|
+
|
461
|
+
|
462
|
+
|
463
|
+
<div class="sourcecode">
|
464
|
+
<p class="source-link">
|
465
|
+
Source: <a href="javascript:toggleSource('M000011_source')" id="l_M000011_source">show</a>
|
466
|
+
|
467
|
+
| <a href="http://github.com/relevance/cap_gun/blob/31891bcc6756c572860ebaa872e13aea5445b2dc/lib/cap_gun/presenter.rb#L64" target="_blank" class="github_url">on GitHub</a>
|
468
|
+
|
469
|
+
</p>
|
470
|
+
<div id="M000011_source" class="dyn-source">
|
471
|
+
<pre><span class="ruby-comment cmt"># File lib/cap_gun/presenter.rb, line 64</span>
|
472
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">exit_code</span>
|
473
|
+
<span class="ruby-identifier">$?</span>
|
474
|
+
<span class="ruby-keyword kw">end</span></pre>
|
475
|
+
</div>
|
476
|
+
</div>
|
477
|
+
|
478
|
+
</div>
|
479
|
+
|
480
|
+
<div class="method">
|
481
|
+
<div class="title" id="M000003">
|
482
|
+
|
483
|
+
<a name="M000003"></a><b>from</b>()
|
484
|
+
|
485
|
+
</div>
|
486
|
+
|
487
|
+
|
488
|
+
|
489
|
+
|
490
|
+
<div class="sourcecode">
|
491
|
+
<p class="source-link">
|
492
|
+
Source: <a href="javascript:toggleSource('M000003_source')" id="l_M000003_source">show</a>
|
493
|
+
|
494
|
+
| <a href="http://github.com/relevance/cap_gun/blob/31891bcc6756c572860ebaa872e13aea5445b2dc/lib/cap_gun/presenter.rb#L23" target="_blank" class="github_url">on GitHub</a>
|
495
|
+
|
496
|
+
</p>
|
497
|
+
<div id="M000003_source" class="dyn-source">
|
498
|
+
<pre><span class="ruby-comment cmt"># File lib/cap_gun/presenter.rb, line 23</span>
|
499
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">from</span>
|
500
|
+
<span class="ruby-identifier">capistrano</span>[<span class="ruby-identifier">:cap_gun_email_envelope</span>][<span class="ruby-identifier">:from</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">DEFAULT_SENDER</span>
|
501
|
+
<span class="ruby-keyword kw">end</span></pre>
|
502
|
+
</div>
|
503
|
+
</div>
|
504
|
+
|
505
|
+
</div>
|
506
|
+
|
507
|
+
<div class="method">
|
508
|
+
<div class="title" id="M000008">
|
509
|
+
|
510
|
+
<a name="M000008"></a><b>git_details</b>()
|
511
|
+
|
512
|
+
</div>
|
513
|
+
|
514
|
+
|
515
|
+
|
516
|
+
|
517
|
+
<div class="sourcecode">
|
518
|
+
<p class="source-link">
|
519
|
+
Source: <a href="javascript:toggleSource('M000008_source')" id="l_M000008_source">show</a>
|
520
|
+
|
521
|
+
| <a href="http://github.com/relevance/cap_gun/blob/31891bcc6756c572860ebaa872e13aea5445b2dc/lib/cap_gun/presenter.rb#L44" target="_blank" class="github_url">on GitHub</a>
|
522
|
+
|
523
|
+
</p>
|
524
|
+
<div id="M000008_source" class="dyn-source">
|
525
|
+
<pre><span class="ruby-comment cmt"># File lib/cap_gun/presenter.rb, line 44</span>
|
526
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">git_details</span>
|
527
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">capistrano</span>[<span class="ruby-identifier">:scm</span>].<span class="ruby-identifier">to_sym</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:git</span>
|
528
|
+
<span class="ruby-value str">"\#{branch}\n\#{git_log}\n"</span>
|
529
|
+
<span class="ruby-keyword kw">rescue</span>
|
530
|
+
<span class="ruby-keyword kw">nil</span>
|
531
|
+
<span class="ruby-keyword kw">end</span></pre>
|
532
|
+
</div>
|
533
|
+
</div>
|
534
|
+
|
535
|
+
</div>
|
536
|
+
|
537
|
+
<div class="method">
|
538
|
+
<div class="title" id="M000009">
|
539
|
+
|
540
|
+
<a name="M000009"></a><b>git_log</b>()
|
541
|
+
|
542
|
+
</div>
|
543
|
+
|
544
|
+
|
545
|
+
|
546
|
+
|
547
|
+
<div class="sourcecode">
|
548
|
+
<p class="source-link">
|
549
|
+
Source: <a href="javascript:toggleSource('M000009_source')" id="l_M000009_source">show</a>
|
550
|
+
|
551
|
+
| <a href="http://github.com/relevance/cap_gun/blob/31891bcc6756c572860ebaa872e13aea5445b2dc/lib/cap_gun/presenter.rb#L55" target="_blank" class="github_url">on GitHub</a>
|
552
|
+
|
553
|
+
</p>
|
554
|
+
<div id="M000009_source" class="dyn-source">
|
555
|
+
<pre><span class="ruby-comment cmt"># File lib/cap_gun/presenter.rb, line 55</span>
|
556
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">git_log</span>
|
557
|
+
<span class="ruby-node">"\nCommits since last release\n====================\n#{git_log_messages}"</span>
|
558
|
+
<span class="ruby-keyword kw">end</span></pre>
|
559
|
+
</div>
|
560
|
+
</div>
|
561
|
+
|
562
|
+
</div>
|
563
|
+
|
564
|
+
<div class="method">
|
565
|
+
<div class="title" id="M000010">
|
566
|
+
|
567
|
+
<a name="M000010"></a><b>git_log_messages</b>()
|
568
|
+
|
569
|
+
</div>
|
570
|
+
|
571
|
+
|
572
|
+
|
573
|
+
|
574
|
+
<div class="sourcecode">
|
575
|
+
<p class="source-link">
|
576
|
+
Source: <a href="javascript:toggleSource('M000010_source')" id="l_M000010_source">show</a>
|
577
|
+
|
578
|
+
| <a href="http://github.com/relevance/cap_gun/blob/31891bcc6756c572860ebaa872e13aea5445b2dc/lib/cap_gun/presenter.rb#L59" target="_blank" class="github_url">on GitHub</a>
|
579
|
+
|
580
|
+
</p>
|
581
|
+
<div id="M000010_source" class="dyn-source">
|
582
|
+
<pre><span class="ruby-comment cmt"># File lib/cap_gun/presenter.rb, line 59</span>
|
583
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">git_log_messages</span>
|
584
|
+
<span class="ruby-identifier">messages</span> = <span class="ruby-node">`git log #{capistrano[:previous_revision]}..#{capistrano[:current_revision]} --pretty=format:%h:%s`</span>
|
585
|
+
<span class="ruby-identifier">exit_code</span>.<span class="ruby-identifier">success?</span> <span class="ruby-value">? </span><span class="ruby-identifier">messages</span> <span class="ruby-operator">:</span> <span class="ruby-value str">"N/A"</span>
|
586
|
+
<span class="ruby-keyword kw">end</span></pre>
|
587
|
+
</div>
|
588
|
+
</div>
|
589
|
+
|
590
|
+
</div>
|
591
|
+
|
592
|
+
<div class="method">
|
593
|
+
<div class="title" id="M000012">
|
594
|
+
|
595
|
+
<a name="M000012"></a><b>humanize_release_time</b>(path)
|
596
|
+
|
597
|
+
</div>
|
598
|
+
|
599
|
+
<div class="description">
|
600
|
+
<p>
|
601
|
+
Gives you a prettier date/time for output from the standard Capistrano
|
602
|
+
timestamped release directory. This assumes Capistrano uses UTC for its
|
603
|
+
date/timestamped directories, and converts to the local machine timezone.
|
604
|
+
</p>
|
605
|
+
|
606
|
+
</div>
|
607
|
+
|
608
|
+
|
609
|
+
|
610
|
+
|
611
|
+
<div class="sourcecode">
|
612
|
+
<p class="source-link">
|
613
|
+
Source: <a href="javascript:toggleSource('M000012_source')" id="l_M000012_source">show</a>
|
614
|
+
|
615
|
+
| <a href="http://github.com/relevance/cap_gun/blob/31891bcc6756c572860ebaa872e13aea5445b2dc/lib/cap_gun/presenter.rb#L71" target="_blank" class="github_url">on GitHub</a>
|
616
|
+
|
617
|
+
</p>
|
618
|
+
<div id="M000012_source" class="dyn-source">
|
619
|
+
<pre><span class="ruby-comment cmt"># File lib/cap_gun/presenter.rb, line 71</span>
|
620
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">humanize_release_time</span>(<span class="ruby-identifier">path</span>)
|
621
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">path</span>
|
622
|
+
<span class="ruby-identifier">match</span> = <span class="ruby-identifier">path</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp re">/(\d+)$/</span>)
|
623
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">match</span>
|
624
|
+
<span class="ruby-identifier">local</span> = <span class="ruby-identifier">convert_from_utc</span>(<span class="ruby-identifier">match</span>[<span class="ruby-value">1</span>])
|
625
|
+
<span class="ruby-identifier">local</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-node">"%B #{local.day.ordinalize}, %Y %l:%M %p #{local_timezone}"</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/\s+/</span>, <span class="ruby-value str">' '</span>).<span class="ruby-identifier">strip</span>
|
626
|
+
<span class="ruby-keyword kw">end</span></pre>
|
627
|
+
</div>
|
628
|
+
</div>
|
629
|
+
|
630
|
+
</div>
|
631
|
+
|
632
|
+
<div class="method">
|
633
|
+
<div class="title" id="M000015">
|
634
|
+
|
635
|
+
<a name="M000015"></a><b>local_datetime_zone_offset</b>()
|
636
|
+
|
637
|
+
</div>
|
638
|
+
|
639
|
+
|
640
|
+
|
641
|
+
|
642
|
+
<div class="sourcecode">
|
643
|
+
<p class="source-link">
|
644
|
+
Source: <a href="javascript:toggleSource('M000015_source')" id="l_M000015_source">show</a>
|
645
|
+
|
646
|
+
| <a href="http://github.com/relevance/cap_gun/blob/31891bcc6756c572860ebaa872e13aea5445b2dc/lib/cap_gun/presenter.rb#L88" target="_blank" class="github_url">on GitHub</a>
|
647
|
+
|
648
|
+
</p>
|
649
|
+
<div id="M000015_source" class="dyn-source">
|
650
|
+
<pre><span class="ruby-comment cmt"># File lib/cap_gun/presenter.rb, line 88</span>
|
651
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">local_datetime_zone_offset</span>
|
652
|
+
<span class="ruby-ivar">@local_datetime_zone_offset</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">DateTime</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">offset</span>
|
653
|
+
<span class="ruby-keyword kw">end</span></pre>
|
654
|
+
</div>
|
655
|
+
</div>
|
656
|
+
|
657
|
+
</div>
|
658
|
+
|
659
|
+
<div class="method">
|
660
|
+
<div class="title" id="M000017">
|
661
|
+
|
662
|
+
<a name="M000017"></a><b>local_timezone</b>()
|
663
|
+
|
664
|
+
</div>
|
665
|
+
|
666
|
+
|
667
|
+
|
668
|
+
|
669
|
+
<div class="sourcecode">
|
670
|
+
<p class="source-link">
|
671
|
+
Source: <a href="javascript:toggleSource('M000017_source')" id="l_M000017_source">show</a>
|
672
|
+
|
673
|
+
| <a href="http://github.com/relevance/cap_gun/blob/31891bcc6756c572860ebaa872e13aea5445b2dc/lib/cap_gun/presenter.rb#L92" target="_blank" class="github_url">on GitHub</a>
|
674
|
+
|
675
|
+
</p>
|
676
|
+
<div id="M000017_source" class="dyn-source">
|
677
|
+
<pre><span class="ruby-comment cmt"># File lib/cap_gun/presenter.rb, line 92</span>
|
678
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">local_timezone</span>
|
679
|
+
<span class="ruby-ivar">@current_timezone</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">zone</span>
|
680
|
+
<span class="ruby-keyword kw">end</span></pre>
|
681
|
+
</div>
|
682
|
+
</div>
|
683
|
+
|
684
|
+
</div>
|
685
|
+
|
686
|
+
<div class="method">
|
687
|
+
<div class="title" id="M000019">
|
688
|
+
|
689
|
+
<a name="M000019"></a><b>previous_release_time</b>()
|
690
|
+
|
691
|
+
</div>
|
692
|
+
|
693
|
+
|
694
|
+
|
695
|
+
|
696
|
+
<div class="sourcecode">
|
697
|
+
<p class="source-link">
|
698
|
+
Source: <a href="javascript:toggleSource('M000019_source')" id="l_M000019_source">show</a>
|
699
|
+
|
700
|
+
| <a href="http://github.com/relevance/cap_gun/blob/31891bcc6756c572860ebaa872e13aea5445b2dc/lib/cap_gun/presenter.rb#L100" target="_blank" class="github_url">on GitHub</a>
|
701
|
+
|
702
|
+
</p>
|
703
|
+
<div id="M000019_source" class="dyn-source">
|
704
|
+
<pre><span class="ruby-comment cmt"># File lib/cap_gun/presenter.rb, line 100</span>
|
705
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">previous_release_time</span>
|
706
|
+
<span class="ruby-identifier">humanize_release_time</span>(<span class="ruby-identifier">capistrano</span>[<span class="ruby-identifier">:previous_release</span>])
|
707
|
+
<span class="ruby-keyword kw">end</span></pre>
|
708
|
+
</div>
|
709
|
+
</div>
|
710
|
+
|
711
|
+
</div>
|
712
|
+
|
713
|
+
<div class="method">
|
714
|
+
<div class="title" id="M000001">
|
715
|
+
|
716
|
+
<a name="M000001"></a><b>recipients</b>()
|
717
|
+
|
718
|
+
</div>
|
719
|
+
|
720
|
+
|
721
|
+
|
722
|
+
|
723
|
+
<div class="sourcecode">
|
724
|
+
<p class="source-link">
|
725
|
+
Source: <a href="javascript:toggleSource('M000001_source')" id="l_M000001_source">show</a>
|
726
|
+
|
727
|
+
| <a href="http://github.com/relevance/cap_gun/blob/31891bcc6756c572860ebaa872e13aea5445b2dc/lib/cap_gun/presenter.rb#L15" target="_blank" class="github_url">on GitHub</a>
|
728
|
+
|
729
|
+
</p>
|
730
|
+
<div id="M000001_source" class="dyn-source">
|
731
|
+
<pre><span class="ruby-comment cmt"># File lib/cap_gun/presenter.rb, line 15</span>
|
732
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">recipients</span>
|
733
|
+
<span class="ruby-identifier">capistrano</span>[<span class="ruby-identifier">:cap_gun_email_envelope</span>][<span class="ruby-identifier">:recipients</span>]
|
734
|
+
<span class="ruby-keyword kw">end</span></pre>
|
735
|
+
</div>
|
736
|
+
</div>
|
737
|
+
|
738
|
+
</div>
|
739
|
+
|
740
|
+
<div class="method">
|
741
|
+
<div class="title" id="M000018">
|
742
|
+
|
743
|
+
<a name="M000018"></a><b>release_time</b>()
|
744
|
+
|
745
|
+
</div>
|
746
|
+
|
747
|
+
|
748
|
+
|
749
|
+
|
750
|
+
<div class="sourcecode">
|
751
|
+
<p class="source-link">
|
752
|
+
Source: <a href="javascript:toggleSource('M000018_source')" id="l_M000018_source">show</a>
|
753
|
+
|
754
|
+
| <a href="http://github.com/relevance/cap_gun/blob/31891bcc6756c572860ebaa872e13aea5445b2dc/lib/cap_gun/presenter.rb#L96" target="_blank" class="github_url">on GitHub</a>
|
755
|
+
|
756
|
+
</p>
|
757
|
+
<div id="M000018_source" class="dyn-source">
|
758
|
+
<pre><span class="ruby-comment cmt"># File lib/cap_gun/presenter.rb, line 96</span>
|
759
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">release_time</span>
|
760
|
+
<span class="ruby-identifier">humanize_release_time</span>(<span class="ruby-identifier">capistrano</span>[<span class="ruby-identifier">:current_release</span>])
|
761
|
+
<span class="ruby-keyword kw">end</span></pre>
|
762
|
+
</div>
|
763
|
+
</div>
|
764
|
+
|
765
|
+
</div>
|
766
|
+
|
767
|
+
<div class="method">
|
768
|
+
<div class="title" id="M000020">
|
769
|
+
|
770
|
+
<a name="M000020"></a><b>subject</b>()
|
771
|
+
|
772
|
+
</div>
|
773
|
+
|
774
|
+
|
775
|
+
|
776
|
+
|
777
|
+
<div class="sourcecode">
|
778
|
+
<p class="source-link">
|
779
|
+
Source: <a href="javascript:toggleSource('M000020_source')" id="l_M000020_source">show</a>
|
780
|
+
|
781
|
+
| <a href="http://github.com/relevance/cap_gun/blob/31891bcc6756c572860ebaa872e13aea5445b2dc/lib/cap_gun/presenter.rb#L104" target="_blank" class="github_url">on GitHub</a>
|
782
|
+
|
783
|
+
</p>
|
784
|
+
<div id="M000020_source" class="dyn-source">
|
785
|
+
<pre><span class="ruby-comment cmt"># File lib/cap_gun/presenter.rb, line 104</span>
|
786
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">subject</span>
|
787
|
+
<span class="ruby-node">"#{email_prefix} #{capistrano[:application]} #{deployed_to}"</span>
|
788
|
+
<span class="ruby-keyword kw">end</span></pre>
|
789
|
+
</div>
|
790
|
+
</div>
|
791
|
+
|
792
|
+
</div>
|
793
|
+
|
794
|
+
<div class="method">
|
795
|
+
<div class="title" id="M000005">
|
796
|
+
|
797
|
+
<a name="M000005"></a><b>summary</b>()
|
798
|
+
|
799
|
+
</div>
|
800
|
+
|
801
|
+
|
802
|
+
|
803
|
+
|
804
|
+
<div class="sourcecode">
|
805
|
+
<p class="source-link">
|
806
|
+
Source: <a href="javascript:toggleSource('M000005_source')" id="l_M000005_source">show</a>
|
807
|
+
|
808
|
+
| <a href="http://github.com/relevance/cap_gun/blob/31891bcc6756c572860ebaa872e13aea5445b2dc/lib/cap_gun/presenter.rb#L31" target="_blank" class="github_url">on GitHub</a>
|
809
|
+
|
810
|
+
</p>
|
811
|
+
<div id="M000005_source" class="dyn-source">
|
812
|
+
<pre><span class="ruby-comment cmt"># File lib/cap_gun/presenter.rb, line 31</span>
|
813
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">summary</span>
|
814
|
+
<span class="ruby-node">%[#{capistrano[:application]} was #{deployed_to} by #{current_user} at #{release_time}.]</span>
|
815
|
+
<span class="ruby-keyword kw">end</span></pre>
|
816
|
+
</div>
|
817
|
+
</div>
|
818
|
+
|
819
|
+
</div>
|
820
|
+
|
821
|
+
</div>
|
822
|
+
</div>
|
823
|
+
</body>
|
824
|
+
</html>
|