procman 1.2.0 → 1.3.0

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.
@@ -4,7 +4,7 @@ require 'proc_man/constraint'
4
4
 
5
5
  module ProcMan
6
6
 
7
- VERSION = '1.2.0'
7
+ VERSION = '1.3.0'
8
8
 
9
9
  class Error < StandardError; end
10
10
 
@@ -14,13 +14,13 @@ Capistrano::Configuration.instance(:must_exist).load do
14
14
  task :restart, :roles => :app do
15
15
  run procman_command(:restart)
16
16
  end
17
-
18
- after :start, "procman:start"
19
- after :stop, "procman:stop"
20
- after :restart, "procman:restart"
17
+
18
+ after 'deploy:start', "procman:start"
19
+ after 'deploy:stop', "procman:stop"
20
+ after 'deploy:restart', "procman:restart"
21
21
 
22
22
  def procman_command(command)
23
- command = "sh -c \"cd #{deploy_to} && bundle exec procman #{command} --environment #{environment}\""
23
+ command = "sh -c \"cd #{deploy_to} && bundle exec procman #{command} --environment #{fetch(:rails_env, 'production')}\""
24
24
  if user = fetch(:procman_user, 'app')
25
25
  command = "sudo -u #{user} #{command}"
26
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: procman
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-25 00:00:00.000000000 Z
12
+ date: 2013-03-27 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A very very simple library for starting/stopping/restarting processes
15
15
  for a Ruby application
@@ -20,13 +20,12 @@ extensions: []
20
20
  extra_rdoc_files: []
21
21
  files:
22
22
  - bin/procman
23
+ - lib/proc_man/capistrano.rb
23
24
  - lib/proc_man/constraint.rb
24
- - lib/proc_man/deploy.rb
25
25
  - lib/proc_man/process.rb
26
26
  - lib/proc_man/procfile.rb
27
27
  - lib/proc_man.rb
28
28
  - LICENCE
29
- - Procfile
30
29
  - Procfile.template
31
30
  - procman.gemspec
32
31
  - README.md
data/Procfile DELETED
@@ -1,24 +0,0 @@
1
- process :example_worker do
2
-
3
- # Only action this process in production on a specific host
4
- # constraint :environment => 'production', :host => 'app01.myapp.com'
5
-
6
- # Only action this process in development
7
- constraint :environment => 'development'
8
-
9
- # Define the action to be carried out when this process should start
10
- start do
11
-
12
- end
13
-
14
- # Define the action to be carried out when this process should stop
15
- stop do
16
-
17
- end
18
-
19
- # Define the action to be carried out when this process should restart
20
- restart do
21
-
22
- end
23
-
24
- end