ramaze 2009.06.12 → 2009.07
Sign up to get free protection for your applications and to get access to all the features.
- data/MANIFEST +10 -0
- data/README.md +4 -9
- data/Rakefile +30 -21
- data/doc/AUTHORS +1 -1
- data/doc/CHANGELOG +144 -0
- data/doc/meta/announcement.txt +47 -76
- data/examples/misc/css.rb +6 -12
- data/lib/proto/app.rb +4 -5
- data/lib/proto/controller/init.rb +1 -1
- data/lib/proto/spec/main.rb +3 -4
- data/lib/ramaze.rb +0 -2
- data/lib/ramaze/app.rb +4 -3
- data/lib/ramaze/cache.rb +1 -0
- data/lib/ramaze/cache/lru.rb +42 -0
- data/lib/ramaze/contrib/addressable_route.rb +10 -9
- data/lib/ramaze/controller.rb +1 -3
- data/lib/ramaze/helper/blue_form.rb +214 -0
- data/lib/ramaze/helper/cache.rb +44 -9
- data/lib/ramaze/helper/formatting.rb +5 -2
- data/lib/ramaze/helper/layout.rb +2 -2
- data/lib/ramaze/helper/paginate.rb +28 -33
- data/lib/ramaze/request.rb +1 -1
- data/lib/ramaze/snippets/ramaze/lru_hash.rb +248 -0
- data/lib/ramaze/spec/bacon.rb +5 -0
- data/lib/ramaze/spec/helper/template_examples.rb +4 -1
- data/lib/ramaze/version.rb +1 -1
- data/lib/ramaze/view.rb +4 -3
- data/lib/ramaze/view/less.rb +12 -0
- data/ramaze.gemspec +27 -24
- data/spec/contrib/addressable_route.rb +3 -5
- data/spec/contrib/rest.rb +1 -1
- data/spec/examples/caching.rb +2 -2
- data/spec/examples/css.rb +2 -2
- data/spec/examples/element.rb +2 -2
- data/spec/examples/hello.rb +2 -2
- data/spec/examples/helpers/httpdigest.rb +2 -2
- data/spec/examples/linking.rb +2 -2
- data/spec/examples/simple.rb +2 -2
- data/spec/examples/templates/template_erubis.rb +5 -2
- data/spec/examples/templates/template_ezamar.rb +5 -2
- data/spec/examples/templates/template_haml.rb +5 -2
- data/spec/examples/templates/template_liquid.rb +5 -2
- data/spec/examples/templates/template_markaby.rb +5 -2
- data/spec/examples/templates/template_nagoro.rb +5 -2
- data/spec/examples/templates/template_redcloth.rb +5 -2
- data/spec/examples/templates/template_remarkably.rb +5 -2
- data/spec/examples/templates/template_tenjin.rb +5 -2
- data/spec/ramaze/action/render.rb +4 -1
- data/spec/ramaze/app.rb +4 -1
- data/spec/ramaze/app/location.rb +43 -0
- data/spec/ramaze/bin/ramaze.rb +7 -2
- data/spec/ramaze/cache/localmemcache.rb +1 -1
- data/spec/ramaze/cache/lru.rb +48 -0
- data/spec/ramaze/cache/memcache.rb +1 -1
- data/spec/ramaze/cache/sequel.rb +1 -1
- data/spec/ramaze/controller/actionless_templates.rb +1 -1
- data/spec/ramaze/controller/lonely_mapping.rb +3 -1
- data/spec/ramaze/controller/mapping.rb +4 -1
- data/spec/ramaze/controller/provide_inheritance.rb +4 -1
- data/spec/ramaze/controller/resolve.rb +1 -1
- data/spec/ramaze/controller/subclass.rb +1 -1
- data/spec/ramaze/controller/template_resolving.rb +1 -1
- data/spec/ramaze/dispatcher/directory.rb +4 -1
- data/spec/ramaze/dispatcher/file.rb +8 -8
- data/spec/ramaze/error.rb +1 -1
- data/spec/ramaze/files.rb +4 -1
- data/spec/ramaze/gestalt.rb +4 -1
- data/spec/ramaze/helper/auth.rb +1 -1
- data/spec/ramaze/helper/bench.rb +4 -1
- data/spec/ramaze/helper/blue_form.rb +433 -0
- data/spec/ramaze/helper/cache.rb +2 -2
- data/spec/ramaze/helper/flash.rb +1 -1
- data/spec/ramaze/helper/form.rb +4 -1
- 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 +4 -1
- data/spec/ramaze/helper/layout.rb +1 -1
- data/spec/ramaze/helper/link.rb +1 -1
- data/spec/ramaze/helper/localize.rb +4 -1
- data/spec/ramaze/helper/maruku.rb +4 -1
- data/spec/ramaze/helper/pager.rb +1 -1
- data/spec/ramaze/helper/paginate.rb +4 -1
- data/spec/ramaze/helper/request_accessor.rb +4 -1
- data/spec/ramaze/helper/sequel_form.rb +4 -1
- data/spec/ramaze/helper/simple_captcha.rb +1 -1
- data/spec/ramaze/helper/stack.rb +1 -1
- data/spec/ramaze/helper/user.rb +4 -1
- 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 +1 -1
- data/spec/ramaze/request.rb +4 -1
- data/spec/ramaze/session/memcache.rb +1 -1
- data/spec/ramaze/struct.rb +4 -1
- data/spec/ramaze/view.rb +1 -1
- data/spec/ramaze/view/erubis.rb +1 -1
- data/spec/ramaze/view/ezamar.rb +1 -1
- data/spec/ramaze/view/gestalt.rb +2 -2
- data/spec/ramaze/view/haml.rb +1 -1
- data/spec/ramaze/view/less.rb +60 -0
- data/spec/ramaze/view/less/file.css.less +8 -0
- data/spec/ramaze/view/liquid.rb +1 -1
- data/spec/ramaze/view/nagoro.rb +1 -1
- data/spec/ramaze/view/redcloth.rb +1 -1
- data/spec/ramaze/view/remarkably.rb +1 -1
- data/spec/ramaze/view/sass.rb +1 -1
- data/spec/ramaze/view/tagz.rb +1 -1
- data/spec/ramaze/view/tenjin.rb +1 -1
- 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/lru_hash.rb +88 -0
- 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 +8 -2
- data/tasks/gem_setup.rake +21 -8
- data/tasks/setup.rake +8 -2
- metadata +29 -9
@@ -1,4 +1,4 @@
|
|
1
|
-
require 'spec/helper'
|
1
|
+
require File.expand_path('../../../spec/helper', __FILE__)
|
2
2
|
require 'ramaze/contrib/addressable_route'
|
3
3
|
|
4
4
|
class SpecAddressableRoute < Ramaze::Controller
|
@@ -12,11 +12,9 @@ end
|
|
12
12
|
describe 'addressable routing' do
|
13
13
|
behaves_like :rack_test
|
14
14
|
|
15
|
-
RAR = Ramaze::AddressableRoute
|
16
|
-
RAR.map('/customer/{customer_id}/order/{order_id}', '/order/show')
|
17
|
-
|
18
15
|
Ramaze.middleware! :spec do |m|
|
19
|
-
m.use
|
16
|
+
m.use(Ramaze::AddressableRoute,
|
17
|
+
'/customer/{customer_id}/order/{order_id}' => '/order/show')
|
20
18
|
m.run Ramaze::AppMap
|
21
19
|
end
|
22
20
|
|
data/spec/contrib/rest.rb
CHANGED
data/spec/examples/caching.rb
CHANGED
data/spec/examples/css.rb
CHANGED
data/spec/examples/element.rb
CHANGED
data/spec/examples/hello.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
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
4
|
# Not sure if we should change the behaviour of digest_authorize, it keeps
|
5
5
|
# challenging the authorization even after a logout, which will log us in right
|
data/spec/examples/linking.rb
CHANGED
data/spec/examples/simple.rb
CHANGED
@@ -1,8 +1,11 @@
|
|
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
10
|
describe 'Template Erubis' do
|
8
11
|
behaves_like :template_spec
|
@@ -1,8 +1,11 @@
|
|
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'
|
5
|
-
require 'examples/templates/template_ezamar'
|
8
|
+
require File.expand_path('../../../../examples/templates/template_ezamar', __FILE__)
|
6
9
|
|
7
10
|
describe 'Template Ezamar' do
|
8
11
|
behaves_like :template_spec
|
@@ -1,8 +1,11 @@
|
|
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
10
|
describe 'Template Haml' do
|
8
11
|
behaves_like :template_spec
|
@@ -1,8 +1,11 @@
|
|
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
10
|
describe 'Template Liquid' do
|
8
11
|
behaves_like :template_spec
|
@@ -1,8 +1,11 @@
|
|
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 'markaby'
|
5
|
-
# require 'examples/templates/
|
8
|
+
# require File.expand_path('../../../../examples/templates/template_erubis', __FILE__)
|
6
9
|
|
7
10
|
describe 'Template Markaby' do
|
8
11
|
# behaves_like :template_spec
|
@@ -1,8 +1,11 @@
|
|
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'
|
5
|
-
require 'examples/templates/template_nagoro'
|
8
|
+
require File.expand_path('../../../../examples/templates/template_nagoro', __FILE__)
|
6
9
|
|
7
10
|
describe 'Template Nagoro' do
|
8
11
|
behaves_like :template_spec
|
@@ -1,8 +1,11 @@
|
|
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
10
|
describe 'Template RedCloth' do
|
8
11
|
behaves_like :template_spec
|
@@ -1,8 +1,11 @@
|
|
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
10
|
describe 'Template Remarkably' do
|
8
11
|
behaves_like :template_spec
|
@@ -1,8 +1,11 @@
|
|
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
10
|
describe 'Template Tenjin' do
|
8
11
|
behaves_like :template_spec
|
@@ -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
|
@@ -0,0 +1,43 @@
|
|
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__)
|
5
|
+
|
6
|
+
module SpecBlog
|
7
|
+
class Controller < Ramaze::Controller
|
8
|
+
map nil, :blog
|
9
|
+
app.location = '/'
|
10
|
+
end
|
11
|
+
|
12
|
+
class Posts < Controller
|
13
|
+
map '/posts'
|
14
|
+
|
15
|
+
def index
|
16
|
+
'The Blog Posts'
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
module SpecWiki
|
22
|
+
class Controller < Ramaze::Controller
|
23
|
+
map nil, :wiki
|
24
|
+
app.location = '/wiki'
|
25
|
+
end
|
26
|
+
|
27
|
+
class Pages < Controller
|
28
|
+
map '/pages'
|
29
|
+
|
30
|
+
def index
|
31
|
+
'The Wiki Page'
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
describe Ramaze::App do
|
37
|
+
behaves_like :rack_test
|
38
|
+
|
39
|
+
it "Doesn't set location for app automatically" do
|
40
|
+
get('/wiki/pages').body.should == 'The Wiki Page'
|
41
|
+
get('/posts').body.should == 'The Blog Posts'
|
42
|
+
end
|
43
|
+
end
|
data/spec/ramaze/bin/ramaze.rb
CHANGED
@@ -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/tool/bin"
|
6
|
+
|
3
7
|
require "pathname"
|
8
|
+
|
4
9
|
module Ramaze
|
5
|
-
BINPATH = Pathname
|
10
|
+
BINPATH = Pathname(Ramaze::ROOT).join("../bin/ramaze").expand_path
|
6
11
|
end
|
7
12
|
|
8
13
|
USAGE = <<TXT
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com
|
2
2
|
# All files in this distribution are subject to the terms of the Ruby license.
|
3
3
|
|
4
|
-
require 'spec/helper'
|
4
|
+
require File.expand_path('../../../../spec/helper', __FILE__)
|
5
5
|
spec_require 'localmemcache'
|
6
6
|
|
7
7
|
describe Ramaze::Cache::LocalMemCache do
|
@@ -0,0 +1,48 @@
|
|
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__)
|
5
|
+
|
6
|
+
describe Ramaze::Cache::LRU do
|
7
|
+
Ramaze.options.cache.names = [:one, :two]
|
8
|
+
Ramaze.options.cache.default = Ramaze::Cache::LRU
|
9
|
+
Ramaze.setup_dependencies
|
10
|
+
|
11
|
+
cache = Ramaze::Cache.one
|
12
|
+
hello = 'Hello, World!'
|
13
|
+
|
14
|
+
should 'store without ttl' do
|
15
|
+
cache.store(:hello, hello).should == hello
|
16
|
+
end
|
17
|
+
|
18
|
+
should 'fetch' do
|
19
|
+
cache.fetch(:hello).should == hello
|
20
|
+
end
|
21
|
+
|
22
|
+
should 'delete' do
|
23
|
+
cache.delete(:hello)
|
24
|
+
cache.fetch(:hello).should == nil
|
25
|
+
end
|
26
|
+
|
27
|
+
should 'delete two key/value pairs at once' do
|
28
|
+
cache.store(:hello, hello).should == hello
|
29
|
+
cache.store(:ramaze, 'ramaze').should == 'ramaze'
|
30
|
+
cache.delete(:hello, :ramaze)
|
31
|
+
cache.fetch(:hello).should == nil
|
32
|
+
cache.fetch(:innate).should == nil
|
33
|
+
end
|
34
|
+
|
35
|
+
should 'store with ttl' do
|
36
|
+
cache.store(:hello, @hello, :ttl => 0.2)
|
37
|
+
cache.fetch(:hello).should == @hello
|
38
|
+
sleep 0.3
|
39
|
+
cache.fetch(:hello).should == nil
|
40
|
+
end
|
41
|
+
|
42
|
+
should 'clear' do
|
43
|
+
cache.store(:hello, @hello)
|
44
|
+
cache.fetch(:hello).should == @hello
|
45
|
+
cache.clear
|
46
|
+
cache.fetch(:hello).should == nil
|
47
|
+
end
|
48
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com
|
2
2
|
# All files in this distribution are subject to the terms of the Ruby license.
|
3
3
|
|
4
|
-
require 'spec/helper'
|
4
|
+
require File.expand_path('../../../../spec/helper', __FILE__)
|
5
5
|
|
6
6
|
spec_precondition 'memcached is running' do
|
7
7
|
require 'memcache'
|
data/spec/ramaze/cache/sequel.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com
|
2
2
|
# All files in this distribution are subject to the terms of the Ruby license.
|
3
3
|
|
4
|
-
require 'spec/helper'
|
4
|
+
require File.expand_path('../../../../spec/helper', __FILE__)
|
5
5
|
spec_require 'sequel'
|
6
6
|
|
7
7
|
DB = Sequel.sqlite
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com
|
2
2
|
# All files in this distribution are subject to the terms of the Ruby license.
|
3
3
|
|
4
|
-
require 'spec/helper'
|
4
|
+
require File.expand_path('../../../../spec/helper', __FILE__)
|
5
5
|
|
6
6
|
Ramaze::App.options.merge!(:layouts => 'view')
|
7
7
|
|
@@ -1,5 +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.
|
2
3
|
|
4
|
+
require File.expand_path('../../../../spec/helper', __FILE__)
|
3
5
|
|
4
6
|
class SpecHello < Ramaze::Controller
|
5
7
|
def index
|
@@ -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
|
describe 'Controller::generate_mapping' do
|
4
7
|
def gen(klass)
|
@@ -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 SpecControllerInheritedMain < Ramaze::Controller
|
4
7
|
Ramaze.node('/')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com
|
2
2
|
# All files in this distribution are subject to the terms of the Ruby license.
|
3
3
|
|
4
|
-
require 'spec/helper'
|
4
|
+
require File.expand_path('../../../../spec/helper', __FILE__)
|
5
5
|
|
6
6
|
class MainController < Ramaze::Controller
|
7
7
|
map '/'
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com
|
2
2
|
# All files in this distribution are subject to the terms of the Ruby license.
|
3
3
|
|
4
|
-
require 'spec/helper'
|
4
|
+
require File.expand_path('../../../../spec/helper', __FILE__)
|
5
5
|
|
6
6
|
class BaseController < Ramaze::Controller
|
7
7
|
alias_view :foo, :bar
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com
|
2
2
|
# All files in this distribution are subject to the terms of the Ruby license.
|
3
3
|
|
4
|
-
require 'spec/helper'
|
4
|
+
require File.expand_path('../../../../spec/helper', __FILE__)
|
5
5
|
|
6
6
|
class SpecViewAlias < Ramaze::Controller
|
7
7
|
map '/'
|