capistrano-extensions 0.1.8 → 0.1.9

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.
@@ -0,0 +1,5 @@
1
+ *.sw?
2
+ .DS_Store
3
+ coverage
4
+ rdoc
5
+ pkg
@@ -1,3 +1,20 @@
1
+ === v0.1.9 / 2009-08-12
2
+ * When syncing data remotely and locally, drop the target database before importing the source database. Previously, errors would occur during migration when the pending migration set included a table rename. This is due to the fact that mysqldump only creates DROP TABLE statements for tables that actually exist.
3
+
4
+ === v0.1.8 / 2009-04-27
5
+ * Add two-level caching for syncing of content and database content. First cache is locally in :tmp_dir (defaults to tmp/cap/), second is on the server in #{shared_path}
6
+ * When syncing the database, automatically drop the target database (after backing it up) to eliminate the need to manually run rake db:drop db:create on the target server.
7
+ * Add util::tmp::check, which will alert you with red messages when your local cache grows too big (> 50MB or > 10 files)
8
+ * Expose :store_remote_backups and :store_dev_backups to turn on/off data/content backup when syncing.
9
+ * Introduce :remote_backup_expires to set the expiry time in seconds for the remote cache (defaults to 2 days)
10
+ * Via :zip, :unzip, and :zip_ext, allow user to choose their compression algorithm
11
+ * Introduce :exclude_paths, which is basically a wrapper for :copy_exclude. :copy_exclude is now preset to exclude all environment directories (particularly helpful for users of environmentalist) that are not being deployed to.
12
+ * Change default :deploy_to to "/var/vhosts/#{application}"
13
+ * Change default :deployable_environments to [:staging]
14
+ * Change default :deploy_via to :copy
15
+ * Change default :copy_cache to { File.expand_path("~/.capistrano/#{application}") }, which allows us to blindly use the user's home directory.
16
+ * Move gem management to Jeweler
17
+
1
18
  === v0.1.5 / 2009-02-22
2
19
  * Fixed local:restore_content to work better with :content_directories.
3
20
 
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2008 Peter H. Boling of 9thBit LLC
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.
@@ -6,13 +6,13 @@
6
6
  == DESCRIPTION/FEATURES:
7
7
 
