nitro 0.12.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. data/{ChangeLog → CHANGELOG} +137 -0
  2. data/INSTALL +1 -2
  3. data/README +1 -1
  4. data/Rakefile +10 -61
  5. data/benchmark/{nitro/bench.rb → bench.rb} +1 -1
  6. data/benchmark/{nitro/simple-webrick-n-200.txt → simple-webrick-n-200.txt} +0 -0
  7. data/benchmark/{nitro/static-webrick-n-200.txt → static-webrick-n-200.txt} +0 -0
  8. data/benchmark/{nitro/tiny-lhttpd-n-200-c-5.txt → tiny-lhttpd-n-200-c-5.txt} +0 -0
  9. data/benchmark/{nitro/tiny-webrick-n-200-c-5.txt → tiny-webrick-n-200-c-5.txt} +0 -0
  10. data/benchmark/{nitro/tiny-webrick-n-200.txt → tiny-webrick-n-200.txt} +0 -0
  11. data/benchmark/{nitro/tiny2-webrick-n-200.txt → tiny2-webrick-n-200.txt} +0 -0
  12. data/doc/{ChangeLog.1 → CHANGELOG.1} +0 -0
  13. data/{RELEASES → doc/RELEASES} +46 -0
  14. data/doc/faq.txt +7 -0
  15. data/examples/README.windows +1 -1
  16. data/examples/ajax/controller.rb +21 -0
  17. data/examples/ajax/public/index.xhtml +70 -0
  18. data/examples/ajax/public/js/ajax.js +64 -0
  19. data/examples/ajax/run.rb +16 -0
  20. data/examples/blog/README +6 -3
  21. data/examples/blog/conf/apache.conf +2 -2
  22. data/examples/blog/conf/lhttpd.conf +2 -2
  23. data/examples/blog/log/apache.error_log +777 -0
  24. data/examples/blog/{root → public}/base.xsl +0 -0
  25. data/examples/blog/{root → public}/fcgi.rb +0 -0
  26. data/examples/blog/{root → public}/m/bubbles.gif +0 -0
  27. data/examples/blog/{root → public}/m/comments_curve.gif +0 -0
  28. data/examples/blog/{root → public}/m/down.gif +0 -0
  29. data/examples/blog/{root → public}/m/footer_bg.gif +0 -0
  30. data/examples/blog/{root → public}/m/garrow.gif +0 -0
  31. data/examples/blog/{root → public}/m/gbull.gif +0 -0
  32. data/examples/blog/{root → public}/m/grbull.gif +0 -0
  33. data/examples/blog/{root → public}/m/h1_bg.gif +0 -0
  34. data/examples/blog/{root → public}/m/header_bg.gif +0 -0
  35. data/examples/blog/{root → public}/m/nitro.gif +0 -0
  36. data/examples/blog/{root → public}/m/obull.gif +0 -0
  37. data/examples/blog/{root → public}/m/page_bg.gif +0 -0
  38. data/examples/blog/{root → public}/m/rss.gif +0 -0
  39. data/examples/blog/{root → public}/m/side_title_bg.gif +0 -0
  40. data/examples/blog/{root → public}/m/sidebar_bg.gif +0 -0
  41. data/examples/{no_xsl_blog/root → blog/public}/style.css +6 -0
  42. data/examples/blog/run.rb +10 -12
  43. data/examples/blog/{lib → src}/blog.rb +3 -3
  44. data/examples/blog/{lib/blog → src}/controller.rb +13 -2
  45. data/examples/blog/src/mailer.rb +23 -0
  46. data/examples/blog/{lib/blog/model.rb → src/models/blog.rb} +4 -7
  47. data/examples/blog/src/models/content.rb +52 -0
  48. data/examples/blog/src/views/blog_entry_email.xhtml +16 -0
  49. data/examples/blog/{root → src/views}/comments.xhtml +0 -0
  50. data/examples/blog/{root → src/views}/entry_form.xhtml +0 -0
  51. data/examples/blog/{root → src/views}/error.xhtml +0 -0
  52. data/examples/blog/{root → src/views}/index.xhtml +0 -0
  53. data/examples/blog/{root → src/views}/login.xhtml +0 -0
  54. data/examples/blog/{root → src/views}/recent_posts.xhtml +0 -0
  55. data/examples/blog/{root → src/views}/view_entry.xhtml +8 -0
  56. data/examples/blog/{root → src/views}/view_entry.xml +0 -0
  57. data/examples/blog/src/xsl/base.xsl +153 -0
  58. data/examples/blog/{root → src/xsl}/style.xsl +2 -2
  59. data/examples/no_xsl_blog/README +5 -1
  60. data/examples/no_xsl_blog/conf/apache.conf +2 -2
  61. data/examples/no_xsl_blog/conf/lhttpd.conf +2 -2
  62. data/examples/no_xsl_blog/lib/blog/model.rb +1 -1
  63. data/{lib/parts → examples/no_xsl_blog/lib}/content.rb +1 -11
  64. data/examples/no_xsl_blog/log/apache.error_log +405 -0
  65. data/examples/no_xsl_blog/{root → public}/comments.xhtml +0 -0
  66. data/examples/no_xsl_blog/{root → public}/entry_form.xhtml +0 -0
  67. data/examples/no_xsl_blog/{root → public}/fcgi.rb +0 -0
  68. data/examples/no_xsl_blog/{root → public}/index.xhtml +0 -0
  69. data/examples/no_xsl_blog/{root → public}/login.xhtml +0 -0
  70. data/examples/no_xsl_blog/{root → public}/m/bubbles.gif +0 -0
  71. data/examples/no_xsl_blog/{root → public}/m/comments_curve.gif +0 -0
  72. data/examples/no_xsl_blog/{root → public}/m/down.gif +0 -0
  73. data/examples/no_xsl_blog/{root → public}/m/footer_bg.gif +0 -0
  74. data/examples/no_xsl_blog/{root → public}/m/garrow.gif +0 -0
  75. data/examples/no_xsl_blog/{root → public}/m/gbull.gif +0 -0
  76. data/examples/no_xsl_blog/{root → public}/m/grbull.gif +0 -0
  77. data/examples/no_xsl_blog/{root → public}/m/h1_bg.gif +0 -0
  78. data/examples/no_xsl_blog/{root → public}/m/header_bg.gif +0 -0
  79. data/examples/no_xsl_blog/{root → public}/m/nitro.gif +0 -0
  80. data/examples/no_xsl_blog/{root → public}/m/obull.gif +0 -0
  81. data/examples/no_xsl_blog/{root → public}/m/page_bg.gif +0 -0
  82. data/examples/no_xsl_blog/{root → public}/m/rss.gif +0 -0
  83. data/examples/no_xsl_blog/{root → public}/m/side_title_bg.gif +0 -0
  84. data/examples/no_xsl_blog/{root → public}/m/sidebar_bg.gif +0 -0
  85. data/examples/no_xsl_blog/{root → public}/recent_posts.xhtml +0 -0
  86. data/examples/{blog/root → no_xsl_blog/public}/style.css +0 -0
  87. data/examples/no_xsl_blog/{root → public}/view_entry.xhtml +0 -0
  88. data/examples/no_xsl_blog/{root → public}/view_entry.xml +0 -0
  89. data/examples/tiny/conf/apache.conf +2 -2
  90. data/examples/tiny/log/apache.error_log +100 -0
  91. data/examples/tiny/{root → public}/fcgi.rb +0 -0
  92. data/examples/tiny/{root → public}/include.xhtml +0 -0
  93. data/examples/tiny/{root → public}/index.xhtml +0 -0
  94. data/{bin/proto/root/m → examples/tiny/public}/nitro.png +0 -0
  95. data/examples/tiny/{root → public}/upload.xhtml +0 -0
  96. data/examples/tiny/run.rb +1 -2
  97. data/examples/why_wiki/wiki.yml +1 -0
  98. data/install.rb +5 -2
  99. data/lib/nitro.rb +2 -6
  100. data/lib/nitro/adapters/fastcgi.rb +2 -2
  101. data/lib/nitro/adapters/webrick.rb +4 -4
  102. data/lib/nitro/conf.rb +5 -2
  103. data/lib/nitro/controller.rb +2 -2
  104. data/lib/nitro/dispatcher.rb +19 -8
  105. data/lib/nitro/mail.rb +252 -8
  106. data/lib/nitro/render.rb +24 -21
  107. data/lib/nitro/runner.rb +1 -1
  108. data/lib/nitro/scaffold.rb +2 -5
  109. data/lib/nitro/simple.rb +2 -1
  110. data/lib/nitro/template.rb +42 -2
  111. data/test/nitro/tc_controller.rb +9 -4
  112. data/test/nitro/tc_dispatcher.rb +4 -6
  113. data/test/nitro/tc_mail.rb +95 -0
  114. data/test/{root → public}/blog/list.xhtml +0 -0
  115. data/test/public/dummy_mailer/registration.xhtml +5 -0
  116. data/vendor/README +0 -1
  117. metadata +136 -181
  118. data/benchmark/og/bench.rb +0 -75
  119. data/benchmark/og/sqlite-no-prepare.1.txt +0 -13
  120. data/benchmark/og/sqlite-no-prepare.2.txt +0 -13
  121. data/benchmark/og/sqlite-prepare.1.txt +0 -13
  122. data/benchmark/og/sqlite-prepare.2.txt +0 -13
  123. data/bin/proto/README +0 -34
  124. data/bin/proto/conf/apache.conf +0 -1
  125. data/bin/proto/conf/app.conf.rb +0 -14
  126. data/bin/proto/conf/lhttpd.conf +0 -236
  127. data/bin/proto/ctl +0 -4
  128. data/bin/proto/lib/README +0 -5
  129. data/bin/proto/log/README +0 -3
  130. data/bin/proto/root/fcgi.rb +0 -6
  131. data/bin/proto/root/index.xhtml +0 -69
  132. data/bin/proto/root/style.css +0 -152
  133. data/bin/proto/root/style.xsl +0 -99
  134. data/doc/og_config.txt +0 -35
  135. data/doc/og_tutorial.txt +0 -595
  136. data/examples/og/README +0 -11
  137. data/examples/og/mock_example.rb +0 -50
  138. data/examples/og/mysql_to_psql.rb +0 -96
  139. data/examples/og/run.rb +0 -286
  140. data/examples/tiny/root/nitro.png +0 -0
  141. data/lib/glue.rb +0 -55
  142. data/lib/glue/array.rb +0 -61
  143. data/lib/glue/attribute.rb +0 -83
  144. data/lib/glue/cache.rb +0 -138
  145. data/lib/glue/flexob.rb +0 -12
  146. data/lib/glue/hash.rb +0 -122
  147. data/lib/glue/inflector.rb +0 -91
  148. data/lib/glue/logger.rb +0 -147
  149. data/lib/glue/misc.rb +0 -14
  150. data/lib/glue/mixins.rb +0 -36
  151. data/lib/glue/number.rb +0 -24
  152. data/lib/glue/object.rb +0 -32
  153. data/lib/glue/pool.rb +0 -60
  154. data/lib/glue/property.rb +0 -408
  155. data/lib/glue/string.rb +0 -162
  156. data/lib/glue/time.rb +0 -85
  157. data/lib/glue/validation.rb +0 -394
  158. data/lib/og.rb +0 -185
  159. data/lib/og/adapter.rb +0 -513
  160. data/lib/og/adapters/filesys.rb +0 -121
  161. data/lib/og/adapters/mysql.rb +0 -347
  162. data/lib/og/adapters/oracle.rb +0 -375
  163. data/lib/og/adapters/psql.rb +0 -273
  164. data/lib/og/adapters/sqlite.rb +0 -262
  165. data/lib/og/backend.rb +0 -297
  166. data/lib/og/connection.rb +0 -304
  167. data/lib/og/database.rb +0 -282
  168. data/lib/og/enchant.rb +0 -125
  169. data/lib/og/meta.rb +0 -373
  170. data/lib/og/mock.rb +0 -165
  171. data/lib/og/observer.rb +0 -53
  172. data/lib/og/typemacros.rb +0 -23
  173. data/lib/parts/README +0 -9
  174. data/test/glue/tc_attribute.rb +0 -22
  175. data/test/glue/tc_cache.rb +0 -45
  176. data/test/glue/tc_hash.rb +0 -38
  177. data/test/glue/tc_logger.rb +0 -39
  178. data/test/glue/tc_numbers.rb +0 -20
  179. data/test/glue/tc_property.rb +0 -89
  180. data/test/glue/tc_property_mixins.rb +0 -93
  181. data/test/glue/tc_property_type_checking.rb +0 -35
  182. data/test/glue/tc_strings.rb +0 -103
  183. data/test/glue/tc_validation.rb +0 -188
  184. data/test/og/tc_filesys.rb +0 -83
  185. data/test/og/tc_lifecycle.rb +0 -104
  186. data/test/og/tc_many_to_many.rb +0 -62
  187. data/test/og/tc_meta.rb +0 -55
  188. data/test/og/tc_observer.rb +0 -85
  189. data/test/og/tc_sqlite.rb +0 -87
  190. data/test/tc_og.rb +0 -355
  191. data/vendor/composite_sexp_processor.rb +0 -43
  192. data/vendor/parse_tree.rb +0 -745
  193. data/vendor/sexp_processor.rb +0 -453
