Skip to content

Commit

Permalink
Fully remove support for Rails 3b3 and earlier.
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 committed Jun 10, 2010
1 parent 2ca9097 commit ebdb075
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 12 deletions.
7 changes: 7 additions & 0 deletions doc-src/HAML_CHANGELOG.md
Expand Up @@ -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).
Expand Down
7 changes: 7 additions & 0 deletions doc-src/SASS_CHANGELOG.md
Expand Up @@ -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).
Expand Down
7 changes: 7 additions & 0 deletions lib/haml/railtie.rb
@@ -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'
Expand Down
9 changes: 0 additions & 9 deletions lib/sass/plugin/rails.rb
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/haml/helper_test.rb
Expand Up @@ -165,7 +165,7 @@ def test_content_tag_block

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>
Expand Down Expand Up @@ -315,7 +315,7 @@ def test_page_class
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

Expand Down
2 changes: 1 addition & 1 deletion test/test_helper.rb
Expand Up @@ -65,7 +65,7 @@ def rails_block_helper_char
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

0 comments on commit ebdb075

Please sign in to comment.