8
8
  This gem provides a base set of {Capistrano}[http://www.capify.org/] extensions including the following:
9
- * a new :gemfile RemoteDependency type
10
- * tasks/helpers for handling public and private asset folders (e.g. created by the file_column plugin)
11
- * tasks/helpers for auto-syncing server gems (via integration with the {GemInstaller}[http://geminstaller.rubyforge.org/] gem)
12
- * helpers for dealing with multiple deployable environments (e.g. staging, prodtest, production)
13
- * tasks for working with remote logfiles
14
- * tasks for database/asset synchronization from production back to local environments
15
- * integration with {environmentalist}[http://johntrupiano.rubyforge.org/environmentalist]
9
+ * a new :gemfile RemoteDependency type
10
+ * tasks/helpers for handling public and private asset folders (e.g. created by the file_column plugin)
11
+ * tasks/helpers for auto-syncing server gems (via integration with the {GemInstaller}[http://geminstaller.rubyforge.org/] gem)
12
+ * helpers for dealing with multiple deployable environments (e.g. staging, prodtest, production)
13
+ * tasks for working with remote logfiles
14
+ * tasks for database/asset synchronization from production back to local environments
15
+ * integration with {environmentalist}[http://johntrupiano.rubyforge.org/environmentalist]
16
16
 
17
17
  For a detailed exploration of these features, check out the wiki: http://github.com/jtrupiano/capistrano-extensions/wikis/home
18
18
 
@@ -0,0 +1,71 @@
1
+ require 'rake'
2
+ require 'rake/testtask'
3
+ require 'rake/rdoctask'
4
+
5
+ gem 'jeweler', '~> 1.2.0'
6
+ require 'jeweler'
7
+ Jeweler::Tasks.new do |gem|
8
+ gem.name = "capistrano-extensions"
9
+ gem.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)
10
+ gem.authors = ["John Trupiano"]
11
+ gem.email = "jtrupiano@gmail.com"
12
+ gem.homepage = "http://github.com/jtrupiano/capistrano-extensions"
13
+ gem.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)
14
+
15
+ gem.rubyforge_project = "johntrupiano"
16
+
17
+ gem.add_dependency "capistrano", "~> 2.5.5"
18
+ end
19
+
20
+ # preprare for
21
+ Jeweler::RubyforgeTasks.new do |rubyforge|
22
+ rubyforge.remote_doc_path = "capistrano-extensions"
23
+ rubyforge.doc_task = "rdoc"
24
+ end
25
+
26
+ desc 'Default: run unit tests.'
27
+ task :default => :test
28
+
29
+ desc 'Test the capistrano-extensions plugin.'
30
+ Rake::TestTask.new(:test) do |t|
31
+ t.libs << 'lib'
32
+ t.pattern = 'test/**/*_test.rb'
33
+ t.verbose = true
34
+ end
35
+
36
+ desc 'Generate documentation'
37
+ Rake::RDocTask.new do |rdoc|
38
+ config = YAML.load(File.read('VERSION.yml'))
39
+ rdoc.rdoc_dir = 'rdoc'
40
+ rdoc.title = "capistrano-extensions #{config[:major]}.#{config[:minor]}.#{config[:patch]}"
41
+ rdoc.options << '--line-numbers' << '--inline-source'
42
+ rdoc.rdoc_files.include('README*')
43
+ rdoc.rdoc_files.include('lib/**/*.rb')
44
+ end
45
+
46
+ # Rubyforge documentation task
47
+ # begin
48
+ # require 'rake/contrib/sshpublisher'
49
+ # namespace :rubyforge do
50
+ #
51
+ # desc "Release gem and RDoc documentation to RubyForge"
52
+ # task :release => ["rubyforge:release:gem", "rubyforge:release:docs"]
53
+ #
54
+ # namespace :release do
55
+ # desc "Publish RDoc to RubyForge."
56
+ # task :docs => [:rdoc] do
57
+ # config = YAML.load(
58
+ # File.read(File.expand_path('~/.rubyforge/user-config.yml'))
59
+ # )
60
+ #
61
+ # host = "#{config['username']}@rubyforge.org"
62
+ # remote_dir = "/var/www/gforge-projects/johntrupiano/capistrano-extensions/"
63
+ # local_dir = 'rdoc'
64
+ #
65
+ # Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
66
+ # end
67
+ # end
68
+ # end
69
+ # rescue LoadError
70
+ # puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
71
+ # end
data/TODO ADDED
@@ -0,0 +1,16 @@
1
+
2
+ SHORT TERM
3
+ * Allow individual files to be specified in :shared_content (e.g. ChaseCCTool.swf in Chase)
4
+ * Write an all-encompassing "pull from production, migrate, test" recipe.
5
+ * Fix nested geminstaller shortcoming...won't pick up on the nested file structure I recently devised.
6
+ * Better compression than gzip? Already abstracted this out to :zip, :unzip and :zip_ext, but may still want to do some more benchmarking.
7
+ ** INCREMENTAL (DELTA) CONTENT DOWNLOADS, FTW!!! -- tar -N (to pass a timestamp to only pick up new files)...perhaps this can speed up the :copy_cache too??
8
+
9
+ * MySQL import seems to take quite awhile...anyway to speed it up?
10
+
11
+ LONG TERM
12
+ * Extend Capistrano by creating a :property function to replace the set, _cset mess. That way we can track the properties and create the documentation for the parameters that was always so elusive.
13
+
14
+ * We could also ensure that all executables invoked are recorded in a similar fashion, by using something other than :property to define it...perhaps :executable. We could then always ensure that the program is invokable on the target system and abort the run before we even start it if something's missing.
15
+
16
+ * Perhaps we should be using a set of rake tasks to manage a lot of this "shell scripting"...might clean up deploy.rb
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 1
4
- :patch: 8
4
+ :patch: 9
@@ -0,0 +1,56 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE
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{capistrano-extensions}
8
+ s.version = "0.1.9"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["John Trupiano"]
12
+ s.date = %q{2009-08-12}
13
+ 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}
14
+ s.email = %q{jtrupiano@gmail.com}
15
+ s.executables = ["capistrano-extensions-sync-content", "capistrano-extensions-sync-db"]
16
+ s.extra_rdoc_files = [
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".gitignore",
21
+ "History.txt",
22
+ "ISSUES.txt",
23
+ "MIT-LICENSE",
24
+ "README.rdoc",
25
+ "Rakefile",
26
+ "TODO",
27
+ "VERSION.yml",
28
+ "bin/capistrano-extensions-sync-content",
29
+ "bin/capistrano-extensions-sync-db",
30
+ "capistrano-extensions.gemspec",
31
+ "lib/capistrano-extensions.rb",
32
+ "lib/capistrano-extensions/deploy.rb",
33
+ "lib/capistrano-extensions/geminstaller_dependency.rb",
34
+ "lib/capistrano-extensions/recipes/content_sync.rb",
35
+ "lib/capistrano-extensions/recipes/db_sync.rb"
36
+ ]
37
+ s.homepage = %q{http://github.com/jtrupiano/capistrano-extensions}
38
+ s.rdoc_options = ["--charset=UTF-8"]
39
+ s.require_paths = ["lib"]
40
+ s.rubyforge_project = %q{johntrupiano}
41
+ s.rubygems_version = %q{1.3.5}
42
+ 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}
43
+
44
+ if s.respond_to? :specification_version then
45
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
46
+ s.specification_version = 3
47
+
48
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
49
+ s.add_runtime_dependency(%q<capistrano>, ["~> 2.5.5"])
50
+ else
51
+ s.add_dependency(%q<capistrano>, ["~> 2.5.5"])
52
+ end
53
+ else
54
+ s.add_dependency(%q<capistrano>, ["~> 2.5.5"])
55
+ end
56
+ end
@@ -23,6 +23,7 @@ namespace :remote do
23
23
 
24
24
  pass_str = pluck_pass_str(db)
25
25
  run "#{unzip} -c #{remote_file}.#{zip_ext} > #{remote_file}"
26
+ run "cd #{current_path} && rake RAILS_ENV=#{rails_env} db:drop db:create"
26
27
  run "mysql -u#{db['username']} #{pass_str} #{db['database']} < #{remote_file}"
27
28
  run "rm -f #{remote_file}"
28
29
  end
@@ -90,6 +91,7 @@ namespace :local do
90
91
  end
91
92
  cmd << <<-CMD
92
93
  #{unzip} -c #{remote_backup_file}.#{zip_ext} > #{remote_backup_file} &&
94
+ rake RAILS_ENV=#{env} db:drop db:create &&
93
95
  #{mysql_str} < #{remote_backup_file} &&
94
96
  rm -f #{remote_backup_file}
95
97
  CMD
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Trupiano
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-27 00:00:00 -04:00
12
+ date: 2009-08-12 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -22,16 +22,6 @@ dependencies:
22
22
  - !ruby/object:Gem::Version
23
23
  version: 2.5.5
24
24
  version:
25
- - !ruby/object:Gem::Dependency
26
- name: geminstaller
27
- type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ~>
32
- - !ruby/object:Gem::Version
33
- version: 0.5.1
34
- version:
35
25
  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
36
26
  email: jtrupiano@gmail.com
37
27
  executables:
@@ -42,25 +32,28 @@ extensions: []
42
32
  extra_rdoc_files:
43
33
  - README.rdoc
44
34
  files:
35
+ - .gitignore
45
36
  - History.txt
46
37
  - ISSUES.txt
47
- - Manifest.txt
38
+ - MIT-LICENSE
48
39
  - README.rdoc
40
+ - Rakefile
41
+ - TODO
49
42
  - VERSION.yml
50
43
  - bin/capistrano-extensions-sync-content
51
44
  - bin/capistrano-extensions-sync-db
52
- - lib/capistrano-extensions
45
+ - capistrano-extensions.gemspec
46
+ - lib/capistrano-extensions.rb
53
47
  - lib/capistrano-extensions/deploy.rb
54
48
  - lib/capistrano-extensions/geminstaller_dependency.rb
55
- - lib/capistrano-extensions/recipes
56
49
  - lib/capistrano-extensions/recipes/content_sync.rb
57
50
  - lib/capistrano-extensions/recipes/db_sync.rb
58
- - lib/capistrano-extensions.rb
59
51
  has_rdoc: true
60
52
  homepage: http://github.com/jtrupiano/capistrano-extensions
53
+ licenses: []
54
+
61
55
  post_install_message:
62
56
  rdoc_options:
63
- - --inline-source
64
57
  - --charset=UTF-8
65
58
  require_paths:
66
59
  - lib
@@ -79,9 +72,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
72
  requirements: []
80
73
 
81
74
  rubyforge_project: johntrupiano
82
- rubygems_version: 1.3.1
75
+ rubygems_version: 1.3.5
83
76
  signing_key:
84
- specification_version: 2
77
+ specification_version: 3
85
78
  summary: 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
86
79
  test_files: []
87
80
 
@@ -1,15 +0,0 @@
1
- History.txt
2
- ISSUES.txt
3
- Manifest.txt
4
- README.txt
5
- Rakefile
6
- TODO
7
- bin/capistrano-extensions-sync-content
8
- bin/capistrano-extensions-sync-db
9
- capistrano-extensions.gemspec
10
- lib/capistrano-extensions.rb
11
- lib/capistrano-extensions/deploy.rb
12
- lib/capistrano-extensions/geminstaller_dependency.rb
13
- lib/capistrano-extensions/recipes/content_sync.rb
14
- lib/capistrano-extensions/recipes/db_sync.rb
15
- lib/capistrano-extensions/version.rb