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
Added Version info to runtimes and got rid of deps on extensions/all and 
replaced with extension/io. Is this still good for 1.8.6?
dyoder (author)
Mon Aug 25 09:44:54 -0700 2008
automatthew (committer)
Tue Aug 26 06:35:37 -0700 2008
commit  7e64511577abbfd9a1d4c2ab2fedcbaef3d5c9ef
tree    54be00f4c39e30d64bf2d99abca34211ea172b03
parent  fdf2e3d2eec22520b446ff779728b5cb9f99e0a4
...
27
28
29
30
 
31
32
33
...
27
28
29
 
30
31
32
33
0
@@ -27,7 +27,7 @@ gem = Gem::Specification.new do |gem|
0
   gem.add_dependency('sequel', '>= 2.0.0')
0
   gem.add_dependency('autocode', '>= 1.0.0')
0
   gem.add_dependency('RedCloth', '>= 3.0.0')
0
- gem.add_dependency('filebase', '>= 0.3.0')
0
+ gem.add_dependency('filebase', '>= 0.3.1')
0
   gem.add_dependency('functor', '>= 0.4.2')
0
   gem.files = FileList[ 'app/**/*', 'app/**/.gitignore', 'lib/**/*.rb','lib/**/*.erb', "{doc,samples,verify}/**/*" ]
0
   gem.has_rdoc = true
...
27
28
29
30
 
31
32
 
 
33
34
35
...
27
28
29
 
30
31
32
33
34
35
36
37
0
@@ -27,9 +27,11 @@ Choice.options do
0
     desc "Select an ORM (e.g. active_record, sequel, none)"
0
     default "sequel"
0
   end
0
-
0
+
0
 end
0
 
0
+puts "** Waves Runtime #{Waves.version}"
0
+
0
 orm = Choice.choices.orm.snake_case
0
 orm_require, orm_include = case orm
0
 when 'sequel'
...
10
11
12
13
 
14
15
16
...
18
19
20
 
21
...
10
11
12
 
13
14
15
16
...
18
19
20
21
22
0
@@ -10,7 +10,7 @@ Choice.options do
0
     desc 'Defaults to development.'
0
     cast Symbol
0
   end
0
- separator ''
0
+ separator ''
0
 end
0
 
0
 console = Waves::Console.load( Choice.choices )
0
@@ -18,4 +18,5 @@ Object.send(:define_method, :waves) { console }
0
 require 'irb'
0
 require 'irb/completion'
0
 ARGV.clear
0
+Waves.log.info "Waves Runtime #{Waves.version} **"
0
 IRB.start
...
51
52
53
 
54
55
...
51
52
53
54
55
56
0
@@ -51,5 +51,6 @@ Choice.options do
0
     desc 'Startup file to load.'
0
     desc 'Defaults to "lib/startup.rb"'
0
   end
0
+ separator ''
0
 end
0
 Waves::Server.run( Choice.choices )
...
58
59
60
61
 
62
63
64
65
66
67
 
 
 
68
69
 
70
71
72
...
58
59
60
 
61
62
63
64
 
 
 
65
66
67
68
 
69
70
71
72
0
@@ -58,15 +58,15 @@ module Waves
0
               @controller ||= app::Controllers[ singular ].process( @request ) { self }
0
             end
0
 
0
- def view( method = nil, assigns = nil)
0
+ def view( method = nil, assigns = nil )
0
               @view ||= app::Views[ singular ].process( @request ) { self }
0
             end
0
             
0
- end
0
- auto_create_class true, app::Resources::Default
0
- auto_load true, :directories => [ :resources ]
0
+ end
0
+ auto_create_class( true, app::Resources::Default )
0
+ auto_load( true, :directories => [ :resources ] )
0
         end
0
-
0
+
0
       end
0
     end
0
   end
...
39
40
41
42
 
 
43
44
45
...
65
66
67
68
 
69
70
71
...
39
40
41
 
42
43
44
45
46
...
66
67
68
 
69
70
71
72
0
@@ -39,7 +39,8 @@ module Waves
0
           gots = ( gots + ( [nil] * ( wants.length - gots.length ) ) )
0
         elsif wants.length < gots.length
0
           # true is a wildcard matcher ...
0
- return false unless wants.last == true or ( wants.last.respond_to? :values and wants.last.values.first == true )
0
+ return false unless wants.last == true or
0
+ ( wants.last.respond_to? :values and wants.last.values.first == true )
0
           # pad wants with last so they are the same length
