nitro 0.12.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- data/{ChangeLog → CHANGELOG} +137 -0
- data/INSTALL +1 -2
- data/README +1 -1
- data/Rakefile +10 -61
- data/benchmark/{nitro/bench.rb → bench.rb} +1 -1
- data/benchmark/{nitro/simple-webrick-n-200.txt → simple-webrick-n-200.txt} +0 -0
- data/benchmark/{nitro/static-webrick-n-200.txt → static-webrick-n-200.txt} +0 -0
- data/benchmark/{nitro/tiny-lhttpd-n-200-c-5.txt → tiny-lhttpd-n-200-c-5.txt} +0 -0
- data/benchmark/{nitro/tiny-webrick-n-200-c-5.txt → tiny-webrick-n-200-c-5.txt} +0 -0
- data/benchmark/{nitro/tiny-webrick-n-200.txt → tiny-webrick-n-200.txt} +0 -0
- data/benchmark/{nitro/tiny2-webrick-n-200.txt → tiny2-webrick-n-200.txt} +0 -0
- data/doc/{ChangeLog.1 → CHANGELOG.1} +0 -0
- data/{RELEASES → doc/RELEASES} +46 -0
- data/doc/faq.txt +7 -0
- data/examples/README.windows +1 -1
- data/examples/ajax/controller.rb +21 -0
- data/examples/ajax/public/index.xhtml +70 -0
- data/examples/ajax/public/js/ajax.js +64 -0
- data/examples/ajax/run.rb +16 -0
- data/examples/blog/README +6 -3
- data/examples/blog/conf/apache.conf +2 -2
- data/examples/blog/conf/lhttpd.conf +2 -2
- data/examples/blog/log/apache.error_log +777 -0
- data/examples/blog/{root → public}/base.xsl +0 -0
- data/examples/blog/{root → public}/fcgi.rb +0 -0
- data/examples/blog/{root → public}/m/bubbles.gif +0 -0
- data/examples/blog/{root → public}/m/comments_curve.gif +0 -0
- data/examples/blog/{root → public}/m/down.gif +0 -0
- data/examples/blog/{root → public}/m/footer_bg.gif +0 -0
- data/examples/blog/{root → public}/m/garrow.gif +0 -0
- data/examples/blog/{root → public}/m/gbull.gif +0 -0
- data/examples/blog/{root → public}/m/grbull.gif +0 -0
- data/examples/blog/{root → public}/m/h1_bg.gif +0 -0
- data/examples/blog/{root → public}/m/header_bg.gif +0 -0
- data/examples/blog/{root → public}/m/nitro.gif +0 -0
- data/examples/blog/{root → public}/m/obull.gif +0 -0
- data/examples/blog/{root → public}/m/page_bg.gif +0 -0
- data/examples/blog/{root → public}/m/rss.gif +0 -0
- data/examples/blog/{root → public}/m/side_title_bg.gif +0 -0
- data/examples/blog/{root → public}/m/sidebar_bg.gif +0 -0
- data/examples/{no_xsl_blog/root → blog/public}/style.css +6 -0
- data/examples/blog/run.rb +10 -12
- data/examples/blog/{lib → src}/blog.rb +3 -3
- data/examples/blog/{lib/blog → src}/controller.rb +13 -2
- data/examples/blog/src/mailer.rb +23 -0
- data/examples/blog/{lib/blog/model.rb → src/models/blog.rb} +4 -7
- data/examples/blog/src/models/content.rb +52 -0
- data/examples/blog/src/views/blog_entry_email.xhtml +16 -0
- data/examples/blog/{root → src/views}/comments.xhtml +0 -0
- data/examples/blog/{root → src/views}/entry_form.xhtml +0 -0
- data/examples/blog/{root → src/views}/error.xhtml +0 -0
- data/examples/blog/{root → src/views}/index.xhtml +0 -0
- data/examples/blog/{root → src/views}/login.xhtml +0 -0
- data/examples/blog/{root → src/views}/recent_posts.xhtml +0 -0
- data/examples/blog/{root → src/views}/view_entry.xhtml +8 -0
- data/examples/blog/{root → src/views}/view_entry.xml +0 -0
- data/examples/blog/src/xsl/base.xsl +153 -0
- data/examples/blog/{root → src/xsl}/style.xsl +2 -2
- data/examples/no_xsl_blog/README +5 -1
- data/examples/no_xsl_blog/conf/apache.conf +2 -2
- data/examples/no_xsl_blog/conf/lhttpd.conf +2 -2
- data/examples/no_xsl_blog/lib/blog/model.rb +1 -1
- data/{lib/parts → examples/no_xsl_blog/lib}/content.rb +1 -11
- data/examples/no_xsl_blog/log/apache.error_log +405 -0
- data/examples/no_xsl_blog/{root → public}/comments.xhtml +0 -0
- data/examples/no_xsl_blog/{root → public}/entry_form.xhtml +0 -0
- data/examples/no_xsl_blog/{root → public}/fcgi.rb +0 -0
- data/examples/no_xsl_blog/{root → public}/index.xhtml +0 -0
- data/examples/no_xsl_blog/{root → public}/login.xhtml +0 -0
- data/examples/no_xsl_blog/{root → public}/m/bubbles.gif +0 -0
- data/examples/no_xsl_blog/{root → public}/m/comments_curve.gif +0 -0
- data/examples/no_xsl_blog/{root → public}/m/down.gif +0 -0
- data/examples/no_xsl_blog/{root → public}/m/footer_bg.gif +0 -0
- data/examples/no_xsl_blog/{root → public}/m/garrow.gif +0 -0
- data/examples/no_xsl_blog/{root → public}/m/gbull.gif +0 -0
- data/examples/no_xsl_blog/{root → public}/m/grbull.gif +0 -0
- data/examples/no_xsl_blog/{root → public}/m/h1_bg.gif +0 -0
- data/examples/no_xsl_blog/{root → public}/m/header_bg.gif +0 -0
- data/examples/no_xsl_blog/{root → public}/m/nitro.gif +0 -0
- data/examples/no_xsl_blog/{root → public}/m/obull.gif +0 -0
- data/examples/no_xsl_blog/{root → public}/m/page_bg.gif +0 -0
- data/examples/no_xsl_blog/{root → public}/m/rss.gif +0 -0
- data/examples/no_xsl_blog/{root → public}/m/side_title_bg.gif +0 -0
- data/examples/no_xsl_blog/{root → public}/m/sidebar_bg.gif +0 -0
- data/examples/no_xsl_blog/{root → public}/recent_posts.xhtml +0 -0
- data/examples/{blog/root → no_xsl_blog/public}/style.css +0 -0
- data/examples/no_xsl_blog/{root → public}/view_entry.xhtml +0 -0
- data/examples/no_xsl_blog/{root → public}/view_entry.xml +0 -0
- data/examples/tiny/conf/apache.conf +2 -2
- data/examples/tiny/log/apache.error_log +100 -0
- data/examples/tiny/{root → public}/fcgi.rb +0 -0
- data/examples/tiny/{root → public}/include.xhtml +0 -0
- data/examples/tiny/{root → public}/index.xhtml +0 -0
- data/{bin/proto/root/m → examples/tiny/public}/nitro.png +0 -0
- data/examples/tiny/{root → public}/upload.xhtml +0 -0
- data/examples/tiny/run.rb +1 -2
- data/examples/why_wiki/wiki.yml +1 -0
- data/install.rb +5 -2
- data/lib/nitro.rb +2 -6
- data/lib/nitro/adapters/fastcgi.rb +2 -2
- data/lib/nitro/adapters/webrick.rb +4 -4
- data/lib/nitro/conf.rb +5 -2
- data/lib/nitro/controller.rb +2 -2
- data/lib/nitro/dispatcher.rb +19 -8
- data/lib/nitro/mail.rb +252 -8
- data/lib/nitro/render.rb +24 -21
- data/lib/nitro/runner.rb +1 -1
- data/lib/nitro/scaffold.rb +2 -5
- data/lib/nitro/simple.rb +2 -1
- data/lib/nitro/template.rb +42 -2
- data/test/nitro/tc_controller.rb +9 -4
- data/test/nitro/tc_dispatcher.rb +4 -6
- data/test/nitro/tc_mail.rb +95 -0
- data/test/{root → public}/blog/list.xhtml +0 -0
- data/test/public/dummy_mailer/registration.xhtml +5 -0
- data/vendor/README +0 -1
- metadata +136 -181
- data/benchmark/og/bench.rb +0 -75
- data/benchmark/og/sqlite-no-prepare.1.txt +0 -13
- data/benchmark/og/sqlite-no-prepare.2.txt +0 -13
- data/benchmark/og/sqlite-prepare.1.txt +0 -13
- data/benchmark/og/sqlite-prepare.2.txt +0 -13
- data/bin/proto/README +0 -34
- data/bin/proto/conf/apache.conf +0 -1
- data/bin/proto/conf/app.conf.rb +0 -14
- data/bin/proto/conf/lhttpd.conf +0 -236
- data/bin/proto/ctl +0 -4
- data/bin/proto/lib/README +0 -5
- data/bin/proto/log/README +0 -3
- data/bin/proto/root/fcgi.rb +0 -6
- data/bin/proto/root/index.xhtml +0 -69
- data/bin/proto/root/style.css +0 -152
- data/bin/proto/root/style.xsl +0 -99
- data/doc/og_config.txt +0 -35
- data/doc/og_tutorial.txt +0 -595
- data/examples/og/README +0 -11
- data/examples/og/mock_example.rb +0 -50
- data/examples/og/mysql_to_psql.rb +0 -96
- data/examples/og/run.rb +0 -286
- data/examples/tiny/root/nitro.png +0 -0
- data/lib/glue.rb +0 -55
- data/lib/glue/array.rb +0 -61
- data/lib/glue/attribute.rb +0 -83
- data/lib/glue/cache.rb +0 -138
- data/lib/glue/flexob.rb +0 -12
- data/lib/glue/hash.rb +0 -122
- data/lib/glue/inflector.rb +0 -91
- data/lib/glue/logger.rb +0 -147
- data/lib/glue/misc.rb +0 -14
- data/lib/glue/mixins.rb +0 -36
- data/lib/glue/number.rb +0 -24
- data/lib/glue/object.rb +0 -32
- data/lib/glue/pool.rb +0 -60
- data/lib/glue/property.rb +0 -408
- data/lib/glue/string.rb +0 -162
- data/lib/glue/time.rb +0 -85
- data/lib/glue/validation.rb +0 -394
- data/lib/og.rb +0 -185
- data/lib/og/adapter.rb +0 -513
- data/lib/og/adapters/filesys.rb +0 -121
- data/lib/og/adapters/mysql.rb +0 -347
- data/lib/og/adapters/oracle.rb +0 -375
- data/lib/og/adapters/psql.rb +0 -273
- data/lib/og/adapters/sqlite.rb +0 -262
- data/lib/og/backend.rb +0 -297
- data/lib/og/connection.rb +0 -304
- data/lib/og/database.rb +0 -282
- data/lib/og/enchant.rb +0 -125
- data/lib/og/meta.rb +0 -373
- data/lib/og/mock.rb +0 -165
- data/lib/og/observer.rb +0 -53
- data/lib/og/typemacros.rb +0 -23
- data/lib/parts/README +0 -9
- data/test/glue/tc_attribute.rb +0 -22
- data/test/glue/tc_cache.rb +0 -45
- data/test/glue/tc_hash.rb +0 -38
- data/test/glue/tc_logger.rb +0 -39
- data/test/glue/tc_numbers.rb +0 -20
- data/test/glue/tc_property.rb +0 -89
- data/test/glue/tc_property_mixins.rb +0 -93
- data/test/glue/tc_property_type_checking.rb +0 -35
- data/test/glue/tc_strings.rb +0 -103
- data/test/glue/tc_validation.rb +0 -188
- data/test/og/tc_filesys.rb +0 -83
- data/test/og/tc_lifecycle.rb +0 -104
- data/test/og/tc_many_to_many.rb +0 -62
- data/test/og/tc_meta.rb +0 -55
- data/test/og/tc_observer.rb +0 -85
- data/test/og/tc_sqlite.rb +0 -87
- data/test/tc_og.rb +0 -355
- data/vendor/composite_sexp_processor.rb +0 -43
- data/vendor/parse_tree.rb +0 -745
- data/vendor/sexp_processor.rb +0 -453
data/{ChangeLog → CHANGELOG}
RENAMED
@@ -1,5 +1,142 @@
|
|
1
|
+
17-03-2005 George Moschovitis <gm@navel.gr>
|
2
|
+
|
3
|
+
* lib/nitro/adapters/fastcgi.rb: better check for Og.
|
4
|
+
|
5
|
+
* lib/nitro/adapters/webrick.rb: better check for Og.
|
6
|
+
|
7
|
+
* test/*: many changes to make tests pass again.
|
8
|
+
|
9
|
+
* examples/*: updated all apache configuration files.
|
10
|
+
|
11
|
+
* examples/blog/src/views/blog_entry_email.xhtml: introduced.
|
12
|
+
|
13
|
+
* examples/blog/src/mailer.rb: introduced,
|
14
|
+
mail sent!
|
15
|
+
|
16
|
+
* examples/no_xsl_blog/*: converted to new codebase.
|
17
|
+
|
18
|
+
16-03-2005 George Moschovitis <gm@navel.gr>
|
19
|
+
|
20
|
+
* examples/blog/*: many changes to convert to new codebase.
|
21
|
+
excellent, runs with separated templates!
|
22
|
+
|
23
|
+
* examples/ajax/*: converted to new codebase.
|
24
|
+
|
25
|
+
* examples/tiny/*: converted to new codebase.
|
26
|
+
|
27
|
+
* lib/nitro/render.rb: template_root, renamed from base,
|
28
|
+
dont pass template_root.
|
29
|
+
|
30
|
+
* public/error.xhtml: added.
|
31
|
+
|
32
|
+
* lib/nitro/dispatcher.rb: separate template_root / public_root for extra
|
33
|
+
security and flexibility,
|
34
|
+
(#dispatch): don't calculate template_root.
|
35
|
+
|
36
|
+
* public/index.xhtml: updated.
|
37
|
+
|
38
|
+
* bin/proto: removed.
|
39
|
+
|
40
|
+
* run.rb: introduced.
|
41
|
+
|
42
|
+
* public/media: introduced.
|
43
|
+
|
44
|
+
* experimented with proto directory structure.
|
45
|
+
|
46
|
+
* public/js/ajax.js: (ajax_async_get): implemented.
|
47
|
+
|
48
|
+
15-03-2005 George Moschovitis <gm@navel.gr>
|
49
|
+
|
50
|
+
* test/nitro/tc_mail.rb: added tests.
|
51
|
+
|
52
|
+
* lib/nitro/template.rb (FileTemplate): introduced,
|
53
|
+
added caching support.
|
54
|
+
MEGA, extend FileTemplate form Flexob and use some binding
|
55
|
+
magic to provide the environment.
|
56
|
+
|
57
|
+
* lib/nitro/mail.rb (#encoded): introduced,
|
58
|
+
(#create): implemented,
|
59
|
+
(#deliver): implemented.
|
60
|
+
(Mail): added support for additional headers.
|
61
|
+
(#quoted_printable): added.
|
62
|
+
yeah, delivery works!!
|
63
|
+
(#render_body): simple implementation,
|
64
|
+
use the new Flexob based FileTemplate.
|
65
|
+
|
66
|
+
14-03-2005 George Moschovitis <gm@navel.gr>
|
67
|
+
|
68
|
+
* test/nitro/tc_mail.rb: introduced.
|
69
|
+
|
70
|
+
* lib/nitro/mail.rb: worked on mailer implementation.
|
71
|
+
|
72
|
+
13-03-2005 George Moschovitis <gm@navel.gr>
|
73
|
+
|
74
|
+
* lib/nitro/mail.rb: introduced Mailer.
|
75
|
+
|
76
|
+
12-03-2005 George Moschovitis <gm@navel.gr>
|
77
|
+
|
78
|
+
* examples/ajax/controller.rb (#get_word): implemented.
|
79
|
+
Yeah, the autocompletion works!!
|
80
|
+
|
81
|
+
* examples/ajax/*: copied stuff from public,
|
82
|
+
yeah, I got a simple xmlhttp request working.
|
83
|
+
|
84
|
+
11-03-2005 George Moschovitis <gm@navel.gr>
|
85
|
+
|
86
|
+
* public/js/ajax.js: introduced.
|
87
|
+
(#xml_http_request): implemented,
|
88
|
+
(#xml_http_request_object): implemented.
|
89
|
+
|
90
|
+
* public/js: introduced.
|
91
|
+
|
92
|
+
* public/*: introduced.
|
93
|
+
|
94
|
+
* examples/ajax/*: introduced ajax example.
|
95
|
+
|
96
|
+
* doc/faq.txt: introduced.
|
97
|
+
|
98
|
+
10-03-2005 George Moschovitis <gm@navel.gr>
|
99
|
+
|
100
|
+
* lib/nitro.rb: removed Name.
|
101
|
+
|
102
|
+
* lib/parts: deprecated.
|
103
|
+
|
104
|
+
* examples/no_xsl_blog/lib/content.rb: moved from parts.
|
105
|
+
|
106
|
+
* examples/blog/lib/content.rb: moved from parts.
|
107
|
+
|
108
|
+
* vendor/*: removed parse_tree files.
|
109
|
+
|
110
|
+
* Rakefile: updated, removed Og dependencies,
|
111
|
+
added ruby-breakpoint dependency.
|
112
|
+
|
113
|
+
* yeah, the examples run again.
|
114
|
+
|
115
|
+
* splitted project in 4 parts: nitro, og, gen (internal, not released), glue.
|
116
|
+
|
117
|
+
* lib/og/adapters/psql.rb: use system in create/drop db to avoid shell expansion. [sjenkins]
|
118
|
+
|
119
|
+
* lib/og/adapters/mysql.rb: use system in create/drop db to avoid shell expansion. [sjenkins]
|
120
|
+
|
121
|
+
09-03-2005 George Moschovitis <gm@navel.gr>
|
122
|
+
|
123
|
+
* lib/glue/validation.rb (#validate_format): don't quote the regexp. [dbovensiepen]
|
124
|
+
|
125
|
+
* lib/og/meta.rb: check_implicit_graph_changes. [mneumann]
|
126
|
+
|
127
|
+
* worked on and uploaded Nitro web site.
|
128
|
+
|
129
|
+
08-03-2005 George Moschovitis <gm@navel.gr>
|
130
|
+
|
131
|
+
* lib/nitro/template.rb: allow entities in the following form: %ent;
|
132
|
+
to be more xsl friendly.
|
133
|
+
|
134
|
+
* worked on a simple Nitro web site.
|
135
|
+
|
1
136
|
07-03-2005 George Moschovitis <gm@navel.gr>
|
2
137
|
|
138
|
+
* --- VERSION 0.12.0 ---
|
139
|
+
|
3
140
|
* lib/og/adapters/mysql.rb: overide create_fields.
|
4
141
|
|
5
142
|
* examples/why_wiki: updated, added nice urls.
|
data/INSTALL
CHANGED
data/README
CHANGED
data/Rakefile
CHANGED
@@ -6,15 +6,13 @@ require 'rake/rdoctask'
|
|
6
6
|
require 'rake/testtask'
|
7
7
|
require 'rake/gempackagetask'
|
8
8
|
|
9
|
-
og = false # true
|
10
|
-
|
11
9
|
task :default => :package
|
12
10
|
|
13
11
|
# Run the tests.
|
14
12
|
|
15
13
|
Rake::TestTask.new do |t|
|
16
14
|
t.libs << 'test'
|
17
|
-
t.test_files = FileList['test/**/tc*.rb']
|
15
|
+
t.test_files = FileList['test/**/tc*.rb']
|
18
16
|
t.verbose = true
|
19
17
|
end
|
20
18
|
|
@@ -31,56 +29,12 @@ end
|
|
31
29
|
Rake::RDocTask.new do |rd|
|
32
30
|
rd.main = 'README'
|
33
31
|
rd.rdoc_dir = 'doc/rdoc'
|
34
|
-
rd.rdoc_files.include('README', 'INSTALL', 'doc/
|
32
|
+
rd.rdoc_files.include('README', 'INSTALL', 'doc/config.txt', 'doc/tutorial.txt', 'lib/**/*.rb')
|
35
33
|
rd.options << '--all --inline-source'
|
36
34
|
end
|
37
35
|
|
38
36
|
# Build gem.
|
39
37
|
|
40
|
-
if og
|
41
|
-
|
42
|
-
spec = Gem::Specification.new do |s|
|
43
|
-
s.name = 'og'
|
44
|
-
if File.read('lib/og.rb') =~ /Version\s+=\s+'(\d+\.\d+\.\d+)'/
|
45
|
-
s.version = $1
|
46
|
-
else
|
47
|
-
raise 'No version found'
|
48
|
-
end
|
49
|
-
s.summary = 'Og (ObjectGraph)'
|
50
|
-
s.description = 'An efficient and transparent Object-Relational mapping library'
|
51
|
-
|
52
|
-
# s.add_dependency 'postgres-pr', '>= 0.3.0'
|
53
|
-
# s.add_dependency 'postgres', '>= 0.7.1'
|
54
|
-
s.add_dependency 'extensions', '>= 0.5'
|
55
|
-
# s.add_dependency 'sqlite3-ruby', '>= 1.0.0'
|
56
|
-
#s.add_dependency 'mysql', '>= 2.5.1'
|
57
|
-
s.add_dependency 'flexmock', '>= 0.0.3'
|
58
|
-
|
59
|
-
s.required_ruby_version = '>= 1.8.0'
|
60
|
-
|
61
|
-
s.files = FileList[
|
62
|
-
'README.og', 'RELEASES.og', 'doc/LICENSE', 'doc/AUTHORS', 'Rakefile', 'ChangeLog*',
|
63
|
-
'install.rb',
|
64
|
-
'examples/og/*', 'lib/glue.rb', 'lib/glue/**/*', 'lib/og/**/*', 'lib/og.rb',
|
65
|
-
'test/*og*.rb', 'test/og/*', 'vendor/extensions/**/*'
|
66
|
-
].exclude('.svn/**/*').exclude('**/*.log').to_a
|
67
|
-
|
68
|
-
s.require_path = 'lib'
|
69
|
-
s.autorequire = 'og'
|
70
|
-
|
71
|
-
s.has_rdoc = true
|
72
|
-
s.extra_rdoc_files = FileList['README.og', 'RELEASES.og', 'doc/LICENSE', 'doc/AUTHORS'].to_a
|
73
|
-
s.rdoc_options << '--main' << 'README.og' << '--title' << 'Og Documentation'
|
74
|
-
s.rdoc_options << '--all' << '--inline-source'
|
75
|
-
|
76
|
-
s.author = 'George Moschovitis'
|
77
|
-
s.email = 'gm@navel.gr'
|
78
|
-
s.homepage = 'http://www.rubyforge.com/projects/nitro'
|
79
|
-
s.rubyforge_project = 'nitro'
|
80
|
-
end
|
81
|
-
|
82
|
-
else
|
83
|
-
|
84
38
|
spec = Gem::Specification.new do |s|
|
85
39
|
s.name = 'nitro'
|
86
40
|
if File.read('lib/nitro.rb') =~ /Version\s+=\s+'(\d+\.\d+\.\d+)'/
|
@@ -90,18 +44,16 @@ spec = Gem::Specification.new do |s|
|
|
90
44
|
end
|
91
45
|
s.summary = 'Nitro Web Engine'
|
92
46
|
s.description =
|
93
|
-
'
|
94
|
-
'web
|
47
|
+
'Nitro provides everything you need to develop real-world, scalable ' +
|
48
|
+
'web applications.'
|
95
49
|
|
96
|
-
|
97
|
-
|
98
|
-
|
50
|
+
s.add_dependency 'glue', '= 0.13.0'
|
51
|
+
s.add_dependency 'og', '= 0.13.0'
|
52
|
+
s.add_dependency 'ruby-breakpoint', '>= 0.5'
|
99
53
|
s.add_dependency 'extensions', '>= 0.5'
|
100
|
-
# s.add_dependency 'sqlite3-ruby', '>= 1.0.0'
|
101
|
-
# s.add_dependency 'mysql', '>= 2.5.1'
|
102
54
|
s.add_dependency 'flexmock', '>= 0.0.3'
|
103
55
|
|
104
|
-
s.required_ruby_version = '>= 1.8.
|
56
|
+
s.required_ruby_version = '>= 1.8.1'
|
105
57
|
|
106
58
|
s.files = FileList[
|
107
59
|
'[A-Z]*', 'install.rb', '{bin,benchmark,examples,doc,lib,test,vendor}/**/*'
|
@@ -111,7 +63,7 @@ spec = Gem::Specification.new do |s|
|
|
111
63
|
s.autorequire = 'nitro'
|
112
64
|
|
113
65
|
s.has_rdoc = true
|
114
|
-
s.extra_rdoc_files = FileList['[A-Z]*'].
|
66
|
+
s.extra_rdoc_files = FileList['[A-Z]*'].to_a
|
115
67
|
s.rdoc_options << '--main' << 'README' << '--title' << 'Nitro Documentation'
|
116
68
|
s.rdoc_options << '--all' << '--inline-source'
|
117
69
|
|
@@ -123,12 +75,10 @@ spec = Gem::Specification.new do |s|
|
|
123
75
|
|
124
76
|
s.author = 'George Moschovitis'
|
125
77
|
s.email = 'gm@navel.gr'
|
126
|
-
s.homepage = 'http://
|
78
|
+
s.homepage = 'http://nitro.rubyforge.org'
|
127
79
|
s.rubyforge_project = 'nitro'
|
128
80
|
end
|
129
81
|
|
130
|
-
end
|
131
|
-
|
132
82
|
Rake::GemPackageTask.new(spec) do |pkg|
|
133
83
|
pkg.package_dir = 'dist'
|
134
84
|
pkg.need_zip = true
|
@@ -140,4 +90,3 @@ end
|
|
140
90
|
task :install do
|
141
91
|
ruby 'install.rb'
|
142
92
|
end
|
143
|
-
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/{RELEASES → doc/RELEASES}
RENAMED
@@ -1,3 +1,49 @@
|
|
1
|
+
== Version 0.13.0 was released on 07/03/2005.
|
2
|
+
|
3
|
+
A snapshot of the latest code. The Nitro project is now
|
4
|
+
split in three gems (nitro, og, glue) and the code is
|
5
|
+
better separated. Many changes were made to make programming
|
6
|
+
with Nitro more similar to Rails, to make the platform
|
7
|
+
more accessible to newcomers. A conversion of ActionMailer
|
8
|
+
and an AJAX example are also included.
|
9
|
+
|
10
|
+
* Introduced Mailer subsystem:
|
11
|
+
|
12
|
+
class MyMailer < Mailer
|
13
|
+
def registration_email(to, username, password)
|
14
|
+
@from = 'system@navel.gr'
|
15
|
+
@to = to
|
16
|
+
@subject = 'Registration information'
|
17
|
+
@body.username = username
|
18
|
+
@body.password = password
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
the tempate (registration_email.xhtml):
|
23
|
+
|
24
|
+
Hello #{username}
|
25
|
+
|
26
|
+
Thanks for registering, your password is '#{password}'
|
27
|
+
|
28
|
+
Then use it like this:
|
29
|
+
|
30
|
+
MyMailer.deliver_registration_email('gmosx@navel.gr', 'gmosx', 'rulez')
|
31
|
+
|
32
|
+
For more information, check out the updated blog example.
|
33
|
+
|
34
|
+
* AJAX example, demonstrates how to use ajax techniques with
|
35
|
+
Nitro. A simple Google Suggest style UI is implemented.
|
36
|
+
|
37
|
+
* Use a Rails compatible directory structure. Check out
|
38
|
+
the updated blog example. Please note that Nitro does not
|
39
|
+
force a directory structure (see an alternative structure
|
40
|
+
in the no_xsl_blog example).
|
41
|
+
|
42
|
+
* Optional separate template_root/public_root for extra security.
|
43
|
+
|
44
|
+
* Further code cleanup and bug fixes.
|
45
|
+
|
46
|
+
|
1
47
|
== Version 0.12.0 was released on 07/03/2005.
|
2
48
|
|
3
49
|
A careful blend of new features and subtle improvements
|
data/doc/faq.txt
ADDED
data/examples/README.windows
CHANGED
@@ -0,0 +1,21 @@
|
|
1
|
+
# * George Moschovitis <gm@navel.gr>
|
2
|
+
# (c) 2004-2005 Navel, all rights reserved.
|
3
|
+
# $Id: controller.rb 301 2005-03-16 13:24:25Z gmosx $
|
4
|
+
|
5
|
+
require 'nitro/controller'
|
6
|
+
|
7
|
+
COUNTRIES = %w{ Greece USA England Germany Italy Canada France Japan Australia Holland }
|
8
|
+
|
9
|
+
class AjaxController < N::Controller
|
10
|
+
def hit
|
11
|
+
puts "-----------------------------> hit #{request['val']}"
|
12
|
+
end
|
13
|
+
|
14
|
+
# ann :ajax => true, :params => :word
|
15
|
+
def get_word
|
16
|
+
word = request['word']
|
17
|
+
word = COUNTRIES.find { |c| c =~ /^#{word}/ } || '-'
|
18
|
+
@out << word
|
19
|
+
end
|
20
|
+
# ajax :get_word, :params => :word
|
21
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>Server Side Autocompletion</title>
|
4
|
+
<script type="text/javascript" src="js/ajax.js">#{}</script>
|
5
|
+
<script type="text/javascript">
|
6
|
+
|
7
|
+
function hit() {
|
8
|
+
ajax_get('hit?val=' + document.getElementById('hitval').value);
|
9
|
+
return false;
|
10
|
+
}
|
11
|
+
|
12
|
+
function getWord(input, evt) {
|
13
|
+
if (input.value.length == 0) {
|
14
|
+
return;
|
15
|
+
}
|
16
|
+
|
17
|
+
//allow backspace to work in IE
|
18
|
+
|
19
|
+
if (typeof input.selectionStart == 'undefined' && evt.keyCode == 8) { input.value = input.value.substr(0,input.value.length-1); }
|
20
|
+
|
21
|
+
// Ignore the following keystrokes
|
22
|
+
|
23
|
+
switch (evt.keyCode) {
|
24
|
+
case 37: //left arrow
|
25
|
+
case 39: //right arrow
|
26
|
+
case 33: //page up
|
27
|
+
case 34: //page down
|
28
|
+
case 36: //home
|
29
|
+
case 35: //end
|
30
|
+
case 13: //enter
|
31
|
+
case 9: //tab
|
32
|
+
case 27: //esc
|
33
|
+
case 16: //shift
|
34
|
+
case 17: //ctrl
|
35
|
+
case 18: //alt
|
36
|
+
case 20: //caps lock
|
37
|
+
case 8: //backspace
|
38
|
+
case 46: //delete
|
39
|
+
case 38: //up arrow
|
40
|
+
case 40: //down arrow
|
41
|
+
return;
|
42
|
+
break;
|
43
|
+
}
|
44
|
+
|
45
|
+
lastLength = input.value.length;
|
46
|
+
|
47
|
+
word = ajax_get('get_word?word=' + input.value)
|
48
|
+
|
49
|
+
if (word.length > 1) {
|
50
|
+
input.value = word
|
51
|
+
try {
|
52
|
+
input.setSelectionRange(lastLength, input.value.length);
|
53
|
+
} catch(e) {
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
</script>
|
59
|
+
</head>
|
60
|
+
<body>
|
61
|
+
<h1>Server side autocompletion</h1>
|
62
|
+
<form>
|
63
|
+
Enter a Country: <input type="text" id="country" name="country" value="" onkeyup="getWord(this,event)" autocomplete="off" />
|
64
|
+
</form>
|
65
|
+
<h1>Send data to a server action</h1>
|
66
|
+
<p>
|
67
|
+
<input id="hitval" type="text" value="Test" /> <a href="#" onclick="hit()">Send</a>
|
68
|
+
</p>
|
69
|
+
</body>
|
70
|
+
</html>
|