daemontools 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,7 +18,9 @@ module Daemontools
18
18
 
19
19
  def command(param, options = {})
20
20
  Daemontools.stop(@curr_service_name) if Daemontools.exists?(@curr_service_name)
21
- cmd = "/bin/bash -l -c '#{param.gsub(':environment', @environment)}' 2>&1"
21
+ @command = param.gsub(':environment', @environment)
22
+ template_path = File.expand_path(File.dirname(__FILE__))+'/../../templates/rvm.erb'
23
+ cmd = ERB.new(File.read(template_path)).result(binding())
22
24
  Daemontools.add(@curr_service_name, cmd)
23
25
  Daemontools.make_run_status_up(@curr_service_name)
24
26
  Daemontools.start(@curr_service_name)
@@ -1,3 +1,3 @@
1
1
  module Daemontools
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
data/templates/rvm.erb ADDED
@@ -0,0 +1,3 @@
1
+ /bin/bash -l -c '<%= @command %> 2>&1 &
2
+ trap "kill $!" exit INT TERM
3
+ wait'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daemontools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -64,6 +64,7 @@ files:
64
64
  - lib/daemontools/version.rb
65
65
  - templates/log.erb
66
66
  - templates/run.erb
67
+ - templates/rvm.erb
67
68
  homepage: ''
68
69
  licenses: []
69
70
  post_install_message:
@@ -78,7 +79,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
78
79
  version: '0'
79
80
  segments:
80
81
  - 0
81
- hash: -1763031162701123507
82
+ hash: 333858289
82
83
  required_rubygems_version: !ruby/object:Gem::Requirement
83
84
  none: false
84
85
  requirements:
@@ -87,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
88
  version: '0'
88
89
  segments:
89
90
  - 0
90
- hash: -1763031162701123507
91
+ hash: 333858289
91
92
  requirements: []
92
93
  rubyforge_project:
93
94
  rubygems_version: 1.8.24