obbistrano 1.1.05 → 1.1.06
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/lib/obbistrano_tasks.rb +15 -16
- data/obbistrano.gemspec +1 -1
- metadata +1 -1
data/lib/obbistrano_tasks.rb
CHANGED
@@ -344,22 +344,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
344
344
|
# +MIGRATING+ APPLICATIONS
|
345
345
|
# =============================================================================
|
346
346
|
|
347
|
-
|
348
|
-
require 'capistrano/server_definition'
|
349
|
-
print "==== Which server would you like to copy #{application} to? [Full Domain Name] "
|
350
|
-
new_server = STDIN.gets.strip
|
351
|
-
old_roles = roles[:web]
|
352
|
-
roles[:web].clear
|
353
|
-
roles[:web] << ServerDefinition.new(new_server)
|
354
|
-
setup
|
355
|
-
roles[:web].clear
|
356
|
-
roles[:web] = old_roles
|
357
|
-
run "rsync -avzh . #{user}@#{new_server}: --exclude 'tmp/*'"
|
358
|
-
"#{databases}".each do |db|
|
359
|
-
run "mysqldump #{db} | ssh #{user}@#{new_server} mysql #{db}"
|
360
|
-
end
|
361
|
-
|
362
|
-
end
|
347
|
+
|
363
348
|
|
364
349
|
|
365
350
|
###### Private tasks for server operations #############
|
@@ -477,7 +462,21 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
477
462
|
|
478
463
|
end
|
479
464
|
|
465
|
+
task :mirror do
|
466
|
+
print "==== Which server would you like to copy #{application} to? [Full Domain Name] "
|
467
|
+
new_server = STDIN.gets.strip
|
468
|
+
old_roles = roles[:web]
|
469
|
+
roles[:web].clear
|
470
|
+
role :web, new_server
|
471
|
+
host.setup
|
472
|
+
roles[:web].clear
|
473
|
+
roles[:web] = old_roles
|
474
|
+
run "rsync -avzh . #{user}@#{new_server}: --exclude 'tmp/*'"
|
475
|
+
"#{databases}".each do |db|
|
476
|
+
run "mysqldump #{db} | ssh #{user}@#{new_server} mysql #{db}"
|
477
|
+
end
|
480
478
|
|
479
|
+
end
|
481
480
|
|
482
481
|
end
|
483
482
|
|
data/obbistrano.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{obbistrano}
|
5
|
-
s.version = "1.1.
|
5
|
+
s.version = "1.1.06"
|
6
6
|
s.authors = ["Ross Riley", "One Black Bear"]
|
7
7
|
s.date = Time.now
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|