nitro 0.15.0 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +218 -0
- data/INSTALL +3 -0
- data/README +4 -2
- data/Rakefile +150 -8
- data/benchmark/bench.rb +1 -1
- data/doc/AUTHORS +2 -8
- data/doc/RELEASES +63 -1
- data/examples/ajax/controller.rb +2 -2
- data/examples/ajax/public/index.xhtml +3 -1
- data/examples/ajax/run.rb +3 -3
- data/examples/blog/README +8 -0
- data/examples/blog/cache/entriesadmintrue +3 -0
- data/examples/blog/run.rb +38 -40
- data/examples/blog/src/blog.rb +2 -1
- data/examples/blog/src/controller.rb +40 -20
- data/examples/blog/src/mailer.rb +2 -2
- data/examples/blog/src/models/blog.rb +2 -1
- data/examples/blog/src/models/content.rb +4 -33
- data/examples/blog/src/views/error.xhtml +1 -1
- data/examples/blog/src/xsl/style.xsl +1 -1
- data/examples/blog/test/tc_blog.rb +43 -0
- data/examples/flash/run.rb +2 -2
- data/examples/no_xsl_blog/lib/blog.rb +1 -1
- data/examples/no_xsl_blog/lib/blog/controller.rb +26 -17
- data/examples/no_xsl_blog/lib/blog/model.rb +3 -3
- data/examples/no_xsl_blog/lib/blog/template.rb +1 -1
- data/examples/no_xsl_blog/lib/content.rb +3 -7
- data/examples/no_xsl_blog/run.rb +34 -34
- data/examples/tiny/public/deep/dir/hello.xhtml +2 -0
- data/examples/tiny/run.rb +2 -2
- data/examples/wee_style/run.rb +5 -3
- data/examples/why_wiki/run.rb +5 -3
- data/install.rb +1 -1
- data/lib/nitro.rb +10 -9
- data/lib/nitro/adapters/cgi.rb +27 -2
- data/lib/nitro/adapters/fastcgi.rb +6 -2
- data/lib/nitro/adapters/webrick.rb +11 -9
- data/lib/nitro/buffering.rb +2 -2
- data/lib/nitro/builders/atom.rb +78 -0
- data/lib/nitro/builders/form.rb +2 -2
- data/lib/nitro/builders/rss.rb +4 -4
- data/lib/nitro/builders/table.rb +2 -2
- data/lib/nitro/builders/xhtml.rb +5 -8
- data/lib/nitro/builders/xml.rb +38 -14
- data/lib/nitro/caching.rb +2 -2
- data/lib/nitro/caching/actions.rb +2 -2
- data/lib/nitro/caching/fragments.rb +2 -2
- data/lib/nitro/caching/invalidation.rb +2 -28
- data/lib/nitro/caching/output.rb +3 -3
- data/lib/nitro/caching/stores.rb +4 -4
- data/lib/nitro/conf.rb +11 -6
- data/lib/nitro/context.rb +2 -2
- data/lib/nitro/controller.rb +12 -7
- data/lib/nitro/cookie.rb +2 -2
- data/lib/nitro/dispatcher.rb +33 -40
- data/lib/nitro/environment.rb +1 -1
- data/lib/nitro/localization.rb +5 -7
- data/lib/nitro/mail.rb +2 -2
- data/lib/nitro/markup.rb +5 -5
- data/lib/nitro/output.rb +2 -2
- data/lib/nitro/part.rb +8 -5
- data/lib/nitro/render.rb +46 -45
- data/lib/nitro/request.rb +7 -6
- data/lib/nitro/response.rb +14 -5
- data/lib/nitro/routing.rb +2 -2
- data/lib/nitro/runner.rb +57 -17
- data/lib/nitro/scaffold.rb +14 -8
- data/lib/nitro/session.rb +7 -4
- data/lib/nitro/session/drb.rb +2 -2
- data/lib/nitro/session/drbserver.rb +2 -2
- data/lib/nitro/session/memory.rb +2 -2
- data/lib/nitro/shaders.rb +8 -7
- data/lib/nitro/simple.rb +4 -1
- data/lib/nitro/template.rb +8 -8
- data/lib/nitro/testing.rb +6 -0
- data/lib/nitro/testing/assertions.rb +102 -0
- data/lib/nitro/testing/context.rb +52 -0
- data/lib/nitro/testing/testcase.rb +55 -0
- data/lib/nitro/ui/pager.rb +3 -3
- data/lib/nitro/ui/popup.rb +8 -13
- data/lib/nitro/ui/tabs.rb +4 -10
- data/lib/nitro/uri.rb +7 -7
- data/proto/doc/README +1 -0
- data/proto/public/cgi.rb +5 -0
- data/proto/run.rb +2 -4
- data/test/nitro/adapters/tc_cgi.rb +1 -1
- data/test/nitro/adapters/tc_webrick.rb +1 -2
- data/test/nitro/builders/tc_atom.rb +26 -0
- data/test/nitro/builders/tc_rss.rb +3 -2
- data/test/nitro/builders/tc_table.rb +1 -1
- data/test/nitro/builders/tc_xhtml.rb +4 -3
- data/test/nitro/builders/tc_xml.rb +7 -7
- data/test/nitro/tc_context.rb +1 -1
- data/test/nitro/tc_controller.rb +5 -3
- data/test/nitro/tc_dispatcher.rb +19 -18
- data/test/nitro/tc_localization.rb +1 -1
- data/test/nitro/tc_mail.rb +1 -1
- data/test/nitro/tc_session.rb +1 -1
- data/test/nitro/tc_template.rb +1 -1
- data/test/nitro/tc_uri.rb +3 -4
- data/test/nitro/ui/tc_pager.rb +7 -7
- data/test/public/blog/inc1.xhtml +2 -0
- data/test/public/blog/inc2.xhtml +1 -0
- data/test/public/blog/list.xhtml +3 -0
- metadata +180 -203
- data/examples/blog/cache/entriesadmin +0 -12
- data/lib/nitro/cluster.rb +0 -218
- data/lib/nitro/component.rb +0 -15
- data/lib/nitro/filters.rb +0 -215
- data/lib/nitro/ui/date-select.rb +0 -69
- data/test/nitro/tc_filters.rb +0 -111
data/lib/nitro/caching/stores.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# * George Moschovitis <gm@navel.gr>
|
2
2
|
# (c) 2004-2005 Navel, all rights reserved.
|
3
|
-
# $Id: stores.rb
|
3
|
+
# $Id: stores.rb 9 2005-04-13 00:08:20Z nasis $
|
4
4
|
|
5
5
|
require 'fileutils'
|
6
6
|
|
7
7
|
require 'glue/hash'
|
8
8
|
|
9
|
-
module
|
9
|
+
module Nitro
|
10
10
|
|
11
11
|
# Adds support for caching.
|
12
12
|
|
@@ -14,13 +14,13 @@ module Caching
|
|
14
14
|
|
15
15
|
# Cached fragments are stored in memory.
|
16
16
|
|
17
|
-
class MemoryStore < SafeHash
|
17
|
+
class MemoryStore < Glue::SafeHash
|
18
18
|
|
19
19
|
def read(name, options = {})
|
20
20
|
self[name]
|
21
21
|
end
|
22
22
|
|
23
|
-
|
23
|
+
def write(name, content = '', options = {})
|
24
24
|
self[name] = content
|
25
25
|
end
|
26
26
|
|
data/lib/nitro/conf.rb
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
# * George Moschovitis <gm@navel.gr>
|
2
2
|
# (c) 2004-2005 Navel, all rights reserved.
|
3
|
-
# $Id: conf.rb
|
3
|
+
# $Id: conf.rb 1 2005-04-11 11:04:30Z gmosx $
|
4
4
|
|
5
5
|
require 'glue/flexob'
|
6
6
|
|
7
|
-
|
7
|
+
require 'nitro/dispatcher'
|
8
|
+
|
9
|
+
module Nitro
|
8
10
|
|
9
11
|
# Configuration.
|
10
12
|
|
@@ -18,12 +20,10 @@ class Conf < Flexob
|
|
18
20
|
# Default configuration parameters.
|
19
21
|
|
20
22
|
hash = {
|
21
|
-
:name => 'Nitro
|
22
|
-
# this is accessible as localhost on windows
|
23
|
-
:host => '0.0.0.0',
|
23
|
+
:name => 'Nitro',
|
24
|
+
:host => '0.0.0.0', # this is accessible as localhost on windows.
|
24
25
|
:port => 9999,
|
25
26
|
:dispatcher => Dispatcher.new,
|
26
|
-
|
27
27
|
:template_root => 'templates',
|
28
28
|
:public_root => 'public'
|
29
29
|
}
|
@@ -33,6 +33,11 @@ class Conf < Flexob
|
|
33
33
|
super(hash)
|
34
34
|
end
|
35
35
|
|
36
|
+
def mount(name, options = {})
|
37
|
+
$nitro_mount_options = options
|
38
|
+
require_part(name)
|
39
|
+
end
|
40
|
+
|
36
41
|
end
|
37
42
|
|
38
43
|
end
|
data/lib/nitro/context.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# * George Moschovitis <gm@navel.gr>
|
2
2
|
# (c) 2004-2005 Navel, all rights reserved.
|
3
|
-
# $Id$
|
3
|
+
# $Id: context.rb 1 2005-04-11 11:04:30Z gmosx $
|
4
4
|
|
5
5
|
require 'nitro/request'
|
6
6
|
require 'nitro/response'
|
@@ -9,7 +9,7 @@ require 'nitro/session'
|
|
9
9
|
require 'nitro/output'
|
10
10
|
require 'nitro/adapters/cgi.rb'
|
11
11
|
|
12
|
-
module
|
12
|
+
module Nitro
|
13
13
|
|
14
14
|
# Encapsulates an HTTP processing cycle context.
|
15
15
|
# Integrates the Request and the Response.
|
data/lib/nitro/controller.rb
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
# * George Moschovitis <gm@navel.gr>
|
2
|
-
# (c)
|
3
|
-
# $Id$
|
2
|
+
# (c) 2005 Navel, all rights reserved.
|
3
|
+
# $Id: controller.rb 20 2005-04-15 15:18:36Z gmosx $
|
4
|
+
|
5
|
+
require 'glue/aspects'
|
4
6
|
|
5
7
|
require 'nitro/render'
|
6
8
|
require 'nitro/scaffold'
|
7
|
-
require 'nitro/filters'
|
8
9
|
require 'nitro/caching'
|
9
10
|
|
10
|
-
module
|
11
|
+
module Nitro
|
11
12
|
|
12
13
|
# Encapsulates metadata that describe an action
|
13
14
|
# parameter.
|
@@ -77,8 +78,8 @@ end
|
|
77
78
|
|
78
79
|
class Controller
|
79
80
|
include Render
|
81
|
+
include Glue::Aspects
|
80
82
|
include Scaffolding
|
81
|
-
include Filtering
|
82
83
|
include Caching
|
83
84
|
|
84
85
|
# A hash containing metadata for the action
|
@@ -113,7 +114,11 @@ class Controller
|
|
113
114
|
|
114
115
|
def inherited(child)
|
115
116
|
child.class_eval %{
|
116
|
-
|
117
|
+
if caller[2].to_s.split(':').last =~ /[0-9]+/
|
118
|
+
DEF_FILE = caller[2].to_s.strip.gsub( /:[0-9]+$/ , '')
|
119
|
+
else
|
120
|
+
DEF_FILE = caller[3].to_s.strip.gsub( /:[0-9]+$/ , '')
|
121
|
+
end
|
117
122
|
|
118
123
|
@template_root = 'public'
|
119
124
|
|
@@ -143,7 +148,7 @@ class Controller
|
|
143
148
|
# Some dangerous methods from ancestors are removed.
|
144
149
|
|
145
150
|
def action_methods
|
146
|
-
|
151
|
+
classes = self.ancestors.reject do |a|
|
147
152
|
[Object, Kernel, Render, Controller].include?(a)
|
148
153
|
end
|
149
154
|
|
data/lib/nitro/cookie.rb
CHANGED
data/lib/nitro/dispatcher.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# * George Moschovitis <gm@navel.gr>
|
2
2
|
# (c) 2004-2005 Navel, all rights reserved.
|
3
|
-
# $Id$
|
3
|
+
# $Id: dispatcher.rb 23 2005-04-16 18:20:00Z gmosx $
|
4
4
|
|
5
|
-
module
|
5
|
+
module Nitro
|
6
6
|
|
7
7
|
require 'nitro/controller'
|
8
8
|
require 'nitro/routing'
|
@@ -11,6 +11,7 @@ require 'nitro/simple'
|
|
11
11
|
# The Dispatcher manages a set of controllers.
|
12
12
|
|
13
13
|
class Dispatcher
|
14
|
+
|
14
15
|
include Router
|
15
16
|
|
16
17
|
# The public root directory. The files in this
|
@@ -30,10 +31,6 @@ class Dispatcher
|
|
30
31
|
|
31
32
|
attr_accessor :controllers
|
32
33
|
|
33
|
-
# APIs map.
|
34
|
-
|
35
|
-
attr_accessor :apis
|
36
|
-
|
37
34
|
# Create a new Dispatcher.
|
38
35
|
#
|
39
36
|
# Input:
|
@@ -41,11 +38,8 @@ class Dispatcher
|
|
41
38
|
# [+controllers+]
|
42
39
|
# Either a hash of controller mappings or a single
|
43
40
|
# controller that gets mapped to :root.
|
44
|
-
#
|
45
|
-
# [+apis+]
|
46
|
-
# A hash of apis supported by the Dispatcher.
|
47
41
|
|
48
|
-
def initialize(controllers = nil
|
42
|
+
def initialize(controllers = nil)
|
49
43
|
@public_root = 'public'
|
50
44
|
@template_root = @public_root
|
51
45
|
|
@@ -56,8 +50,6 @@ class Dispatcher
|
|
56
50
|
end
|
57
51
|
|
58
52
|
mount(controllers)
|
59
|
-
|
60
|
-
@apis = apis || {}
|
61
53
|
end
|
62
54
|
|
63
55
|
# Process the given hash and mount the
|
@@ -71,10 +63,10 @@ class Dispatcher
|
|
71
63
|
#
|
72
64
|
# === Examples
|
73
65
|
#
|
74
|
-
# dispatcher.mount
|
75
|
-
# :root => MainController # mounts /
|
66
|
+
# dispatcher.mount(
|
67
|
+
# :root => MainController, # mounts /
|
76
68
|
# 'users' => UsersController # mounts /users
|
77
|
-
#
|
69
|
+
# )
|
78
70
|
|
79
71
|
def add_controller(controllers)
|
80
72
|
(@controllers ||= {}).update(controllers)
|
@@ -82,21 +74,6 @@ class Dispatcher
|
|
82
74
|
end
|
83
75
|
alias_method :mount, :add_controller
|
84
76
|
|
85
|
-
# Add a new api to the dispatcher
|
86
|
-
#
|
87
|
-
# [+api+]
|
88
|
-
# API symbol
|
89
|
-
# [+data+]
|
90
|
-
# Data for this API [content_type, ..]
|
91
|
-
#
|
92
|
-
# === Example
|
93
|
-
#
|
94
|
-
# dispatcher.add_api(:xml, 'text/xml')
|
95
|
-
|
96
|
-
def add_api(api, data)
|
97
|
-
(@apis ||= {})[api] = data
|
98
|
-
end
|
99
|
-
|
100
77
|
# Update the routes. Typically called after a new
|
101
78
|
# Controller is mounted.
|
102
79
|
|
@@ -123,15 +100,8 @@ class Dispatcher
|
|
123
100
|
# The dispatching context.
|
124
101
|
|
125
102
|
def dispatch(path, context = nil)
|
126
|
-
api = :xhtml
|
127
|
-
|
128
103
|
path = route(path, context)
|
129
104
|
|
130
|
-
if @apis
|
131
|
-
# OPTIMIZE: check only if lookup fails.
|
132
|
-
@apis.each { |k, v| api = k if path.slice!(/#{k}\//) }
|
133
|
-
end
|
134
|
-
|
135
105
|
parts = path.split('/')
|
136
106
|
parts.shift
|
137
107
|
|
@@ -167,23 +137,46 @@ class Dispatcher
|
|
167
137
|
action = parts.join('__')
|
168
138
|
end
|
169
139
|
end
|
170
|
-
|
171
|
-
content_type = @apis[:api] || 'text/html'
|
172
140
|
|
173
|
-
return klass, "
|
141
|
+
return klass, "#{action}_action", base
|
174
142
|
end
|
175
143
|
alias_method :split_path, :dispatch
|
176
144
|
|
177
145
|
# Get the controller for the given key.
|
178
146
|
# Also handles reloading of controllers.
|
147
|
+
#--
|
148
|
+
# gmosx, FIXME: this method is a NASTY hack, anyone can
|
149
|
+
# help me fix this ?
|
150
|
+
#++
|
179
151
|
|
180
152
|
def controller_class_for(key, context)
|
181
153
|
klass = @controllers[key]
|
182
154
|
|
183
155
|
if (:full == Rendering.reload) and context and context[:__RELOADED__].nil? and klass
|
156
|
+
=begin
|
157
|
+
ancestors = [c = klass]
|
158
|
+
while (c = c.superclass) != Nitro::Controller
|
159
|
+
ancestors.unshift(c)
|
160
|
+
end
|
161
|
+
|
162
|
+
for c in ancestors
|
163
|
+
actions = c.public_instance_methods.find_all { |m| m.to_s =~ /(_action$)|(_template$)/ }
|
164
|
+
actions += c.action_methods
|
165
|
+
actions.each { |m| c.send(:remove_method, m) rescue nil }
|
166
|
+
c.advices = []
|
167
|
+
|
168
|
+
Object.send(:remove_const, c) rescue nil
|
169
|
+
load(c::DEF_FILE)
|
170
|
+
c = Object.const_get(klass.name.intern)
|
171
|
+
end
|
172
|
+
=end
|
173
|
+
#=begin
|
184
174
|
def_file = klass::DEF_FILE
|
175
|
+
# Object.send(:remove_const, klass) rescue nil
|
176
|
+
# FIXME: also reload superclasses!
|
185
177
|
Controller.remove_subclasses
|
186
178
|
load(def_file)
|
179
|
+
#=end
|
187
180
|
klass = @controllers[key] = Object.const_get(klass.name.intern)
|
188
181
|
context[:__RELOADED__] = true
|
189
182
|
end
|
data/lib/nitro/environment.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# * George Moschovitis <gm@navel.gr>
|
2
2
|
# (c) 2004-2005 Navel, all rights reserved.
|
3
|
-
# $Id: environment.rb
|
3
|
+
# $Id: environment.rb 1 2005-04-11 11:04:30Z gmosx $
|
4
4
|
|
5
5
|
# Setup up the proposed environment. You are free
|
6
6
|
# to skip this if you dont like it. Just set
|
data/lib/nitro/localization.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
# * George Moschovitis <gm@navel.gr>
|
2
2
|
# (c) 2004-2005 Navel, all rights reserved.
|
3
|
-
# $Id:
|
3
|
+
# $Id: localization.rb 17 2005-04-14 16:03:40Z gmosx $
|
4
4
|
|
5
5
|
require 'yaml'
|
6
6
|
|
7
|
-
require '
|
7
|
+
require 'glue/aspects'
|
8
8
|
require 'nitro/shaders'
|
9
9
|
|
10
|
-
module
|
10
|
+
module Nitro
|
11
11
|
|
12
12
|
# Represents a locale.
|
13
13
|
#--
|
@@ -121,9 +121,9 @@ class Localization
|
|
121
121
|
|
122
122
|
end
|
123
123
|
|
124
|
-
# Localization
|
124
|
+
# Localization Aspect.
|
125
125
|
|
126
|
-
module
|
126
|
+
module LocalizationAspect
|
127
127
|
def localize
|
128
128
|
# @lc = @context.conf.localization[@session[:LOCALE]]
|
129
129
|
@lc = Localization[@context.session[:LOCALE]]
|
@@ -152,5 +152,3 @@ class LocalizationShader < Shader
|
|
152
152
|
end
|
153
153
|
|
154
154
|
end
|
155
|
-
|
156
|
-
|
data/lib/nitro/mail.rb
CHANGED
@@ -4,14 +4,14 @@
|
|
4
4
|
#
|
5
5
|
# * George Moschovitis <gm@navel.gr>
|
6
6
|
# (c) 2004-2005 Navel, all rights reserved.
|
7
|
-
# $Id: mail.rb
|
7
|
+
# $Id: mail.rb 1 2005-04-11 11:04:30Z gmosx $
|
8
8
|
|
9
9
|
require 'net/smtp'
|
10
10
|
|
11
11
|
require 'glue/attribute'
|
12
12
|
require 'nitro/template'
|
13
13
|
|
14
|
-
module
|
14
|
+
module Nitro
|
15
15
|
|
16
16
|
# Encapsulates an email message.
|
17
17
|
|
data/lib/nitro/markup.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# George Moschovitis <gm@navel.gr>
|
2
2
|
# (c) 2004 Navel, all rights reserved.
|
3
|
-
# $Id$
|
3
|
+
# $Id: markup.rb 7 2005-04-12 14:24:10Z gmosx $
|
4
4
|
|
5
5
|
require 'glue/property'
|
6
6
|
|
7
|
-
module
|
7
|
+
module Nitro
|
8
8
|
|
9
9
|
#--
|
10
10
|
# Override the default PropertyUtils implementation to
|
@@ -18,13 +18,13 @@ module PropertyUtils
|
|
18
18
|
s = prop.symbol
|
19
19
|
if markup = prop.meta[:markup]
|
20
20
|
# if true, set to default Markup
|
21
|
-
markup =
|
21
|
+
markup = Nitro::Markup if true == markup
|
22
22
|
|
23
23
|
code = %{
|
24
24
|
def #{s}=(val)
|
25
25
|
}
|
26
26
|
|
27
|
-
if
|
27
|
+
if Property.type_checking
|
28
28
|
code << %{
|
29
29
|
unless String == val.class
|
30
30
|
raise "Invalid type, expected '#{prop.klass}', is '\#\{val.class\}'."
|
@@ -67,7 +67,7 @@ end
|
|
67
67
|
#
|
68
68
|
# here comes the #{obj.body} # => prints the expanded version.
|
69
69
|
#
|
70
|
-
# obj.body =
|
70
|
+
# obj.body = Nitro::Markup.expand(@params['body'])
|
71
71
|
|
72
72
|
module Markup
|
73
73
|
def self.expand_html!(str)
|
data/lib/nitro/output.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# * George Moschovitis <gm@navel.gr>
|
2
2
|
# (c) 2004-2005 Navel, all rights reserved.
|
3
|
-
# $Id: output.rb
|
3
|
+
# $Id: output.rb 1 2005-04-11 11:04:30Z gmosx $
|
4
4
|
|
5
5
|
require 'nitro/builders/xml'
|
6
6
|
require 'nitro/builders/xhtml'
|
@@ -8,7 +8,7 @@ require 'nitro/builders/rss'
|
|
8
8
|
require 'nitro/builders/form'
|
9
9
|
require 'nitro/builders/table'
|
10
10
|
|
11
|
-
module
|
11
|
+
module Nitro
|
12
12
|
|
13
13
|
# The output buffer string. This buffer integrates
|
14
14
|
# the programmatic rendering support (XhtmlBuilder)
|
data/lib/nitro/part.rb
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# * George Moschovitis <gm@navel.gr>
|
2
|
-
# (c)
|
3
|
-
# $Id: part.rb
|
2
|
+
# (c) 2005 Navel, all rights reserved.
|
3
|
+
# $Id: part.rb 20 2005-04-15 15:18:36Z gmosx $
|
4
4
|
|
5
5
|
# UNDER CONSTRUCTION, dont use yet!
|
6
6
|
|
7
7
|
require 'glue/attribute'
|
8
8
|
|
9
|
-
module
|
9
|
+
module Nitro
|
10
10
|
|
11
11
|
class Part
|
12
|
-
cattr_accessor :parts_root, "/home/gmosx/
|
12
|
+
cattr_accessor :parts_root, "/home/gmosx/private/plasma/parts"
|
13
13
|
end
|
14
14
|
|
15
15
|
end
|
@@ -17,7 +17,10 @@ end
|
|
17
17
|
module Kernel
|
18
18
|
|
19
19
|
def require_part(name)
|
20
|
-
|
20
|
+
# gmosx: RDoc complains about this, so lets use an
|
21
|
+
# eval, AAAAAAAARGH!
|
22
|
+
# require "#{N::Part.parts_root}/#{name}/mount"
|
23
|
+
eval %{ require '#{Nitro::Part.parts_root}/#{name}/mount' }
|
21
24
|
end
|
22
25
|
|
23
26
|
end
|