capistrano_transmit 0.1.0 → 0.2.0

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/README.rdoc CHANGED
@@ -32,19 +32,19 @@ Then add to your deploy.rb:
32
32
 
33
33
  == Examples
34
34
 
35
- cap transmit:get:mysql # Fetch the remote production MySQL database
36
- # and overwrite your local development database with it
37
- cap transmit:get:assets # Fetch the remote assets into your local development environment
35
+ cap transmit:get:mysql # Fetch the remote production MySQL database
36
+ # and overwrite your local development database with it
37
+ cap transmit:get:assets # Fetch the remote assets into your local development environment
38
38
 
39
39
 
40
- cap transmit:put:mysql # Overwrite the production MySQL database with your development data
40
+ cap transmit:put:mysql # Overwrite the production MySQL database with your development data
41
41
 
42
42
  == Prerequisites
43
43
 
44
44
  This Capistrano extension assumes some variables are present in your deploy.rb:
45
45
 
46
- user # the SSH user for connecting to the deploy host
47
- deploy_host # the host on which to run the db dump
46
+ user # the SSH user for connecting to the deploy host
47
+ deploy_host # the host on which to run the db dump
48
48
 
49
49
 
50
- Copyright (c) 2010 Joost Baaij, released under the MIT license
50
+ Copyright (c) 2010-2011 Joost Baaij, released under the MIT license.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{capistrano_transmit}
5
- s.version = "0.1.0"
5
+ s.version = "0.2.0"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Joost Baaij"]
@@ -3,6 +3,13 @@ unless Capistrano::Configuration.respond_to?(:instance)
3
3
  end
4
4
 
5
5
  Capistrano::Configuration.instance.load do
6
+
7
+ _cset :user, ""
8
+ _cset :db_config { capture "cat #{current_path}/config/database.yml" }
9
+ _cset :db_remote { YAML::load(db_config)['production'] }
10
+ _cset :db_local { YAML::load_file("config/database.yml")['development'] }
11
+ _cset :dumpfile { "#{current_path}/tmp/#{db_remote['database']}.sql.gz" }
12
+
6
13
  after "transmit:get:mysql", "transmit:cleanup"
7
14
  after "transmit:put:mysql", "transmit:cleanup"
8
15
 
@@ -38,16 +45,4 @@ Capistrano::Configuration.instance.load do
38
45
  end
39
46
  end
40
47
 
41
- set(:db_remote) do
42
- db_config = capture "cat #{current_path}/config/database.yml"
43
- YAML::load(db_config)['production']
44
- end
45
-
46
- set(:db_local) do
47
- YAML::load_file("config/database.yml")['development']
48
- end
49
-
50
- set :dumpfile do
51
- "#{current_path}/tmp/#{db_remote['database']}.sql.gz"
52
- end
53
48
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: capistrano_transmit
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.0
5
+ version: 0.2.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Joost Baaij