cap_gun 0.2.2 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/README.markdown +0 -1
- data/Rakefile +2 -0
- data/cap_gun.gemspec +12 -29
- data/examples/presenter_example.rb +12 -0
- data/lib/cap_gun.rb +20 -3
- data/lib/cap_gun/presenter.rb +8 -5
- data/version.yml +2 -1
- metadata +48 -37
- data/VERSION +0 -1
- data/apple-touch-icon.png +0 -0
- data/classes/CapGun.html +0 -119
- data/classes/CapGun/Mailer.html +0 -174
- data/classes/CapGun/Presenter.html +0 -824
- data/css/main.css +0 -263
- data/css/panel.css +0 -383
- data/css/reset.css +0 -53
- data/favicon.ico +0 -0
- data/files/LICENSE.html +0 -81
- data/files/README_markdown.html +0 -171
- data/files/lib/cap_gun/presenter_rb.html +0 -66
- data/files/lib/cap_gun_rb.html +0 -66
- data/i/arrows.png +0 -0
- data/i/results_bg.png +0 -0
- data/i/tree_bg.png +0 -0
- data/index.html +0 -14
- data/js/jquery-1.3.2.min.js +0 -19
- data/js/jquery-effect.js +0 -593
- data/js/main.js +0 -22
- data/js/searchdoc.js +0 -628
- data/panel/index.html +0 -71
- data/panel/search_index.js +0 -1
- data/panel/tree.js +0 -1
data/CHANGELOG
CHANGED
data/README.markdown
CHANGED
@@ -68,7 +68,6 @@ Just include a comment in the cap command like so, and CapGun will add the comme
|
|
68
68
|
|
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
|
-
* Continuos Integration: http://runcoderun.com/relevance/cap_gun
|
72
71
|
* SDocs: http://relevance.github.com/cap_gun/
|
73
72
|
|
74
73
|
== LICENSE
|
data/Rakefile
CHANGED
@@ -7,6 +7,8 @@ begin
|
|
7
7
|
gemspec.homepage = "http://github.com/relevance/cap_gun"
|
8
8
|
gemspec.description = 'Super simple capistrano deployment notifications.'
|
9
9
|
gemspec.authors = ["Rob Sanheim", "Muness Alrubaie", "Relevance"]
|
10
|
+
gemspec.add_dependency 'activesupport'
|
11
|
+
gemspec.add_dependency 'actionmailer'
|
10
12
|
gemspec.add_development_dependency "micronaut"
|
11
13
|
gemspec.add_development_dependency "mocha"
|
12
14
|
end
|
data/cap_gun.gemspec
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
4
|
# -*- encoding: utf-8 -*-
|
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.4"
|
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{
|
12
|
+
s.date = %q{2010-05-28}
|
13
13
|
s.description = %q{Super simple capistrano deployment notifications.}
|
14
14
|
s.email = %q{opensource@thinkrelevance.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -23,40 +23,16 @@ Gem::Specification.new do |s|
|
|
23
23
|
"LICENSE",
|
24
24
|
"README.markdown",
|
25
25
|
"Rakefile",
|
26
|
-
"VERSION",
|
27
|
-
"apple-touch-icon.png",
|
28
26
|
"cap_gun.gemspec",
|
29
|
-
"classes/CapGun.html",
|
30
|
-
"classes/CapGun/Mailer.html",
|
31
|
-
"classes/CapGun/Presenter.html",
|
32
27
|
"created.rid",
|
33
|
-
"css/main.css",
|
34
|
-
"css/panel.css",
|
35
|
-
"css/reset.css",
|
36
28
|
"examples/cap_gun_example.rb",
|
37
29
|
"examples/example_helper.rb",
|
38
30
|
"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",
|
48
31
|
"init.rb",
|
49
32
|
"install.rb",
|
50
|
-
"js/jquery-1.3.2.min.js",
|
51
|
-
"js/jquery-effect.js",
|
52
|
-
"js/main.js",
|
53
|
-
"js/searchdoc.js",
|
54
33
|
"lib/cap_gun.rb",
|
55
34
|
"lib/cap_gun/presenter.rb",
|
56
35
|
"manifest.txt",
|
57
|
-
"panel/index.html",
|
58
|
-
"panel/search_index.js",
|
59
|
-
"panel/tree.js",
|
60
36
|
"tasks/cap_bot_tasks.rake",
|
61
37
|
"vendor/action_mailer_tls/README",
|
62
38
|
"vendor/action_mailer_tls/init.rb",
|
@@ -68,7 +44,7 @@ Gem::Specification.new do |s|
|
|
68
44
|
s.homepage = %q{http://github.com/relevance/cap_gun}
|
69
45
|
s.rdoc_options = ["--charset=UTF-8"]
|
70
46
|
s.require_paths = ["lib"]
|
71
|
-
s.rubygems_version = %q{1.3.
|
47
|
+
s.rubygems_version = %q{1.3.6}
|
72
48
|
s.summary = %q{Bang! You're deployed.}
|
73
49
|
s.test_files = [
|
74
50
|
"examples/cap_gun_example.rb",
|
@@ -81,14 +57,21 @@ Gem::Specification.new do |s|
|
|
81
57
|
s.specification_version = 3
|
82
58
|
|
83
59
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
60
|
+
s.add_runtime_dependency(%q<activesupport>, [">= 0"])
|
61
|
+
s.add_runtime_dependency(%q<actionmailer>, [">= 0"])
|
84
62
|
s.add_development_dependency(%q<micronaut>, [">= 0"])
|
85
63
|
s.add_development_dependency(%q<mocha>, [">= 0"])
|
86
64
|
else
|
65
|
+
s.add_dependency(%q<activesupport>, [">= 0"])
|
66
|
+
s.add_dependency(%q<actionmailer>, [">= 0"])
|
87
67
|
s.add_dependency(%q<micronaut>, [">= 0"])
|
88
68
|
s.add_dependency(%q<mocha>, [">= 0"])
|
89
69
|
end
|
90
70
|
else
|
71
|
+
s.add_dependency(%q<activesupport>, [">= 0"])
|
72
|
+
s.add_dependency(%q<actionmailer>, [">= 0"])
|
91
73
|
s.add_dependency(%q<micronaut>, [">= 0"])
|
92
74
|
s.add_dependency(%q<mocha>, [">= 0"])
|
93
75
|
end
|
94
76
|
end
|
77
|
+
|
@@ -100,5 +100,17 @@ describe CapGun::Presenter do
|
|
100
100
|
end
|
101
101
|
|
102
102
|
end
|
103
|
+
|
104
|
+
describe "previous_revision" do
|
105
|
+
|
106
|
+
it "returns n/a if not set" do
|
107
|
+
CapGun::Presenter.new({}).previous_revision.should == "n/a"
|
108
|
+
end
|
109
|
+
|
110
|
+
it "returns the previous revision if set" do
|
111
|
+
CapGun::Presenter.new({:previous_revision => "100"}).previous_revision.should == "100"
|
112
|
+
end
|
113
|
+
|
114
|
+
end
|
103
115
|
|
104
116
|
end
|
data/lib/cap_gun.rb
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
require 'active_support'
|
2
|
+
|
3
|
+
begin
|
4
|
+
# This requires the full active_support.
|
5
|
+
# ActiveSupport v3 and up are modular and
|
6
|
+
# need to be explicitly loaded.
|
7
|
+
# Rescue in cases of ActiveSupport 2.3.2 and earlier.
|
8
|
+
require 'active_support/all'
|
9
|
+
rescue
|
10
|
+
# Do nothing, everything should be included
|
11
|
+
# by default in older versions of ActiveSupport.
|
12
|
+
end
|
13
|
+
|
1
14
|
require 'action_mailer'
|
2
15
|
|
3
16
|
require File.join(File.dirname(__FILE__), *%w[cap_gun presenter])
|
@@ -28,7 +41,7 @@ require File.join(File.dirname(__FILE__), *%w[.. vendor action_mailer_tls lib sm
|
|
28
41
|
#
|
29
42
|
# See README for full install/config instructions.
|
30
43
|
module CapGun
|
31
|
-
VERSION = '0.
|
44
|
+
VERSION = '0.2.4'
|
32
45
|
|
33
46
|
# This mailer is configured with a capistrano variable called "cap_gun_email_envelope"
|
34
47
|
class Mailer < ActionMailer::Base
|
@@ -67,9 +80,13 @@ if Object.const_defined?("Capistrano")
|
|
67
80
|
desc "Send notification of the current release and the previous release via email."
|
68
81
|
task :email, :roles => :app do
|
69
82
|
CapGun::Mailer.load_mailer_config(self)
|
70
|
-
CapGun::Mailer.deliver_deployment_notification
|
83
|
+
if CapGun::Mailer.respond_to?(:deliver_deployment_notification)
|
84
|
+
CapGun::Mailer.deliver_deployment_notification(self)
|
85
|
+
else
|
86
|
+
CapGun::Mailer.deployment_notification(self).deliver
|
87
|
+
end
|
71
88
|
end
|
72
89
|
end
|
73
90
|
|
74
91
|
end
|
75
|
-
end
|
92
|
+
end
|
data/lib/cap_gun/presenter.rb
CHANGED
@@ -10,7 +10,6 @@ module CapGun
|
|
10
10
|
def initialize(capistrano)
|
11
11
|
self.capistrano = capistrano
|
12
12
|
end
|
13
|
-
|
14
13
|
|
15
14
|
def recipients
|
16
15
|
capistrano[:cap_gun_email_envelope][:recipients]
|
@@ -58,9 +57,9 @@ module CapGun
|
|
58
57
|
def scm_log_messages
|
59
58
|
messages = case capistrano[:scm].to_sym
|
60
59
|
when :git
|
61
|
-
`git log #{
|
60
|
+
`git log #{previous_revision}..#{capistrano[:current_revision]} --pretty=format:%h:%s`
|
62
61
|
when :subversion
|
63
|
-
`svn log -r #{
|
62
|
+
`svn log -r #{previous_revision.to_i+1}:#{capistrano[:current_revision]}`
|
64
63
|
else
|
65
64
|
"N/A"
|
66
65
|
end
|
@@ -103,6 +102,10 @@ module CapGun
|
|
103
102
|
humanize_release_time(capistrano[:current_release])
|
104
103
|
end
|
105
104
|
|
105
|
+
def previous_revision
|
106
|
+
capistrano.fetch(:previous_revision, "n/a")
|
107
|
+
end
|
108
|
+
|
106
109
|
def previous_release_time
|
107
110
|
humanize_release_time(capistrano[:previous_release])
|
108
111
|
end
|
@@ -127,7 +130,7 @@ Release Revision: #{capistrano[:current_revision]}
|
|
127
130
|
|
128
131
|
Previous Release: #{capistrano[:previous_release]}
|
129
132
|
Previous Release Time: #{previous_release_time}
|
130
|
-
Previous Release Revision: #{
|
133
|
+
Previous Release Revision: #{previous_revision}
|
131
134
|
|
132
135
|
Repository: #{capistrano[:repository]}
|
133
136
|
Deploy path: #{capistrano[:deploy_to]}
|
@@ -137,4 +140,4 @@ EOL
|
|
137
140
|
end
|
138
141
|
|
139
142
|
end
|
140
|
-
end
|
143
|
+
end
|
data/version.yml
CHANGED
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cap_gun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 2
|
8
|
+
- 4
|
9
|
+
version: 0.2.4
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Rob Sanheim
|
@@ -11,29 +16,57 @@ autorequire:
|
|
11
16
|
bindir: bin
|
12
17
|
cert_chain: []
|
13
18
|
|
14
|
-
date:
|
19
|
+
date: 2010-05-28 00:00:00 -04:00
|
15
20
|
default_executable:
|
16
21
|
dependencies:
|
22
|
+
- !ruby/object:Gem::Dependency
|
23
|
+
name: activesupport
|
24
|
+
prerelease: false
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
version: "0"
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: actionmailer
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 0
|
43
|
+
version: "0"
|
44
|
+
type: :runtime
|
45
|
+
version_requirements: *id002
|
17
46
|
- !ruby/object:Gem::Dependency
|
18
47
|
name: micronaut
|
19
|
-
|
20
|
-
|
21
|
-
version_requirements: !ruby/object:Gem::Requirement
|
48
|
+
prerelease: false
|
49
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
22
50
|
requirements:
|
23
51
|
- - ">="
|
24
52
|
- !ruby/object:Gem::Version
|
53
|
+
segments:
|
54
|
+
- 0
|
25
55
|
version: "0"
|
26
|
-
|
56
|
+
type: :development
|
57
|
+
version_requirements: *id003
|
27
58
|
- !ruby/object:Gem::Dependency
|
28
59
|
name: mocha
|
29
|
-
|
30
|
-
|
31
|
-
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
prerelease: false
|
61
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
32
62
|
requirements:
|
33
63
|
- - ">="
|
34
64
|
- !ruby/object:Gem::Version
|
65
|
+
segments:
|
66
|
+
- 0
|
35
67
|
version: "0"
|
36
|
-
|
68
|
+
type: :development
|
69
|
+
version_requirements: *id004
|
37
70
|
description: Super simple capistrano deployment notifications.
|
38
71
|
email: opensource@thinkrelevance.com
|
39
72
|
executables: []
|
@@ -50,40 +83,16 @@ files:
|
|
50
83
|
- LICENSE
|
51
84
|
- README.markdown
|
52
85
|
- Rakefile
|
53
|
-
- VERSION
|
54
|
-
- apple-touch-icon.png
|
55
86
|
- cap_gun.gemspec
|
56
|
-
- classes/CapGun.html
|
57
|
-
- classes/CapGun/Mailer.html
|
58
|
-
- classes/CapGun/Presenter.html
|
59
87
|
- created.rid
|
60
|
-
- css/main.css
|
61
|
-
- css/panel.css
|
62
|
-
- css/reset.css
|
63
88
|
- examples/cap_gun_example.rb
|
64
89
|
- examples/example_helper.rb
|
65
90
|
- 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
|
75
91
|
- init.rb
|
76
92
|
- install.rb
|
77
|
-
- js/jquery-1.3.2.min.js
|
78
|
-
- js/jquery-effect.js
|
79
|
-
- js/main.js
|
80
|
-
- js/searchdoc.js
|
81
93
|
- lib/cap_gun.rb
|
82
94
|
- lib/cap_gun/presenter.rb
|
83
95
|
- manifest.txt
|
84
|
-
- panel/index.html
|
85
|
-
- panel/search_index.js
|
86
|
-
- panel/tree.js
|
87
96
|
- tasks/cap_bot_tasks.rake
|
88
97
|
- vendor/action_mailer_tls/README
|
89
98
|
- vendor/action_mailer_tls/init.rb
|
@@ -104,18 +113,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
104
113
|
requirements:
|
105
114
|
- - ">="
|
106
115
|
- !ruby/object:Gem::Version
|
116
|
+
segments:
|
117
|
+
- 0
|
107
118
|
version: "0"
|
108
|
-
version:
|
109
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
120
|
requirements:
|
111
121
|
- - ">="
|
112
122
|
- !ruby/object:Gem::Version
|
123
|
+
segments:
|
124
|
+
- 0
|
113
125
|
version: "0"
|
114
|
-
version:
|
115
126
|
requirements: []
|
116
127
|
|
117
128
|
rubyforge_project:
|
118
|
-
rubygems_version: 1.3.
|
129
|
+
rubygems_version: 1.3.6
|
119
130
|
signing_key:
|
120
131
|
specification_version: 3
|
121
132
|
summary: Bang! You're deployed.
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.0.0
|
data/apple-touch-icon.png
DELETED
Binary file
|
data/classes/CapGun.html
DELETED
@@ -1,119 +0,0 @@
|
|
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>
|