0
           wants = ( wants + ( [ wants.last ] * ( gots.length - wants.length ) ) )
0
         end
0
@@ -65,7 +66,7 @@ module Waves
0
       functor( :match, Hash, Symbol, String, nil ) do | r, key, want, got |
0
         r[ key.to_s ] = want
0
       end
0
- functor( :match, Hash, Symbol, true, Object ) do | r, key, want, got |
0
+ functor( :match, Hash, Symbol, true, String ) do | r, key, want, got |
0
         r[ key.to_s ] ||= []; r[ key.to_s ] << got
0
       end
0
       functor( :match, Hash, Symbol, Regexp, String ) do | r, key, want, got |
...
30
31
32
33
 
34
35
36
...
30
31
32
 
33
34
35
36
0
@@ -30,7 +30,7 @@ module Waves
0
       
0
       # Returns the active configuration for the logger.
0
       def config
0
- @config ||= Waves::Server.config.log
0
+ @config ||= Waves.config.log
0
       end
0
       
0
       # Returns the logging level used to filter logging events.
...
25
26
27
 
28
29
30
...
70
71
72
 
 
 
 
 
 
73
74
75
...
25
26
27
28
29
30
31
...
71
72
73
74
75
76
77
78
79
80
81
82
0
@@ -25,6 +25,7 @@ module Waves
0
   def self.instance ; Waves::Runtime.instance ; end
0
   
0
   def self.version ; File.read( File.expand_path( "#{File.dirname(__FILE__)}/../../doc/VERSION" ) ) ; end
0
+ def self.license ; File.read( File.expand_path( "#{File.dirname(__FILE__)}/../../doc/LICENSE" ) ) ; end
0
 
0
   def self.method_missing(name,*args,&block) ; instance.send(name,*args,&block) ; end
0
 
0
@@ -70,6 +71,12 @@ module Waves
0
 
0
     # Returns the cache set for the current configuration
0
     def cache ; config.cache ; end
0
+
0
+ # Start and / or access the Waves::Logger instance.
0
+ def log
0
+ @log ||= Waves::Logger.start
0
+ end
0
+
0
   end
0
 
0
 end
...
43
44
45
46
47
48
49
50
51
52
53
54
55
 
 
56
57
58
...
62
63
64
65
 
66
67
68
69
70
 
71
72
73
...
43
44
45
 
 
 
 
 
46
47
48
49
 
50
51
52
53
54
...
58
59
60
 
61
62
63
64
65
 
66
67
68
69
0
@@ -43,16 +43,12 @@ module Waves
0
       Thread.new { loop {sleep 1} } if RUBY_PLATFORM =~ /mswin32/
0
     end
0
 
0
- # Start and / or access the Waves::Logger instance.
0
- def log
0
- @log ||= Waves::Logger.start
0
- end
0
-
0
     # Start the server.
0
     def start
0
       daemonize if options[:daemon]
0
       start_debugger if options[:debugger]
0
- log.info "** Waves Server #{Waves.version} starting on #{host}:#{port}"
0
+ log.info "Waves Runtime #{Waves.version}"
0
+ log.info "Waves starting on #{host}:#{port}"
0
       handler, options = config.handler
0
       handler.run( config.application.to_app, options ) do |server|
0
         @server = server
0
@@ -62,12 +58,12 @@ module Waves
0
 
0
     # Stop the server.
0
     def stop
0
- log.info "** Waves Server Stopping ..."
0
+ log.info "Waves Server Stopping ..."
0
       if options[:daemon]
0
         pid_file = :log / $$ + '.pid'; FileUtils.rm( pid_file ) if File.exist?( pid_file )
0
       end
0
       @server.stop
0
- log.info "** Waves Server Stopped"
0
+ log.info "Waves Server Stopped"
0
     end
0
 
0
     # Provides access to the server mutex for thread-safe operation.
...
16
17
18
19
 
20
21
22
...
16
17
18
 
19
20
21
22
0
@@ -16,7 +16,7 @@ require 'functor'
0
 require 'mongrel'
0
 
0
 # a bunch of handy stuff
0
-require 'extensions/all'
0
+require 'extensions/io'
0
 require 'fileutils'
0
 require 'metaid'
0
 require 'forwardable'

Comments

    No one has commented yet.