capper 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +48 -0
- data/Gemfile +1 -8
- data/Gemfile.lock +24 -12
- data/{LICENSE.txt → LICENSE} +0 -0
- data/{README.rdoc → README.md} +3 -4
- data/Rakefile +4 -22
- data/capper.gemspec +18 -65
- data/lib/capper/base.rb +54 -0
- data/lib/capper/bundler.rb +9 -1
- data/lib/capper/config.rb +13 -0
- data/lib/capper/git.rb +1 -1
- data/lib/capper/multistage.rb +20 -0
- data/lib/capper/rails.rb +1 -1
- data/lib/capper/rvm.rb +12 -9
- data/lib/capper/unicorn.rb +5 -2
- data/lib/capper/utils/load.rb +6 -0
- data/lib/capper/utils/multistage.rb +27 -0
- data/lib/capper/whenever.rb +4 -4
- metadata +28 -37
- data/VERSION +0 -1
- data/lib/capper.rb +0 -32
data/.gitignore
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# rcov generated
|
2
|
+
coverage
|
3
|
+
|
4
|
+
# rdoc generated
|
5
|
+
rdoc
|
6
|
+
|
7
|
+
# yard generated
|
8
|
+
doc
|
9
|
+
.yardoc
|
10
|
+
|
11
|
+
# bundler
|
12
|
+
.bundle
|
13
|
+
|
14
|
+
# jeweler generated
|
15
|
+
pkg
|
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
|
43
|
+
|
44
|
+
# For redcar:
|
45
|
+
#.redcar
|
46
|
+
|
47
|
+
# For rubinius:
|
48
|
+
#*.rbc
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,22 +1,34 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
capper (0.1.0)
|
5
|
+
capistrano
|
6
|
+
capistrano_colors
|
7
|
+
erubis
|
8
|
+
|
1
9
|
GEM
|
2
10
|
remote: http://rubygems.org/
|
3
11
|
specs:
|
12
|
+
capistrano (2.6.0)
|
13
|
+
highline
|
14
|
+
net-scp (>= 1.0.0)
|
15
|
+
net-sftp (>= 2.0.0)
|
16
|
+
net-ssh (>= 2.0.14)
|
17
|
+
net-ssh-gateway (>= 1.1.0)
|
18
|
+
capistrano_colors (0.5.4)
|
4
19
|
erubis (2.7.0)
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
20
|
+
highline (1.6.2)
|
21
|
+
net-scp (1.0.4)
|
22
|
+
net-ssh (>= 1.99.1)
|
23
|
+
net-sftp (2.0.5)
|
24
|
+
net-ssh (>= 2.0.9)
|
25
|
+
net-ssh (2.1.4)
|
26
|
+
net-ssh-gateway (1.1.0)
|
27
|
+
net-ssh (>= 1.99.1)
|
13
28
|
|
14
29
|
PLATFORMS
|
15
30
|
ruby
|
16
31
|
|
17
32
|
DEPENDENCIES
|
18
33
|
bundler (~> 1.0.0)
|
19
|
-
|
20
|
-
jeweler (~> 1.6.4)
|
21
|
-
rcov
|
22
|
-
shoulda
|
34
|
+
capper!
|
data/{LICENSE.txt → LICENSE}
RENAMED
File without changes
|
data/{README.rdoc → README.md}
RENAMED
@@ -1,8 +1,8 @@
|
|
1
|
-
|
1
|
+
# capper
|
2
2
|
|
3
3
|
Capper is a collection of opinionated Capistrano recipes
|
4
4
|
|
5
|
-
|
5
|
+
## Contributing to capper
|
6
6
|
|
7
7
|
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
8
8
|
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
@@ -10,8 +10,7 @@ Capper is a collection of opinionated Capistrano recipes
|
|
10
10
|
* Start a feature/bugfix branch
|
11
11
|
* Commit and push until you are happy with your contribution
|
12
12
|
|
13
|
-
|
13
|
+
## Copyright
|
14
14
|
|
15
15
|
Copyright (c) 2011 Benedikt Böhm. See LICENSE.txt for
|
16
16
|
further details.
|
17
|
-
|
data/Rakefile
CHANGED
@@ -1,28 +1,10 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
3
|
require 'rubygems'
|
4
|
-
require 'bundler'
|
5
4
|
|
6
5
|
begin
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
$stderr.puts "
|
11
|
-
exit e.status_code
|
6
|
+
require 'bundler'
|
7
|
+
Bundler::GemHelper.install_tasks
|
8
|
+
rescue LoadError
|
9
|
+
$stderr.puts "Bundler not installed. You should install it with: gem install bundler"
|
12
10
|
end
|
13
|
-
|
14
|
-
require 'rake'
|
15
|
-
require 'jeweler'
|
16
|
-
|
17
|
-
Jeweler::Tasks.new do |gem|
|
18
|
-
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
19
|
-
gem.name = "capper"
|
20
|
-
gem.homepage = "http://github.com/hollow/capper"
|
21
|
-
gem.license = "MIT"
|
22
|
-
gem.summary = %Q{Capistrano extensions for easy deployment}
|
23
|
-
gem.description = %Q{Capistrano extensions for easy deployment}
|
24
|
-
gem.email = "bb@xnull.de"
|
25
|
-
gem.authors = ["Benedikt Böhm"]
|
26
|
-
end
|
27
|
-
|
28
|
-
Jeweler::RubygemsDotOrgTasks.new
|
data/capper.gemspec
CHANGED
@@ -1,70 +1,23 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
-
# -*- encoding: utf-8 -*-
|
5
|
-
|
6
1
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "0.
|
9
|
-
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["Benedikt Böhm"]
|
12
|
-
s.date = %q{2011-07-12}
|
13
|
-
s.description = %q{Capistrano extensions for easy deployment}
|
14
|
-
s.email = %q{bb@xnull.de}
|
15
|
-
s.extra_rdoc_files = [
|
16
|
-
"LICENSE.txt",
|
17
|
-
"README.rdoc"
|
18
|
-
]
|
19
|
-
s.files = [
|
20
|
-
".document",
|
21
|
-
".rvmrc",
|
22
|
-
"Gemfile",
|
23
|
-
"Gemfile.lock",
|
24
|
-
"LICENSE.txt",
|
25
|
-
"README.rdoc",
|
26
|
-
"Rakefile",
|
27
|
-
"VERSION",
|
28
|
-
"capper.gemspec",
|
29
|
-
"lib/capper.rb",
|
30
|
-
"lib/capper/bundler.rb",
|
31
|
-
"lib/capper/git.rb",
|
32
|
-
"lib/capper/rails.rb",
|
33
|
-
"lib/capper/rvm.rb",
|
34
|
-
"lib/capper/templates/unicorn.rb.erb",
|
35
|
-
"lib/capper/templates/unicorn.sh.erb",
|
36
|
-
"lib/capper/unicorn.rb",
|
37
|
-
"lib/capper/utils/templates.rb",
|
38
|
-
"lib/capper/whenever.rb"
|
39
|
-
]
|
40
|
-
s.homepage = %q{http://github.com/hollow/capper}
|
2
|
+
s.name = "capper"
|
3
|
+
s.version = "0.2.0"
|
4
|
+
s.platform = Gem::Platform::RUBY
|
41
5
|
s.licenses = ["MIT"]
|
42
|
-
s.
|
43
|
-
s.
|
44
|
-
s.
|
6
|
+
s.authors = ["Benedikt Böhm"]
|
7
|
+
s.email = ["bb@xnull.de"]
|
8
|
+
s.homepage = "http://github.com/hollow/capper"
|
9
|
+
s.summary = %q{Capistrano is a collection of opinionated Capistrano recipes}
|
10
|
+
s.description = %q{Capistrano is a collection of opinionated Capistrano recipes}
|
45
11
|
|
46
|
-
|
47
|
-
|
12
|
+
s.add_dependency "erubis"
|
13
|
+
s.add_dependency "capistrano"
|
14
|
+
s.add_dependency "capistrano_colors"
|
48
15
|
|
49
|
-
|
50
|
-
s.add_runtime_dependency(%q<erubis>, [">= 0"])
|
51
|
-
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
52
|
-
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
53
|
-
s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
|
54
|
-
s.add_development_dependency(%q<rcov>, [">= 0"])
|
55
|
-
else
|
56
|
-
s.add_dependency(%q<erubis>, [">= 0"])
|
57
|
-
s.add_dependency(%q<shoulda>, [">= 0"])
|
58
|
-
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
59
|
-
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
60
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
61
|
-
end
|
62
|
-
else
|
63
|
-
s.add_dependency(%q<erubis>, [">= 0"])
|
64
|
-
s.add_dependency(%q<shoulda>, [">= 0"])
|
65
|
-
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
66
|
-
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
67
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
68
|
-
end
|
69
|
-
end
|
16
|
+
s.add_development_dependency "bundler", "~> 1.0.0"
|
70
17
|
|
18
|
+
s.files = `git ls-files`.split("\n")
|
19
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
20
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
21
|
+
s.require_paths = ["lib"]
|
22
|
+
s.extra_rdoc_files = ["LICENSE", "README.md"]
|
23
|
+
end
|
data/lib/capper/base.rb
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
require 'capistrano'
|
2
|
+
|
3
|
+
unless Capistrano::Configuration.respond_to?(:instance)
|
4
|
+
abort "capper requires Capistrano 2"
|
5
|
+
end
|
6
|
+
|
7
|
+
# add some nice colors
|
8
|
+
require "capistrano_colors"
|
9
|
+
|
10
|
+
# mixin various helpers
|
11
|
+
require 'capper/utils/load'
|
12
|
+
|
13
|
+
require 'capper/utils/templates'
|
14
|
+
include Capper::Utils::Templates
|
15
|
+
|
16
|
+
require 'capper/utils/multistage'
|
17
|
+
include Capper::Utils::Multistage
|
18
|
+
|
19
|
+
# define a bunch of defaults that make sense
|
20
|
+
Capper.load do
|
21
|
+
# apps should not require root access
|
22
|
+
set(:use_sudo, false)
|
23
|
+
set(:group_writable, false)
|
24
|
+
|
25
|
+
# default app layout
|
26
|
+
_cset(:user) { application }
|
27
|
+
_cset(:bin_path) { File.join(deploy_to, "bin") }
|
28
|
+
_cset(:base_path) { "/var/app" }
|
29
|
+
_cset(:config_path) { "#{shared_path}/config" }
|
30
|
+
set(:deploy_to) { "#{base_path}/#{application}" }
|
31
|
+
|
32
|
+
# cleanup by default
|
33
|
+
after "deploy:update", "deploy:cleanup"
|
34
|
+
|
35
|
+
namespace :deploy do
|
36
|
+
desc <<-DESC
|
37
|
+
Prepares one or more servers for deployment. Before you can use any \
|
38
|
+
of the Capistrano deployment tasks with your project, you will need to \
|
39
|
+
make sure all of your servers have been prepared with `cap deploy:setup'. When \
|
40
|
+
you add a new server to your cluster, you can easily run the setup task \
|
41
|
+
on just that server by specifying the HOSTS environment variable:
|
42
|
+
|
43
|
+
$ cap HOSTS=new.server.com deploy:setup
|
44
|
+
|
45
|
+
It is safe to run this task on servers that have already been set up; it \
|
46
|
+
will not destroy any deployed revisions or data.
|
47
|
+
DESC
|
48
|
+
task :setup, :except => { :no_release => true } do
|
49
|
+
dirs = [releases_path, shared_path]
|
50
|
+
dirs += shared_children.map { |d| File.join(shared_path, d) }
|
51
|
+
run "mkdir -p #{dirs.join(' ')}"
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
data/lib/capper/bundler.rb
CHANGED
@@ -1,11 +1,19 @@
|
|
1
|
-
require File.dirname(__FILE__) + '
|
1
|
+
require File.dirname(__FILE__) + '/base' unless defined?(Capper)
|
2
2
|
require 'bundler/capistrano'
|
3
3
|
|
4
|
+
# bundler requires rvm
|
5
|
+
require "capper/rvm"
|
6
|
+
|
4
7
|
Capper.load do
|
8
|
+
# do not install a global bundle
|
9
|
+
# instead, use the gemset selected by rvm_ruby_string
|
10
|
+
set(:bundle_dir) { File.join(shared_path, 'bundle', rvm_ruby_string) }
|
11
|
+
|
5
12
|
namespace :bundle do
|
6
13
|
desc "Setup bundler"
|
7
14
|
task :setup, :except => {:no_release => true} do
|
8
15
|
run "if ! gem query -i -n ^bundler$ >/dev/null; then gem install bundler; fi"
|
16
|
+
run "mkdir -p #{bundle_dir}"
|
9
17
|
end
|
10
18
|
end
|
11
19
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/base' unless defined?(Capper)
|
2
|
+
|
3
|
+
Capper.load do
|
4
|
+
_cset(:config_repo) { abort "Please specify the config repository, set :config_repo, 'foo'" }
|
5
|
+
|
6
|
+
after "deploy:setup" do
|
7
|
+
run "rm -rf #{config_path} && git clone #{config_repo} #{config_path}"
|
8
|
+
end
|
9
|
+
|
10
|
+
after "deploy:update_code" do
|
11
|
+
run "cd #{config_path} && git pull"
|
12
|
+
end
|
13
|
+
end
|
data/lib/capper/git.rb
CHANGED
@@ -0,0 +1,20 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/base' unless defined?(Capper)
|
2
|
+
|
3
|
+
Capper.load do
|
4
|
+
# execute the specified stage so that recipes required in stage can contribute to task list
|
5
|
+
on :load do
|
6
|
+
if stages.include?(ARGV.first)
|
7
|
+
find_and_execute_task(ARGV.first) if ARGV.any?{ |option| option =~ /-T|--tasks|-e|--explain/ }
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
namespace :multistage do
|
12
|
+
task :ensure do
|
13
|
+
unless exists?(:current_stage)
|
14
|
+
abort "No stage specified. Please specify one of: #{stages.join(', ')} (e.g. `cap #{stages.first} #{ARGV.last}')"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
on :start, "multistage:ensure", :except => stages
|
20
|
+
end
|
data/lib/capper/rails.rb
CHANGED
data/lib/capper/rvm.rb
CHANGED
@@ -1,30 +1,33 @@
|
|
1
|
-
require File.dirname(__FILE__) + '
|
1
|
+
require File.dirname(__FILE__) + '/base' unless defined?(Capper)
|
2
2
|
|
3
3
|
$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
|
4
4
|
require 'rvm/capistrano'
|
5
5
|
|
6
6
|
Capper.load do
|
7
7
|
set(:rvm_type, :user)
|
8
|
-
set(:rvm_ruby_string, File.read(".rvmrc").gsub(/^rvm use --create (.*)
|
8
|
+
set(:rvm_ruby_string, File.read(".rvmrc").gsub(/^rvm use --create (.*)/, '\1').strip)
|
9
9
|
|
10
10
|
namespace :rvm do
|
11
11
|
# install the requested ruby if missing
|
12
12
|
desc "Install the selected ruby version using RVM."
|
13
13
|
task :setup, :except => {:no_release => true} do
|
14
|
-
|
15
|
-
|
14
|
+
wo_gemset = rvm_ruby_string.gsub(/@.*/, '')
|
15
|
+
run("if ! rvm list rubies | grep -q #{wo_gemset}; then " +
|
16
|
+
"rvm install #{rvm_ruby_string}; fi && " +
|
17
|
+
"rvm use --create #{rvm_ruby_string}",
|
16
18
|
:shell => "/bin/bash -l")
|
17
19
|
|
18
20
|
# this ensures that Gentoos declare -x RUBYOPT="-rauto_gem" is ignored.
|
19
|
-
run "touch ~/.rvm/rubies/#{
|
21
|
+
run "touch ~/.rvm/rubies/#{wo_gemset}/lib/ruby/site_ruby/auto_gem.rb"
|
20
22
|
end
|
21
23
|
|
22
24
|
# prevents interactive rvm dialog
|
23
|
-
task :
|
24
|
-
run "rvm rvmrc
|
25
|
+
task :trust_rvmrc, :except => {:no_release => true} do
|
26
|
+
run "rvm rvmrc trust #{release_path} >/dev/null"
|
27
|
+
run "rvm rvmrc trust #{current_path} >/dev/null"
|
25
28
|
end
|
26
29
|
end
|
27
30
|
|
28
|
-
|
29
|
-
after "deploy:
|
31
|
+
before "deploy:setup", "rvm:setup"
|
32
|
+
after "deploy:symlink", "rvm:trust_rvmrc"
|
30
33
|
end
|
data/lib/capper/unicorn.rb
CHANGED
@@ -1,8 +1,11 @@
|
|
1
|
-
require File.dirname(__FILE__) + '
|
1
|
+
require File.dirname(__FILE__) + '/base' unless defined?(Capper)
|
2
2
|
|
3
3
|
# Unicorn capistrano controls.
|
4
4
|
# See http://unicorn.bogomips.org/SIGNALS.html for signals that can be sent to unicorn.
|
5
5
|
|
6
|
+
# unicorn requires bundler
|
7
|
+
require 'capper/bundler'
|
8
|
+
|
6
9
|
Capper.load do
|
7
10
|
# unicorn configuration variables
|
8
11
|
_cset(:unicorn_worker_processes, 4)
|
@@ -10,7 +13,7 @@ Capper.load do
|
|
10
13
|
|
11
14
|
# these cannot be overriden
|
12
15
|
set(:unicorn_script) { "#{bin_path}/unicorn" }
|
13
|
-
set(:unicorn_config) { "#{
|
16
|
+
set(:unicorn_config) { "#{config_path}/unicorn.rb" }
|
14
17
|
set(:unicorn_pidfile) { "#{shared_path}/pids/unicorn.pid" }
|
15
18
|
|
16
19
|
namespace :deploy do
|
@@ -0,0 +1,27 @@
|
|
1
|
+
class Capper
|
2
|
+
module Utils
|
3
|
+
module Multistage
|
4
|
+
|
5
|
+
def stage(name, &block)
|
6
|
+
stages = fetch(:stages, [])
|
7
|
+
|
8
|
+
if stages.include?(name)
|
9
|
+
abort "Multiple stages with the same name are not allowed"
|
10
|
+
end
|
11
|
+
|
12
|
+
namespace :multistage do
|
13
|
+
task(name, {}, &block)
|
14
|
+
end
|
15
|
+
|
16
|
+
desc "Set the target stage to `#{name}'."
|
17
|
+
task(name) do
|
18
|
+
set(:current_stage, name.to_sym)
|
19
|
+
find_and_execute_task("multistage:#{name}")
|
20
|
+
end
|
21
|
+
|
22
|
+
set(:stages, [stages, name].flatten.sort)
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/capper/whenever.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require File.dirname(__FILE__) + '/base' unless defined?(Capper)
|
2
2
|
|
3
3
|
# whenever requires bundler
|
4
4
|
require 'capper/bundler'
|
@@ -33,13 +33,13 @@ Capper.load do
|
|
33
33
|
task :update_crontab do
|
34
34
|
on_rollback do
|
35
35
|
if previous_release
|
36
|
-
run "cd #{previous_release} && #{whenever_command} #{whenever_update_flags}"
|
36
|
+
run "cd #{previous_release} && #{whenever_command} #{whenever_update_flags}"
|
37
37
|
else
|
38
|
-
run "cd #{release_path} && #{whenever_command} #{whenever_clear_flags}"
|
38
|
+
run "cd #{release_path} && #{whenever_command} #{whenever_clear_flags}"
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
-
run "cd #{current_path} && #{whenever_command} #{whenever_update_flags}"
|
42
|
+
run "cd #{current_path} && #{whenever_command} #{whenever_update_flags}"
|
43
43
|
end
|
44
44
|
|
45
45
|
desc <<-DESC
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: capper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.
|
5
|
+
version: 0.2.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- "Benedikt B\xC3\xB6hm"
|
@@ -10,11 +10,12 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-07-
|
13
|
+
date: 2011-07-26 00:00:00 +02:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: erubis
|
18
|
+
prerelease: false
|
18
19
|
requirement: &id001 !ruby/object:Gem::Requirement
|
19
20
|
none: false
|
20
21
|
requirements:
|
@@ -22,79 +23,72 @@ dependencies:
|
|
22
23
|
- !ruby/object:Gem::Version
|
23
24
|
version: "0"
|
24
25
|
type: :runtime
|
25
|
-
prerelease: false
|
26
26
|
version_requirements: *id001
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: capistrano
|
29
|
+
prerelease: false
|
29
30
|
requirement: &id002 !ruby/object:Gem::Requirement
|
30
31
|
none: false
|
31
32
|
requirements:
|
32
33
|
- - ">="
|
33
34
|
- !ruby/object:Gem::Version
|
34
35
|
version: "0"
|
35
|
-
type: :
|
36
|
-
prerelease: false
|
36
|
+
type: :runtime
|
37
37
|
version_requirements: *id002
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
|
-
name:
|
39
|
+
name: capistrano_colors
|
40
|
+
prerelease: false
|
40
41
|
requirement: &id003 !ruby/object:Gem::Requirement
|
41
42
|
none: false
|
42
43
|
requirements:
|
43
|
-
- -
|
44
|
+
- - ">="
|
44
45
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
46
|
-
type: :
|
47
|
-
prerelease: false
|
46
|
+
version: "0"
|
47
|
+
type: :runtime
|
48
48
|
version_requirements: *id003
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
|
-
name:
|
50
|
+
name: bundler
|
51
|
+
prerelease: false
|
51
52
|
requirement: &id004 !ruby/object:Gem::Requirement
|
52
53
|
none: false
|
53
54
|
requirements:
|
54
55
|
- - ~>
|
55
56
|
- !ruby/object:Gem::Version
|
56
|
-
version: 1.
|
57
|
+
version: 1.0.0
|
57
58
|
type: :development
|
58
|
-
prerelease: false
|
59
59
|
version_requirements: *id004
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
none: false
|
64
|
-
requirements:
|
65
|
-
- - ">="
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: "0"
|
68
|
-
type: :development
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: *id005
|
71
|
-
description: Capistrano extensions for easy deployment
|
72
|
-
email: bb@xnull.de
|
60
|
+
description: Capistrano is a collection of opinionated Capistrano recipes
|
61
|
+
email:
|
62
|
+
- bb@xnull.de
|
73
63
|
executables: []
|
74
64
|
|
75
65
|
extensions: []
|
76
66
|
|
77
67
|
extra_rdoc_files:
|
78
|
-
- LICENSE
|
79
|
-
- README.
|
68
|
+
- LICENSE
|
69
|
+
- README.md
|
80
70
|
files:
|
81
71
|
- .document
|
72
|
+
- .gitignore
|
82
73
|
- .rvmrc
|
83
74
|
- Gemfile
|
84
75
|
- Gemfile.lock
|
85
|
-
- LICENSE
|
86
|
-
- README.
|
76
|
+
- LICENSE
|
77
|
+
- README.md
|
87
78
|
- Rakefile
|
88
|
-
- VERSION
|
89
79
|
- capper.gemspec
|
90
|
-
- lib/capper.rb
|
80
|
+
- lib/capper/base.rb
|
91
81
|
- lib/capper/bundler.rb
|
82
|
+
- lib/capper/config.rb
|
92
83
|
- lib/capper/git.rb
|
84
|
+
- lib/capper/multistage.rb
|
93
85
|
- lib/capper/rails.rb
|
94
86
|
- lib/capper/rvm.rb
|
95
87
|
- lib/capper/templates/unicorn.rb.erb
|
96
88
|
- lib/capper/templates/unicorn.sh.erb
|
97
89
|
- lib/capper/unicorn.rb
|
90
|
+
- lib/capper/utils/load.rb
|
91
|
+
- lib/capper/utils/multistage.rb
|
98
92
|
- lib/capper/utils/templates.rb
|
99
93
|
- lib/capper/whenever.rb
|
100
94
|
has_rdoc: true
|
@@ -111,9 +105,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
111
105
|
requirements:
|
112
106
|
- - ">="
|
113
107
|
- !ruby/object:Gem::Version
|
114
|
-
hash: 2356379123392142359
|
115
|
-
segments:
|
116
|
-
- 0
|
117
108
|
version: "0"
|
118
109
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
110
|
none: false
|
@@ -127,6 +118,6 @@ rubyforge_project:
|
|
127
118
|
rubygems_version: 1.6.2
|
128
119
|
signing_key:
|
129
120
|
specification_version: 3
|
130
|
-
summary: Capistrano
|
121
|
+
summary: Capistrano is a collection of opinionated Capistrano recipes
|
131
122
|
test_files: []
|
132
123
|
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.1.0
|
data/lib/capper.rb
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
require 'capistrano'
|
2
|
-
|
3
|
-
unless Capistrano::Configuration.respond_to?(:instance)
|
4
|
-
abort "capper requires Capistrano 2"
|
5
|
-
end
|
6
|
-
|
7
|
-
require 'capper/utils/templates'
|
8
|
-
|
9
|
-
# mixin various helpers
|
10
|
-
include Capper::Utils::Templates
|
11
|
-
|
12
|
-
# define a bunch of defaults that make sense
|
13
|
-
Capistrano::Configuration.instance(true).load do
|
14
|
-
# apps should not require root access
|
15
|
-
_cset(:use_sudo, false)
|
16
|
-
_cset(:group_writable, false)
|
17
|
-
|
18
|
-
# default app layout
|
19
|
-
_cset(:user) { application }
|
20
|
-
_cset(:bin_path) { File.join(deploy_to, "bin") }
|
21
|
-
_cset(:base_path) { "/var/app" }
|
22
|
-
set(:deploy_to) { "#{base_path}/#{application}" }
|
23
|
-
|
24
|
-
# cleanup by default
|
25
|
-
after "deploy:update", "deploy:cleanup"
|
26
|
-
end
|
27
|
-
|
28
|
-
class Capper
|
29
|
-
def self.load(&block)
|
30
|
-
Capistrano::Configuration.instance(true).load(&block)
|
31
|
-
end
|
32
|
-
end
|