ramaze 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. data/Rakefile +42 -0
  2. data/doc/allison/LICENSE +184 -0
  3. data/doc/allison/README +37 -0
  4. data/doc/allison/allison.css +300 -0
  5. data/doc/allison/allison.gif +0 -0
  6. data/doc/allison/allison.js +307 -0
  7. data/doc/allison/allison.rb +287 -0
  8. data/doc/allison/cache/BODY +588 -0
  9. data/doc/allison/cache/CLASS_INDEX +4 -0
  10. data/doc/allison/cache/CLASS_PAGE +1 -0
  11. data/doc/allison/cache/FILE_INDEX +4 -0
  12. data/doc/allison/cache/FILE_PAGE +1 -0
  13. data/doc/allison/cache/FONTS +1 -0
  14. data/doc/allison/cache/FR_INDEX_BODY +1 -0
  15. data/doc/allison/cache/IMGPATH +1 -0
  16. data/doc/allison/cache/INDEX +1 -0
  17. data/doc/allison/cache/JAVASCRIPT +307 -0
  18. data/doc/allison/cache/METHOD_INDEX +4 -0
  19. data/doc/allison/cache/METHOD_LIST +1 -0
  20. data/doc/allison/cache/SRC_PAGE +1 -0
  21. data/doc/allison/cache/STYLE +322 -0
  22. data/doc/allison/cache/URL +1 -0
  23. data/doc/readme_chunks/principles.txt +33 -18
  24. data/doc/tutorial/todolist.html +599 -0
  25. data/doc/tutorial/todolist.txt +230 -230
  26. data/examples/identity.rb +21 -0
  27. data/examples/nitro_form.rb +22 -0
  28. data/lib/ramaze/controller.rb +1 -1
  29. data/lib/ramaze/dispatcher.rb +10 -4
  30. data/lib/ramaze/helper/{openid.rb → identity.rb} +15 -6
  31. data/lib/ramaze/helper/nitroform.rb +10 -0
  32. data/lib/ramaze/helper/stack.rb +1 -1
  33. data/lib/ramaze/inform.rb +18 -8
  34. data/lib/ramaze/snippets/kernel/aquire.rb +3 -3
  35. data/lib/ramaze/snippets/object/traits.rb +1 -1
  36. data/lib/ramaze/snippets/ramaze/caller_info.rb +17 -1
  37. data/lib/ramaze/snippets/ramaze/caller_lines.rb +1 -1
  38. data/lib/ramaze/store/yaml.rb +10 -1
  39. data/lib/ramaze/template/ezamar.rb +10 -5
  40. data/lib/ramaze/trinity/request.rb +12 -2
  41. data/lib/ramaze/version.rb +1 -1
  42. data/lib/ramaze.rb +5 -3
  43. data/spec/public/error404.xhtml +1 -0
  44. data/spec/spec_all.rb +21 -19
  45. data/spec/spec_helper.rb +1 -1
  46. data/spec/tc_error.rb +18 -4
  47. data/spec/tc_helper_cache.rb +1 -1
  48. data/spec/tc_helper_flash.rb +1 -2
  49. metadata +32 -4
data/spec/spec_helper.rb CHANGED
@@ -28,7 +28,7 @@ module Spec::Runner::ContextEval::ModuleMethods
28
28
  def ramaze_start hash = {}
