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

public
Rubygem
Description: Merb Core: All you need. None you don't.
Homepage: http://www.merbivore.com
Clone URL: git://github.com/wycats/merb-core.git
Slight refactor of BootLoader + the addition of BootLoader docs
wycats (author)
Fri Jan 25 16:05:21 -0800 2008
commit  1f5b88761475ebcd1eab3102cdd87ecf404a5c8a
tree    206162d3e10564980b6f76c95251bf7e6bb6723e
parent  c765d974253901535e308b1729a54d0dc0b7b453
...
47
48
49
50
 
51
52
53
...
47
48
49
 
50
51
52
53
0
@@ -47,7 +47,7 @@ spec = Gem::Specification.new do |s|
0
   s.description = s.summary
0
   s.executables = %w( merb.9 )
0
   s.require_path = "lib"
0
- s.files = %w( LICENSE README Rakefile TODO ) + Dir["{bin,spec,lib,examples,app_generators,merb_generators,merb_default_generators,rspec_generators,test_unit_generators,script}/**/*"]
0
+ s.files = %w( LICENSE README Rakefile TODO ) + Dir["{docs,bin,spec,lib,examples,app_generators,merb_generators,merb_default_generators,rspec_generators,test_unit_generators,script}/**/*"]
0
 
0
   # rdoc
0
   s.has_rdoc = true
...
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
...
136
137
138
139
 
140
141
142
...
163
164
165
166
 
167
168
169
...
293
294
295
296
 
297
298
299
...
304
305
306
307
308
309
310
311
...
354
355
356
357
358
359
360
 
 
361
362
363
...
55
56
57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
59
60
...
115
116
117
 
118
119
120
121
...
142
143
144
 
145
146
147
148
...
272
273
274
 
275
276
277
278
...
283
284
285
 
 
286
287
288
...
331
332
333
 
 
 
 
334
335
336
337
338
0
@@ -55,27 +55,6 @@ class Merb::BootLoader::Environment < Merb::BootLoader
0
   end
0
 end
0
 
0
-# Load the init-file.
0
-#
0
-# The file will be searched for in the following order:
0
-# * A relative path provided via a -I command line switch
0
-# * merb_init.rb, relative to the root
0
-# * merb_init.rb, relative to the config directory
0
-# * application.rb, relative to the root
0
-class Merb::BootLoader::InitFile < Merb::BootLoader
0
- def self.run
0
- if Merb::Config[:init_file] && File.exists?(Merb.root / Merb::Config[:init_file])
0
- require(Merb.root / Merb::Config[:init_file])
0
- elsif File.exists?(Merb.root / "merb_init.rb")
0
- require(Merb.root / "merb_init")
0
- elsif File.exists?(Merb.root / "config" / "merb_init.rb")
0
- require(Merb.root / "config" / "merb_init")
0
- elsif File.file?(Merb.root / "application.rb")
0
- require(Merb.root / "application")
0
- end
0
- end
0
-end
0
-
0
 # Build the framework paths.
0
 #
0
 # By default, the following paths will be used:
0
@@ -136,7 +115,7 @@ class Merb::BootLoader::BuildFramework < Merb::BootLoader
0
 end
0
 
0
 # Load the dependencies file, which registers the list of necessary dependencies and
0
-# an after_
0
+# any after_app_loads hooks.
0
 class Merb::BootLoader::Dependencies < Merb::BootLoader
0
   def self.run
0
     if File.exists?(Merb.dir_for(:config) / "dependencies.rb")
0
@@ -163,7 +142,7 @@ end
0
 # Merb::BootLoader::BuildFramework)
0
 class Merb::BootLoader::LoadRouter < Merb::BootLoader
0
   def self.run
0
- require(Merb.dir_for(:config) / "router") if File.exists?(Merb.dir_for(:config) / "router")
0
+ require(Merb.dir_for(:config) / "router") if File.exists?(Merb.dir_for(:config) / "router.rb")
0
   end
0
 end
0
 
0
@@ -293,7 +272,7 @@ class Merb::BootLoader::AfterAppLoads < Merb::BootLoader
0
   end
0
 end
0
 
0
-# Choose the Rack adapter/server to use and set Merb.adapter
0
+# Mixin the correct session container.
0
 class Merb::BootLoader::MixinSessionContainer < Merb::BootLoader
0
   def self.run
0
     Merb.register_session_type('memory',
0
@@ -304,8 +283,6 @@ class Merb::BootLoader::MixinSessionContainer < Merb::BootLoader
0
       Merb.framework_root / "merb-core" / "dispatch" / "session" / "cookie",
0
       "Using 'share-nothing' cookie sessions (4kb limit per client)")
0
 
0
- Merb::Config[:session_store] = "memory"
0
-
0
     Merb::Controller.class_eval do
0
       lib = File.join(Merb.framework_root, 'merb')
0
       session_store = Merb::Config[:session_store].to_s
0
@@ -354,10 +331,8 @@ end
0
 # Rack::Builder.new { } block. Allows for mounting additional apps or middleware
0
 class Merb::BootLoader::RackUpApplication < Merb::BootLoader
0
   def self.run
0
- if File.exists?(Merb.root / "rack.rb")
0
- Merb::Config[:app] = eval("Rack::Builder.new {( #{IO.read(Merb.root / 'rack')}\n )}.to_app")
0
- elsif File.exists?(Merb.root / "config" / "rack.rb")
0
- Merb::Config[:app] = eval("Rack::Builder.new {( #{IO.read(Merb.root / 'config' / 'rack')}\n )}.to_app")
0
+ if File.exists?(Merb.dir_for(:config) / "rack.rb")
0
+ Merb::Config[:app] = eval("Rack::Builder.new {( #{IO.read(Merb.dir_for(:config) / 'rack')}\n )}.to_app")
0
     else
0
       Merb::Config[:app] = ::Merb::Rack::Application.new
0
     end

Comments

    No one has commented yet.