daemontools 0.1.6 → 0.1.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 34f57fb230e6b4f0abdd86100747b078b3d12e45
4
- data.tar.gz: 28ee31d69851ae285298a1bbafaac8444add479b
3
+ metadata.gz: cfe155135f411080262557e67c56d203a6589fc9
4
+ data.tar.gz: f8bc727120045f5cd713bc45bf89e9a004618da5
5
5
  SHA512:
6
- metadata.gz: 9409f7dadc45810fc5d4d0cfe8ae56b17b205025b74f4a0784bd7bfc8fc849337171fdad83893a42c5ce96488afe7b7a7f9bec153b61849355b4ded66c0c084c
7
- data.tar.gz: f9ab3f24543f200233d996b6e9923c9d648cf5ec36e4471d2a1049db712923a0544f0b22d66fcbc9bb74bf20b92debd03beb753f2fd43e2a14a934b2f37e98ae
6
+ metadata.gz: 309f6b10d84c43d8a557354bc58e84a07396b66261163f6bfc14ca337df13eea80cd39bab336c9cf8e40135497786ec8c13c3cfe105fd0e466cc3f761ff29bed
7
+ data.tar.gz: b2e902de6ca608ef34355caf4fe85bf9fb18aa3ec783f68d424d00c467e558f2ed7ffbb9ba477fc1517555351552d77ac8531d62c50fbb667808c7a61b747365
@@ -65,6 +65,7 @@ module Daemontools
65
65
  @path = "#{@svc_root}/#{name}"
66
66
  @change_user_command = options[:change_user_command]
67
67
  @ulimit = options[:ulimit]
68
+ @write_time = options[:write_time]
68
69
 
69
70
  if Dir.exists?(@path)
70
71
  stop(name)
@@ -1,12 +1,13 @@
1
1
  module Daemontools
2
2
  class Builder
3
- attr_accessor :environment, :all_roles, :services, :curr_service_name, :change_user_command, :ulimit
3
+ attr_accessor :environment, :all_roles, :services, :curr_service_name, :change_user_command, :ulimit, :write_time
4
4
 
5
5
  def initialize(filename)
6
6
  @all_roles = []
7
7
  @services = {}
8
8
  @change_user_command = 'setuidgid'
9
9
  @ulimit = {}
10
+ @write_time = true
10
11
  eval(File.read(filename), binding())
11
12
  end
12
13
 
@@ -23,7 +24,7 @@ module Daemontools
23
24
  @command = param.gsub(':environment', @environment)
24
25
  template_path = File.expand_path(File.dirname(__FILE__))+'/../../templates/rvm.erb'
25
26
  cmd = ERB.new(File.read(template_path)).result(binding())
26
- Daemontools.add(@curr_service_name, cmd, { :change_user_command => @change_user_command, :ulimit => @ulimit })
27
+ Daemontools.add(@curr_service_name, cmd, { :change_user_command => @change_user_command, :ulimit => @ulimit, :write_time => @write_time })
27
28
  Daemontools.make_run_status_up(@curr_service_name)
28
29
  Daemontools.start(@curr_service_name)
29
30
  end
@@ -58,5 +59,9 @@ module Daemontools
58
59
  def ulimit(opt, val)
59
60
  @ulimit[opt] = val
60
61
  end
62
+
63
+ def write_time(val)
64
+ @write_time = val
65
+ end
61
66
  end
62
67
  end
@@ -1,3 +1,3 @@
1
1
  module Daemontools
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
@@ -3,4 +3,4 @@
3
3
  LOGDIR=<%= @log_dir %>
4
4
  mkdir -p $LOGDIR
5
5
  <%= "chmod 0777 $LOGDIR" if @user %>
6
- exec <%= "setuidgid #{@user}" if @user %> multilog t s16000000 n25 $LOGDIR
6
+ exec <%= "setuidgid #{@user}" if @user %> multilog <%= "t " if @write_time %>s16000000 n25 $LOGDIR
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daemontools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - sh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-05 00:00:00.000000000 Z
11
+ date: 2017-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler