ramaze 2009.06.12 → 2009.07

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. data/MANIFEST +10 -0
  2. data/README.md +4 -9
  3. data/Rakefile +30 -21
  4. data/doc/AUTHORS +1 -1
  5. data/doc/CHANGELOG +144 -0
  6. data/doc/meta/announcement.txt +47 -76
  7. data/examples/misc/css.rb +6 -12
  8. data/lib/proto/app.rb +4 -5
  9. data/lib/proto/controller/init.rb +1 -1
  10. data/lib/proto/spec/main.rb +3 -4
  11. data/lib/ramaze.rb +0 -2
  12. data/lib/ramaze/app.rb +4 -3
  13. data/lib/ramaze/cache.rb +1 -0
  14. data/lib/ramaze/cache/lru.rb +42 -0
  15. data/lib/ramaze/contrib/addressable_route.rb +10 -9
  16. data/lib/ramaze/controller.rb +1 -3
  17. data/lib/ramaze/helper/blue_form.rb +214 -0
  18. data/lib/ramaze/helper/cache.rb +44 -9
  19. data/lib/ramaze/helper/formatting.rb +5 -2
  20. data/lib/ramaze/helper/layout.rb +2 -2
  21. data/lib/ramaze/helper/paginate.rb +28 -33
  22. data/lib/ramaze/request.rb +1 -1
  23. data/lib/ramaze/snippets/ramaze/lru_hash.rb +248 -0
  24. data/lib/ramaze/spec/bacon.rb +5 -0
  25. data/lib/ramaze/spec/helper/template_examples.rb +4 -1
  26. data/lib/ramaze/version.rb +1 -1
  27. data/lib/ramaze/view.rb +4 -3
  28. data/lib/ramaze/view/less.rb +12 -0
  29. data/ramaze.gemspec +27 -24
  30. data/spec/contrib/addressable_route.rb +3 -5
  31. data/spec/contrib/rest.rb +1 -1
  32. data/spec/examples/caching.rb +2 -2
  33. data/spec/examples/css.rb +2 -2
  34. data/spec/examples/element.rb +2 -2
  35. data/spec/examples/hello.rb +2 -2
  36. data/spec/examples/helpers/httpdigest.rb +2 -2
  37. data/spec/examples/linking.rb +2 -2
  38. data/spec/examples/simple.rb +2 -2
  39. data/spec/examples/templates/template_erubis.rb +5 -2
  40. data/spec/examples/templates/template_ezamar.rb +5 -2
  41. data/spec/examples/templates/template_haml.rb +5 -2
  42. data/spec/examples/templates/template_liquid.rb +5 -2
  43. data/spec/examples/templates/template_markaby.rb +5 -2
  44. data/spec/examples/templates/template_nagoro.rb +5 -2
  45. data/spec/examples/templates/template_redcloth.rb +5 -2
  46. data/spec/examples/templates/template_remarkably.rb +5 -2
  47. data/spec/examples/templates/template_tenjin.rb +5 -2
  48. data/spec/ramaze/action/render.rb +4 -1
  49. data/spec/ramaze/app.rb +4 -1
  50. data/spec/ramaze/app/location.rb +43 -0
  51. data/spec/ramaze/bin/ramaze.rb +7 -2
  52. data/spec/ramaze/cache/localmemcache.rb +1 -1
  53. data/spec/ramaze/cache/lru.rb +48 -0
  54. data/spec/ramaze/cache/memcache.rb +1 -1
  55. data/spec/ramaze/cache/sequel.rb +1 -1
  56. data/spec/ramaze/controller/actionless_templates.rb +1 -1
  57. data/spec/ramaze/controller/lonely_mapping.rb +3 -1
  58. data/spec/ramaze/controller/mapping.rb +4 -1
  59. data/spec/ramaze/controller/provide_inheritance.rb +4 -1
  60. data/spec/ramaze/controller/resolve.rb +1 -1
  61. data/spec/ramaze/controller/subclass.rb +1 -1
  62. data/spec/ramaze/controller/template_resolving.rb +1 -1
  63. data/spec/ramaze/dispatcher/directory.rb +4 -1
  64. data/spec/ramaze/dispatcher/file.rb +8 -8
  65. data/spec/ramaze/error.rb +1 -1
  66. data/spec/ramaze/files.rb +4 -1
  67. data/spec/ramaze/gestalt.rb +4 -1
  68. data/spec/ramaze/helper/auth.rb +1 -1
  69. data/spec/ramaze/helper/bench.rb +4 -1
  70. data/spec/ramaze/helper/blue_form.rb +433 -0
  71. data/spec/ramaze/helper/cache.rb +2 -2
  72. data/spec/ramaze/helper/flash.rb +1 -1
  73. data/spec/ramaze/helper/form.rb +4 -1
  74. data/spec/ramaze/helper/formatting.rb +4 -1
  75. data/spec/ramaze/helper/gestalt.rb +4 -1
  76. data/spec/ramaze/helper/gravatar.rb +4 -1
  77. data/spec/ramaze/helper/httpdigest.rb +4 -1
  78. data/spec/ramaze/helper/layout.rb +1 -1
  79. data/spec/ramaze/helper/link.rb +1 -1
  80. data/spec/ramaze/helper/localize.rb +4 -1
  81. data/spec/ramaze/helper/maruku.rb +4 -1
  82. data/spec/ramaze/helper/pager.rb +1 -1
  83. data/spec/ramaze/helper/paginate.rb +4 -1
  84. data/spec/ramaze/helper/request_accessor.rb +4 -1
  85. data/spec/ramaze/helper/sequel_form.rb +4 -1
  86. data/spec/ramaze/helper/simple_captcha.rb +1 -1
  87. data/spec/ramaze/helper/stack.rb +1 -1
  88. data/spec/ramaze/helper/user.rb +4 -1
  89. data/spec/ramaze/helper/xhtml.rb +4 -1
  90. data/spec/ramaze/log/informer.rb +1 -1
  91. data/spec/ramaze/log/logging.rb +4 -1
  92. data/spec/ramaze/log/syslog.rb +6 -6
  93. data/spec/ramaze/params.rb +1 -1
  94. data/spec/ramaze/request.rb +4 -1
  95. data/spec/ramaze/session/memcache.rb +1 -1
  96. data/spec/ramaze/struct.rb +4 -1
  97. data/spec/ramaze/view.rb +1 -1
  98. data/spec/ramaze/view/erubis.rb +1 -1
  99. data/spec/ramaze/view/ezamar.rb +1 -1
  100. data/spec/ramaze/view/gestalt.rb +2 -2
  101. data/spec/ramaze/view/haml.rb +1 -1
  102. data/spec/ramaze/view/less.rb +60 -0
  103. data/spec/ramaze/view/less/file.css.less +8 -0
  104. data/spec/ramaze/view/liquid.rb +1 -1
  105. data/spec/ramaze/view/nagoro.rb +1 -1
  106. data/spec/ramaze/view/redcloth.rb +1 -1
  107. data/spec/ramaze/view/remarkably.rb +1 -1
  108. data/spec/ramaze/view/sass.rb +1 -1
  109. data/spec/ramaze/view/tagz.rb +1 -1
  110. data/spec/ramaze/view/tenjin.rb +1 -1
  111. data/spec/snippets/array/put_within.rb +30 -25
  112. data/spec/snippets/binding/locals.rb +4 -1
  113. data/spec/snippets/numeric/filesize_format.rb +4 -1
  114. data/spec/snippets/numeric/time.rb +5 -2
  115. data/spec/snippets/object/__dir__.rb +4 -1
  116. data/spec/snippets/ordered_set.rb +4 -1
  117. data/spec/snippets/ramaze/acquire.rb +4 -1
  118. data/spec/snippets/ramaze/dictionary.rb +4 -1
  119. data/spec/snippets/ramaze/lru_hash.rb +88 -0
  120. data/spec/snippets/ramaze/struct.rb +4 -1
  121. data/spec/snippets/string/camel_case.rb +4 -1
  122. data/spec/snippets/string/color.rb +4 -1
  123. data/spec/snippets/string/snake_case.rb +4 -1
  124. data/spec/snippets/string/unindent.rb +4 -1
  125. data/spec/snippets/thread/into.rb +4 -1
  126. data/tasks/bacon.rake +8 -2
  127. data/tasks/gem_setup.rake +21 -8
  128. data/tasks/setup.rake +8 -2
  129. metadata +29 -9
@@ -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 SpecHelperCache < Ramaze::Controller
7
7
  map '/'
@@ -107,7 +107,7 @@ describe Ramaze::Helper::Cache do
107
107
  lambda{ get('/ttl').body }.should.not.change{ get('/ttl').body }
108
108
  end
109
109
 
110
- lambda{ sleep 1; get('/ttl').body }.should.change{ get('/ttl').body }
110
+ lambda{ sleep 1.5; get('/ttl').body }.should.change{ get('/ttl').body }
111
111
  end
112
112
 
113
113
  it 'caches actions with block keys' do
@@ -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 SpecHelperFlash < Ramaze::Controller
7
7
  map '/'
@@ -1,4 +1,7 @@
1
- require 'spec/helper'
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
  spec_requires 'hpricot'
4
7
 
@@ -1,4 +1,7 @@
1
- require 'spec/helper'
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/helper/formatting'
3
6
 
4
7
  describe 'Helper::Formatting' do
@@ -1,4 +1,7 @@
1
- require 'spec/helper'
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/helper/gestalt'
3
6
 
4
7
  describe Ramaze::Helper::Gestalt do
@@ -1,4 +1,7 @@
1
- require 'spec/helper'
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/helper/gravatar'
3
6
 
4
7
  describe Ramaze::Helper::Gravatar do
@@ -1,4 +1,7 @@
1
- require 'spec/helper'
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
  REALM = 'HttpDigestTestRealm'
4
7
 
@@ -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 LayoutHelperOne < Ramaze::Controller
7
7
  map '/one'
@@ -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 SpecHelperLink < Ramaze::Controller
7
7
  map '/'
@@ -1,6 +1,9 @@
1
1
  # * Encoding: UTF-8
2
+ # Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com
3
+ # All files in this distribution are subject to the terms of the Ruby license.
4
+
2
5
  $KCODE = 'u' if /regexp/.respond_to?(:kcode)
3
- require 'spec/helper'
6
+ require File.expand_path('../../../../spec/helper', __FILE__)
4
7
  spec_requires 'locale/tag', 'locale'
5
8
 
6
9
  class SpecHelperLocalize < Ramaze::Controller
@@ -1,4 +1,7 @@
1
- require 'spec/helper'
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
  spec_require 'maruku'
3
6
 
4
7
  class SpecHelperMaruku < Ramaze::Controller
@@ -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 'hpricot'
6
6
 
7
7
  module Og
@@ -1,4 +1,7 @@
1
- require 'spec/helper'
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
  spec_require 'hpricot'
3
6
 
4
7
  class SpecHelperPaginateArray < Ramaze::Controller
@@ -1,4 +1,7 @@
1
- require 'spec/helper'
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 SpecHelperRequestAccessor < Ramaze::Controller
4
7
  map '/'
@@ -1,4 +1,7 @@
1
- require 'spec/helper'
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
  spec_requires 'hpricot', 'sequel'
4
7
 
@@ -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 SpecSimpleCaptcha < Ramaze::Controller
7
7
  helper :simple_captcha
@@ -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 SpecStackHelper < Ramaze::Controller
7
7
  map '/'
@@ -1,4 +1,7 @@
1
- require 'spec/helper'
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 MockSequelUser
4
7
  def profile
@@ -1,4 +1,7 @@
1
- require 'spec/helper'
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/helper/xhtml'
3
6
 
4
7
  describe Ramaze::Helper::XHTML do
@@ -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
  require 'ramaze/log/informer'
6
6
 
7
7
  describe 'Informer' do
@@ -1,4 +1,7 @@
1
- require 'spec/helper'
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 SpecLogger
4
7
  include Ramaze::Logging
@@ -1,14 +1,14 @@
1
1
  # Copyright (c) 2008 rob@rebeltechnologies.nl
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
  require 'ramaze/log/syslog'
7
7
 
8
8
  describe 'Syslog' do
9
9
 
10
10
  # close the syslog, if it was open for some reason before we
11
- # start a test.
11
+ # start a test.
12
12
  before do
13
13
  if ( Syslog.opened? )
14
14
  ::Syslog.close
@@ -24,8 +24,8 @@ describe 'Syslog' do
24
24
  end
25
25
 
26
26
  it 'should handle non default initialization' do