@@ -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
@@ -55,6 +55,5 @@ $ tar xvfz nitro-x.x.x.tar.gz
55
55
 
56
56
  Put the libray dir in the Ruby path (Unix example):
57
57
 
58
- $ export RUBYOPT='-I path/to/my_dir/nitro/lib'
59
-
58
+ $ export RUBYOPT='-I path/to/nitro/lib'
60
59
 
data/README CHANGED
@@ -1,4 +1,4 @@
1
- = Nitro 0.12.0
1
+ = Nitro 0.13.0
2
2
 
3
3
  Nitro is an efficient, yet simple engine for developing professional Web
4
4
  Applications using the Ruby language. Nitro aims to provide a robust
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'].exclude('**/tc*og*.rb').exclude('test/og/**/*')
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/og_config.txt', 'doc/og_tutorial.txt', 'lib/**/*.rb')
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
- 'An efficient, multiparadigm and flexible platform for rapid ' +
94
- 'web application development. Implements a full development stack.'
47
+ 'Nitro provides everything you need to develop real-world, scalable ' +
48
+ 'web applications.'
95
49
 
96
- # s.add_dependency 'postgres-pr', '>= 0.3.0'
97
- # s.add_dependency 'postgres', '>= 0.7.1'
98
- # s.add_dependency 'ParseTree', '>= 1.3.3'
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.0'
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]*'].exclude('*.og').to_a
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://www.rubyforge.com/projects/nitro'
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
-
@@ -1,5 +1,5 @@
1
1
  # * George Moschovitis <gm@navel.gr>
2
2
  # (c) 2005 Navel, all rights reserved.
3
- # $Id$
3
+ # $Id: bench.rb 288 2005-03-10 12:47:03Z gmosx $
4
4
 
5
5
 
File without changes
@@ -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
@@ -0,0 +1,7 @@
1
+ = Frequently Asked Questions
2
+
3
+ === Who created Nitro ?
4
+
5
+ Nitro was conceived and implemented by George Moschovitis
6
+ (gm@navel.gr) with the help of numerous contributors. For
7
+ more information, please consult doc/AUTHORS.
@@ -1,7 +1,7 @@
1
1
  = Windows
2
2
 
3
3
  If you are running under windows, first run the
4
- tiny, og, wee_style, why_wiki and no_xsl_blog examples.
4
+ tiny, wee_style, why_wiki and no_xsl_blog examples.
5
5
  The blog example needs special libraries that are harder to
6
6
  setup under Windows.
7
7
 
@@ -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>