daemon-ogre 1.4.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/README.md +5 -5
  2. data/README.rdoc +5 -5
  3. data/VERSION +1 -1
  4. data/lib/daemon-ogre.rb +11 -14
  5. metadata +3 -3
data/README.md CHANGED
@@ -56,10 +56,10 @@ you can simply use your terminal with arguments like
56
56
  * start - for start the process if you choosed :terminate => true in code like above
57
57
  start command will check does the application already running or not, so you dont have to worry about
58
58
 
59
- * stop - will terminate the running application
60
- * restart - will stop the process if that is already running than start again
61
- * debug - this will show the fancy loadings if you want look busy by coding big stuffs :) (or debug your code)
62
- * debugger - this will call the ruby debugger gem to aid you in trouble
59
+ * stop - will terminate the running application
60
+ * restart - will stop the process if that is already running than start again
61
+ * debug or -d - this will show the fancy loadings if you want look busy by coding big stuffs :) (or debug your code)
62
+ * debugger - this will call the ruby debugger gem to aid you in trouble
63
63
  you should use these commands:
64
64
 
65
65
 
@@ -70,7 +70,7 @@ you should use these commands:
70
70
  #simply hit enter to repeate the last one
71
71
 
72
72
 
73
- * daemon or -d -this will fork a child process by the given parameters
73
+ * daemon -this will fork a child process by the given parameters
74
74
  * log or -l -you can set the log file position n by terminal for one time run
75
75
  * pid or -p -you can set the pid file position n name by terminal for one time run
76
76
  * status or -s -this will tell you ,does your process is running not
data/README.rdoc CHANGED
@@ -56,10 +56,10 @@ you can simply use your terminal with arguments like
56
56
  * start - for start the process if you choosed :terminate => true in code like above
57
57
  start command will check does the application already running or not, so you dont have to worry about
58
58
 
59
- * stop - will terminate the running application
60
- * restart - will stop the process if that is already running than start again
61
- * debug - this will show the fancy loadings if you want look busy by coding big stuffs :) (or debug your code)
62
- * debugger - this will call the ruby debugger gem to aid you in trouble
59
+ * stop - will terminate the running application
60
+ * restart - will stop the process if that is already running than start again
61
+ * debug or -d - this will show the fancy loadings if you want look busy by coding big stuffs :) (or debug your code)
62
+ * debugger - this will call the ruby debugger gem to aid you in trouble
63
63
  you should use these commands:
64
64
 
65
65
 
@@ -70,7 +70,7 @@ you should use these commands:
70
70
  #simply hit enter to repeate the last one
71
71
 
72
72
 
73
- * daemon or -d -this will fork a child process by the given parameters
73
+ * daemon -this will fork a child process by the given parameters
74
74
  * log or -l -you can set the log file position n by terminal for one time run
75
75
  * pid or -p -you can set the pid file position n name by terminal for one time run
76
76
  * status or -s -this will tell you ,does your process is running not
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.0
1
+ 1.4.1
data/lib/daemon-ogre.rb CHANGED
@@ -304,13 +304,14 @@ begin
304
304
  "\nstart daemon -d stop restart log -l pid -p port -tcp status reset help"+\
305
305
  "\n==============================================================================DESC======>>"
306
306
  puts "start\t\t\t\t=> this will start the #{$0}"+\
307
- "\ndaemon\t\tor -d\t\t=> this will make is daemon process"+\
307
+ "\ndaemon\t\t\t\t=> this will make is daemon process"+\
308
308
  "\nstop\t\t\t\t=> this will kill the last process with pidfile"+\
309
309
  "\nrestart\t\tor reset\t=> hard restart"+\
310
310
  "\nlog\t\tor -l\t\t=> logfile place"+\
311
311
  "\npid\t\tor -p\t\t=> pid file place (if you want set the filename as well, put .pid or .txt in the end)"+\
312
312
  "\nport\t\tor -tcp\t\t=> user definiated port"+\
313
313
  "\nstatus\t\t\t\t=> last process alive?"+\
314
+ "\ndebug\t\tor -d\t\t=> show debug log (you can make your own by using 'puts 'xy' if $DEBUG' "+\
314
315
  "\nhelp\t\t\t\tgive you this msg :)\n"
315
316
  DaemonOgre::App.terminate=true
316
317
  end
@@ -449,18 +450,14 @@ begin
449
450
 
450
451
  def clear
451
452
 
452
- begin
453
- File.delete DaemonOgre::App.log_path
454
- rescue Exception
455
- end
456
- begin
457
- File.delete DaemonOgre::App.daemon_stderr
458
- rescue Exception
459
- end
453
+ logs = ['loh_path','daemon_stderr','exceptions','exlogger']
460
454
 
461
- begin
462
- File.delete DaemonOgre::App.exceptions
463
- rescue Exception
455
+ logs.each do |logname|
456
+ begin
457
+ File.delete DaemonOgre::App.__send__(logname)
458
+ rescue Exception => ex
459
+ puts ex if $DEBUG
460
+ end
464
461
  end
465
462
 
466
463
  end
@@ -601,7 +598,7 @@ begin
601
598
  case one_argv_parameter.downcase
602
599
  when "start" then serv_load.push "start"
603
600
  when "daemon" then serv_load.push "daemon"
604
- when "-d" then serv_load.push "daemon"
601
+ when "-d" then DaemonOgre::Server.debug
605
602
  when "stop" then serv_load.push "stop"
606
603
  when "restart" then serv_load.push "restart"
607
604
  when "reset" then serv_load.push "restart"
@@ -636,7 +633,7 @@ begin
636
633
  begin
637
634
  require "debugger" ;debugger if serv_load.include? "debugger"
638
635
  rescue Exception => ex
639
- puts "you need to install debugger gem => gem install debugger"
636
+ puts "you need to install debugger gem => gem install debugger\n#{ex}"
640
637
  end
641
638
 
642
639
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daemon-ogre
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
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-06-05 00:00:00.000000000 Z
12
+ date: 2013-06-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdoc
@@ -112,7 +112,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
112
112
  version: '0'
113
113
  segments:
114
114
  - 0
115
- hash: 3688360315002378348
115
+ hash: -913428925438343889
116
116
  required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  none: false
118
118
  requirements: