Skip to content
Browse files

remove CoffeeScript template

The CoffeeScript ruby library is no longer maintained. A new
template implementation that uses supported CoffeeScript tools
may be added in the future.
  • Loading branch information...
1 parent d383692 commit 4cda5b9ed6bfe9138a149fed914103e0cbb309bc @rtomayko committed Jun 15, 2010
Showing with 0 additions and 41 deletions.
  1. +0 −21 lib/tilt.rb
  2. +0 −20 test/tilt_coffeetemplate_test.rb
View
21 lib/tilt.rb
@@ -697,25 +697,6 @@ def evaluate(scope, locals, &block)
register 'rdoc', RDocTemplate
- # CoffeeScript info:
- # http://jashkenas.github.com/coffee-script/
- class CoffeeTemplate < Template
- def initialize_engine
- return if defined? ::CoffeeScript
- require_template_library 'coffee-script'
- end
-
- def prepare
- @output = nil
- end
-
- def evaluate(scope, locals, &block)
- @output ||= ::CoffeeScript::compile(data, options)
- end
- end
- register 'coffee', CoffeeTemplate
-
-
# Radius Template
# http://github.com/jlong/radius/
class RadiusTemplate < Template
@@ -748,6 +729,4 @@ def evaluate(scope, locals, &block)
end
end
register 'radius', RadiusTemplate
-
end
-
View
20 test/tilt_coffeetemplate_test.rb
@@ -1,20 +0,0 @@
-require 'contest'
-require 'tilt'
-
-begin
- require 'coffee-script'
-
- class CoffeeTemplateTest < Test::Unit::TestCase
- test "is registered for '.coffee' files" do
- assert_equal Tilt::CoffeeTemplate, Tilt['test.coffee']
- end
-
- test "compiles and evaluates the template on #render" do
- template = Tilt::CoffeeTemplate.new { |t| "greeting: \"Hello CoffeeScript\"" }
- assert_equal "(function(){\n var greeting;\n greeting = \"Hello CoffeeScript\";\n})();", template.render
- end
- end
-
-rescue LoadError => boom
- warn "Tilt::CoffeeTemplate (disabled)\n"
-end

0 comments on commit 4cda5b9

Please sign in to comment.
Something went wrong with that request. Please try again.