Fully remove support for Rails 3b3 and earlier.

This commit is contained in:
Nathan Weizenbaum 2010-06-10 14:09:18 -07:00
parent 2ca90977e3
commit ebdb0753ae
6 changed files with 24 additions and 12 deletions

View File

@ -3,6 +3,13 @@
* Table of contents
{:toc}
## 3.0.13 (Unreleased)
## Rails 3 Support
Support for Rails 3 versions prior to beta 4 has been removed.
Upgrade to Rails 3.0.0.beta4 if you haven't already.
## 3.0.12
[Tagged on GitHub](http://github.com/nex3/haml/commit/3.0.12).

View File

@ -3,6 +3,13 @@
* Table of contents
{:toc}
## 3.0.13 (Unreleased)
## Rails 3 Support
Support for Rails 3 versions prior to beta 4 has been removed.
Upgrade to Rails 3.0.0.beta4 if you haven't already.
## 3.0.12
[Tagged on GitHub](http://github.com/nex3/haml/commit/3.0.12).

View File

@ -1,3 +1,10 @@
if Haml::Util.ap_geq_3? && !Haml::Util.ap_geq?("3.0.0.beta4")
raise <<ERROR
Haml and Sass no longer support Rails 3 versions before beta 4.
Please upgrade to Rails 3.0.0.beta4 or later.
ERROR
end
# Rails 3.0.0.beta.2+
if defined?(ActiveSupport) && Haml::Util.has?(:public_method, ActiveSupport, :on_load)
require 'haml/template/options'

View File

@ -1,13 +1,4 @@
unless defined?(Sass::RAILS_LOADED)
if Haml::Util.ap_geq_3? && !Haml::Util.ap_geq?("3.0.0.beta4")
Haml::Util.haml_warn(<<WARNING)
DEPRECATION WARNING:
Haml/Sass support for Rails 3 versions before beta 4 is deprecated,
and will be removed in Haml/Sass 3.0.13.
Please upgrade to Rails 3.0.0.beta4 or later.
WARNING
end
Sass::RAILS_LOADED = true
# Reverse-merging (we're in Rails, anyway) so we dont' clobber what's already been defined further up-stream

View File

@ -165,7 +165,7 @@ HAML
def test_content_tag_error_wrapping
def @base.protect_against_forgery?; false; end
error_class = Haml::Util.ap_geq?("3.0.0.beta4") ? "field_with_errors" : "fieldWithErrors"
error_class = Haml::Util.ap_geq_3? ? "field_with_errors" : "fieldWithErrors"
assert_equal(<<HTML, render(<<HAML, :action_view))
<form action="" method="post">
<div class="#{error_class}"><label for="post_error_field">Error field</label></div>
@ -315,7 +315,7 @@ HAML
end
def test_indented_capture
prior = Haml::Util.ap_geq?("3.0.0.beta4") ? "" : " \n"
prior = Haml::Util.ap_geq_3? ? "" : " \n"
assert_equal("#{prior} Foo\n ", @base.render(:inline => " <% res = capture do %>\n Foo\n <% end %><%= res %>"))
end

View File

@ -65,7 +65,7 @@ class Test::Unit::TestCase
end
def form_for_calling_convention(name)
return "@#{name}, :as => :#{name}, :html => {:class => nil, :id => nil}" if Haml::Util.ap_geq?("3.0.0.beta3")
return "@#{name}, :as => :#{name}, :html => {:class => nil, :id => nil}" if Haml::Util.ap_geq_3?
return ":#{name}, @#{name}"
end
end