super_mega_ultra_capistrano_extensions 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  require "super_mega_ultra_capistrano_extensions/version"
2
2
 
3
3
  require "super_mega_ultra_capistrano_extensions/recipes/config"
4
- require "super_mega_ultra_capistrano_extensions/recipes/unicorn"
4
+ require "super_mega_ultra_capistrano_extensions/recipes/app_server"
5
5
  require "super_mega_ultra_capistrano_extensions/recipes/deploy"
6
6
 
7
7
  module Capistrano
@@ -0,0 +1,29 @@
1
+ Capistrano::Configuration.instance(:must_exist).load do
2
+ set :app_server_init_script, fetch(:app_server_init_script) { "/etc/init.d/#{application}" }
3
+
4
+ namespace :app_server do
5
+ desc <<-DESC
6
+ Start the app server. This operation can be called even if the \
7
+ app server is currently running. It will fail gracefully.
8
+ DESC
9
+ task :start, :roles => :web do
10
+ run "#{app_server_init_script} start"
11
+ end
12
+
13
+ desc <<-DESC
14
+ Stop the app server. This operation can be called even if the \
15
+ app server is stopped. It will fail gracefully.
16
+ DESC
17
+ task :stop, :roles => :web do
18
+ run "#{app_server_init_script} stop"
19
+ end
20
+
21
+ desc <<-DESC
22
+ Restart the app server. This operation can be called regardless \
23
+ if the app server is currently up or down.
24
+ DESC
25
+ task :restart, :roles => :web do
26
+ run "#{app_server_init_script} restart"
27
+ end
28
+ end
29
+ end
@@ -1,7 +1,7 @@
1
1
  Capistrano::Configuration.instance(:must_exist).load do
2
2
  set :default_run_options, {:pty => true}
3
3
  set :deploy_to, "/var/www/apps/#{application}"
4
- set :default_environment, "#{shared_path}/config/environment"
4
+ set :default_environment, {:environment => "#{shared_path}/config/environment"}
5
5
  set :deploy_via, :remote_cache
6
6
  set :keep_releases, 2
7
7
  set :port, 1022
@@ -1,3 +1,3 @@
1
1
  module SuperMegaUltraCapistranoExtensions
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: super_mega_ultra_capistrano_extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -40,9 +40,9 @@ files:
40
40
  - README.md
41
41
  - Rakefile
42
42
  - lib/super_mega_ultra_capistrano_extensions.rb
43
+ - lib/super_mega_ultra_capistrano_extensions/recipes/app_server.rb
43
44
  - lib/super_mega_ultra_capistrano_extensions/recipes/config.rb
44
45
  - lib/super_mega_ultra_capistrano_extensions/recipes/deploy.rb
45
- - lib/super_mega_ultra_capistrano_extensions/recipes/unicorn.rb
46
46
  - lib/super_mega_ultra_capistrano_extensions/version.rb
47
47
  - super_mega_ultra_capistrano_extensions.gemspec
48
48
  homepage: http://github.com/everydayhero/super_mega_ultra_capistrano_extensions
@@ -1,31 +0,0 @@
1
- Capistrano::Configuration.instance(:must_exist).load do
2
- set :unicorn_init_script, fetch(:unicorn_init_script) { "/etc/init.d/#{application}" }
3
-
4
- namespace :unicorn do
5
- desc <<-DESC
6
- Start the unicorn workers. This operation is able to be called \
7
- even if there are currently active workers. It will fail \
8
- gracefully.
9
- DESC
10
- task :start, :roles => :web do
11
- run "#{unicorn_init_script} start"
12
- end
13
-
14
- desc <<-DESC
15
- Stop the unicorn workers. This operation is able to be called \
16
- even if there are no active workers. It will fail gracefully.
17
- DESC
18
- task :stop, :roles => :web do
19
- run "#{unicorn_init_script} stop"
20
- end
21
-
22
- desc <<-DESC
23
- Restart the unicorn workers. This operation can be called \
24
- regardless of active / inactive workers. It will spin up new \
25
- workers if non exist or will restart the current active ones.
26
- DESC
27
- task :restart, :roles => :web do
28
- run "#{unicorn_init_script} restart"
29
- end
30
- end
31
- end