wulffeld_capistrano_recipes 0.0.1
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/Rakefile +17 -0
- data/VERSION +1 -0
- data/lib/capistrano/recipes/deploy/strategy/remote_cache_with_project_root.rb +27 -0
- data/wulffeld_capistrano_recipes.gemspec +35 -0
- metadata +70 -0
data/Rakefile
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "wulffeld_capistrano_recipes"
|
8
|
+
gem.summary = "Capistrano deployment strategies for Capistrano 2.0."
|
9
|
+
gem.description = ""
|
10
|
+
gem.email = "martin@wulffeld.org"
|
11
|
+
gem.homepage = "http://www.wulffeld.org/"
|
12
|
+
gem.authors = ["Martin Moen Wulffeld"]
|
13
|
+
end
|
14
|
+
Jeweler::GemcutterTasks.new
|
15
|
+
rescue LoadError
|
16
|
+
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
17
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.1
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# Source: http://ricroberts.com/articles/deploying-a-sub-folder-with-capistrano
|
2
|
+
require 'capistrano/recipes/deploy/strategy/remote_cache'
|
3
|
+
|
4
|
+
module Capistrano
|
5
|
+
module Deploy
|
6
|
+
module Strategy
|
7
|
+
# Implements the deployment strategy that keeps a cached checkout of
|
8
|
+
# the source code on each remote server. Each deploy simply updates the
|
9
|
+
# cached checkout, and then does a copy from the cached copy to the
|
10
|
+
# final deployment location.
|
11
|
+
class RemoteCacheWithProjectRoot < RemoteCache
|
12
|
+
def copy_repository_cache
|
13
|
+
cached_project_root = File.join(repository_cache, project_root)
|
14
|
+
|
15
|
+
logger.trace "copying the cached version from #{cached_project_root} to #{configuration[:release_path]}"
|
16
|
+
|
17
|
+
if copy_exclude.empty?
|
18
|
+
run "cp -RPp #{cached_project_root} #{configuration[:release_path]} && #{mark}"
|
19
|
+
else
|
20
|
+
exclusions = copy_exclude.map { |e| "--exclude=\"#{e}\"" }.join(' ')
|
21
|
+
run "rsync -lrpt #{exclusions} #{cached_project_root}/* #{configuration[:release_path]} && #{mark}"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,35 @@
|
|
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
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{wulffeld_capistrano_recipes}
|
8
|
+
s.version = "0.0.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Martin Moen Wulffeld"]
|
12
|
+
s.date = %q{2011-04-22}
|
13
|
+
s.description = %q{}
|
14
|
+
s.email = %q{martin@wulffeld.org}
|
15
|
+
s.files = [
|
16
|
+
"Rakefile",
|
17
|
+
"VERSION",
|
18
|
+
"lib/capistrano/recipes/deploy/strategy/remote_cache_with_project_root.rb",
|
19
|
+
"wulffeld_capistrano_recipes.gemspec"
|
20
|
+
]
|
21
|
+
s.homepage = %q{http://www.wulffeld.org/}
|
22
|
+
s.require_paths = ["lib"]
|
23
|
+
s.rubygems_version = %q{1.5.0}
|
24
|
+
s.summary = %q{Capistrano deployment strategies for Capistrano 2.0.}
|
25
|
+
|
26
|
+
if s.respond_to? :specification_version then
|
27
|
+
s.specification_version = 3
|
28
|
+
|
29
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
30
|
+
else
|
31
|
+
end
|
32
|
+
else
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
metadata
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: wulffeld_capistrano_recipes
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Martin Moen Wulffeld
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-04-22 00:00:00 +02:00
|
19
|
+
default_executable:
|
20
|
+
dependencies: []
|
21
|
+
|
22
|
+
description: ""
|
23
|
+
email: martin@wulffeld.org
|
24
|
+
executables: []
|
25
|
+
|
26
|
+
extensions: []
|
27
|
+
|
28
|
+
extra_rdoc_files: []
|
29
|
+
|
30
|
+
files:
|
31
|
+
- Rakefile
|
32
|
+
- VERSION
|
33
|
+
- lib/capistrano/recipes/deploy/strategy/remote_cache_with_project_root.rb
|
34
|
+
- wulffeld_capistrano_recipes.gemspec
|
35
|
+
has_rdoc: true
|
36
|
+
homepage: http://www.wulffeld.org/
|
37
|
+
licenses: []
|
38
|
+
|
39
|
+
post_install_message:
|
40
|
+
rdoc_options: []
|
41
|
+
|
42
|
+
require_paths:
|
43
|
+
- lib
|
44
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
45
|
+
none: false
|
46
|
+
requirements:
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
hash: 3
|
50
|
+
segments:
|
51
|
+
- 0
|
52
|
+
version: "0"
|
53
|
+
required_rubygems_version: !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
|
+
requirements: []
|
63
|
+
|
64
|
+
rubyforge_project:
|
65
|
+
rubygems_version: 1.5.0
|
66
|
+
signing_key:
|
67
|
+
specification_version: 3
|
68
|
+
summary: Capistrano deployment strategies for Capistrano 2.0.
|
69
|
+
test_files: []
|
70
|
+
|