GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Rubygem
Description: Resource-oriented open source Ruby framework for Web apps.
Homepage: http://rubywaves.com/
Clone URL: git://github.com/dyoder/waves.git
cosmetic, easier to trace
Pascal (author)
Sun May 11 00:32:03 -0700 2008
commit  15d6ed732294857b1864f8c14b54aa8ae27fc419
tree    dc559bf4c29be50ea2f689ec5d114cb51a6450ab
parent  4f898c379f1457f55c0e80e5b4d064fa341f6c77
...
28
29
30
31
 
32
33
34
...
41
42
43
44
 
 
 
45
46
47
48
 
 
 
 
49
50
51
52
53
 
 
 
54
55
56
...
28
29
30
 
31
32
33
34
...
41
42
43
 
44
45
46
47
48
 
 
49
50
51
52
53
54
55
56
 
57
58
59
60
61
62
0
@@ -28,7 +28,7 @@ module Waves
0
   # main Waves application, you can use +Waves+.+application+.
0
   class Application
0
 
0
- class << self; attr_accessor :instance; end
0
+ class << self; attr_accessor :instance; end
0
 
0
     # Accessor for options passed to the application. Valid options include
0
     attr_reader :options
0
@@ -41,16 +41,22 @@ module Waves
0
       Kernel.load( :lib / 'application.rb' ) if Waves.application.nil?
0
     end
0
 
0
- def synchronize( &block ) ; ( @mutex ||= Mutex.new ).synchronize( &block ) ; end
0
+ def synchronize( &block )
0
+ ( @mutex ||= Mutex.new ).synchronize( &block )
0
+ end
0
 
0
     # The 'mode' of the application determines which configuration it will run under.
0
- def mode ; @mode ||= @options[:mode]||:development ; end
0
-
0
+ def mode
0
+ @mode ||= @options[:mode]||:development
0
+ end
0
+
0
     # Debug is true if debug is set to true in the current configuration.
0
     def debug? ; config.debug ; end
0
 
0
     # Access the current configuration. *Example:* +Waves::Server.config+
0
- def config ; Waves.application.configurations[ mode ] ; end
0
+ def config
0
+ Waves.application.configurations[ mode ]
0
+ end
0
 
0
     # Access the mappings for the application.
0
     def mapping ; Waves.application.configurations[ :mapping ] ; end
...
114
115
116
117
118
119
120
...
114
115
116
 
117
118
119
0
@@ -114,7 +114,6 @@ module Waves
0
   module Configurations
0
 
0
     class Base
0
-
0
       # Set the given attribute with the given value. Typically, you wouldn't
0
       # use this directly.
0
       def self.[]=( name, val )
...
27
28
29
 
30
31
 
 
 
 
32
33
 
34
35
36
...
39
40
41
 
42
43
44
...
27
28
29
30
31
 
32
33
34
35
36
37
38
39
40
41
...
44
45
46
47
48
49
50
0
@@ -27,10 +27,15 @@ module Waves
0
       def output
0
         @output ||= ( config[:output] ? File.expand_path( config[:output] ) : $stderr )
0
       end
0
+
0
       # Returns the active configuration for the logger.
0
- def config ; @config ||= Waves::Server.config.log ; end
0
+ def config
0
+ @config ||= Waves::Server.config.log
0
+ end
0
+
0
       # Returns the logging level used to filter logging events.
0
       def level ; @level ||= ::Logger.const_get( config[:level].to_s.upcase || 'INFO' ) ; end
0
+
0
       # Starts the logger, using the active configuration to initialize it.
0
       def start
0
         @log = config[:rotation] ?
0
@@ -39,6 +44,7 @@ module Waves
0
         @log.level = level
0
         self
0
       end
0
+
0
       # Forwards logging methods to the logger.
0
       def method_missing(name,*args,&block)
0
         @log.send name,*args, &block if @log
...
37
38
39
40
 
 
 
41
42
43
...
70
71
72
 
73
74
 
 
 
 
75
76
77
...
37
38
39
 
40
41
42
43
44
45
...
72
73
74
75
76
 
77
78
79
80
81
82
83
0
@@ -37,7 +37,9 @@ module Waves
0
     end
0
 
0
     # Start and / or access the Waves::Logger instance.
0
- def log ; @log ||= Waves::Logger.start ; end
0
+ def log
0
+ @log ||= Waves::Logger.start
0
+ end
0
 
0
     # Start the server.
0
     def start
0
@@ -70,8 +72,12 @@ module Waves
0
       def run( options={} )
0
         @server.stop if @server; @server = new( options ); @server.start
0
       end
0
+
0
       # Allows us to access the Waves::Server instance.
0
- def method_missing(*args); @server.send(*args); end
0
+ def method_missing(*args)
0
+ @server.send(*args)
0
+ end
0
+
0
       # Probably wouldn't need this if I added a block parameter to method_missing.
0
       def synchronize(&block) ; @server.synchronize(&block) ; end
0
     end

Comments

    No one has commented yet.