public
Description: A very fast & simple Ruby web server
Homepage: http://code.macournoyer.com/thin/
Clone URL: git://github.com/macournoyer/thin.git
Search Repo:
Add --trace (-V) option to trace request/response and get backtrace w/out 
all Ruby debug stuff.
macournoyer (author)
Mon Jan 21 20:48:42 -0800 2008
commit  2b8482fd1dc3fe7c0539ddce9299dfb96bb8d88d
tree    6dbd74d0789232e0668612324857b82653d34800
parent  1d33a94f4f2dcfbb13df7a448c848c1319e2287a
...
1
2
 
 
3
4
5
...
1
 
2
3
4
5
6
0
@@ -1,5 +1,6 @@
0
 == 0.5.5 Pony release
0
- * Add --config option to load options from a config file in thin script [Matt Todd].
0
+ * Add --trace (-V) option to trace request/response and get backtrace w/out all Ruby debug stuff.
0
+ * Add --config (-C) option to load options from a config file in thin script [Matt Todd].
0
  * Alter response headers to output directly to a string.
0
  * Improve specs stability.
0
  * Move request body to a Tempfile if too big (> 112 MB)
...
50
51
52
53
54
55
 
 
 
 
56
57
58
...
63
64
65
66
67
68
 
 
69
70
71
...
50
51
52
 
 
 
53
54
55
56
57
58
59
...
64
65
66
 
 
 
67
68
69
70
71
0
@@ -50,9 +50,10 @@
0
   opts.separator ""
0
   opts.separator "Common options:"
0
 
0
- opts.on_tail("-D", "--debug", "Set debbuging on") { $DEBUG = true }
0
- opts.on_tail("-h", "--help", "Show this message") { puts opts; exit }
0
- opts.on_tail('-v', '--version', "Show version") { puts Thin::SERVER; exit }
0
+ opts.on_tail("-D", "--debug", "Set debbuging on") { $DEBUG = true }
0
+ opts.on_tail("-V", "--trace", "Set tracing on") { $TRACE = true }
0
+ opts.on_tail("-h", "--help", "Show this message") { puts opts; exit }
0
+ opts.on_tail('-v', '--version', "Show version") { puts Thin::SERVER; exit }
0
 end
0
 
0
 
0
@@ -63,9 +64,8 @@
0
 end
0
 
0
 def load_options_from_config_file!(options)
0
- file = options.delete(:config)
0
- YAML.load_file(file).each do |key, value|
0
- options[key.to_sym] = value
0
+ if file = options.delete(:config)
0
+ YAML.load_file(file).each { |key, value| options[key.to_sym] = value }
0
   end
0
 end
0
 
...
13
14
15
16
 
17
18
19
...
13
14
15
 
16
17
18
19
0
@@ -13,7 +13,7 @@
0
       
0
       # Log a message to the console if tracing is activated
0
       def trace(msg=nil)
0
- puts msg || yield if $DEBUG && !@silent
0
+ puts msg || yield if ($DEBUG || $TRACE) && !@silent
0
       end
0
       
0
       def log_error(e)

Comments

    No one has commented yet.