jtrupiano-capistrano-extensions 0.1.4 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +3 -0
- data/ISSUES.txt +10 -0
- data/Manifest.txt +2 -1
- data/README.txt +7 -5
- data/Rakefile +2 -2
- data/capistrano-extensions.gemspec +41 -0
- data/lib/capistrano-extensions/deploy.rb +11 -5
- data/lib/capistrano-extensions/version.rb +1 -1
- metadata +13 -7
data/History.txt
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
=== v0.1.5 / 2009-02-22
|
2
|
+
* Fixed local:restore_content to work better with :content_directories.
|
3
|
+
|
1
4
|
=== v0.1.4 / 2008-09-12
|
2
5
|
* In local:restore_db, the db import would previously fail if the username was not specified in your database.yml
|
3
6
|
file. I have corrected this and set it to default to 'root' now (as rails does).
|
data/ISSUES.txt
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
Known Bugs and Shortcomings
|
2
|
+
|
3
|
+
(this one is specific to passenger-recipes, which really should be merged into capistrano-extensions...)
|
4
|
+
* When introducing a new shared content directory, a bug can manifest itself when trying to sync production data back to your staging server. Consider the following scenario:
|
5
|
+
1) Add a new upload field to your app (e.g. using file_column)
|
6
|
+
2) Update the deploy script to reference this new shared directory (via either :shared_content or :content_directories)
|
7
|
+
3) Try cap remote:sync FROM=production TO=staging --> It will fail when it tries to tarball up the shared content on production.
|
8
|
+
|
9
|
+
Currently, the best workaround is to log onto your production server and created the shared content directory, e.g. #{shared_path}/content/model_that_you_added_file_column_to
|
10
|
+
|
data/Manifest.txt
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
History.txt
|
2
|
+
ISSUES.txt
|
2
3
|
Manifest.txt
|
3
4
|
README.txt
|
4
5
|
Rakefile
|
5
6
|
bin/capistrano-extensions-sync-content
|
6
7
|
bin/capistrano-extensions-sync-db
|
8
|
+
capistrano-extensions.gemspec
|
7
9
|
lib/capistrano-extensions.rb
|
8
10
|
lib/capistrano-extensions/deploy.rb
|
9
11
|
lib/capistrano-extensions/geminstaller_dependency.rb
|
10
12
|
lib/capistrano-extensions/version.rb
|
11
|
-
|
data/README.txt
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
= capistrano-extensions
|
2
2
|
|
3
|
-
* http://
|
3
|
+
* Stable API: http://johntrupiano.rubyforge.org/capistrano-extensions
|
4
|
+
* Source: http://github.com/jtrupiano/capistrano-extensions
|
4
5
|
|
5
6
|
== DESCRIPTION/FEATURES:
|
6
7
|
|
7
8
|
This gem provides a base set of Capistrano extensions including the following:
|
8
9
|
* a new :gemfile RemoteDependency type
|
9
|
-
* tasks/helpers for handling public asset folders (e.g. created by the file_column plugin)
|
10
|
+
* tasks/helpers for handling public and private asset folders (e.g. created by the file_column plugin)
|
10
11
|
* tasks/helpers for auto-syncing server gems (via integration with Chad Wooley's GemInstaller gem)
|
11
12
|
* helpers for dealing with multiple deployable environments (e.g. staging, prodtest, production)
|
12
13
|
* tasks for working with remote logfiles
|
@@ -20,12 +21,13 @@ For a detailed exploration of these features, check out the wiki: http://github.
|
|
20
21
|
|
21
22
|
== REQUIREMENTS:
|
22
23
|
|
23
|
-
* Capistrano
|
24
|
-
* GemInstaller
|
24
|
+
* Capistrano ~> 2.5.5
|
25
|
+
* GemInstaller ~> 0.5.1
|
25
26
|
|
26
27
|
== INSTALL:
|
27
28
|
|
28
|
-
* sudo gem install capistrano-extensions
|
29
|
+
* sudo gem install capistrano-extensions (stable from rubyforge)
|
30
|
+
* sudo gem install jtrupiano-capistrano-extensions (HEAD of repo from github)
|
29
31
|
|
30
32
|
== LICENSE:
|
31
33
|
|
data/Rakefile
CHANGED
@@ -26,8 +26,8 @@ Hoe.new(PKG_NAME, PKG_VERSION) do |p|
|
|
26
26
|
p.summary = p.description # More details later??
|
27
27
|
p.remote_rdoc_dir = PKG_NAME # Release to /PKG_NAME
|
28
28
|
# p.changes = p.paragraphs_of('CHANGELOG', 0..1).join("\n\n")
|
29
|
-
p.extra_deps << ["capistrano", "
|
30
|
-
p.extra_deps << ["geminstaller", "
|
29
|
+
p.extra_deps << ["capistrano", "~> 2.5.5"]
|
30
|
+
p.extra_deps << ["geminstaller", "~> 0.5.1"]
|
31
31
|
p.need_zip = true
|
32
32
|
p.need_tar = false
|
33
33
|
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{capistrano-extensions}
|
5
|
+
s.version = "0.1.6"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["John Trupiano"]
|
9
|
+
s.date = %q{2009-03-11}
|
10
|
+
s.description = %q{A base set of Capistrano extensions-- aids with the file_column plugin, the GemInstaller gem, multiple deployable environments, logfile helpers, and database/asset synchronization from production to local environment}
|
11
|
+
s.email = %q{jtrupiano@gmail.com}
|
12
|
+
s.executables = ["capistrano-extensions-sync-content", "capistrano-extensions-sync-db"]
|
13
|
+
s.extra_rdoc_files = ["History.txt", "ISSUES.txt", "Manifest.txt", "README.txt"]
|
14
|
+
s.files = ["History.txt", "ISSUES.txt", "Manifest.txt", "README.txt", "Rakefile", "bin/capistrano-extensions-sync-content", "bin/capistrano-extensions-sync-db", "capistrano-extensions.gemspec", "lib/capistrano-extensions.rb", "lib/capistrano-extensions/deploy.rb", "lib/capistrano-extensions/geminstaller_dependency.rb", "lib/capistrano-extensions/version.rb"]
|
15
|
+
s.has_rdoc = true
|
16
|
+
s.homepage = %q{http://github.com/jtrupiano/capistrano-extensions}
|
17
|
+
s.rdoc_options = ["--main", "README.txt"]
|
18
|
+
s.require_paths = ["lib"]
|
19
|
+
s.rubyforge_project = %q{johntrupiano}
|
20
|
+
s.rubygems_version = %q{1.3.1}
|
21
|
+
s.summary = %q{A base set of Capistrano extensions-- aids with the file_column plugin, the GemInstaller gem, multiple deployable environments, logfile helpers, and database/asset synchronization from production to local environment}
|
22
|
+
|
23
|
+
if s.respond_to? :specification_version then
|
24
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
25
|
+
s.specification_version = 2
|
26
|
+
|
27
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
28
|
+
s.add_runtime_dependency(%q<capistrano>, ["~> 2.5.5"])
|
29
|
+
s.add_runtime_dependency(%q<geminstaller>, ["~> 0.5.1"])
|
30
|
+
s.add_development_dependency(%q<hoe>, [">= 1.9.0"])
|
31
|
+
else
|
32
|
+
s.add_dependency(%q<capistrano>, ["~> 2.5.5"])
|
33
|
+
s.add_dependency(%q<geminstaller>, ["~> 0.5.1"])
|
34
|
+
s.add_dependency(%q<hoe>, [">= 1.9.0"])
|
35
|
+
end
|
36
|
+
else
|
37
|
+
s.add_dependency(%q<capistrano>, ["~> 2.5.5"])
|
38
|
+
s.add_dependency(%q<geminstaller>, ["~> 0.5.1"])
|
39
|
+
s.add_dependency(%q<hoe>, [">= 1.9.0"])
|
40
|
+
end
|
41
|
+
end
|
@@ -87,9 +87,9 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
87
87
|
mappings = content_directories.inject(shared_content) { |hsh, dir| hsh.merge({"content/#{dir}" => "public/#{dir}"}) }
|
88
88
|
mappings.each_pair do |remote, local|
|
89
89
|
run <<-CMD
|
90
|
+
umask 0022 &&
|
90
91
|
mkdir -p #{shared_path}/#{remote} &&
|
91
|
-
ln -sf #{shared_path}/#{remote} #{latest_release}/#{local}
|
92
|
-
chmod 755 -R #{shared_path}/#{remote}
|
92
|
+
ln -sf #{shared_path}/#{remote} #{latest_release}/#{local}
|
93
93
|
CMD
|
94
94
|
end
|
95
95
|
end
|
@@ -261,7 +261,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
261
261
|
run "cd #{shared_path} && tar czf #{shared_path}/content_backup.tar.gz #{folders.join(' ')}"
|
262
262
|
|
263
263
|
#run "cd #{content_path} && tar czf #{shared_path}/content_backup.tar.gz *"
|
264
|
-
|
264
|
+
download("#{shared_path}/content_backup.tar.gz", "#{application}-#{rails_env}-content_backup.tar.gz")
|
265
265
|
run "rm -f #{shared_path}/content_backup.tar.gz"
|
266
266
|
end
|
267
267
|
|
@@ -272,11 +272,17 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
272
272
|
task :restore_content do
|
273
273
|
from = ENV['FROM'] || rails_env
|
274
274
|
|
275
|
-
system "
|
275
|
+
system "mkdir -p tmp/content-#{from}"
|
276
|
+
system "tar xzf #{application}-#{from}-content_backup.tar.gz -C tmp/content-#{from}"
|
276
277
|
system "rm -f #{application}-#{from}-content_backup.tar.gz"
|
277
278
|
|
278
279
|
shared_content.each_pair do |remote, local|
|
279
|
-
system "rm -rf #{local} && mv
|
280
|
+
system "rm -rf #{local} && mv tmp/content-#{from}/#{remote} #{local}"
|
281
|
+
end
|
282
|
+
|
283
|
+
content_directories.each do |public_dir|
|
284
|
+
system "rm -rf public/#{public_dir}"
|
285
|
+
system "mv tmp/content-#{from}/content/#{public_dir} public/"
|
280
286
|
end
|
281
287
|
|
282
288
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jtrupiano-capistrano-extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Trupiano
|
@@ -9,35 +9,38 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2009-03-11 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: capistrano
|
17
|
+
type: :runtime
|
17
18
|
version_requirement:
|
18
19
|
version_requirements: !ruby/object:Gem::Requirement
|
19
20
|
requirements:
|
20
|
-
- -
|
21
|
+
- - ~>
|
21
22
|
- !ruby/object:Gem::Version
|
22
|
-
version: 2.
|
23
|
+
version: 2.5.5
|
23
24
|
version:
|
24
25
|
- !ruby/object:Gem::Dependency
|
25
26
|
name: geminstaller
|
27
|
+
type: :runtime
|
26
28
|
version_requirement:
|
27
29
|
version_requirements: !ruby/object:Gem::Requirement
|
28
30
|
requirements:
|
29
|
-
- -
|
31
|
+
- - ~>
|
30
32
|
- !ruby/object:Gem::Version
|
31
|
-
version: 0.
|
33
|
+
version: 0.5.1
|
32
34
|
version:
|
33
35
|
- !ruby/object:Gem::Dependency
|
34
36
|
name: hoe
|
37
|
+
type: :development
|
35
38
|
version_requirement:
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
41
|
- - ">="
|
39
42
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
43
|
+
version: 1.9.0
|
41
44
|
version:
|
42
45
|
description: A base set of Capistrano extensions-- aids with the file_column plugin, the GemInstaller gem, multiple deployable environments, logfile helpers, and database/asset synchronization from production to local environment
|
43
46
|
email: jtrupiano@gmail.com
|
@@ -48,15 +51,18 @@ extensions: []
|
|
48
51
|
|
49
52
|
extra_rdoc_files:
|
50
53
|
- History.txt
|
54
|
+
- ISSUES.txt
|
51
55
|
- Manifest.txt
|
52
56
|
- README.txt
|
53
57
|
files:
|
54
58
|
- History.txt
|
59
|
+
- ISSUES.txt
|
55
60
|
- Manifest.txt
|
56
61
|
- README.txt
|
57
62
|
- Rakefile
|
58
63
|
- bin/capistrano-extensions-sync-content
|
59
64
|
- bin/capistrano-extensions-sync-db
|
65
|
+
- capistrano-extensions.gemspec
|
60
66
|
- lib/capistrano-extensions.rb
|
61
67
|
- lib/capistrano-extensions/deploy.rb
|
62
68
|
- lib/capistrano-extensions/geminstaller_dependency.rb
|