obbistrano 1.0.89 → 1.0.90
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 +3 -37
- data/obbistrano.gemspec +1 -1
- metadata +1 -1
data/lib/obbistrano_tasks.rb
CHANGED
@@ -103,10 +103,6 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
103
103
|
end
|
104
104
|
|
105
105
|
namespace :app do
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
106
|
|
111
107
|
# =============================================================================
|
112
108
|
# DEPLOYING APPLICATIONS
|
@@ -126,13 +122,6 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
126
122
|
git_deploy if repository.include? "git"
|
127
123
|
svn_deploy if repository.include? "svn"
|
128
124
|
end
|
129
|
-
|
130
|
-
task :syncdb do
|
131
|
-
logger.level = -1
|
132
|
-
run "cd #{deploy_to} && script/syncdb #{environment}"
|
133
|
-
logger.level=2
|
134
|
-
logger.info "Application database has been synchronised"
|
135
|
-
end
|
136
125
|
|
137
126
|
task :git_deploy do
|
138
127
|
logger.level = 2
|
@@ -233,8 +222,6 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
233
222
|
# =============================================================================
|
234
223
|
# GENERAL ADMIN FOR APPLICATIONS
|
235
224
|
# =============================================================================
|
236
|
-
|
237
|
-
|
238
225
|
|
239
226
|
desc "Clears the application's cache files from tmp/cache."
|
240
227
|
task :clearcache do
|
@@ -245,40 +232,19 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
245
232
|
task :clearlogs do
|
246
233
|
run "cd #{deploy_to} && rm -f tmp/log/*"
|
247
234
|
end
|
248
|
-
|
249
235
|
|
250
|
-
|
251
|
-
|
252
236
|
# =============================================================================
|
253
237
|
# +MIGRATING+ APPLICATIONS
|
254
238
|
# =============================================================================
|
255
|
-
|
256
|
-
task :copy_site do
|
257
|
-
config_check
|
258
|
-
needs_root
|
259
|
-
backup
|
260
|
-
print "==== Which server would you like to copy #{application} to? [Full Domain Name] "
|
261
|
-
line = STDIN.gets.strip
|
262
|
-
begin
|
263
|
-
new_server = options["servers"][line]["domain"]
|
264
|
-
rescue
|
265
|
-
puts "*** Can't find that new server in the config"
|
266
|
-
exit
|
267
|
-
end
|
268
|
-
with_user("root", "#{root_pass}") do
|
269
|
-
run "rsync -avzh . -e ssh root@#{new_server}:/backup/#{application}/ --exclude 'tmp/*' --exclude '.git/*'"
|
270
|
-
end
|
271
|
-
options["apps"]["#{application}"]["server"] = line
|
272
|
-
config_write
|
273
|
-
try_login
|
274
|
-
restore
|
275
|
-
end
|
276
239
|
|
277
240
|
task :mirror do
|
278
241
|
config_check
|
279
242
|
print "==== Which server would you like to copy #{application} to? [Full Domain Name] "
|
280
243
|
new_server = STDIN.gets.strip
|
281
244
|
run "rsync -avzh . #{user}@#{new_server}: --exclude 'tmp/*'"
|
245
|
+
"#{databases}".each do |db|
|
246
|
+
run "mysqldump #{db} | ssh #{user}@#{new_server} mysql #{db}"
|
247
|
+
end
|
282
248
|
end
|
283
249
|
|
284
250
|
|
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.0.
|
5
|
+
s.version = "1.0.90"
|
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=
|