29
29
  options = {
30
30
  :mode => :debug,
31
- :adapter => :mongrel,
31
+ :adapter => :webrick,
32
32
  :run_loose => true,
33
33
  :error_page => false,
34
34
  :port => 7007,
data/spec/tc_error.rb CHANGED
@@ -5,6 +5,8 @@ require 'spec/spec_helper'
5
5
  require 'open-uri'
6
6
 
7
7
  class TCErrorController < Ramaze::Controller
8
+ trait :public => 'spec/public'
9
+
8
10
  def index
9
11
  self.class.name
10
12
  end
@@ -15,15 +17,27 @@ context "Error" do
15
17
  ramaze :mapping => {'/' => TCErrorController }, :error_page => true
16
18
 
17
19
  specify "your illegal stuff" do
18
- lambda{ get('/def/illegal') }.should_raise RuntimeError, /Net::HTTPNotFound/
20
+ Ramaze::Dispatcher.trait[:handle_error] = { Exception => '/error', }
21
+
22
+ lambda{ get('/illegal') }.should_raise RuntimeError
19
23
  end
20
24
  end
21
25
 
22
26
  context "no controller" do
23
- Ramaze::Global.mapping = {}
24
-
25
27
  specify "your illegal stuff" do
26
- lambda{ get('/def/illegal') }.should_raise RuntimeError, /Net::HTTPNotFound/
28
+ Ramaze::Global.mapping = {}
29
+ Ramaze::Dispatcher.trait[:handle_error] = { Exception => '/error', }
30
+
31
+ lambda{ get('/illegal') }.should_raise RuntimeError
32
+ end
33
+ end
34
+
35
+ context "only error page (custom)" do
36
+ specify "custom static page" do
37
+ Ramaze::Global.mapping = {'/' => TCErrorController }
38
+ Ramaze::Dispatcher.trait[:handle_error] = { Exception => '/error404', }
39
+
40
+ get('/foo').should == '404 - not found'
27
41
  end
28
42
  end
29
43
  end
@@ -36,7 +36,7 @@ class TCCacheHelperController < Ramaze::Controller
36
36
  end
37
37
 
38
38
  context "CacheHelper" do
39
- ramaze(:adapter => :mongrel, :mapping => {'/' => TCCacheHelperController})
39
+ ramaze(:mapping => {'/' => TCCacheHelperController})
40
40
 
41
41
  specify "testrun" do
42
42
  get('/').should == 'TCCacheHelperController'
@@ -55,8 +55,7 @@ class TCFlashHelperThirdController < Ramaze::Controller
55
55
  end
56
56
 
57
57
  context "FlashHelper" do
58
- ramaze :adapter => :mongrel,
59
- :mapping => {
58
+ ramaze :mapping => {
60
59
  '/' => TCFlashHelperFirstController,
61
60
  '/second' => TCFlashHelperSecondController,
62
61
  '/third' => TCFlashHelperThirdController
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: ramaze
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.8
7
- date: 2007-03-20 00:00:00 +09:00
6
+ version: 0.0.9
7
+ date: 2007-04-02 00:00:00 +09:00
8
8
  summary: Ramaze tries to be a very simple Webframework without the voodoo
9
9
  require_paths:
10
10
  - lib
@@ -35,7 +35,7 @@ post_install_message: |-
35
35
  ramaze --create yourproject
36
36
 
37
37
  * Browse and try the Examples in
38
- /usr/lib/ruby/gems/1.8/gems/ramaze-0.0.8/examples
38
+ /usr/lib/ruby/gems/1.8/gems/ramaze-0.0.9/examples
39
39
 
40
40
  ============================================================
41
41
  authors:
@@ -62,6 +62,7 @@ files:
62
62
  - examples/blog/main.rb
63
63
  - examples/blog/public
64
64
  - examples/blog/public/screen.css
65
+ - examples/nitro_form.rb
65
66
  - examples/caching.rb
66
67
  - examples/todolist
67
68
  - examples/todolist/src
@@ -91,6 +92,7 @@ files:
91
92
  - examples/todolist/public/ramaze.png
92
93
  - examples/todolist/public/error.xhtml
93
94
  - examples/todolist/public/404.jpg
95
+ - examples/identity.rb
94
96
  - examples/element.rb
95
97
  - examples/simple.rb
96
98
  - examples/whywiki
@@ -128,7 +130,31 @@ files:
128
130
  - doc/readme_chunks/getting_help.txt
129
131
  - doc/COPYING.ja
130
132
  - doc/tutorial
133
+ - doc/tutorial/todolist.html
131
134
  - doc/tutorial/todolist.txt
135
+ - doc/allison
136
+ - doc/allison/LICENSE
137
+ - doc/allison/cache
138
+ - doc/allison/cache/URL
139
+ - doc/allison/cache/BODY
140
+ - doc/allison/cache/SRC_PAGE
141
+ - doc/allison/cache/CLASS_PAGE
142
+ - doc/allison/cache/FONTS
143
+ - doc/allison/cache/INDEX
144
+ - doc/allison/cache/STYLE
145
+ - doc/allison/cache/FILE_PAGE
146
+ - doc/allison/cache/METHOD_INDEX
147
+ - doc/allison/cache/FR_INDEX_BODY
148
+ - doc/allison/cache/JAVASCRIPT
149
+ - doc/allison/cache/IMGPATH
150
+ - doc/allison/cache/FILE_INDEX
151
+ - doc/allison/cache/METHOD_LIST
152
+ - doc/allison/cache/CLASS_INDEX
153
+ - doc/allison/README
154
+ - doc/allison/allison.js
155
+ - doc/allison/allison.rb
156
+ - doc/allison/allison.css
157
+ - doc/allison/allison.gif
132
158
  - doc/INSTALL
133
159
  - doc/COPYING
134
160
  - doc/ProjectInfo
@@ -192,6 +218,7 @@ files:
192
218
  - spec/public/favicon.ico
193
219
  - spec/public/ramaze.png
194
220
  - spec/public/test_download.css
221
+ - spec/public/error404.xhtml
195
222
  - spec/tc_helper_aspect.rb
196
223
  - spec/spec_helper_requester.rb
197
224
  - spec/tc_template_ezamar.rb
@@ -265,11 +292,12 @@ files:
265
292
  - lib/ramaze/helper/feed.rb
266
293
  - lib/ramaze/helper/redirect.rb
267
294
  - lib/ramaze/helper/form.rb
268
- - lib/ramaze/helper/openid.rb
295
+ - lib/ramaze/helper/identity.rb
269
296
  - lib/ramaze/helper/flash.rb
270
297
  - lib/ramaze/helper/stack.rb
271
298
  - lib/ramaze/helper/auth.rb
272
299
  - lib/ramaze/helper/aspect.rb
300
+ - lib/ramaze/helper/nitroform.rb
273
301
  - lib/ramaze/adapter.rb
274
302
  - lib/ramaze/trinity
275
303
  - lib/ramaze/trinity/response.rb