cap_gun 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- 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/lib/cap_gun/presenter.rb
CHANGED
@@ -41,29 +41,36 @@ module CapGun
|
|
41
41
|
"Branch: #{capistrano[:branch]}" unless capistrano[:branch].nil? || capistrano[:branch].empty?
|
42
42
|
end
|
43
43
|
|
44
|
-
def
|
45
|
-
return unless capistrano[:scm].to_sym
|
44
|
+
def scm_details
|
45
|
+
return unless [:git,:subversion].include? capistrano[:scm].to_sym
|
46
46
|
<<-EOL
|
47
47
|
#{branch}
|
48
|
-
#{
|
48
|
+
#{scm_log}
|
49
49
|
EOL
|
50
50
|
rescue
|
51
51
|
nil
|
52
52
|
end
|
53
53
|
|
54
|
-
def
|
55
|
-
"\nCommits since last release\n====================\n#{
|
54
|
+
def scm_log
|
55
|
+
"\nCommits since last release\n====================\n#{scm_log_messages}"
|
56
56
|
end
|
57
57
|
|
58
|
-
def
|
59
|
-
messages =
|
58
|
+
def scm_log_messages
|
59
|
+
messages = case capistrano[:scm].to_sym
|
60
|
+
when :git
|
61
|
+
`git log #{capistrano[:previous_revision]}..#{capistrano[:current_revision]} --pretty=format:%h:%s`
|
62
|
+
when :subversion
|
63
|
+
`svn log -r #{capistrano[:previous_revision].to_i+1}:#{capistrano[:current_revision]}`
|
64
|
+
else
|
65
|
+
"N/A"
|
66
|
+
end
|
60
67
|
exit_code.success? ? messages : "N/A"
|
61
68
|
end
|
62
|
-
|
69
|
+
|
63
70
|
def exit_code
|
64
71
|
$?
|
65
72
|
end
|
66
|
-
|
73
|
+
|
67
74
|
# Gives you a prettier date/time for output from the standard Capistrano timestamped release directory.
|
68
75
|
# This assumes Capistrano uses UTC for its date/timestamped directories, and converts to the local
|
69
76
|
# machine timezone.
|
@@ -125,7 +132,7 @@ Previous Release Revision: #{capistrano[:previous_revision]}
|
|
125
132
|
Repository: #{capistrano[:repository]}
|
126
133
|
Deploy path: #{capistrano[:deploy_to]}
|
127
134
|
Domain: #{capistrano[:domain]}
|
128
|
-
#{
|
135
|
+
#{scm_details}
|
129
136
|
EOL
|
130
137
|
end
|
131
138
|
|
data/panel/index.html
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
4
|
+
|
5
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
6
|
+
<head>
|
7
|
+
<title>layout</title>
|
8
|
+
<link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" charset="utf-8" />
|
9
|
+
<link rel="stylesheet" href="../css/panel.css" type="text/css" media="screen" charset="utf-8" />
|
10
|
+
<script src="search_index.js" type="text/javascript" charset="utf-8"></script>
|
11
|
+
<script src="tree.js" type="text/javascript" charset="utf-8"></script>
|
12
|
+
<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
|
13
|
+
<script src="../js/searchdoc.js" type="text/javascript" charset="utf-8"></script>
|
14
|
+
<script type="text/javascript" charset="utf-8">
|
15
|
+
//<![CDATA[
|
16
|
+
function placeholder() {
|
17
|
+
if (jQuery.browser.safari) return;
|
18
|
+
$('#search-label').click(function() {
|
19
|
+
$('#search').focus();
|
20
|
+
$('#search-label').hide();
|
21
|
+
});
|
22
|
+
|
23
|
+
$('#search').focus(function() {
|
24
|
+
$('#search-label').hide();
|
25
|
+
});
|
26
|
+
$('#search').blur(function() {
|
27
|
+
this.value == '' && $('#search-label').show()
|
28
|
+
});
|
29
|
+
|
30
|
+
$('#search')[0].value == '' && $('#search-label').show();
|
31
|
+
}
|
32
|
+
$(function() {
|
33
|
+
placeholder();
|
34
|
+
var panel = new Searchdoc.Panel($('#panel'), search_data, tree, top.frames[1]);
|
35
|
+
$('#search').focus();
|
36
|
+
|
37
|
+
var s = window.parent.location.search.match(/\?q=([^&]+)/);
|
38
|
+
if (s) {
|
39
|
+
s = decodeURIComponent(s[1]).replace(/\+/g, ' ');
|
40
|
+
if (s.length > 0)
|
41
|
+
{
|
42
|
+
$('#search').val(s);
|
43
|
+
panel.search(s, true);
|
44
|
+
}
|
45
|
+
}
|
46
|
+
})
|
47
|
+
//]]>
|
48
|
+
</script>
|
49
|
+
</head>
|
50
|
+
<body>
|
51
|
+
<div class="panel panel_tree" id="panel">
|
52
|
+
<div class="header">
|
53
|
+
<div>
|
54
|
+
<label for="search" id="search-label" style="display: none">Search</label>
|
55
|
+
<table>
|
56
|
+
<tr><td>
|
57
|
+
<input type="Search" placeholder="Search" autosave="searchdoc" results="10" id="search" autocomplete="off"/>
|
58
|
+
</td></tr>
|
59
|
+
</table></div>
|
60
|
+
</div>
|
61
|
+
<div class="tree">
|
62
|
+
<ul>
|
63
|
+
</ul>
|
64
|
+
</div>
|
65
|
+
<div class="result">
|
66
|
+
<ul>
|
67
|
+
</ul>
|
68
|
+
</div>
|
69
|
+
</div>
|
70
|
+
</body>
|
71
|
+
</html>
|
@@ -0,0 +1 @@
|
|
1
|
+
var search_data = {"index":{"longSearchIndex":["lib/cap_gun.rb","capgun","capgun","capgun::presenter","capgun::presenter","capgun::presenter","capgun::presenter","capgun::presenter","capgun::presenter","capgun::mailer","capgun::presenter","capgun::presenter","capgun::presenter","capgun::presenter","capgun::presenter","capgun::presenter","capgun::presenter","capgun::mailer","capgun::presenter","capgun::presenter","capgun::presenter","capgun::presenter","capgun::presenter","capgun::presenter","capgun::presenter","capgun::presenter","files/license.html","files/readme_markdown.html","files/lib/cap_gun_rb.html","files/lib/cap_gun/presenter_rb.html"],"searchIndex":["capgun","mailer","presenter","body()","branch()","comment()","convert_from_utc()","current_user()","deployed_to()","deployment_notification()","email_prefix()","exit_code()","from()","git_details()","git_log()","git_log_messages()","humanize_release_time()","load_mailer_config()","local_datetime_zone_offset()","local_timezone()","new()","previous_release_time()","recipients()","release_time()","subject()","summary()","license","readme.markdown","cap_gun.rb","presenter.rb"],"info":[["CapGun","lib/cap_gun.rb","classes/CapGun.html"," < ","Tell everyone about your releases! Send email notification after Capistrano deployments! Rule the world!",1],["Mailer","CapGun","classes/CapGun/Mailer.html"," < ActionMailer::Base","This mailer is configured with a capistrano variable called \"cap_gun_email_envelope\" ",1],["Presenter","CapGun","classes/CapGun/Presenter.html"," < Object","",1],["body","CapGun::Presenter","classes/CapGun/Presenter.html#M000022","()","",2],["branch","CapGun::Presenter","classes/CapGun/Presenter.html#M000007","()","",2],["comment","CapGun::Presenter","classes/CapGun/Presenter.html#M000021","()","",2],["convert_from_utc","CapGun::Presenter","classes/CapGun/Presenter.html#M000014","(timestamp)","Use some DateTime magicrey to convert UTC to the current time zone When the whole world is on Rails 2.1",2],["current_user","CapGun::Presenter","classes/CapGun/Presenter.html#M000004","()","",2],["deployed_to","CapGun::Presenter","classes/CapGun/Presenter.html#M000006","()","",2],["deployment_notification","CapGun::Mailer","classes/CapGun/Mailer.html#M000016","(capistrano)","Grab the options for emailing from capistrano[:cap_gun_email_envelope] (should be set in your deploy",2],["email_prefix","CapGun::Presenter","classes/CapGun/Presenter.html#M000002","()","",2],["exit_code","CapGun::Presenter","classes/CapGun/Presenter.html#M000011","()","",2],["from","CapGun::Presenter","classes/CapGun/Presenter.html#M000003","()","",2],["git_details","CapGun::Presenter","classes/CapGun/Presenter.html#M000008","()","",2],["git_log","CapGun::Presenter","classes/CapGun/Presenter.html#M000009","()","",2],["git_log_messages","CapGun::Presenter","classes/CapGun/Presenter.html#M000010","()","",2],["humanize_release_time","CapGun::Presenter","classes/CapGun/Presenter.html#M000012","(path)","Gives you a prettier date/time for output from the standard Capistrano timestamped release directory.",2],["load_mailer_config","CapGun::Mailer","classes/CapGun/Mailer.html#M000013","(cap)","",2],["local_datetime_zone_offset","CapGun::Presenter","classes/CapGun/Presenter.html#M000015","()","",2],["local_timezone","CapGun::Presenter","classes/CapGun/Presenter.html#M000017","()","",2],["new","CapGun::Presenter","classes/CapGun/Presenter.html#M000000","(capistrano)","",2],["previous_release_time","CapGun::Presenter","classes/CapGun/Presenter.html#M000019","()","",2],["recipients","CapGun::Presenter","classes/CapGun/Presenter.html#M000001","()","",2],["release_time","CapGun::Presenter","classes/CapGun/Presenter.html#M000018","()","",2],["subject","CapGun::Presenter","classes/CapGun/Presenter.html#M000020","()","",2],["summary","CapGun::Presenter","classes/CapGun/Presenter.html#M000005","()","",2],["LICENSE","files/LICENSE.html","files/LICENSE.html","","Copyright (c) 2009 Relevance, Inc. Permission is hereby granted, free of charge, to any person obtaining",3],["README.markdown","files/README_markdown.html","files/README_markdown.html","","# CapGun ## DESCRIPTION Tell everyone about your releases! Send email notification after Capistrano",3],["cap_gun.rb","files/lib/cap_gun_rb.html","files/lib/cap_gun_rb.html","","",3],["presenter.rb","files/lib/cap_gun/presenter_rb.html","files/lib/cap_gun/presenter_rb.html","","",3]]}}
|
data/panel/tree.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
var tree = [["","","files",[["LICENSE","files/LICENSE.html","",[]],["README.markdown","files/README_markdown.html","",[]],["","","lib",[["","","cap_gun",[["presenter.rb","files/lib/cap_gun/presenter_rb.html","",[]]]],["cap_gun.rb","files/lib/cap_gun_rb.html","",[]]]]]],["CapGun","classes/CapGun.html","",[["Mailer","classes/CapGun/Mailer.html"," < ActionMailer::Base",[]],["Presenter","classes/CapGun/Presenter.html"," < Object",[]]]]]
|
data/version.yml
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cap_gun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Sanheim
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2009-
|
14
|
+
date: 2009-11-05 00:00:00 -05:00
|
15
15
|
default_executable:
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
@@ -51,15 +51,39 @@ files:
|
|
51
51
|
- README.markdown
|
52
52
|
- Rakefile
|
53
53
|
- VERSION
|
54
|
+
- apple-touch-icon.png
|
54
55
|
- cap_gun.gemspec
|
56
|
+
- classes/CapGun.html
|
57
|
+
- classes/CapGun/Mailer.html
|
58
|
+
- classes/CapGun/Presenter.html
|
59
|
+
- created.rid
|
60
|
+
- css/main.css
|
61
|
+
- css/panel.css
|
62
|
+
- css/reset.css
|
55
63
|
- examples/cap_gun_example.rb
|
56
64
|
- examples/example_helper.rb
|
57
65
|
- examples/presenter_example.rb
|
66
|
+
- favicon.ico
|
67
|
+
- files/LICENSE.html
|
68
|
+
- files/README_markdown.html
|
69
|
+
- files/lib/cap_gun/presenter_rb.html
|
70
|
+
- files/lib/cap_gun_rb.html
|
71
|
+
- i/arrows.png
|
72
|
+
- i/results_bg.png
|
73
|
+
- i/tree_bg.png
|
74
|
+
- index.html
|
58
75
|
- init.rb
|
59
76
|
- install.rb
|
77
|
+
- js/jquery-1.3.2.min.js
|
78
|
+
- js/jquery-effect.js
|
79
|
+
- js/main.js
|
80
|
+
- js/searchdoc.js
|
60
81
|
- lib/cap_gun.rb
|
61
82
|
- lib/cap_gun/presenter.rb
|
62
83
|
- manifest.txt
|
84
|
+
- panel/index.html
|
85
|
+
- panel/search_index.js
|
86
|
+
- panel/tree.js
|
63
87
|
- tasks/cap_bot_tasks.rake
|
64
88
|
- vendor/action_mailer_tls/README
|
65
89
|
- vendor/action_mailer_tls/init.rb
|