blavosync 0.2.3 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/Blavosync.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{blavosync}
8
- s.version = "0.2.3"
8
+ s.version = "0.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["jayronc"]
12
- s.date = %q{2009-12-30}
12
+ s.date = %q{2010-01-05}
13
13
  s.description = %q{Sync a remote db and rsync content to your development environment. Useful for small teams and developers who are not able to do this manually.}
14
14
  s.email = %q{jerrodblavos@mac.com}
15
15
  s.extra_rdoc_files = [
data/History.txt CHANGED
@@ -1,2 +0,0 @@
1
- == 0.4.12 / 2009-12-29
2
- * attempting to build a gem that works with EY-solo
data/README.rdoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = BlavoSync
2
2
 
3
- == DEPENDENCIES
3
+ == Dependencies
4
4
 
5
5
  * Capistrano2 (http://github.com/jamis/capistrano)
6
6
 
@@ -11,7 +11,8 @@
11
11
  * A valid $RAILS_ROOT/config/database.yml file with entries for both production and development.
12
12
  * The latest capistrano2 and a valid $RAILS_ROOT/config/deploy.rb file with either a :domain or :rsync domain entry.
13
13
  * The blavosync rubygem, available at http://gemcutter.org (sudo gem install blavosync).
14
- * Hopefully you already have a nice little app running somewhere that has some decent data and assets. In your $RAILS_ROOT/config/deploy.rb file add this line to the top:
14
+
15
+ Hopefully you already have a nice little app running somewhere that has some decent data and assets. In your $RAILS_ROOT/config/deploy.rb file add this line to the top:
15
16
 
16
17
  require "blavosync/recipes"
17
18
 
@@ -27,33 +28,34 @@ This covers the basic requirements, on to usage. As long as your $RAILS_ROOT/co
27
28
 
28
29
  cap local:sync
29
30
 
30
- This will dump the production database and load it into your local mysql database, defined in your $RAILS_ROOT/config/database.yml, and then rsync anything in your $RAILS_ROOT/shared/system directory on production into your $RAILS_ROOT/tmp directory in a new system directory. Once this is done, the $RAILS_ROOT/tmp/system directory will be symlinked into $RAILS_ROOT/public/system.
31
+ This will dump the production database and load it into your local mysql database, defined in your $RAILS\_ROOT/config/database.yml, and then rsync anything in your $RAILS\_ROOT/shared/system directory on production into your $RAILS\_ROOT/tmp directory in a new system directory. Once this is done, the $RAILS\_ROOT/tmp/system directory will be symlinked into $RAILS_ROOT/public/system.
31
32
 
32
33
  There are some considerations you should take before using this tool, such as do you have enough disk space or bandwidth to pull down all the assets. You may already have a $RAILS_ROOT/public/system directory full of assets, in which case if you want to keep those you should back them up somewhere and delete the system directory, otherwise the symlink may not work.
33
34
 
34
35
  If you are on OSX you may need to enable FollowSymLinks in your virtualhost entry for these assets to be served by apache.
35
36
 
36
- == USAGE
37
+ == Usage
37
38
 
38
- adds the following tasks to projects using capistrano
39
+ sudo gem install blavosync -s http://gemcutter.org
39
40
 
40
- === cap local:sync
41
+ Adds the following tasks to projects using capistrano.
41
42
 
42
- Wrapper for local:sync_db and local:sync\_content
43
- $> cap local:sync
43
+ === cap local:sync
44
+ Wrapper for *local:sync_db* and *local:sync\_content*.
44
45
 
45
46
  === cap local:rsync
46
-
47
- Wrapper for local:rsync_content and local:rsync\_restore\_content
48
- $> cap local:sync_content
47
+ Wrapper for *local:rsync_content* and *local:rsync\_restore\_content*.
49
48
 
50
49
  === cap local:sync_db
50
+ Wrapper for *local:backup_db* and *local:restore\_db*.
51
+
52
+ == Variables
51
53
 
52
- Wrapper for local:backup_db and local:restore\_db.
53
- $> cap local:sync_db
54
+ set :content_directory, 'not_system_because_i_roll_non_standard_style'
54
55
 
56
+ For subcommands try
55
57
 
56
- For subcommands try cap -T local
58
+ cap -T local
57
59
 
58
60
  ==== Note on Patches/Pull Requests
59
61
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.3
1
+ 0.3.0
@@ -21,7 +21,7 @@ Capistrano::Configuration.instance(:must_exist).load do |configuration|
21
21
  Pathname.new('.').realpath
22
22
  end
23
23
  def content_dir
24
- "system"
24
+ exists?(:content_directory) ? fetch(:content_directory) : "system"
25
25
  end
26
26
  def content_path
27
27
  File.join(fetch(:shared_path), content_dir)
@@ -45,7 +45,7 @@ Capistrano::Configuration.instance(:must_exist).load do |configuration|
45
45
  "tmp"
46
46
  end
47
47
  def content_sync_method
48
- 'rsync'
48
+ exists?(:sync_method) ? sync_method : 'rsync'
49
49
  end
50
50
  def from_env
51
51
  (ENV['FROM_ENV'].nil? ? 'production' : ENV['RAILS_ENV'])
@@ -53,8 +53,8 @@ Capistrano::Configuration.instance(:must_exist).load do |configuration|
53
53
  def to_env
54
54
  (ENV['TO_ENV'].nil? ? 'development' : ENV['TO_ENV'])
55
55
  end
56
- def rsync_content_backup_file
57
- "#{shared_path}/system"
56
+ def rsync_content_backup_file
57
+ "#{shared_path}/#{content_dir}"
58
58
  end
59
59
  def tar_content_backup_file
60
60
  "#{shared_path}/backup_#{from_env}_content.tar.#{zip_ext}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blavosync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - jayronc
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-30 00:00:00 -05:00
12
+ date: 2010-01-05 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies: []
15
15