27
- syslog = Ramaze::Logger::Syslog.new( 'ramaze_syslog_test',
28
- ::Syslog::LOG_NDELAY | ::Syslog::LOG_NOWAIT,
27
+ syslog = Ramaze::Logger::Syslog.new( 'ramaze_syslog_test',
28
+ ::Syslog::LOG_NDELAY | ::Syslog::LOG_NOWAIT,
29
29
  ::Syslog::LOG_DAEMON )
30
30
  ::Syslog.opened?.should == true
31
31
  ::Syslog.ident.should == 'ramaze_syslog_test'
@@ -43,7 +43,7 @@ describe 'Syslog' do
43
43
  child = fork {
44
44
  logpipe[0].close
45
45
  STDERR.reopen(logpipe[1])
46
- syslog = Ramaze::Logger::Syslog.new( 'ramaze_syslog_test',
46
+ syslog = Ramaze::Logger::Syslog.new( 'ramaze_syslog_test',
47
47
  ::Syslog::LOG_PID | ::Syslog::LOG_NDELAY | ::Syslog::LOG_PERROR,
48
48
  ::Syslog::LOG_USER )
49
49
  syslog.send priority, msg
@@ -54,7 +54,7 @@ describe 'Syslog' do
54
54
 
55
55
  logpipe[0].gets.should == "ramaze_syslog_test[#{child}]: #{msg}\n"
56
56
  end
57
-
57
+
58
58
  it 'should handle debug' do
59
59
  test_log_msg :direct, :debug, "Hello Debug World"
60
60
  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
  class TCParamsController < Ramaze::Controller
7
7
  map '/'
@@ -1,4 +1,7 @@
1
- require 'spec/helper'
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 'Ramaze::Request' do
4
7
  def request(env = {})
@@ -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'
@@ -1,4 +1,7 @@
1
- require 'spec/helper'
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
  Point = Ramaze::Struct.new(:x,:y)
4
7
 
@@ -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
  module Ramaze
7
7
  module View
@@ -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 'erubis'
6
6
 
7
7
  Ramaze::App.options.views = 'erubis'
@@ -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 'ezamar'
6
6
 
7
7
  Ramaze::App.options.views = 'ezamar'
@@ -1,7 +1,7 @@
1
- # Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com
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 'ramaze/gestalt'
6
6
 
7
7
  Ramaze::App.options.views = 'gestalt'
@@ -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 'haml'
6
6
 
7
7
  Ramaze::App.options.views = 'haml'
@@ -0,0 +1,60 @@
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
+ spec_require 'less'
6
+
7
+ Ramaze::App.options.views = 'less'
8
+
9
+ class SpecLess < Ramaze::Controller
10
+ map '/'
11
+ provide :css, :Less
12
+
13
+ def style
14
+ <<-LESS
15
+ @dark: #110011;
16
+ .outline { border: 1px solid black }
17
+
18
+ .article {
19
+ a { text-decoration: none }
20
+ p { color: @dark }
21
+ .outline;
22
+ }
23
+ LESS
24
+ end
25
+ end
26
+
27
+ describe Ramaze::View::Less do
28
+ behaves_like :rack_test
29
+
30
+ def cmp(actually, expected)
31
+ actually.strip.split("\n").sort.
32
+ should == expected.strip.split("\n").sort
33
+ end
34
+
35
+ should 'render inline' do
36
+ got = get('/style.css')
37
+ got.status.should == 200
38
+ got['Content-Type'].should == 'text/css'
39
+
40
+ cmp(got.body, <<-CSS)
41
+ .outline { border: 1px solid black; }
42
+ .article a { text-decoration: none; }
43
+ .article p { color: #110011; }
44
+ .article { border: 1px solid black; }
45
+ CSS
46
+ end
47
+
48
+ should 'render from file' do
49
+ got = get('/file.css')
50
+ got.status.should == 200
51
+ got['Content-Type'].should == 'text/css'
52
+
53
+ cmp(got.body, <<-CSS)
54
+ .outline { border: 1px solid black; }
55
+ .article a { text-decoration: none; }
56
+ .article p { color: #110011; }
57
+ .article { border: 1px solid black; }
58
+ CSS
59
+ end
60
+ end
@@ -0,0 +1,8 @@
1
+ @dark: #110011;
2
+ .outline { border: 1px solid black }
3
+
4
+ .article {
5
+ a { text-decoration: none }
6
+ p { color: @dark }
7
+ .outline;
8
+ }
@@ -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 'liquid'
6
6
 
7
7
  Ramaze::App.options.views = 'liquid'
@@ -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 'nagoro'
6
6
 
7
7
  Ramaze::App.options.views = 'nagoro'
@@ -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_requires 'erubis', 'redcloth'
6
6
 
7
7
  Ramaze::App.options.views = 'redcloth'