mlanett-daemons 1.1.10.2 → 1.1.10.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +17 -0
- data/lib/daemons/application.rb +2 -2
- data/lib/daemons/version.rb +1 -1
- metadata +1 -1
data/Rakefile
CHANGED
@@ -13,3 +13,20 @@ rd = Rake::RDocTask.new("rdoc") do |rdoc|
|
|
13
13
|
rdoc.rdoc_files.include('README', 'TODO', 'Releases')
|
14
14
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
15
|
end
|
16
|
+
|
17
|
+
desc "Version bump"
|
18
|
+
task :version_bump do
|
19
|
+
# VERSION = "1.1.10.2"
|
20
|
+
lines = File.open("lib/daemons/version.rb") { |io| io.readlines }
|
21
|
+
lines = lines.map do |line|
|
22
|
+
if line =~ /VERSION = "(\d+(\.\d+)+)"/
|
23
|
+
version = $1.split(/\./).map(&:to_i)
|
24
|
+
version[-1] += 1
|
25
|
+
line.gsub(/".*"/) { '"' + version.join(".") + '"' }
|
26
|
+
else
|
27
|
+
line
|
28
|
+
end
|
29
|
+
end
|
30
|
+
File.open("lib/daemons/version.rb","w") { |io| io.puts lines }
|
31
|
+
`git commit -m "Version bump" lib/daemons/version.rb`
|
32
|
+
end
|
data/lib/daemons/application.rb
CHANGED
@@ -70,11 +70,11 @@ module Daemons
|
|
70
70
|
end
|
71
71
|
|
72
72
|
def output_logfile
|
73
|
-
(options[:log_output] && logdir) ? File.join(logdir, @group.app_name + '.
|
73
|
+
(options[:log_output] && logdir) ? File.join(logdir, @group.app_name + '.log') : nil
|
74
74
|
end
|
75
75
|
|
76
76
|
def logfile
|
77
|
-
logdir ? File.join(logdir, @group.app_name + '.log') : nil
|
77
|
+
logdir ? File.join(logdir, @group.app_name + '.err.log') : nil
|
78
78
|
end
|
79
79
|
|
80
80
|
# this function is only used to daemonize the currently running process (Daemons.daemonize)
|
data/lib/daemons/version.rb
CHANGED