procman 1.4.1 → 1.5.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.
data/README.md CHANGED
@@ -94,6 +94,8 @@ constraint :environment => 'production'
94
94
  constraint :host => /\.local\z/
95
95
  # execute in prodution and where the hostname is 'app01'
96
96
  constraint :environment => 'production', :host => 'app01'
97
+ # only execute if process explicity set using --processes
98
+ constraint :manual => true
97
99
  ```
98
100
 
99
101
  ## Executing process commands
@@ -130,7 +132,7 @@ You can use the included Capistrano recipe to automatically run your procman sta
130
132
  commands whenever you deploy. Just require the deploy recipes in your `Capfile`.
131
133
 
132
134
  ```ruby
133
- require 'proc_man/deploy'
135
+ require 'proc_man/capistrano'
134
136
  ```
135
137
 
136
138
  This requires that you are using bundler and the `procman` gem has been included in your Gemfile.
data/lib/proc_man.rb CHANGED
@@ -4,7 +4,7 @@ require 'proc_man/constraint'
4
4
 
5
5
  module ProcMan
6
6
 
7
- VERSION = '1.4.1'
7
+ VERSION = '1.5.0'
8
8
 
9
9
  class Error < StandardError; end
10
10
 
@@ -25,10 +25,12 @@ module ProcMan
25
25
  !!condition.match(value)
26
26
  when Array
27
27
  condition.any? { |c| compare(c, value) }
28
+ when TrueClass
29
+ value == "true"
28
30
  else
29
31
  false
30
32
  end
31
33
  end
32
34
 
33
35
  end
34
- end
36
+ end
@@ -33,6 +33,12 @@ module ProcMan
33
33
  def host
34
34
  @host ||= `hostname -f`.strip
35
35
  end
36
+
37
+ ## Returns whether this process is explicitly listed
38
+ def manual
39
+ return @manual unless @manual.nil?
40
+ @manual = self.options[:processes] && self.options[:processes].split(',').include?(self.name.to_s)
41
+ end
36
42
 
37
43
  ## Sets a constraint for this process
38
44
  def constraint(hash = {})
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.4.1
4
+ version: 1.5.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: 2013-03-28 00:00:00.000000000 Z
12
+ date: 2013-04-16 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
@@ -27,7 +27,6 @@ files:
27
27
  - lib/proc_man.rb
28
28
  - LICENCE
29
29
  - Procfile.template
30
- - procman-1.4.0.gem
31
30
  - procman.gemspec
32
31
  - README.md
33
32
  homepage: http://atechmedia.com
data/procman-1.4.0.gem DELETED
Binary file