Skip to content
This repository
Browse code

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...
commit 4cda5b9ed6bfe9138a149fed914103e0cbb309bc 1 parent d383692
Ryan Tomayko authored

Showing 2 changed files with 0 additions and 41 deletions. Show diff stats Hide diff stats

  1. +0 21 lib/tilt.rb
  2. +0 20 test/tilt_coffeetemplate_test.rb
21 lib/tilt.rb
@@ -697,25 +697,6 @@ def evaluate(scope, locals, &block)
697 697 register 'rdoc', RDocTemplate
698 698
699 699
700   - # CoffeeScript info:
701   - # http://jashkenas.github.com/coffee-script/
702   - class CoffeeTemplate < Template
703   - def initialize_engine
704   - return if defined? ::CoffeeScript
705   - require_template_library 'coffee-script'
706   - end
707   -
708   - def prepare
709   - @output = nil
710   - end
711   -
712   - def evaluate(scope, locals, &block)
713   - @output ||= ::CoffeeScript::compile(data, options)
714   - end
715   - end
716   - register 'coffee', CoffeeTemplate
717   -
718   -
719 700 # Radius Template
720 701 # http://github.com/jlong/radius/
721 702 class RadiusTemplate < Template
@@ -748,6 +729,4 @@ def evaluate(scope, locals, &block)
748 729 end
749 730 end
750 731 register 'radius', RadiusTemplate
751   -
752 732 end
753   -
20 test/tilt_coffeetemplate_test.rb
... ... @@ -1,20 +0,0 @@
1   -require 'contest'
2   -require 'tilt'
3   -
4   -begin
5   - require 'coffee-script'
6   -
7   - class CoffeeTemplateTest < Test::Unit::TestCase
8   - test "is registered for '.coffee' files" do
9   - assert_equal Tilt::CoffeeTemplate, Tilt['test.coffee']
10   - end
11   -
12   - test "compiles and evaluates the template on #render" do
13   - template = Tilt::CoffeeTemplate.new { |t| "greeting: \"Hello CoffeeScript\"" }
14   - assert_equal "(function(){\n var greeting;\n greeting = \"Hello CoffeeScript\";\n})();", template.render
15   - end
16   - end
17   -
18   -rescue LoadError => boom
19   - warn "Tilt::CoffeeTemplate (disabled)\n"
20   -end

0 comments on commit 4cda5b9

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