Pistos-ramaze 2009.04.08 → 2009.06.12
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/MANIFEST +37 -22
- data/{README.markdown → README.md} +5 -24
- data/Rakefile +33 -26
- data/benchmark/bench_templates/bench.rb +67 -0
- data/benchmark/bench_templates/view/large.erb +79 -0
- data/benchmark/bench_templates/view/large.haml +41 -0
- data/benchmark/bench_templates/view/large.xhtml +79 -0
- data/benchmark/bench_templates/view/small.erb +21 -0
- data/benchmark/bench_templates/view/small.haml +12 -0
- data/benchmark/bench_templates/view/small.xhtml +21 -0
- data/benchmark/run.rb +14 -21
- data/benchmark/suite/minimal.rb +3 -5
- data/benchmark/suite/no_informer.rb +0 -2
- data/benchmark/suite/no_sessions.rb +3 -4
- data/benchmark/suite/no_template.rb +1 -3
- data/benchmark/suite/simple.rb +1 -3
- data/benchmark/suite/template_erubis.rb +0 -2
- data/benchmark/suite/template_etanni.rb +8 -0
- data/benchmark/suite/template_ezamar.rb +1 -3
- data/benchmark/suite/template_haml.rb +0 -2
- data/benchmark/suite/template_liquid.rb +0 -2
- data/benchmark/suite/template_markaby.rb +0 -2
- data/benchmark/suite/template_nagoro.rb +1 -3
- data/benchmark/suite/template_redcloth.rb +0 -2
- data/benchmark/suite/template_tenjin.rb +0 -2
- data/bin/ramaze +11 -163
- data/doc/AUTHORS +15 -8
- data/doc/CHANGELOG +10094 -12262
- data/doc/meta/announcement.txt +93 -46
- data/doc/tutorial/todolist.html +22 -58
- data/doc/tutorial/todolist.txt +20 -39
- data/examples/app/auth/layout/{auth.nag → auth.xhtml} +0 -0
- data/examples/app/auth/view/{index.nag → index.xhtml} +0 -0
- data/examples/app/auth/view/{login.nag → login.xhtml} +0 -0
- data/examples/app/auth/view/{secret.nag → secret.xhtml} +0 -0
- data/examples/app/blog/app.rb +1 -1
- data/examples/app/blog/controller/comment.rb +1 -1
- data/examples/app/blog/controller/entry.rb +12 -3
- data/examples/app/blog/model/init.rb +5 -0
- data/examples/app/blog/model/tag.rb +2 -2
- data/examples/app/blog/view/entry/index.nag +3 -3
- data/examples/app/blog/view/feed.atom.nag +1 -1
- data/examples/app/blog/view/feed.rss.nag +1 -1
- data/examples/app/blog/view/index.nag +1 -1
- data/examples/app/blog/view/tag/index.nag +1 -1
- data/examples/app/chat/layout/{default.nag → default.xhtml} +0 -0
- data/examples/app/chat/view/{chat.nag → chat.xhtml} +0 -0
- data/examples/app/chat/view/{index.nag → index.xhtml} +0 -0
- data/examples/app/localization/locale/de.yaml +5 -0
- data/examples/app/localization/locale/en.yaml +5 -0
- data/examples/app/localization/locale/ja.yaml +5 -0
- data/examples/app/localization/start.rb +33 -20
- data/examples/app/wikore/spec/wikore.rb +4 -6
- data/examples/app/wikore/src/controller.rb +9 -11
- data/examples/app/wikore/src/model.rb +7 -10
- data/examples/app/wikore/start.rb +1 -1
- data/examples/app/wikore/{template → view}/index.xhtml +0 -0
- data/examples/helpers/cache.rb +6 -4
- data/examples/misc/css.rb +6 -12
- data/examples/misc/rapp.rb +28 -17
- data/lib/proto/app.rb +14 -0
- data/lib/proto/config.ru +8 -5
- data/lib/proto/controller/init.rb +3 -3
- data/lib/proto/spec/main.rb +9 -11
- data/lib/proto/start.rb +6 -10
- data/lib/ramaze.rb +8 -9
- data/lib/ramaze/app.rb +4 -3
- data/lib/ramaze/cache/localmemcache.rb +2 -2
- data/lib/ramaze/cache/memcache.rb +26 -1
- data/lib/ramaze/cache/sequel.rb +24 -9
- data/lib/ramaze/contrib/addressable_route.rb +56 -0
- data/lib/ramaze/contrib/email.rb +2 -0
- data/lib/ramaze/contrib/facebook/facebook.rb +4 -4
- data/lib/ramaze/contrib/sequel/create_join.rb +1 -0
- data/lib/ramaze/contrib/sequel/form_field.rb +4 -4
- data/lib/ramaze/contrib/sequel/image.rb +9 -11
- data/lib/ramaze/contrib/sequel/relation.rb +17 -3
- data/lib/ramaze/controller.rb +26 -18
- data/lib/ramaze/gestalt.rb +4 -1
- data/lib/ramaze/helper.rb +1 -0
- data/lib/ramaze/helper/auth.rb +0 -5
- data/lib/ramaze/helper/cache.rb +65 -25
- data/lib/ramaze/helper/form.rb +14 -2
- data/lib/ramaze/helper/formatting.rb +3 -1
- data/lib/ramaze/helper/gestalt.rb +32 -0
- data/lib/ramaze/helper/identity.rb +3 -3
- data/lib/ramaze/helper/layout.rb +97 -0
- data/lib/ramaze/helper/link.rb +6 -25
- data/lib/ramaze/helper/localize.rb +13 -3
- data/lib/ramaze/helper/paginate.rb +4 -2
- data/lib/ramaze/helper/ultraviolet.rb +2 -0
- data/lib/ramaze/helper/user.rb +3 -3
- data/lib/ramaze/log/rotatinginformer.rb +10 -10
- data/lib/ramaze/request.rb +3 -5
- data/lib/ramaze/setup.rb +22 -9
- data/lib/ramaze/spec.rb +8 -12
- data/lib/ramaze/spec/bacon.rb +34 -0
- data/lib/ramaze/spec/helper/template_examples.rb +15 -22
- data/lib/ramaze/tool/bin.rb +340 -0
- data/lib/ramaze/tool/project_creator.rb +1 -1
- data/lib/ramaze/version.rb +1 -1
- data/lib/ramaze/view.rb +6 -11
- data/lib/ramaze/view/erubis.rb +2 -2
- data/lib/ramaze/view/ezamar.rb +2 -2
- data/lib/ramaze/view/gestalt.rb +14 -0
- data/lib/ramaze/view/haml.rb +2 -1
- data/lib/ramaze/view/liquid.rb +45 -11
- data/lib/ramaze/view/maruku.rb +2 -1
- data/lib/ramaze/view/nagoro/render_partial.rb +9 -9
- data/lib/ramaze/view/sass.rb +1 -1
- data/lib/ramaze/view/tenjin.rb +7 -4
- data/lib/vendor/etag.rb +4 -2
- data/lib/vendor/route_exceptions.rb +9 -15
- data/ramaze.gemspec +56 -9
- data/spec/contrib/addressable_route.rb +30 -0
- data/spec/contrib/rest.rb +2 -2
- data/spec/examples/caching.rb +5 -7
- data/spec/examples/css.rb +3 -3
- data/spec/examples/element.rb +4 -3
- data/spec/examples/hello.rb +3 -3
- data/spec/examples/helpers/httpdigest.rb +44 -69
- data/spec/examples/linking.rb +3 -3
- data/spec/examples/simple.rb +3 -3
- data/spec/examples/templates/template_erubis.rb +8 -4
- data/spec/examples/templates/template_ezamar.rb +9 -4
- data/spec/examples/templates/template_haml.rb +8 -4
- data/spec/examples/templates/template_liquid.rb +8 -4
- data/spec/examples/templates/template_markaby.rb +9 -5
- data/spec/examples/templates/template_nagoro.rb +9 -5
- data/spec/examples/templates/template_redcloth.rb +8 -4
- data/spec/examples/templates/template_remarkably.rb +8 -4
- data/spec/examples/templates/template_tenjin.rb +8 -4
- data/spec/helper.rb +1 -2
- data/spec/ramaze/action/render.rb +4 -1
- data/spec/ramaze/app.rb +5 -2
- data/spec/ramaze/bin/ramaze.rb +96 -0
- data/spec/ramaze/cache/localmemcache.rb +1 -1
- data/spec/ramaze/cache/memcache.rb +7 -1
- data/spec/ramaze/cache/sequel.rb +1 -1
- data/spec/ramaze/controller/actionless_templates.rb +2 -2
- data/spec/ramaze/controller/lonely_mapping.rb +18 -0
- data/spec/ramaze/controller/mapping.rb +4 -15
- data/spec/ramaze/controller/provide_inheritance.rb +5 -2
- data/spec/ramaze/controller/resolve.rb +2 -2
- data/spec/ramaze/controller/subclass.rb +2 -2
- data/spec/ramaze/controller/template_resolving.rb +2 -2
- data/spec/ramaze/dispatcher/directory.rb +5 -2
- data/spec/ramaze/dispatcher/file.rb +28 -26
- data/spec/ramaze/error.rb +3 -3
- data/spec/ramaze/files.rb +5 -2
- data/spec/ramaze/gestalt.rb +26 -17
- data/spec/ramaze/helper/auth.rb +30 -41
- data/spec/ramaze/helper/bench.rb +6 -2
- data/spec/ramaze/helper/cache.rb +45 -5
- data/spec/ramaze/helper/flash.rb +11 -15
- data/spec/ramaze/helper/form.rb +6 -3
- data/spec/ramaze/helper/formatting.rb +4 -1
- data/spec/ramaze/helper/gestalt.rb +4 -1
- data/spec/ramaze/helper/gravatar.rb +4 -1
- data/spec/ramaze/helper/httpdigest.rb +51 -66
- data/spec/ramaze/helper/layout.rb +79 -0
- data/spec/ramaze/helper/layout/default.xhtml +5 -0
- data/spec/ramaze/helper/link.rb +33 -12
- data/spec/ramaze/helper/localize.rb +9 -4
- data/spec/ramaze/helper/maruku.rb +5 -2
- data/spec/ramaze/helper/pager.rb +2 -2
- data/spec/ramaze/helper/paginate.rb +5 -2
- data/spec/ramaze/helper/request_accessor.rb +5 -2
- data/spec/ramaze/helper/sequel_form.rb +7 -2
- data/spec/ramaze/helper/simple_captcha.rb +10 -14
- data/spec/ramaze/helper/stack.rb +32 -40
- data/spec/ramaze/helper/user.rb +19 -14
- data/spec/ramaze/helper/xhtml.rb +4 -1
- data/spec/ramaze/log/informer.rb +1 -1
- data/spec/ramaze/log/logging.rb +4 -1
- data/spec/ramaze/log/syslog.rb +6 -6
- data/spec/ramaze/params.rb +5 -6
- data/spec/ramaze/request.rb +16 -1
- data/spec/ramaze/session/memcache.rb +66 -0
- data/spec/ramaze/struct.rb +4 -1
- data/spec/ramaze/view.rb +2 -2
- data/spec/ramaze/view/erubis.rb +2 -2
- data/spec/ramaze/view/ezamar.rb +2 -2
- data/spec/ramaze/view/gestalt.rb +94 -0
- data/spec/ramaze/view/gestalt/external.ges +8 -0
- data/spec/ramaze/view/haml.rb +2 -2
- data/spec/ramaze/view/liquid.rb +2 -2
- data/spec/ramaze/view/nagoro.rb +2 -2
- data/spec/ramaze/view/redcloth.rb +2 -2
- data/spec/ramaze/view/remarkably.rb +2 -2
- data/spec/ramaze/view/sass.rb +2 -2
- data/spec/ramaze/view/tagz.rb +2 -2
- data/spec/ramaze/view/tenjin.rb +2 -2
- data/spec/snippets/array/put_within.rb +30 -25
- data/spec/snippets/binding/locals.rb +4 -1
- data/spec/snippets/numeric/filesize_format.rb +4 -1
- data/spec/snippets/numeric/time.rb +5 -2
- data/spec/snippets/object/__dir__.rb +4 -1
- data/spec/snippets/ordered_set.rb +4 -1
- data/spec/snippets/ramaze/acquire.rb +4 -1
- data/spec/snippets/ramaze/dictionary.rb +4 -1
- data/spec/snippets/ramaze/struct.rb +4 -1
- data/spec/snippets/string/camel_case.rb +4 -1
- data/spec/snippets/string/color.rb +4 -1
- data/spec/snippets/string/snake_case.rb +4 -1
- data/spec/snippets/string/unindent.rb +4 -1
- data/spec/snippets/thread/into.rb +4 -1
- data/tasks/bacon.rake +5 -3
- data/tasks/changelog.rake +3 -1
- data/tasks/{gem_installer.rake → gem_setup.rake} +45 -22
- data/tasks/release.rake +12 -27
- data/tasks/setup.rake +6 -0
- data/tasks/todo.rake +2 -4
- metadata +205 -31
- data/CHANGELOG +0 -16546
- data/benchmark/suite/template_builder.rb +0 -12
- data/doc/tutorial/todolist.mkd +0 -787
- data/examples/helpers/provide.rb +0 -23
- data/lib/proto/view/page.xhtml +0 -27
- data/lib/ramaze/snippets/divide.rb +0 -22
- data/lib/ramaze/snippets/kernel/constant.rb +0 -41
- data/lib/ramaze/snippets/object/acquire.rb +0 -37
- data/lib/ramaze/snippets/string/each.rb +0 -19
- data/spec/ramaze/helper/partial.rb +0 -40
- data/spec/snippets/kernel/constant.rb +0 -23
- data/tasks/install_dependencies.rake +0 -6
data/spec/contrib/rest.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require 'spec/helper'
|
1
|
+
require File.expand_path('../../../spec/helper', __FILE__)
|
2
2
|
require 'ramaze/contrib/rest'
|
3
3
|
|
4
4
|
class Posts < Ramaze::Controller
|
@@ -13,7 +13,7 @@ class Posts < Ramaze::Controller
|
|
13
13
|
end
|
14
14
|
|
15
15
|
describe 'Contrib REST rewrite' do
|
16
|
-
behaves_like :
|
16
|
+
behaves_like :rack_test
|
17
17
|
|
18
18
|
it('rewrites GET to show'){ get('/').body.should == 'Showing' }
|
19
19
|
it('rewrites POST to create'){ post('/').body.should == 'Creating' }
|
data/spec/examples/caching.rb
CHANGED
@@ -1,18 +1,16 @@
|
|
1
|
-
require 'spec/helper'
|
2
|
-
require 'examples/helpers/cache'
|
1
|
+
require File.expand_path('../../../spec/helper', __FILE__)
|
2
|
+
require File.expand_path('../../../examples/helpers/cache', __FILE__)
|
3
3
|
|
4
4
|
describe 'Caching' do
|
5
|
-
behaves_like :
|
5
|
+
behaves_like :rack_test
|
6
6
|
|
7
7
|
it '/' do
|
8
8
|
3.times do
|
9
|
-
lambda{ get('/') }.
|
10
|
-
should.not.change{ get('/').body }
|
9
|
+
lambda{ get('/') }.should.not.change{ get('/').body }
|
11
10
|
end
|
12
11
|
|
13
12
|
3.times do
|
14
|
-
lambda{ get('/invalidate') }.
|
15
|
-
should.change{ get('/').body }
|
13
|
+
lambda{ get('/invalidate') }.should.change{ get('/').body }
|
16
14
|
end
|
17
15
|
end
|
18
16
|
end
|
data/spec/examples/css.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
require 'spec/helper'
|
1
|
+
require File.expand_path('../../../spec/helper', __FILE__)
|
2
2
|
spec_require 'haml'
|
3
|
-
require 'examples/misc/css'
|
3
|
+
require File.expand_path('../../../examples/misc/css', __FILE__)
|
4
4
|
|
5
5
|
describe 'CSSController' do
|
6
|
-
behaves_like :
|
6
|
+
behaves_like :rack_test
|
7
7
|
|
8
8
|
def req(path) r = get(path); [r.content_type, r.body] end
|
9
9
|
|
data/spec/examples/element.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
require 'spec/helper'
|
2
|
-
|
1
|
+
require File.expand_path('../../../spec/helper', __FILE__)
|
2
|
+
spec_require 'nagoro'
|
3
|
+
require File.expand_path('../../../examples/basic/element', __FILE__)
|
3
4
|
|
4
5
|
describe 'Element' do
|
5
|
-
behaves_like :
|
6
|
+
behaves_like :rack_test
|
6
7
|
|
7
8
|
it '/' do
|
8
9
|
r = get('/').body
|
data/spec/examples/hello.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
require 'spec/helper'
|
2
|
-
require 'examples/basic/hello'
|
1
|
+
require File.expand_path('../../../spec/helper', __FILE__)
|
2
|
+
require File.expand_path('../../../examples/basic/hello', __FILE__)
|
3
3
|
|
4
4
|
describe 'Hello' do
|
5
|
-
behaves_like :
|
5
|
+
behaves_like :rack_test
|
6
6
|
|
7
7
|
it 'serves the index page' do
|
8
8
|
get('/').body.should == 'Hello, World!'
|
@@ -1,89 +1,64 @@
|
|
1
|
-
require 'spec/helper'
|
2
|
-
require 'examples/helpers/httpdigest'
|
1
|
+
require File.expand_path('../../../../spec/helper', __FILE__)
|
2
|
+
require File.expand_path('../../../../examples/helpers/httpdigest', __FILE__)
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
end
|
13
|
-
super
|
14
|
-
end
|
15
|
-
|
16
|
-
def method
|
17
|
-
@params['method']
|
18
|
-
end
|
19
|
-
|
20
|
-
def response(password)
|
21
|
-
Rack::Auth::Digest::MD5.new(nil).send(:digest, self, password)
|
22
|
-
end
|
23
|
-
end
|
4
|
+
# Not sure if we should change the behaviour of digest_authorize, it keeps
|
5
|
+
# challenging the authorization even after a logout, which will log us in right
|
6
|
+
# away again.
|
7
|
+
#
|
8
|
+
# IMHO, digest_authorize should only be valid for the following request.
|
9
|
+
#
|
10
|
+
# So for now, we have to reset the values of @digest_username and
|
11
|
+
# @digest_password before we make a request.
|
24
12
|
|
25
13
|
describe Ramaze::Helper do
|
26
|
-
behaves_like :
|
27
|
-
|
28
|
-
def auth_for(got, uri, username, password)
|
29
|
-
challenge = got['WWW-Authenticate'].split(' ', 2).last
|
30
|
-
params = Rack::Auth::Digest::Params.parse(challenge)
|
31
|
-
params.merge!('cnonce' => 'nonsensenonce', 'method' => 'GET',
|
32
|
-
'nc' => '00000001', 'uri' => uri, 'username' => username)
|
33
|
-
params['response'] = MockDigestRequest.new(params).response(password)
|
34
|
-
|
35
|
-
"Digest #{params}"
|
36
|
-
end
|
14
|
+
behaves_like :rack_test
|
37
15
|
|
38
16
|
it 'authorizes request for /eyes_only' do
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
17
|
+
digest_authorize nil, nil
|
18
|
+
get '/eyes_only'
|
19
|
+
last_response.status.should == 401
|
20
|
+
last_response.body.should == "Unauthorized"
|
43
21
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
end
|
22
|
+
digest_authorize 'foo', 'oof'
|
23
|
+
get '/eyes_only'
|
24
|
+
last_response.status.should == 200
|
25
|
+
last_response.body.should == "Shhhh don't tell anyone"
|
49
26
|
end
|
50
27
|
|
51
28
|
it 'authorizes request for /secret as admin' do
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
29
|
+
digest_authorize nil, nil
|
30
|
+
get '/secret'
|
31
|
+
last_response.status.should == 401
|
32
|
+
last_response.body.should == 'Unauthorized'
|
33
|
+
|
34
|
+
digest_authorize 'admin', 'secret'
|
35
|
+
get '/secret'
|
56
36
|
|
57
|
-
|
58
|
-
|
59
|
-
got.status.should == 200
|
60
|
-
got.body.should == "Hello <em>admin</em>, welcome to SECRET world."
|
61
|
-
end
|
37
|
+
last_response.status.should == 200
|
38
|
+
last_response.body.should == "Hello <em>admin</em>, welcome to SECRET world."
|
62
39
|
end
|
63
40
|
|
64
41
|
it 'authorizes request for /secret as root' do
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
42
|
+
digest_authorize nil, nil
|
43
|
+
get '/secret'
|
44
|
+
last_response.status.should == 401
|
45
|
+
last_response.body.should == 'Unauthorized'
|
69
46
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
end
|
47
|
+
digest_authorize 'root', 'password'
|
48
|
+
get '/secret'
|
49
|
+
last_response.status.should == 200
|
50
|
+
last_response.body.should == "Hello <em>root</em>, welcome to SECRET world."
|
75
51
|
end
|
76
52
|
|
77
53
|
it 'authorizes request for /guest' do
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
54
|
+
digest_authorize nil, nil
|
55
|
+
get '/guest'
|
56
|
+
last_response.status.should == 401
|
57
|
+
last_response.body.should == 'Unauthorized'
|
82
58
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
end
|
59
|
+
digest_authorize 'guest', 'access'
|
60
|
+
get '/guest'
|
61
|
+
last_response.status.should == 200
|
62
|
+
last_response.body.should == "Hello <em>guest</em>, welcome to GUEST world."
|
88
63
|
end
|
89
64
|
end
|
data/spec/examples/linking.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
require 'spec/helper'
|
2
|
-
require 'examples/basic/linking'
|
1
|
+
require File.expand_path('../../../spec/helper', __FILE__)
|
2
|
+
require File.expand_path('../../../examples/basic/linking', __FILE__)
|
3
3
|
|
4
4
|
describe 'Linking' do
|
5
|
-
behaves_like :
|
5
|
+
behaves_like :rack_test
|
6
6
|
|
7
7
|
it 'should provide a link to help' do
|
8
8
|
r = get('/').body
|
data/spec/examples/simple.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
require 'spec/helper'
|
2
|
-
require 'examples/basic/simple'
|
1
|
+
require File.expand_path('../../../spec/helper', __FILE__)
|
2
|
+
require File.expand_path('../../../examples/basic/simple', __FILE__)
|
3
3
|
|
4
4
|
describe 'Simple' do
|
5
|
-
behaves_like :
|
5
|
+
behaves_like :rack_test
|
6
6
|
|
7
7
|
def check(url)
|
8
8
|
response = get(url)
|
@@ -1,9 +1,13 @@
|
|
1
|
-
|
1
|
+
# Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com
|
2
|
+
# All files in this distribution are subject to the terms of the Ruby license.
|
3
|
+
|
4
|
+
require File.expand_path('../../../../spec/helper', __FILE__)
|
2
5
|
require 'ramaze/spec/helper/template_examples'
|
3
6
|
|
4
7
|
spec_require 'erubis'
|
5
|
-
require 'examples/templates/template_erubis'
|
8
|
+
require File.expand_path('../../../../examples/templates/template_erubis', __FILE__)
|
6
9
|
|
7
|
-
describe 'Template Erubis' do
|
8
|
-
|
10
|
+
describe 'Template Erubis' do
|
11
|
+
behaves_like :template_spec
|
12
|
+
spec_template 'Erubis'
|
9
13
|
end
|
@@ -1,8 +1,13 @@
|
|
1
|
-
|
1
|
+
# Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com
|
2
|
+
# All files in this distribution are subject to the terms of the Ruby license.
|
3
|
+
|
4
|
+
require File.expand_path('../../../../spec/helper', __FILE__)
|
2
5
|
require 'ramaze/spec/helper/template_examples'
|
3
6
|
|
4
|
-
|
7
|
+
spec_require 'ezamar'
|
8
|
+
require File.expand_path('../../../../examples/templates/template_ezamar', __FILE__)
|
5
9
|
|
6
|
-
describe 'Template Ezamar' do
|
7
|
-
|
10
|
+
describe 'Template Ezamar' do
|
11
|
+
behaves_like :template_spec
|
12
|
+
spec_template 'Ezamar'
|
8
13
|
end
|
@@ -1,9 +1,13 @@
|
|
1
|
-
|
1
|
+
# Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com
|
2
|
+
# All files in this distribution are subject to the terms of the Ruby license.
|
3
|
+
|
4
|
+
require File.expand_path('../../../../spec/helper', __FILE__)
|
2
5
|
require 'ramaze/spec/helper/template_examples'
|
3
6
|
|
4
7
|
spec_require 'haml'
|
5
|
-
require 'examples/templates/template_haml'
|
8
|
+
require File.expand_path('../../../../examples/templates/template_haml', __FILE__)
|
6
9
|
|
7
|
-
describe 'Template Haml' do
|
8
|
-
|
10
|
+
describe 'Template Haml' do
|
11
|
+
behaves_like :template_spec
|
12
|
+
spec_template 'Haml'
|
9
13
|
end
|
@@ -1,9 +1,13 @@
|
|
1
|
-
|
1
|
+
# Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com
|
2
|
+
# All files in this distribution are subject to the terms of the Ruby license.
|
3
|
+
|
4
|
+
require File.expand_path('../../../../spec/helper', __FILE__)
|
2
5
|
require 'ramaze/spec/helper/template_examples'
|
3
6
|
|
4
7
|
spec_require 'liquid'
|
5
|
-
require 'examples/templates/template_liquid'
|
8
|
+
require File.expand_path('../../../../examples/templates/template_liquid', __FILE__)
|
6
9
|
|
7
|
-
describe 'Template Liquid' do
|
8
|
-
|
10
|
+
describe 'Template Liquid' do
|
11
|
+
behaves_like :template_spec
|
12
|
+
spec_template 'Liquid'
|
9
13
|
end
|
@@ -1,10 +1,14 @@
|
|
1
|
-
|
1
|
+
# Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com
|
2
|
+
# All files in this distribution are subject to the terms of the Ruby license.
|
3
|
+
|
4
|
+
require File.expand_path('../../../../spec/helper', __FILE__)
|
2
5
|
require 'ramaze/spec/helper/template_examples'
|
3
6
|
|
4
|
-
#spec_require 'markaby'
|
5
|
-
#require 'examples/templates/
|
7
|
+
# spec_require 'markaby'
|
8
|
+
# require File.expand_path('../../../../examples/templates/template_erubis', __FILE__)
|
6
9
|
|
7
|
-
describe 'Template Markaby' do
|
8
|
-
|
10
|
+
describe 'Template Markaby' do
|
11
|
+
# behaves_like :template_spec
|
12
|
+
# spec_template 'Markaby'
|
9
13
|
it("isn't yet implemented"){ should.flunk('needed Ramaze::View::Markaby') }
|
10
14
|
end
|
@@ -1,9 +1,13 @@
|
|
1
|
-
|
1
|
+
# Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com
|
2
|
+
# All files in this distribution are subject to the terms of the Ruby license.
|
3
|
+
|
4
|
+
require File.expand_path('../../../../spec/helper', __FILE__)
|
2
5
|
require 'ramaze/spec/helper/template_examples'
|
3
6
|
|
4
|
-
|
7
|
+
spec_require 'nagoro'
|
8
|
+
require File.expand_path('../../../../examples/templates/template_nagoro', __FILE__)
|
5
9
|
|
6
|
-
describe 'Template Nagoro' do
|
7
|
-
|
10
|
+
describe 'Template Nagoro' do
|
11
|
+
behaves_like :template_spec
|
12
|
+
spec_template 'Nagoro'
|
8
13
|
end
|
9
|
-
|
@@ -1,9 +1,13 @@
|
|
1
|
-
|
1
|
+
# Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com
|
2
|
+
# All files in this distribution are subject to the terms of the Ruby license.
|
3
|
+
|
4
|
+
require File.expand_path('../../../../spec/helper', __FILE__)
|
2
5
|
require 'ramaze/spec/helper/template_examples'
|
3
6
|
|
4
7
|
spec_require 'redcloth'
|
5
|
-
|
8
|
+
require File.expand_path('../../../../examples/templates/template_redcloth', __FILE__)
|
6
9
|
|
7
|
-
describe 'Template RedCloth' do
|
8
|
-
|
10
|
+
describe 'Template RedCloth' do
|
11
|
+
behaves_like :template_spec
|
12
|
+
spec_template 'RedCloth'
|
9
13
|
end
|
@@ -1,9 +1,13 @@
|
|
1
|
-
|
1
|
+
# Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com
|
2
|
+
# All files in this distribution are subject to the terms of the Ruby license.
|
3
|
+
|
4
|
+
require File.expand_path('../../../../spec/helper', __FILE__)
|
2
5
|
require 'ramaze/spec/helper/template_examples'
|
3
6
|
|
4
7
|
spec_require 'remarkably/engines/html'
|
5
|
-
require 'examples/templates/template_remarkably'
|
8
|
+
require File.expand_path('../../../../examples/templates/template_remarkably', __FILE__)
|
6
9
|
|
7
|
-
describe 'Template Remarkably' do
|
8
|
-
|
10
|
+
describe 'Template Remarkably' do
|
11
|
+
behaves_like :template_spec
|
12
|
+
spec_template 'Remarkably'
|
9
13
|
end
|
@@ -1,9 +1,13 @@
|
|
1
|
-
|
1
|
+
# Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com
|
2
|
+
# All files in this distribution are subject to the terms of the Ruby license.
|
3
|
+
|
4
|
+
require File.expand_path('../../../../spec/helper', __FILE__)
|
2
5
|
require 'ramaze/spec/helper/template_examples'
|
3
6
|
|
4
7
|
spec_require 'tenjin'
|
5
|
-
require 'examples/templates/template_tenjin'
|
8
|
+
require File.expand_path('../../../../examples/templates/template_tenjin', __FILE__)
|
6
9
|
|
7
|
-
describe 'Template Tenjin' do
|
8
|
-
|
10
|
+
describe 'Template Tenjin' do
|
11
|
+
behaves_like :template_spec
|
12
|
+
spec_template 'Tenjin'
|
9
13
|
end
|
data/spec/helper.rb
CHANGED
@@ -4,7 +4,6 @@ if caller_line = caller.grep(%r!spec/ramaze/!).first
|
|
4
4
|
$0 = caller_file
|
5
5
|
end
|
6
6
|
|
7
|
-
require File.expand_path(
|
8
|
-
require 'ramaze/spec'
|
7
|
+
require File.expand_path('../../lib/ramaze/spec/bacon', __FILE__)
|
9
8
|
|
10
9
|
Ramaze.options.roots = [caller_root] if caller_root
|
@@ -1,4 +1,7 @@
|
|
1
|
-
|
1
|
+
# Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com
|
2
|
+
# All files in this distribution are subject to the terms of the Ruby license.
|
3
|
+
|
4
|
+
require File.expand_path('../../../../spec/helper', __FILE__)
|
2
5
|
|
3
6
|
class SpecAction < Ramaze::Controller
|
4
7
|
map '/'
|
data/spec/ramaze/app.rb
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
|
1
|
+
# Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com
|
2
|
+
# All files in this distribution are subject to the terms of the Ruby license.
|
3
|
+
|
4
|
+
require File.expand_path('../../../spec/helper', __FILE__)
|
2
5
|
|
3
6
|
class SpecAppMain < Ramaze::Controller
|
4
7
|
map '/', :core
|
@@ -36,7 +39,7 @@ Ramaze::App[:core].location = '/'
|
|
36
39
|
Ramaze::App[:other].location = '/other'
|
37
40
|
|
38
41
|
describe Ramaze::App do
|
39
|
-
behaves_like :
|
42
|
+
behaves_like :rack_test
|
40
43
|
|
41
44
|
it 'handles call with rack env' do
|
42
45
|
get('/').body.should == 'core main'
|