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
Next checkin
wycats (author)
Fri Jan 11 23:24:54 -0800 2008
commit  76cfb912692b9f3787c27b84757c514fc331e4f7
tree    f22b694701ec760b44f9dc1418b1d528cce9eac3
parent  6a34af9855d3d3abbebc9c215828c281b38ecdfd
...
1
2
3
4
5
6
 
 
 
7
8
9
10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
 
 
 
4
5
6
7
8
 
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
0
@@ -1,9 +1,50 @@
0
 require 'rubygems'
0
 require 'set'
0
 require 'fileutils'
0
-require 'merb/gem_ext/erubis'
0
-require 'merb/logger'
0
-require 'merb/version'
0
+require 'merb_core/gem_ext/erubis'
0
+require 'merb_core/logger'
0
+require 'merb_core/version'
0
 
0
 gem "assistance"
0
-require "assistance"
0
\ No newline at end of file
0
+require "assistance"
0
+
0
+module Merb
0
+ class << self
0
+
0
+ attr_accessor :environment, :load_paths
0
+ self.load_paths = Mash.new
0
+
0
+ # This is the core mechanism for setting up your application layout
0
+ # merb-core won't set a default application layout, but merb-more will
0
+ # use the app/:type layout that is in use in Merb 0.5
0
+ def push_path(type, path, file_glob = "**/*.rb")
0
+ load_paths[type] = [path, file_glob]
0
+ end
0
+
0
+ # Application paths
0
+ def root() @root || Merb::Config[:merb_root] || Dir.pwd end
0
+ def root=(value) @root ||= value end
0
+ def root_path(path) File.join(root, path) end
0
+
0
+ # Logger settings
0
+ attr_accessor :logger
0
+
0
+ def log_path
0
+ if $TESTING
0
+ "#{Merb.root}/log/merb_test.log"
0
+ elsif !(Merb::Config[:daemonize] || Merb::Config[:cluster] )
0
+ STDOUT
0
+ else
0
+ "#{Merb.root}/log/merb.#{Merb::Config[:port]}.log"
0
+ end
0
+ end
0
+
0
+ # Framework paths
0
+ def framework_root() @framework_root ||= File.dirname(__FILE__) end
0
+
0
+ # Set up default generator scope
0
+ attr_accessor :generator_scope
0
+ self.generator_scope = [:merb_default, :merb, :rspec]
0
+ end
0
+
0
+end

Comments

    No one has commented yet.