capistrano-mountaintop 1.0.0
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/.document +11 -0
- data/.gitignore +42 -0
- data/Gemfile +15 -0
- data/Gemfile.lock +54 -0
- data/LICENSE +20 -0
- data/README.markdown +76 -0
- data/Rakefile +39 -0
- data/capistrano-mountaintop.gemspec +85 -0
- data/lib/capistrano-mountaintop.rb +1 -0
- data/lib/capistrano/mountaintop.rb +37 -0
- data/spec/.rspec +1 -0
- data/spec/capistrano-mountaintop_spec.rb +67 -0
- data/spec/spec_helper.rb +21 -0
- data/spec/support/capistrano.rb +6 -0
- metadata +233 -0
data/.document
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# .document is used by rdoc and yard to know how to generate documentation
|
2
|
+
# for example, it can be used to control how rdoc gets built when you do `gem install foo`
|
3
|
+
|
4
|
+
README.rdoc
|
5
|
+
lib/**/*.rb
|
6
|
+
bin/*
|
7
|
+
|
8
|
+
# Files below this - are treated as 'extra files', and aren't parsed for ruby code
|
9
|
+
-
|
10
|
+
features/**/*.feature
|
11
|
+
LICENSE
|
data/.gitignore
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# rcov generated
|
2
|
+
coverage
|
3
|
+
|
4
|
+
# rdoc generated
|
5
|
+
rdoc
|
6
|
+
|
7
|
+
# yard generated
|
8
|
+
doc
|
9
|
+
.yardoc
|
10
|
+
|
11
|
+
# jeweler generated
|
12
|
+
pkg
|
13
|
+
|
14
|
+
# bundler
|
15
|
+
.bundle
|
16
|
+
|
17
|
+
# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
|
18
|
+
#
|
19
|
+
# * Create a file at ~/.gitignore
|
20
|
+
# * Include files you want ignored
|
21
|
+
# * Run: git config --global core.excludesfile ~/.gitignore
|
22
|
+
#
|
23
|
+
# After doing this, these files will be ignored in all your git projects,
|
24
|
+
# saving you from having to 'pollute' every project you touch with them
|
25
|
+
#
|
26
|
+
# Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
|
27
|
+
#
|
28
|
+
# For MacOS:
|
29
|
+
#
|
30
|
+
#.DS_Store
|
31
|
+
#
|
32
|
+
# For TextMate
|
33
|
+
#*.tmproj
|
34
|
+
#tmtags
|
35
|
+
#
|
36
|
+
# For emacs:
|
37
|
+
#*~
|
38
|
+
#\#*
|
39
|
+
#.\#*
|
40
|
+
#
|
41
|
+
# For vim:
|
42
|
+
#*.swp
|
data/Gemfile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
source :gemcutter
|
2
|
+
|
3
|
+
gem "capistrano"
|
4
|
+
gem "capistrano-campfire"
|
5
|
+
gem "capistrano-log_with_awesome"
|
6
|
+
|
7
|
+
group :development do
|
8
|
+
gem "rspec", ">= 2.0.0.beta.19"
|
9
|
+
gem "bundler", ">= 1.0.0.rc.5"
|
10
|
+
gem "jeweler", "~> 1.5.0.pre2"
|
11
|
+
gem "rcov", ">= 0"
|
12
|
+
gem "capistrano-spec"
|
13
|
+
gem "yard"
|
14
|
+
gem "bluecloth" # for README.markdown
|
15
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
bluecloth (2.0.10)
|
5
|
+
capistrano (2.5.17)
|
6
|
+
highline
|
7
|
+
net-scp (>= 1.0.0)
|
8
|
+
net-sftp (>= 2.0.0)
|
9
|
+
net-ssh (>= 2.0.14)
|
10
|
+
net-ssh-gateway (>= 1.0.0)
|
11
|
+
capistrano-campfire (0.1.1)
|
12
|
+
capistrano-log_with_awesome (0.0.1)
|
13
|
+
capistrano (>= 2.5.14)
|
14
|
+
capistrano-spec (0.1.0)
|
15
|
+
diff-lcs (1.1.2)
|
16
|
+
git (1.2.5)
|
17
|
+
highline (1.5.2)
|
18
|
+
jeweler (1.5.0.pre2)
|
19
|
+
bundler (>= 1.0.0.rc.5)
|
20
|
+
git (>= 1.2.5)
|
21
|
+
rake
|
22
|
+
net-scp (1.0.2)
|
23
|
+
net-ssh (>= 1.99.1)
|
24
|
+
net-sftp (2.0.4)
|
25
|
+
net-ssh (>= 2.0.9)
|
26
|
+
net-ssh (2.0.23)
|
27
|
+
net-ssh-gateway (1.0.1)
|
28
|
+
net-ssh (>= 1.99.1)
|
29
|
+
rake (0.8.7)
|
30
|
+
rcov (0.9.8)
|
31
|
+
rspec (2.0.0.beta.20)
|
32
|
+
rspec-core (= 2.0.0.beta.20)
|
33
|
+
rspec-expectations (= 2.0.0.beta.20)
|
34
|
+
rspec-mocks (= 2.0.0.beta.20)
|
35
|
+
rspec-core (2.0.0.beta.20)
|
36
|
+
rspec-expectations (2.0.0.beta.20)
|
37
|
+
diff-lcs (>= 1.1.2)
|
38
|
+
rspec-mocks (2.0.0.beta.20)
|
39
|
+
yard (0.6.1)
|
40
|
+
|
41
|
+
PLATFORMS
|
42
|
+
ruby
|
43
|
+
|
44
|
+
DEPENDENCIES
|
45
|
+
bluecloth
|
46
|
+
bundler (>= 1.0.0.rc.5)
|
47
|
+
capistrano
|
48
|
+
capistrano-campfire
|
49
|
+
capistrano-log_with_awesome
|
50
|
+
capistrano-spec
|
51
|
+
jeweler (~> 1.5.0.pre2)
|
52
|
+
rcov
|
53
|
+
rspec (>= 2.0.0.beta.19)
|
54
|
+
yard
|
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2010 Joshua Nichols
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.markdown
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
# capistrano-mountaintop
|
2
|
+
|
3
|
+
capistrano-mountaintop makes it easy to announce deployments to a [Campfire](http://campfirenow.com/) room.
|
4
|
+
|
5
|
+
* [Homepage](http://github.com/technicalpickles/mountaintop)
|
6
|
+
* [Report a bug](http://github.com/technicalpickles/mountaintop/issues)
|
7
|
+
|
8
|
+
## The story
|
9
|
+
|
10
|
+
> I just wanted to shout [about the deploy] from on top of a mountain. But I didn't have a mountain. I had [capistrano] and [a campfire room] - Ron Burgandy, but not really
|
11
|
+
|
12
|
+
Deploys are kind of a big deal. Days, weeks, worth of code go live at last. Communication is always important, but it is particularly important when you need to get code out there.
|
13
|
+
|
14
|
+
* Only one person should be deploying at a given, because bad things could happen if multiple people try to deploy at the same time
|
15
|
+
* Everyone needs to know a deploy happening. If there is any impact following the deploy, it's important to know that a deploy happened recently and that it may be a cause of the problem
|
16
|
+
* If the deploy goes wrong, it's crucial to easily share the logs for debugging purposes
|
17
|
+
|
18
|
+
We use capistrano for deploying and Campfire for our day to day communication, so improving our deployment to announce itself was the logical step.
|
19
|
+
|
20
|
+
Behold, for this is what capistrano-mountaintop was born to do.
|
21
|
+
|
22
|
+
## Install
|
23
|
+
|
24
|
+
gem install capistrano-mountaintop
|
25
|
+
|
26
|
+
## Configuration
|
27
|
+
|
28
|
+
Since we're dealing with Campfire, we'll need to setup Campfire and the info to go along with it:
|
29
|
+
|
30
|
+
* A Campfire account
|
31
|
+
* A Campfire user for announcing. I'd recommend robotic sounding names, like MrRoboto, Bender, Gir, Number Six, etc
|
32
|
+
* The API authentication token for the Campfire
|
33
|
+
* A Campfire room to shout into
|
34
|
+
|
35
|
+
There's also some lines to add to config/deploy.rb:
|
36
|
+
|
37
|
+
require 'capistrano/mountaintop'
|
38
|
+
set :campfire_options, {
|
39
|
+
:account => 'zim',
|
40
|
+
:room => 'World Conquest',
|
41
|
+
:user => 'Gir',
|
42
|
+
:token => '001000101110101001011112',
|
43
|
+
:ssl => true
|
44
|
+
}
|
45
|
+
|
46
|
+
capistrano-mountain tries to figure out who is deploying by running:
|
47
|
+
|
48
|
+
git config user.name
|
49
|
+
|
50
|
+
If you don't want to use this behavior, you can set it explicitly, or use a configure a different way of determing it:
|
51
|
+
|
52
|
+
# hardcoded
|
53
|
+
set :deployer, 'Zim'
|
54
|
+
# use a different command
|
55
|
+
set :deployer, `whoami`.chomp
|
56
|
+
|
57
|
+
## The final product
|
58
|
+
|
59
|
+
With this in place, deploy in the normal fashion. As that's going on, you'll start seeing messages in the Campfire room:
|
60
|
+
|
61
|
+
Gir: Zim is deploying impending_doom's master to staging
|
62
|
+
Gir: <INSERT FULL LOG HERE>
|
63
|
+
|
64
|
+
Boom. Instant team communication about deploys without having to, you know, communicate manually.
|
65
|
+
|
66
|
+
## Note on Patches/Pull Requests
|
67
|
+
|
68
|
+
* Fork the project.
|
69
|
+
* Make your feature addition or bug fix.
|
70
|
+
* Add tests for it. This is important so I don't break it in a future version unintentionally.
|
71
|
+
* Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
72
|
+
* Send me a pull request. Bonus points for topic branches.
|
73
|
+
|
74
|
+
## Copyright
|
75
|
+
|
76
|
+
Copyright (c) 2010 Joshua Nichols. See LICENSE for details.
|
data/Rakefile
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
begin
|
4
|
+
Bundler.setup(:default, :development)
|
5
|
+
rescue Bundler::BundlerError => e
|
6
|
+
$stderr.puts e.message
|
7
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
+
exit e.status_code
|
9
|
+
end
|
10
|
+
require 'rake'
|
11
|
+
|
12
|
+
require 'jeweler'
|
13
|
+
Jeweler::Tasks.new do |gem|
|
14
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
15
|
+
gem.name = "capistrano-mountaintop"
|
16
|
+
gem.summary = %Q{Announce capistrano deploys from a mountaintop with campfire}
|
17
|
+
gem.description = %Q{Announce capistrano deploys from a mountaintop with campfire}
|
18
|
+
gem.email = "josh@technicalpickles.com"
|
19
|
+
gem.homepage = "http://github.com/technicalpickles/capistrano-mountaintop"
|
20
|
+
gem.authors = ["Joshua Nichols"]
|
21
|
+
gem.version = "1.0.0"
|
22
|
+
end
|
23
|
+
Jeweler::RubygemsDotOrgTasks.new
|
24
|
+
|
25
|
+
require 'rspec/core'
|
26
|
+
require 'rspec/core/rake_task'
|
27
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
28
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
29
|
+
end
|
30
|
+
|
31
|
+
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
32
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
33
|
+
spec.rcov = true
|
34
|
+
end
|
35
|
+
|
36
|
+
task :default => :spec
|
37
|
+
|
38
|
+
require 'yard'
|
39
|
+
YARD::Rake::YardocTask.new
|
@@ -0,0 +1,85 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{capistrano-mountaintop}
|
8
|
+
s.version = "1.0.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Joshua Nichols"]
|
12
|
+
s.date = %q{2011-02-05}
|
13
|
+
s.description = %q{Announce capistrano deploys from a mountaintop with campfire}
|
14
|
+
s.email = %q{josh@technicalpickles.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.markdown"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".gitignore",
|
22
|
+
"Gemfile",
|
23
|
+
"Gemfile.lock",
|
24
|
+
"LICENSE",
|
25
|
+
"README.markdown",
|
26
|
+
"Rakefile",
|
27
|
+
"capistrano-mountaintop.gemspec",
|
28
|
+
"lib/capistrano-mountaintop.rb",
|
29
|
+
"lib/capistrano/mountaintop.rb",
|
30
|
+
"spec/.rspec",
|
31
|
+
"spec/capistrano-mountaintop_spec.rb",
|
32
|
+
"spec/spec_helper.rb",
|
33
|
+
"spec/support/capistrano.rb"
|
34
|
+
]
|
35
|
+
s.homepage = %q{http://github.com/technicalpickles/capistrano-mountaintop}
|
36
|
+
s.require_paths = ["lib"]
|
37
|
+
s.rubygems_version = %q{1.3.7}
|
38
|
+
s.summary = %q{Announce capistrano deploys from a mountaintop with campfire}
|
39
|
+
s.test_files = [
|
40
|
+
"spec/capistrano-mountaintop_spec.rb",
|
41
|
+
"spec/spec_helper.rb",
|
42
|
+
"spec/support/capistrano.rb"
|
43
|
+
]
|
44
|
+
|
45
|
+
if s.respond_to? :specification_version then
|
46
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
47
|
+
s.specification_version = 3
|
48
|
+
|
49
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
50
|
+
s.add_runtime_dependency(%q<capistrano>, [">= 0"])
|
51
|
+
s.add_runtime_dependency(%q<capistrano-campfire>, [">= 0"])
|
52
|
+
s.add_runtime_dependency(%q<capistrano-log_with_awesome>, [">= 0"])
|
53
|
+
s.add_development_dependency(%q<rspec>, [">= 2.0.0.beta.19"])
|
54
|
+
s.add_development_dependency(%q<bundler>, [">= 1.0.0.rc.5"])
|
55
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.0.pre2"])
|
56
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
57
|
+
s.add_development_dependency(%q<capistrano-spec>, [">= 0"])
|
58
|
+
s.add_development_dependency(%q<yard>, [">= 0"])
|
59
|
+
s.add_development_dependency(%q<bluecloth>, [">= 0"])
|
60
|
+
else
|
61
|
+
s.add_dependency(%q<capistrano>, [">= 0"])
|
62
|
+
s.add_dependency(%q<capistrano-campfire>, [">= 0"])
|
63
|
+
s.add_dependency(%q<capistrano-log_with_awesome>, [">= 0"])
|
64
|
+
s.add_dependency(%q<rspec>, [">= 2.0.0.beta.19"])
|
65
|
+
s.add_dependency(%q<bundler>, [">= 1.0.0.rc.5"])
|
66
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.0.pre2"])
|
67
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
68
|
+
s.add_dependency(%q<capistrano-spec>, [">= 0"])
|
69
|
+
s.add_dependency(%q<yard>, [">= 0"])
|
70
|
+
s.add_dependency(%q<bluecloth>, [">= 0"])
|
71
|
+
end
|
72
|
+
else
|
73
|
+
s.add_dependency(%q<capistrano>, [">= 0"])
|
74
|
+
s.add_dependency(%q<capistrano-campfire>, [">= 0"])
|
75
|
+
s.add_dependency(%q<capistrano-log_with_awesome>, [">= 0"])
|
76
|
+
s.add_dependency(%q<rspec>, [">= 2.0.0.beta.19"])
|
77
|
+
s.add_dependency(%q<bundler>, [">= 1.0.0.rc.5"])
|
78
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.0.pre2"])
|
79
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
80
|
+
s.add_dependency(%q<capistrano-spec>, [">= 0"])
|
81
|
+
s.add_dependency(%q<yard>, [">= 0"])
|
82
|
+
s.add_dependency(%q<bluecloth>, [">= 0"])
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'capistrano/mountaintop'
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'capistrano'
|
2
|
+
require 'capistrano/campfire'
|
3
|
+
require 'capistrano/log_with_awesome'
|
4
|
+
# TODO need to handle loading a bit beter. these would load into the instance if it's defined
|
5
|
+
module Capistrano
|
6
|
+
module Mountaintop
|
7
|
+
def self.load_into(configuration)
|
8
|
+
|
9
|
+
configuration.load do
|
10
|
+
|
11
|
+
before 'deploy', 'mountaintop:campfire:starting'
|
12
|
+
after 'deploy', 'mountaintop:campfire:finished'
|
13
|
+
|
14
|
+
namespace :mountaintop do
|
15
|
+
namespace :campfire do
|
16
|
+
task :starting do
|
17
|
+
announced_deployer = fetch(:deployer, `git config user.name`.chomp)
|
18
|
+
announced_stage = fetch(:stage, 'production')
|
19
|
+
|
20
|
+
campfire_room.speak "#{announced_deployer} is deploying #{application}'s #{branch} to #{announced_stage}"
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
task :finished do
|
25
|
+
campfire_room.paste fetch(:full_log)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
if Capistrano::Configuration.instance
|
35
|
+
Capistrano::Mountaintop.load_into(Capistrano::Configuration.instance)
|
36
|
+
end
|
37
|
+
|
data/spec/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
@@ -0,0 +1,67 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
|
3
|
+
describe Capistrano::Mountaintop, "loaded into capistrano" do
|
4
|
+
before do
|
5
|
+
@configuration = Capistrano::Configuration.new
|
6
|
+
@configuration.extend(Capistrano::Spec::ConfigurationExtension)
|
7
|
+
Capistrano::Mountaintop.load_into(@configuration)
|
8
|
+
|
9
|
+
@campfire_room = mock('campfire room')
|
10
|
+
|
11
|
+
@configuration.set(:campfire_room, @campfire_room)
|
12
|
+
end
|
13
|
+
|
14
|
+
it "defines mountaintop:campfire:starting" do
|
15
|
+
@configuration.find_task('mountaintop:campfire:starting').should_not == nil
|
16
|
+
end
|
17
|
+
|
18
|
+
it "defines mountaintop:campfire:finished" do
|
19
|
+
@configuration.find_task('mountaintop:campfire:finished').should_not == nil
|
20
|
+
end
|
21
|
+
|
22
|
+
it "performs mountain:campfire:starting before deploy" do
|
23
|
+
@configuration.should callback('mountaintop:campfire:starting').before('deploy')
|
24
|
+
end
|
25
|
+
|
26
|
+
it "performs mountain:announce:finished after deploy" do
|
27
|
+
@configuration.should callback('mountaintop:campfire:finished').after('deploy')
|
28
|
+
end
|
29
|
+
|
30
|
+
context "in multistage environment" do
|
31
|
+
specify "mountaintop:campfire:begin speaks the user deploying, the branch being deployed, and the stage being deployed to" do
|
32
|
+
@configuration.set(:deployer, "Zim")
|
33
|
+
@configuration.set(:application, "worlddomination")
|
34
|
+
@configuration.set(:branch, "master")
|
35
|
+
@configuration.set(:stage, "staging")
|
36
|
+
@campfire_room.should_receive(:speak).with("Zim is deploying worlddomination's master to staging")
|
37
|
+
|
38
|
+
@configuration.find_and_execute_task('mountaintop:campfire:starting')
|
39
|
+
end
|
40
|
+
|
41
|
+
specify "mountaintop:campfire:finish pastes the full log" do
|
42
|
+
@configuration.set(:full_log, "I AM A LOG")
|
43
|
+
@campfire_room.should_receive(:paste).with("I AM A LOG")
|
44
|
+
|
45
|
+
@configuration.find_and_execute_task('mountaintop:campfire:finished')
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
context "in non-multistage environment" do
|
50
|
+
specify "mountaintop:announce:begin speaks the user deploying and the branch being deployed to production" do
|
51
|
+
@configuration.set(:deployer, "Zim")
|
52
|
+
@configuration.set(:application, "worlddomination")
|
53
|
+
@configuration.set(:branch, "master")
|
54
|
+
@campfire_room.should_receive(:speak).with("Zim is deploying worlddomination's master to production")
|
55
|
+
|
56
|
+
@configuration.find_and_execute_task('mountaintop:campfire:starting')
|
57
|
+
end
|
58
|
+
|
59
|
+
|
60
|
+
specify "mountaintop:announce:finish pastes the full log" do
|
61
|
+
@configuration.set(:full_log, "I AM A LOG")
|
62
|
+
@campfire_room.should_receive(:paste).with("I AM A LOG")
|
63
|
+
|
64
|
+
@configuration.find_and_execute_task('mountaintop:campfire:finished')
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'bundler'
|
2
|
+
begin
|
3
|
+
Bundler.setup(:default, :development)
|
4
|
+
rescue Bundler::BundlerError => e
|
5
|
+
$stderr.puts e.message
|
6
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
7
|
+
exit e.status_code
|
8
|
+
end
|
9
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
10
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
11
|
+
require 'capistrano-mountaintop'
|
12
|
+
require 'rspec'
|
13
|
+
require 'rspec/autorun'
|
14
|
+
|
15
|
+
# Requires supporting files with custom matchers and macros, etc,
|
16
|
+
# in ./support/ and its subdirectories.
|
17
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
18
|
+
|
19
|
+
RSpec.configure do |config|
|
20
|
+
|
21
|
+
end
|
metadata
ADDED
@@ -0,0 +1,233 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano-mountaintop
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 23
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
- 0
|
10
|
+
version: 1.0.0
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Joshua Nichols
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-02-05 00:00:00 -05:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
prerelease: false
|
23
|
+
type: :runtime
|
24
|
+
name: capistrano
|
25
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ">="
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
hash: 3
|
31
|
+
segments:
|
32
|
+
- 0
|
33
|
+
version: "0"
|
34
|
+
requirement: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
prerelease: false
|
37
|
+
type: :runtime
|
38
|
+
name: capistrano-campfire
|
39
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 3
|
45
|
+
segments:
|
46
|
+
- 0
|
47
|
+
version: "0"
|
48
|
+
requirement: *id002
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
prerelease: false
|
51
|
+
type: :runtime
|
52
|
+
name: capistrano-log_with_awesome
|
53
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
hash: 3
|
59
|
+
segments:
|
60
|
+
- 0
|
61
|
+
version: "0"
|
62
|
+
requirement: *id003
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
prerelease: false
|
65
|
+
type: :development
|
66
|
+
name: rspec
|
67
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
68
|
+
none: false
|
69
|
+
requirements:
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
hash: 62196421
|
73
|
+
segments:
|
74
|
+
- 2
|
75
|
+
- 0
|
76
|
+
- 0
|
77
|
+
- beta
|
78
|
+
- 19
|
79
|
+
version: 2.0.0.beta.19
|
80
|
+
requirement: *id004
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
prerelease: false
|
83
|
+
type: :development
|
84
|
+
name: bundler
|
85
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
86
|
+
none: false
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
hash: 15424063
|
91
|
+
segments:
|
92
|
+
- 1
|
93
|
+
- 0
|
94
|
+
- 0
|
95
|
+
- rc
|
96
|
+
- 5
|
97
|
+
version: 1.0.0.rc.5
|
98
|
+
requirement: *id005
|
99
|
+
- !ruby/object:Gem::Dependency
|
100
|
+
prerelease: false
|
101
|
+
type: :development
|
102
|
+
name: jeweler
|
103
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
104
|
+
none: false
|
105
|
+
requirements:
|
106
|
+
- - ~>
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
hash: -1876988199
|
109
|
+
segments:
|
110
|
+
- 1
|
111
|
+
- 5
|
112
|
+
- 0
|
113
|
+
- pre2
|
114
|
+
version: 1.5.0.pre2
|
115
|
+
requirement: *id006
|
116
|
+
- !ruby/object:Gem::Dependency
|
117
|
+
prerelease: false
|
118
|
+
type: :development
|
119
|
+
name: rcov
|
120
|
+
version_requirements: &id007 !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
hash: 3
|
126
|
+
segments:
|
127
|
+
- 0
|
128
|
+
version: "0"
|
129
|
+
requirement: *id007
|
130
|
+
- !ruby/object:Gem::Dependency
|
131
|
+
prerelease: false
|
132
|
+
type: :development
|
133
|
+
name: capistrano-spec
|
134
|
+
version_requirements: &id008 !ruby/object:Gem::Requirement
|
135
|
+
none: false
|
136
|
+
requirements:
|
137
|
+
- - ">="
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
hash: 3
|
140
|
+
segments:
|
141
|
+
- 0
|
142
|
+
version: "0"
|
143
|
+
requirement: *id008
|
144
|
+
- !ruby/object:Gem::Dependency
|
145
|
+
prerelease: false
|
146
|
+
type: :development
|
147
|
+
name: yard
|
148
|
+
version_requirements: &id009 !ruby/object:Gem::Requirement
|
149
|
+
none: false
|
150
|
+
requirements:
|
151
|
+
- - ">="
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
hash: 3
|
154
|
+
segments:
|
155
|
+
- 0
|
156
|
+
version: "0"
|
157
|
+
requirement: *id009
|
158
|
+
- !ruby/object:Gem::Dependency
|
159
|
+
prerelease: false
|
160
|
+
type: :development
|
161
|
+
name: bluecloth
|
162
|
+
version_requirements: &id010 !ruby/object:Gem::Requirement
|
163
|
+
none: false
|
164
|
+
requirements:
|
165
|
+
- - ">="
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
hash: 3
|
168
|
+
segments:
|
169
|
+
- 0
|
170
|
+
version: "0"
|
171
|
+
requirement: *id010
|
172
|
+
description: Announce capistrano deploys from a mountaintop with campfire
|
173
|
+
email: josh@technicalpickles.com
|
174
|
+
executables: []
|
175
|
+
|
176
|
+
extensions: []
|
177
|
+
|
178
|
+
extra_rdoc_files:
|
179
|
+
- LICENSE
|
180
|
+
- README.markdown
|
181
|
+
files:
|
182
|
+
- .document
|
183
|
+
- .gitignore
|
184
|
+
- Gemfile
|
185
|
+
- Gemfile.lock
|
186
|
+
- LICENSE
|
187
|
+
- README.markdown
|
188
|
+
- Rakefile
|
189
|
+
- capistrano-mountaintop.gemspec
|
190
|
+
- lib/capistrano-mountaintop.rb
|
191
|
+
- lib/capistrano/mountaintop.rb
|
192
|
+
- spec/.rspec
|
193
|
+
- spec/capistrano-mountaintop_spec.rb
|
194
|
+
- spec/spec_helper.rb
|
195
|
+
- spec/support/capistrano.rb
|
196
|
+
has_rdoc: true
|
197
|
+
homepage: http://github.com/technicalpickles/capistrano-mountaintop
|
198
|
+
licenses: []
|
199
|
+
|
200
|
+
post_install_message:
|
201
|
+
rdoc_options: []
|
202
|
+
|
203
|
+
require_paths:
|
204
|
+
- lib
|
205
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
206
|
+
none: false
|
207
|
+
requirements:
|
208
|
+
- - ">="
|
209
|
+
- !ruby/object:Gem::Version
|
210
|
+
hash: 3
|
211
|
+
segments:
|
212
|
+
- 0
|
213
|
+
version: "0"
|
214
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
215
|
+
none: false
|
216
|
+
requirements:
|
217
|
+
- - ">="
|
218
|
+
- !ruby/object:Gem::Version
|
219
|
+
hash: 3
|
220
|
+
segments:
|
221
|
+
- 0
|
222
|
+
version: "0"
|
223
|
+
requirements: []
|
224
|
+
|
225
|
+
rubyforge_project:
|
226
|
+
rubygems_version: 1.3.7
|
227
|
+
signing_key:
|
228
|
+
specification_version: 3
|
229
|
+
summary: Announce capistrano deploys from a mountaintop with campfire
|
230
|
+
test_files:
|
231
|
+
- spec/capistrano-mountaintop_spec.rb
|
232
|
+
- spec/spec_helper.rb
|
233
|
+
- spec/support/capistrano.rb
|