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
Minor improvements to streamline autocode decls.`
dyoder (author)
Sat May 10 00:26:12 -0700 2008
commit  d3b5aab081f1b16b29eb7567013906f4d2cc3c06
tree    2da454dc575542e62d7310b9a47fdfa42fd30392
parent  6068a0609734b701f46ffd4539b31b744bca3161
...
13
14
15
16
17
18
 
 
 
19
20
21
...
13
14
15
 
 
 
16
17
18
19
20
21
0
@@ -13,9 +13,9 @@ module Waves
0
           include Waves::Layers::ORM::Sequel
0
           
0
           # Set autoloading from default.rb files
0
- autoinit :Configurations do
0
- autoload_class true
0
- end
0
+ #autoinit :Configurations do
0
+ # autoload_class true
0
+ #end
0
           
0
         end
0
         
...
2
3
4
 
 
 
 
5
6
7
 
8
9
10
11
 
 
 
12
13
14
15
16
17
...
2
3
4
5
6
7
8
9
10
11
12
13
14
 
 
15
16
17
18
 
 
19
20
21
0
@@ -2,16 +2,20 @@ module Waves
0
   module Layers
0
     module Simple
0
       def self.included(app)
0
+
0
+ def app.config ; Waves.config ; end
0
+ def app.configurations ; self::Configurations ; end
0
+
0
         app.instance_eval do
0
 
0
           include Autocode
0
+
0
           autocreate( :Configurations, Module.new) do
0
             include Autocode
0
- autocreate true, Waves::Configurations::Default
0
- autocreate( :Mapping, Module.new) { extend Waves::Mapping }
0
+ autocreate_class true, Waves::Configurations::Default
0
+ autocreate_module( :Mapping ) { extend Waves::Mapping }
0
+ autoload_class
0
           end
0
- meta_def( :config ) { Waves.config }
0
- meta_def( :configurations ) { self::Configurations }
0
 
0
           include Waves::Layers::SimpleErrors
0
 
...
6
7
8
9
10
11
12
 
 
 
 
 
 
13
14
15
16
17
18
19
20
21
22
...
6
7
8
 
 
 
 
9
10
11
12
13
14
15
16
17
18
19
 
 
20
21
22
0
@@ -6,17 +6,17 @@ module Waves
0
     Model = ::Sequel::Model
0
 
0
     module Sequel
0
-
0
- def sequel ; @sequel ||= ::Sequel.open( config.database ) ; end
0
- def database ; @database ||= sequel ; end
0
- def model_config(context, name); context.set_dataset(database[ name ]); end
0
+
0
+ def self.included( app )
0
+ def app.sequel ; @sequel ||= ::Sequel.open( config.database ) ; end
0
+ def app.database ; @database ||= sequel ; end
0
+ def app.model_config(context, name); context.set_dataset(database[ name ]); end
0
+ end
0
 
0
     end
0
   end
0
 end
0
 
0
-::Application.extend(Waves::Orm::Sequel)
0
-
0
 if defined?(Rake)
0
   require File.dirname(__FILE__) / :sequel / :tasks / :schema
0
 end

Comments

    No one has commented yet.