m7d-vlad 1.2.0.4 → 1.2.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,25 @@
1
+ require 'vlad'
2
+ namespace :vlad do
3
+
4
+ remote_task :stop_app, :roles => [:app] do
5
+ #run "sudo /etc/init.d/nginx stop"
6
+ end
7
+
8
+ remote_task :start_app, :roles => [:app] do
9
+ run "cd #{current_path}; touch tmp/restart.txt"
10
+ end
11
+
12
+ remote_task :start_app => :stop_app
13
+
14
+ remote_task :symlink_configs, :roles => [:app] do
15
+ run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml"
16
+ end
17
+
18
+ remote_task :migrate, :roles => [:db] do
19
+ run "cd #{current_path}; #{rake_cmd} db:migrate MERB_ENV=#{merb_env}"
20
+ end
21
+
22
+ remote_task :native_gems, :roles => :app do
23
+ run "cd #{current_path}; thor merb:gem:redeploy"
24
+ end
25
+ end
@@ -0,0 +1,36 @@
1
+ require 'vlad'
2
+
3
+ namespace :vlad do
4
+ ##
5
+ # Nginx web server on Gentoo/Debian init.d systems
6
+
7
+ set :web_command, "/etc/init.d/nginx"
8
+
9
+ desc "(Re)Start the web servers"
10
+
11
+ remote_task :start_web, :roles => :web do
12
+ run "#{web_command} restart"
13
+ end
14
+
15
+ desc "Stop the web servers"
16
+
17
+ remote_task :stop_web, :roles => :web do
18
+ run "#{web_command} stop"
19
+ end
20
+
21
+ ##
22
+ # Everything HTTP.
23
+
24
+ desc "(Re)Start the web and app servers (nginx/passenger)"
25
+ remote_task :start do
26
+ #Rake::Task['vlad:start_app'].invoke
27
+ Rake::Task['vlad:start_web'].invoke
28
+ end
29
+
30
+ desc "Stop the web and app servers (nginx/passenger)"
31
+
32
+ remote_task :stop do
33
+ #Rake::Task['vlad:stop_app'].invoke
34
+ Rake::Task['vlad:stop_web'].invoke
35
+ end
36
+ end
@@ -0,0 +1,12 @@
1
+ require 'vlad'
2
+
3
+ namespace :vlad do
4
+ namespace :web do
5
+ remote_task :enable, :roles => [:web] do
6
+ run "if [ -f #{shared_path}/system/maintenance.html ]; then rm -f #{shared_path}/system/maintenance.html; fi"
7
+ end
8
+ remote_task :disable, :roles => [:web] do
9
+ run "cp -f #{shared_path}/config/maintenance.html #{shared_path}/system/"
10
+ end
11
+ end
12
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: m7d-vlad
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0.4
4
+ version: 1.2.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
@@ -73,6 +73,9 @@ files:
73
73
  - lib/vlad.rb
74
74
  - lib/vlad/core.rb
75
75
  - lib/vlad/git.rb
76
+ - lib/vlad/merb.rb
77
+ - lib/vlad/nginx.rb
78
+ - lib/vlad/web.rb
76
79
  - lib/vlad/maintenance.rb
77
80
  - test/test_rake_remote_task.rb
78
81
  - test/test_vlad.rb