nitro 0.17.0 → 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +124 -0
- data/README +2 -2
- data/Rakefile +4 -12
- data/bin/nitro +1 -1
- data/bin/nitrogen +47 -31
- data/doc/AUTHORS +3 -3
- data/doc/RELEASES +50 -1
- data/examples/README +7 -0
- data/lib/nitro.rb +5 -4
- data/lib/nitro/{adapters → adapter}/cgi.rb +2 -4
- data/lib/nitro/{adapters → adapter}/fastcgi.rb +1 -1
- data/lib/nitro/{adapters → adapter}/webrick.rb +5 -10
- data/lib/nitro/buffering.rb +6 -0
- data/lib/nitro/{builders → builder}/atom.rb +1 -5
- data/lib/nitro/{builders → builder}/form.rb +1 -5
- data/lib/nitro/{builders → builder}/rss.rb +3 -1
- data/lib/nitro/{builders → builder}/table.rb +2 -4
- data/lib/nitro/{builders → builder}/xhtml.rb +3 -5
- data/lib/nitro/{builders → builder}/xml.rb +2 -4
- data/lib/nitro/caching.rb +6 -4
- data/lib/nitro/caching/output.rb +18 -11
- data/lib/nitro/context.rb +3 -1
- data/lib/nitro/controller.rb +29 -18
- data/lib/nitro/dispatcher.rb +2 -4
- data/lib/nitro/element.rb +2 -0
- data/lib/nitro/environment.rb +2 -4
- data/lib/nitro/errors.rb +69 -0
- data/lib/nitro/mail.rb +2 -4
- data/lib/nitro/markup.rb +20 -3
- data/lib/nitro/output.rb +5 -9
- data/lib/nitro/part.rb +2 -3
- data/lib/nitro/render.rb +49 -30
- data/lib/nitro/request.rb +2 -1
- data/lib/nitro/runner.rb +23 -12
- data/lib/nitro/scaffold.rb +5 -3
- data/lib/nitro/service.rb +22 -0
- data/lib/nitro/service/xmlrpc.rb +42 -0
- data/lib/nitro/session.rb +2 -4
- data/lib/nitro/template.rb +8 -10
- data/lib/nitro/testing.rb +0 -4
- data/proto/public/error.xhtml +27 -2
- data/test/nitro/{adapters → adapter}/raw_post1.bin +0 -0
- data/test/nitro/{adapters → adapter}/tc_cgi.rb +1 -1
- data/test/nitro/{adapters → adapter}/tc_webrick.rb +1 -1
- data/test/nitro/{builders → builder}/tc_atom.rb +1 -1
- data/test/nitro/{builders → builder}/tc_rss.rb +1 -1
- data/test/nitro/{builders → builder}/tc_table.rb +1 -1
- data/test/nitro/{builders → builder}/tc_xhtml.rb +1 -1
- data/test/nitro/{builders → builder}/tc_xml.rb +1 -1
- data/test/nitro/tc_caching.rb +18 -0
- data/test/nitro/tc_controller.rb +1 -1
- data/test/nitro/tc_mail.rb +3 -1
- metadata +33 -168
- data/examples/README.windows +0 -9
- data/examples/ajax/controller.rb +0 -21
- data/examples/ajax/public/index.xhtml +0 -72
- data/examples/ajax/public/js/ajax.js +0 -64
- data/examples/ajax/run.rb +0 -14
- data/examples/blog/README +0 -70
- data/examples/blog/conf/apache.conf +0 -30
- data/examples/blog/conf/apache.conf.new +0 -53
- data/examples/blog/conf/lhttpd.conf +0 -79
- data/examples/blog/conf/locales/de.yml +0 -4
- data/examples/blog/conf/locales/en.yml +0 -4
- data/examples/blog/log/README +0 -3
- data/examples/blog/log/apache.error_log +0 -6647
- data/examples/blog/log/rewrite_log +0 -161
- data/examples/blog/public/base.xsl +0 -153
- data/examples/blog/public/fcgi.rb +0 -5
- data/examples/blog/public/m/bubbles.gif +0 -0
- data/examples/blog/public/m/comments_curve.gif +0 -0
- data/examples/blog/public/m/down.gif +0 -0
- data/examples/blog/public/m/footer_bg.gif +0 -0
- data/examples/blog/public/m/garrow.gif +0 -0
- data/examples/blog/public/m/gbull.gif +0 -0
- data/examples/blog/public/m/grbull.gif +0 -0
- data/examples/blog/public/m/h1_bg.gif +0 -0
- data/examples/blog/public/m/header_bg.gif +0 -0
- data/examples/blog/public/m/nitro.gif +0 -0
- data/examples/blog/public/m/obull.gif +0 -0
- data/examples/blog/public/m/page_bg.gif +0 -0
- data/examples/blog/public/m/rss.gif +0 -0
- data/examples/blog/public/m/side_title_bg.gif +0 -0
- data/examples/blog/public/m/sidebar_bg.gif +0 -0
- data/examples/blog/public/style.css +0 -305
- data/examples/blog/run.rb +0 -43
- data/examples/blog/src/blog.rb +0 -21
- data/examples/blog/src/controller.rb +0 -151
- data/examples/blog/src/mailer.rb +0 -23
- data/examples/blog/src/models/blog.rb +0 -33
- data/examples/blog/src/models/content.rb +0 -18
- data/examples/blog/src/views/blog_entry_email.xhtml +0 -16
- data/examples/blog/src/views/comments.xhtml +0 -36
- data/examples/blog/src/views/entry_form.xhtml +0 -22
- data/examples/blog/src/views/error.xhtml +0 -56
- data/examples/blog/src/views/index.xhtml +0 -49
- data/examples/blog/src/views/login.xhtml +0 -26
- data/examples/blog/src/views/recent_posts.xhtml +0 -14
- data/examples/blog/src/views/view_entry.xhtml +0 -37
- data/examples/blog/src/views/view_entry.xml +0 -12
- data/examples/blog/src/xsl/base.xsl +0 -160
- data/examples/blog/src/xsl/style.xsl +0 -143
- data/examples/blog/test/tc_blog.rb +0 -43
- data/examples/flash/log/README +0 -3
- data/examples/flash/root/index.xhtml +0 -16
- data/examples/flash/root/show_inline_text.xhtml +0 -17
- data/examples/flash/run.rb +0 -7
- data/examples/no_xsl_blog/README +0 -24
- data/examples/no_xsl_blog/conf/apache.conf +0 -30
- data/examples/no_xsl_blog/conf/lhttpd.conf +0 -79
- data/examples/no_xsl_blog/conf/locales/de.yml +0 -4
- data/examples/no_xsl_blog/conf/locales/en.yml +0 -4
- data/examples/no_xsl_blog/lib/blog.rb +0 -16
- data/examples/no_xsl_blog/lib/blog/controller.rb +0 -116
- data/examples/no_xsl_blog/lib/blog/model.rb +0 -35
- data/examples/no_xsl_blog/lib/blog/template.rb +0 -138
- data/examples/no_xsl_blog/lib/content.rb +0 -47
- data/examples/no_xsl_blog/log/README +0 -3
- data/examples/no_xsl_blog/log/apache.error_log +0 -473
- data/examples/no_xsl_blog/public/comments.xhtml +0 -36
- data/examples/no_xsl_blog/public/entry_form.xhtml +0 -22
- data/examples/no_xsl_blog/public/fcgi.rb +0 -5
- data/examples/no_xsl_blog/public/index.xhtml +0 -39
- data/examples/no_xsl_blog/public/login.xhtml +0 -21
- data/examples/no_xsl_blog/public/m/bubbles.gif +0 -0
- data/examples/no_xsl_blog/public/m/comments_curve.gif +0 -0
- data/examples/no_xsl_blog/public/m/down.gif +0 -0
- data/examples/no_xsl_blog/public/m/footer_bg.gif +0 -0
- data/examples/no_xsl_blog/public/m/garrow.gif +0 -0
- data/examples/no_xsl_blog/public/m/gbull.gif +0 -0
- data/examples/no_xsl_blog/public/m/grbull.gif +0 -0
- data/examples/no_xsl_blog/public/m/h1_bg.gif +0 -0
- data/examples/no_xsl_blog/public/m/header_bg.gif +0 -0
- data/examples/no_xsl_blog/public/m/nitro.gif +0 -0
- data/examples/no_xsl_blog/public/m/obull.gif +0 -0
- data/examples/no_xsl_blog/public/m/page_bg.gif +0 -0
- data/examples/no_xsl_blog/public/m/rss.gif +0 -0
- data/examples/no_xsl_blog/public/m/side_title_bg.gif +0 -0
- data/examples/no_xsl_blog/public/m/sidebar_bg.gif +0 -0
- data/examples/no_xsl_blog/public/recent_posts.xhtml +0 -14
- data/examples/no_xsl_blog/public/style.css +0 -299
- data/examples/no_xsl_blog/public/view_entry.xhtml +0 -25
- data/examples/no_xsl_blog/public/view_entry.xml +0 -12
- data/examples/no_xsl_blog/run.rb +0 -35
- data/examples/tiny/README +0 -14
- data/examples/tiny/conf/apache.conf +0 -30
- data/examples/tiny/conf/lhttpd.conf +0 -79
- data/examples/tiny/log/README +0 -3
- data/examples/tiny/log/apache.error_log +0 -154
- data/examples/tiny/public/deep/dir/hello.xhtml +0 -3
- data/examples/tiny/public/fcgi.rb +0 -5
- data/examples/tiny/public/include.xhtml +0 -3
- data/examples/tiny/public/index.xhtml +0 -55
- data/examples/tiny/public/nitro.png +0 -0
- data/examples/tiny/public/upload.xhtml +0 -21
- data/examples/tiny/run.rb +0 -7
- data/examples/wee_style/README +0 -10
- data/examples/wee_style/run.rb +0 -50
- data/examples/why_wiki/README +0 -5
- data/examples/why_wiki/run.rb +0 -59
- data/proto/public/js/ajax.js +0 -63
data/CHANGELOG
CHANGED
@@ -1,5 +1,129 @@
|
|
1
|
+
01-06-2005 George Moschovitis <gm@navel.gr>
|
2
|
+
|
3
|
+
* test/*: some fixes to make the tests pass again.
|
4
|
+
|
5
|
+
* fixed NASTY action_metadata bug.
|
6
|
+
|
7
|
+
31-05-2005 George Moschovitis <gm@navel.gr>
|
8
|
+
|
9
|
+
* lib/nitro/render.rb (#redirect): fixed bug.
|
10
|
+
|
11
|
+
30-05-2005 George Moschovitis <gm@navel.gr>
|
12
|
+
|
13
|
+
* doc/RELEASES: updated.
|
14
|
+
|
15
|
+
* lib/nitro/render.rb (#redirect): fixed to work with gecko.
|
16
|
+
|
17
|
+
* lib/nitro/runner.rb: fixed daemonize support.
|
18
|
+
|
19
|
+
29-05-2005 George Moschovitis <gm@navel.gr>
|
20
|
+
|
21
|
+
* lib/nitro/caching: added global enable switch.
|
22
|
+
|
23
|
+
27-05-2005 George Moschovitis <gm@navel.gr>
|
24
|
+
|
25
|
+
* lib/nitro/render.rb (#redirect): fixet to work behind a
|
26
|
+
proxy!
|
27
|
+
|
28
|
+
* lib/nitro/caching/output.rb (#expire_output): begin end block
|
29
|
+
to be more fault tolerant.
|
30
|
+
|
31
|
+
26-05-2005 George Moschovitis <gm@navel.gr>
|
32
|
+
|
33
|
+
* lib/nitro/runner.rb (#daemonize): implemented.
|
34
|
+
|
35
|
+
* lib/nitro/caching/output.rb (#expire_output): introduced.
|
36
|
+
|
37
|
+
* lib/nitro/adapter/webrick.rb: fixed request_uri calc bug!
|
38
|
+
|
39
|
+
25-05-2005 George Moschovitis <gm@navel.gr>
|
40
|
+
|
41
|
+
* lib/nitro/caching/output.rb: fixed filter problem.
|
42
|
+
|
43
|
+
* lib/nitro/markup.rb (MarkupShader): for the moment
|
44
|
+
a simple alias for RedCloth.
|
45
|
+
|
46
|
+
* lib/nitro/request.rb (#host): handle proxy case (forwarded).
|
47
|
+
|
48
|
+
* ../rpc: removed from repository.
|
49
|
+
|
50
|
+
* lib/nitro/service/xmlrpc.rb: copied from rpc.
|
51
|
+
|
52
|
+
* lib/nitro/service.rb: copied from rpc,
|
53
|
+
(Service): renamed from WebService.
|
54
|
+
|
55
|
+
24-05-2005 George Moschovitis <gm@navel.gr>
|
56
|
+
|
57
|
+
* bin/nitrogen: the Dir.ls_r were copied to facets so this is
|
58
|
+
used.
|
59
|
+
|
60
|
+
* lib/examples/README: introduced.
|
61
|
+
|
62
|
+
23-05-2005 George Moschovitis <gm@navel.gr>
|
63
|
+
|
64
|
+
* proto/public/error.xhtml: show exact error line in template.
|
65
|
+
|
66
|
+
* lib/nitro/errors.rb: better presentation,
|
67
|
+
reverse transform the code.
|
68
|
+
|
69
|
+
22-05-2005 George Moschovitis <gm@navel.gr>
|
70
|
+
|
71
|
+
* lib/nitro/template.rb: improved template expansion, allows
|
72
|
+
for reverse transform (useful for error logging).
|
73
|
+
|
74
|
+
* lib/nitro/errors.rb: introduced,
|
75
|
+
(ActionCompileError): introduced,
|
76
|
+
(TemplateCompileError): introduced.
|
77
|
+
(#line_number): implemented.
|
78
|
+
|
79
|
+
* lib/nitro/render.rb (#compile_action): separately compile the
|
80
|
+
action and the template.
|
81
|
+
|
82
|
+
21-05-2005 George Moschovitis <gm@navel.gr>
|
83
|
+
|
84
|
+
* changes to many files to accomodate some dir changes.
|
85
|
+
|
86
|
+
* lib/nitro/scaffold.rb: use tha facets inflector.
|
87
|
+
|
88
|
+
* lib/nitro/render.rb (#compile_action): also try to find
|
89
|
+
templates in the proto dir,
|
90
|
+
try to find templates in all superclasses of the controller.
|
91
|
+
|
92
|
+
* lib/nitro/controller.rb (#inherited): simplified,
|
93
|
+
set template root to point into proto in the default controller.
|
94
|
+
|
95
|
+
20-05-2005 George Moschovitis <gm@navel.gr>
|
96
|
+
|
97
|
+
* moved examples outside of the nitro distribution.
|
98
|
+
|
99
|
+
* examples/flash/: fixed root dir. [gmary]
|
100
|
+
|
101
|
+
--- THE REVENGE OF SITH ---
|
102
|
+
|
103
|
+
19-05-2005 George Moschovitis <gm@navel.gr>
|
104
|
+
|
105
|
+
* started fixing various references to the renamed directories.
|
106
|
+
|
107
|
+
* lib/nitro/part.rb: deprecated.
|
108
|
+
|
109
|
+
* lib/nitro/builder: renamed from builders.
|
110
|
+
|
111
|
+
* lib/nitro/adapter: renamed from adapters.
|
112
|
+
|
113
|
+
17-05-2005 George Moschovitis <gm@navel.gr>
|
114
|
+
|
115
|
+
* lib/nitro/element.rb (#render): post proccesing to fix
|
116
|
+
elements with no text expansion problem.
|
117
|
+
|
118
|
+
* proto/src: added.
|
119
|
+
|
120
|
+
* bin/nitrogen: reimplemented, it now works with gems. The
|
121
|
+
implementation is based on mneumanns wee script [james_b].
|
122
|
+
|
1
123
|
16-05-2005 George Moschovitis <gm@navel.gr>
|
2
124
|
|
125
|
+
* --- VERSION 0.17.0 ---
|
126
|
+
|
3
127
|
* cleanup.rb: updated.
|
4
128
|
|
5
129
|
* doc/RELEASES: updated.
|
data/README
CHANGED
@@ -116,8 +116,8 @@ A short summary of the major features:
|
|
116
116
|
|
117
117
|
* Multiple Platforms
|
118
118
|
|
119
|
-
Runs on Linux and
|
120
|
-
|
119
|
+
Runs on Linux, Windows and Mac OSX. It will probably run on other
|
120
|
+
Unix based system with minor modifications.
|
121
121
|
|
122
122
|
* Multiple Adapters
|
123
123
|
|
data/Rakefile
CHANGED
@@ -1,7 +1,3 @@
|
|
1
|
-
# * George Moschovitis <gm@navel.gr>
|
2
|
-
# (c) 2004-2005 Navel, all rights reserved.
|
3
|
-
# $Id$
|
4
|
-
|
5
1
|
require 'rake/rdoctask'
|
6
2
|
require 'rake/testtask'
|
7
3
|
require 'rake/gempackagetask'
|
@@ -31,6 +27,8 @@ Homepage = "http://#{RubyForgeProject}.rubyforge.org/"
|
|
31
27
|
|
32
28
|
task :default => :package
|
33
29
|
|
30
|
+
$NITRO_NO_ENVIRONMENT = true
|
31
|
+
|
34
32
|
# Run the tests.
|
35
33
|
|
36
34
|
Rake::TestTask.new do |t|
|
@@ -39,14 +37,6 @@ Rake::TestTask.new do |t|
|
|
39
37
|
t.verbose = true
|
40
38
|
end
|
41
39
|
|
42
|
-
# Run all tests. (including expensive/depended tests)
|
43
|
-
|
44
|
-
Rake::TestTask.new(:test_all) do |t|
|
45
|
-
t.libs << 'test'
|
46
|
-
t.test_files = FileList['test/**/tc*.rb']
|
47
|
-
t.verbose = true
|
48
|
-
end
|
49
|
-
|
50
40
|
# Generate RDoc documentation.
|
51
41
|
|
52
42
|
Rake::RDocTask.new do |rd|
|
@@ -233,3 +223,5 @@ task :publish => [:package] do
|
|
233
223
|
end
|
234
224
|
end
|
235
225
|
end
|
226
|
+
|
227
|
+
# * George Moschovitis <gm@navel.gr>
|
data/bin/nitro
CHANGED
@@ -8,5 +8,5 @@ if File.exist?('run.rb')
|
|
8
8
|
system('ruby -rubygems run.rb')
|
9
9
|
else
|
10
10
|
puts 'No application found, starting default application.'
|
11
|
-
system
|
11
|
+
system 'ruby -rubygems ' + File.join(Nitro::LibPath, '..', 'proto', 'run.rb')
|
12
12
|
end
|
data/bin/nitrogen
CHANGED
@@ -1,44 +1,60 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
# * George Moschovitis <gm@navel.gr>
|
4
|
-
# (c) 2004-2005 Navel, all rights reserved.
|
5
|
-
# $Id$
|
6
|
-
|
7
|
-
require 'fileutils'
|
8
|
-
|
9
|
-
$NITRO_NO_ENVIRONMENT = true
|
1
|
+
#!/usr/bin/env ruby
|
10
2
|
|
11
3
|
require 'nitro'
|
4
|
+
require 'ftools'
|
12
5
|
|
13
|
-
|
6
|
+
require 'facet/dir/recurse'
|
14
7
|
|
15
|
-
|
16
|
-
Dir.foreach(path) do |f|
|
17
|
-
next if [".", ".."].include?(f)
|
18
|
-
fullname = path + "/" + f
|
19
|
-
yield(fullname)
|
20
|
-
ll_r(fullname, &block) if FileTest.directory?fullname and not FileTest.symlink?fullname
|
21
|
-
end
|
22
|
-
end
|
8
|
+
PROTO_DIR = File.join(Nitro::LibPath, '..', 'proto')
|
23
9
|
|
24
|
-
|
10
|
+
def usage
|
11
|
+
puts <<-USAGE
|
25
12
|
|
26
|
-
|
13
|
+
NAME
|
14
|
+
nitrogen - frontend for the Nitro generator mechanism.
|
27
15
|
|
28
|
-
|
16
|
+
SYNOPSIS
|
17
|
+
nitrogen app [full path]
|
29
18
|
|
30
|
-
|
19
|
+
DESCRIPTION
|
20
|
+
This is a frontend to the Nitro generator mechanism. Nitro
|
21
|
+
generators are used to 'bootstrap' development by creating
|
22
|
+
a standard directory structure and files for common tasks.
|
23
|
+
|
24
|
+
app: This will create some basic files to get you
|
25
|
+
started fleshing out your Nitro web application.
|
31
26
|
|
32
|
-
|
27
|
+
EXAMPLE
|
28
|
+
nitrogen app ~/my_application
|
33
29
|
|
34
|
-
|
35
|
-
|
30
|
+
This will generate a new Nitro application in the
|
31
|
+
~/my_application folder.
|
32
|
+
USAGE
|
33
|
+
exit 1
|
34
|
+
end
|
36
35
|
|
37
|
-
|
36
|
+
def run
|
37
|
+
case command = ARGV[0] || usage()
|
38
|
+
when 'app'
|
39
|
+
path = ARGV[1] || usage()
|
40
|
+
path = File.expand_path(path)
|
41
|
+
|
42
|
+
if File.exists?(path)
|
43
|
+
STDERR.puts "ERROR: Path #{path} already exists! Aborting!"
|
44
|
+
exit 1
|
45
|
+
end
|
46
|
+
|
47
|
+
FileUtils.cp_r(PROTO_DIR, path)
|
48
|
+
|
49
|
+
Dir.recurse(path) do |f|
|
50
|
+
FileUtils.rm_rf(f) if /\.svn$/ =~ f
|
51
|
+
end
|
52
|
+
|
53
|
+
else
|
54
|
+
usage()
|
55
|
+
end
|
56
|
+
end
|
38
57
|
|
39
|
-
|
40
|
-
USAGE:
|
41
|
-
nitrogen base_dir
|
42
|
-
}
|
58
|
+
run
|
43
59
|
|
44
|
-
|
60
|
+
# This script is based on Michael Neumann's Wee creator script.
|
data/doc/AUTHORS
CHANGED
@@ -6,11 +6,11 @@ MAIN DEVELOPER:
|
|
6
6
|
|
7
7
|
IDEAS, ADDITIONAL CODING, SUPPORT:
|
8
8
|
|
9
|
-
* Anastasios Koutoumanos
|
9
|
+
* Anastasios Koutoumanos <ak@navel.gr>
|
10
10
|
Design, additional coding.
|
11
11
|
|
12
|
-
* James Britt
|
12
|
+
* James Britt <james_b@neurogami.com>
|
13
13
|
Additional code, design, bug reports.
|
14
14
|
|
15
|
-
* Kostas Nasis
|
15
|
+
* Kostas Nasis <kostas@nasis.com>
|
16
16
|
Ideas and bug reports.
|
data/doc/RELEASES
CHANGED
@@ -1,4 +1,53 @@
|
|
1
|
-
== Version 0.
|
1
|
+
== Version 0.18.0
|
2
|
+
|
3
|
+
Mainly a bug fix release. Many small improvements were
|
4
|
+
implemented. All reported bugs were fixed, as well as bugs found
|
5
|
+
during the deployment of a live application. For more information
|
6
|
+
consult the detailed changelog. Thanks to Julien Perrot for small
|
7
|
+
patches.
|
8
|
+
|
9
|
+
Some notable changes:
|
10
|
+
|
11
|
+
* Some changes to make Webrick a valid solution for powering
|
12
|
+
a production server. The full page output caching was improved
|
13
|
+
and support for daemonizing the server was added. Support
|
14
|
+
for running as a proxy target (behind an apache server) was also
|
15
|
+
added.
|
16
|
+
|
17
|
+
* Thread safe mode was added again in Og. This works nice with
|
18
|
+
the Webrick server.
|
19
|
+
|
20
|
+
* New order macro in Og to set default ordering for each
|
21
|
+
entity. The has_many collections respects the order setting.
|
22
|
+
|
23
|
+
* Improved error reporting.
|
24
|
+
|
25
|
+
* Support for template_root overloading. Lets say you have
|
26
|
+
the following Controller hierarchy:
|
27
|
+
|
28
|
+
Controller > MyController > SpecificController.
|
29
|
+
|
30
|
+
The template roots of the 3 controller are searched in reverse
|
31
|
+
order. So by adding a template file in the SpecificController
|
32
|
+
template root you can override a default action in the base
|
33
|
+
Controller. For convienience the base Controller points to
|
34
|
+
the Proto directory. This is experimental.
|
35
|
+
|
36
|
+
* Provide the examples as a separate distribution to make it
|
37
|
+
easier for Ruby newbies to find them.
|
38
|
+
|
39
|
+
* Bug fixes in the Elements system.
|
40
|
+
|
41
|
+
* Improved the nitrogen generator command. Just run
|
42
|
+
|
43
|
+
nitrogen app ~/the/target/path
|
44
|
+
|
45
|
+
to create a skeleton application.
|
46
|
+
|
47
|
+
* Cleaned up some source files.
|
48
|
+
|
49
|
+
|
50
|
+
== Version 0.17.0 was released on 16/05/2005.
|
2
51
|
|
3
52
|
The biggest release yet, featuring the brand new implementation
|
4
53
|
of Og. Due to the many changes this should be considered a preview
|
data/examples/README
ADDED
data/lib/nitro.rb
CHANGED
@@ -25,7 +25,7 @@ module Nitro
|
|
25
25
|
|
26
26
|
# The version.
|
27
27
|
|
28
|
-
Version = '0.
|
28
|
+
Version = '0.18.0'
|
29
29
|
|
30
30
|
# Library path.
|
31
31
|
|
@@ -36,11 +36,12 @@ end
|
|
36
36
|
# gmosx: leave them here.
|
37
37
|
|
38
38
|
require 'nitro/context'
|
39
|
+
require 'nitro/controller'
|
39
40
|
require 'nitro/dispatcher'
|
40
41
|
require 'nitro/render'
|
41
42
|
require 'nitro/conf'
|
42
|
-
require 'nitro/runner'
|
43
|
-
require 'nitro/controller'
|
44
|
-
require 'nitro/part'
|
45
43
|
|
44
|
+
require 'nitro/runner'
|
46
45
|
require 'nitro/environment' unless $NITRO_NO_ENVIRONMENT
|
46
|
+
|
47
|
+
# * George Moschovitis <gm@navel.gr>
|
@@ -1,7 +1,5 @@
|
|
1
|
-
# * George Moschovitis
|
2
|
-
# * James Britt
|
3
|
-
# (c) 2005 Navel, all rights reserved.
|
4
|
-
# $Id: cgi.rb 41 2005-05-05 14:56:40Z gmosx $
|
1
|
+
# * George Moschovitis <gm@navel.gr>
|
2
|
+
# * James Britt <james_b@neurogami.com>
|
5
3
|
|
6
4
|
require 'cgi'
|
7
5
|
require 'stringio'
|
@@ -1,7 +1,3 @@
|
|
1
|
-
# * George Moschovitis <gm@navel.gr>
|
2
|
-
# (c) 2004-2005 Navel, all rights reserved.
|
3
|
-
# $Id: webrick.rb 41 2005-05-05 14:56:40Z gmosx $
|
4
|
-
|
5
1
|
require 'webrick'
|
6
2
|
require 'stringio'
|
7
3
|
|
@@ -102,9 +98,6 @@ class WebrickAdapter < WEBrick::HTTPServlet::AbstractServlet
|
|
102
98
|
begin
|
103
99
|
path = req.request_uri.path
|
104
100
|
|
105
|
-
# gmosx, TODO: move this into a filter.
|
106
|
-
# Og.db.get_connection if defined?(Og) and Og.db
|
107
|
-
|
108
101
|
# REQUEST_MUTEX.lock
|
109
102
|
|
110
103
|
context = Context.new(@conf)
|
@@ -115,7 +108,7 @@ class WebrickAdapter < WEBrick::HTTPServlet::AbstractServlet
|
|
115
108
|
req.header.each { |h, v| context.headers[h.upcase] = v.first }
|
116
109
|
context.headers.update(req.meta_vars)
|
117
110
|
# gmosx: make compatible with fastcgi.
|
118
|
-
context.headers['REQUEST_URI'].slice!(/http:\/\/(
|
111
|
+
context.headers['REQUEST_URI'].slice!(/http:\/\/(.*?)\//)
|
119
112
|
context.headers['REQUEST_URI'] << '/'
|
120
113
|
|
121
114
|
CgiUtils.parse_params(context)
|
@@ -131,7 +124,7 @@ class WebrickAdapter < WEBrick::HTTPServlet::AbstractServlet
|
|
131
124
|
context.close
|
132
125
|
ensure
|
133
126
|
# REQUEST_MUTEX.unlock if REQUEST_MUTEX.locked?
|
134
|
-
|
127
|
+
Og.manager.put_store if defined?(Og) and Og.manager
|
135
128
|
end
|
136
129
|
end
|
137
130
|
end
|
@@ -146,7 +139,7 @@ class WebrickAdapter < WEBrick::HTTPServlet::AbstractServlet
|
|
146
139
|
if req.path == '/'
|
147
140
|
req.instance_variable_set(:@path_info, '/index.html')
|
148
141
|
elsif req.path =~ /^([^.]+)$/
|
149
|
-
req.instance_variable_set(:@path_info, "#{$1}.html")
|
142
|
+
req.instance_variable_set(:@path_info, "#{$1}/index.html")
|
150
143
|
end
|
151
144
|
end
|
152
145
|
|
@@ -162,3 +155,5 @@ class WebrickAdapter < WEBrick::HTTPServlet::AbstractServlet
|
|
162
155
|
end
|
163
156
|
|
164
157
|
end
|
158
|
+
|
159
|
+
# * George Moschovitis <gm@navel.gr>
|