factorylabs-fdlcap 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.3
1
+ 0.3.4
data/fdlcap.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{fdlcap}
5
- s.version = "0.3.3"
5
+ s.version = "0.3.4"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Factory Design Labs"]
9
- s.date = %q{2009-06-29}
9
+ s.date = %q{2009-06-30}
10
10
  s.default_executable = %q{fdlcap}
11
11
  s.email = %q{interactive@factorylabs.com}
12
12
  s.executables = ["fdlcap"]
@@ -129,14 +129,15 @@ Capistrano::Configuration.instance(:must_exist).load do
129
129
  raise "Missing database.yml entry for #{rails_env.to_s}" unless db_info
130
130
 
131
131
  database = db_info["database"]
132
+ tables = ENV['TABLES'] ? ENV['TABLES'].split(',').join(' ') : ''
132
133
  dump_file = "/tmp/#{database}.sql"
133
-
134
+
134
135
  db_host = db_info["host"]
135
136
  host = ""
136
137
  host_arg = " -h #{db_host}" if db_host
137
138
  run "mysqldump -e -q --single-transaction \
138
139
  -u #{db_info["username"]} --password=#{db_info["password"]} \
139
- --database #{db_info["database"]} #{host_arg} | gzip > #{dump_file}.gz"
140
+ #{host_arg} #{db_info["database"]} #{tables}| gzip > #{dump_file}.gz"
140
141
 
141
142
 
142
143
  get "#{dump_file}.gz", "#{dump_file}.gz"
@@ -150,8 +151,10 @@ Capistrano::Configuration.instance(:must_exist).load do
150
151
  gunzip_cmd = "gunzip -c #{dump_file}.gz"
151
152
  sed_cmd = "sed 's/#{db_info["database"]}/#{target_db_info["database"]}/g' > #{dump_file}"
152
153
  execute("#{gunzip_cmd} | #{sed_cmd}", "gunzip/sed of #{dump_file}.gz failed")
153
- execute("mysqladmin #{target_db_login} drop #{target_db_info["database"]} -f", "mysqladmin drop failed")
154
- execute("mysqladmin #{target_db_login} create #{target_db_info["database"]}", "mysqladmin create failed")
154
+ unless ENV['TABLES']
155
+ execute("mysqladmin #{target_db_login} drop #{target_db_info["database"]} -f", "mysqladmin drop failed")
156
+ execute("mysqladmin #{target_db_login} create #{target_db_info["database"]}", "mysqladmin create failed")
157
+ end
155
158
  execute("mysql #{target_db_login} --database #{target_db_info["database"]} < #{dump_file}", "mysql import failed")
156
159
  execute("rake db:migrate RAILS_ENV=#{target_env}", "migrate failed")
157
160
  execute("rm #{dump_file}", "rm of local unzipped #{dump_file} failed")
@@ -5,6 +5,12 @@ Capistrano::Configuration.instance(:must_exist).load do
5
5
  set :scm, :git
6
6
  set :keep_releases, 5
7
7
  set :deploy_via, :remote_cache
8
+
9
+ use_recipe :symlinks
10
+ use_recipe :geminstaller
11
+ use_recipe :perform_cleanup
12
+ use_recipe :symlink_configs
13
+
8
14
  end
9
15
 
10
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: factorylabs-fdlcap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Factory Design Labs
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-29 00:00:00 -07:00
12
+ date: 2009-06-30 00:00:00 -07:00
13
13
  default_executable: fdlcap
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency