jtrupiano-capistrano-extensions 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -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,45 @@
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
+ gem.add_dependency "geminstaller", "~> 0.5.1"
19
+ end
20
+
21
+ # preprare for
22
+ Jeweler::RubyforgeTasks.new do |rubyforge|
23
+ rubyforge.remote_doc_path = "capistrano-extensions"
24
+ rubyforge.doc_task = "rdoc"
25
+ end
26
+
27
+ desc 'Default: run unit tests.'
28
+ task :default => :test
29
+
30
+ desc 'Test the capistrano-extensions plugin.'
31
+ Rake::TestTask.new(:test) do |t|
32
+ t.libs << 'lib'
33
+ t.pattern = 'test/**/*_test.rb'
34
+ t.verbose = true
35
+ end
36
+
37
+ desc 'Generate documentation'
38
+ Rake::RDocTask.new do |rdoc|
39
+ config = YAML.load(File.read('VERSION.yml'))
40
+ rdoc.rdoc_dir = 'rdoc'
41
+ rdoc.title = "capistrano-extensions #{config[:major]}.#{config[:minor]}.#{config[:patch]}"
42
+ rdoc.options << '--line-numbers' << '--inline-source'
43
+ rdoc.rdoc_files.include('README*')
44
+ rdoc.rdoc_files.include('lib/**/*.rb')
45
+ 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,59 @@
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
+ s.add_runtime_dependency(%q<geminstaller>, ["~> 0.5.1"])
51
+ else
52
+ s.add_dependency(%q<capistrano>, ["~> 2.5.5"])
53
+ s.add_dependency(%q<geminstaller>, ["~> 0.5.1"])
54
+ end
55
+ else
56
+ s.add_dependency(%q<capistrano>, ["~> 2.5.5"])
57
+ s.add_dependency(%q<geminstaller>, ["~> 0.5.1"])
58
+ end
59
+ 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: jtrupiano-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 -07:00
12
+ date: 2009-08-12 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -42,25 +42,27 @@ extensions: []
42
42
  extra_rdoc_files:
43
43
  - README.rdoc
44
44
  files:
45
+ - .gitignore
45
46
  - History.txt
46
47
  - ISSUES.txt
47
- - Manifest.txt
48
+ - MIT-LICENSE
48
49
  - README.rdoc
50
+ - Rakefile
51
+ - TODO
49
52
  - VERSION.yml
50
53
  - bin/capistrano-extensions-sync-content
51
54
  - bin/capistrano-extensions-sync-db
52
- - lib/capistrano-extensions
55
+ - capistrano-extensions.gemspec
56
+ - lib/capistrano-extensions.rb
53
57
  - lib/capistrano-extensions/deploy.rb
54
58
  - lib/capistrano-extensions/geminstaller_dependency.rb
55
- - lib/capistrano-extensions/recipes
56
59
  - lib/capistrano-extensions/recipes/content_sync.rb
57
60
  - lib/capistrano-extensions/recipes/db_sync.rb
58
- - lib/capistrano-extensions.rb
59
- has_rdoc: true
61
+ has_rdoc: false
60
62
  homepage: http://github.com/jtrupiano/capistrano-extensions
63
+ licenses:
61
64
  post_install_message:
62
65
  rdoc_options:
63
- - --inline-source
64
66
  - --charset=UTF-8
65
67
  require_paths:
66
68
  - lib
@@ -79,9 +81,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
81
  requirements: []
80
82
 
81
83
  rubyforge_project: johntrupiano
82
- rubygems_version: 1.2.0
84
+ rubygems_version: 1.3.5
83
85
  signing_key:
84
- specification_version: 2
86
+ specification_version: 3
85
87
  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
88
  test_files: []
87
89
 
@@ -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