[rubygem-haml] update to 3.1.2
Mohammed Morsi
mmorsi at fedoraproject.org
Wed Jul 13 15:31:19 UTC 2011
commit 4fe827da82dd4f7abca3cc83c8fa2acffd4e0a8c
Author: Mo Morsi <mmorsi at redhat.com>
Date: Wed Jul 13 11:30:02 2011 -0400
update to 3.1.2
.gitignore | 1 +
haml-issue-403-bugfix.patch | 45 +++++++++++++++++++++++++++++++++++++++++++
rubygem-haml.spec | 30 +++++++++++++++++-----------
sources | 2 +-
4 files changed, 65 insertions(+), 13 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e2cec12..54a9c34 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
haml-2.2.24.gem
haml-3.0.17.gem
/haml-3.0.25.gem
+/haml-3.1.2.gem
diff --git a/haml-issue-403-bugfix.patch b/haml-issue-403-bugfix.patch
new file mode 100644
index 0000000..6660d09
--- /dev/null
+++ b/haml-issue-403-bugfix.patch
@@ -0,0 +1,45 @@
+--- lib/haml/helpers/action_view_mods.rb.orig 2011-07-12 14:20:20.000000000 -0400
++++ lib/haml/helpers/action_view_mods.rb 2011-07-12 14:21:14.000000000 -0400
+@@ -51,10 +51,7 @@ module ActionView
+ # We've got to do the same thing for compatibility.
+
+ if is_haml? && block_is_haml?(block)
+- value = nil
+- buffer = capture_haml(*args) { value = yield(*args) }
+- return buffer unless buffer.empty?
+- return value if value.is_a?(String)
++ capture_haml(*args, &block)
+ else
+ capture_without_haml(*args, &block)
+ end
+@@ -88,16 +85,7 @@ module ActionView
+ module CaptureHelper
+ def capture_with_haml(*args, &block)
+ if Haml::Helpers.block_is_haml?(block)
+- value = nil
+- buffer = capture_haml(*args) { value = yield(*args) }
+- str =
+- if !buffer.empty?
+- buffer
+- elsif value.is_a?(String)
+- value
+- else
+- ''
+- end
++ str = capture_haml(*args, &block)
+ return ActionView::NonConcattingString.new(str) if defined?(ActionView::NonConcattingString)
+ return str
+ else
+--- test/haml/helper_test.rb.orig 2011-07-12 14:21:25.000000000 -0400
++++ test/haml/helper_test.rb 2011-07-12 14:21:31.000000000 -0400
+@@ -357,10 +357,6 @@ HAML
+ assert_equal("1\n\n2\n\n3\n\n", render("- trc([1, 2, 3]) do |i|\n = i.inspect"))
+ end
+
+- def test_capture_with_string_block
+- assert_equal("foo\n", render("= capture { 'foo' }", :action_view))
+- end
+-
+ def test_find_and_preserve_with_block
+ assert_equal("<pre>Foo
Bar</pre>\nFoo\nBar\n",
+ render("= find_and_preserve do\n %pre\n Foo\n Bar\n Foo\n Bar"))
diff --git a/rubygem-haml.spec b/rubygem-haml.spec
index a5a54f6..a36a8ee 100644
--- a/rubygem-haml.spec
+++ b/rubygem-haml.spec
@@ -5,13 +5,15 @@
Summary: An elegant, structured XHTML/XML templating engine
Name: rubygem-%{gemname}
-Version: 3.0.25
+Version: 3.1.2
Release: 1%{?dist}
Group: Development/Languages
License: MIT and WTFPL
URL: http://haml-lang.com/
-Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Source0: http://rubygems.org/gems/%{gemname}-%{version}.gem
+
+# interim fix for https://github.com/nex3/haml/issues/403
+Patch0: haml-issue-403-bugfix.patch
Requires: rubygems
Requires: ruby(abi) = 1.8
@@ -42,6 +44,14 @@ function as a stand-alone templating engine.
%prep
+%setup -q -c -T
+%{__mkdir_p} .%{gemdir}
+gem install --local --install-dir .%{gemdir} \
+ --force -V --rdoc %{SOURCE0}
+
+pushd .%{geminstdir}
+%patch0
+popd
%build
@@ -60,10 +70,9 @@ done
popd
%install
-rm -rf %{buildroot}
mkdir -p %{buildroot}%{gemdir}
-gem install --local --install-dir %{buildroot}%{gemdir} \
- --force --rdoc %{SOURCE0}
+mv .%{gemdir}/* %{buildroot}%{gemdir}
+
mkdir -p %{buildroot}/%{_bindir}
mv %{buildroot}%{gemdir}/bin/* %{buildroot}/%{_bindir}
rmdir %{buildroot}%{gemdir}/bin
@@ -91,16 +100,10 @@ find %{buildroot}/%{geminstdir} -type f ! -perm /go+r -exec chmod -v go+r {} \;
find %{buildroot}%{geminstdir}/bin -type f | \
xargs -n 1 sed -i -e 's"^#!/usr/bin/env ruby"#!/usr/bin/ruby"'
-%clean
-rm -rf %{buildroot}
-
%files
%defattr(-, root, root, -)
%{_bindir}/haml
%{_bindir}/html2haml
-%{_bindir}/sass
-%{_bindir}/css2sass
-%{_bindir}/sass-convert
%dir %{geminstdir}
%{geminstdir}/Rakefile
%{geminstdir}/bin
@@ -123,6 +126,9 @@ rm -rf %{buildroot}
%changelog
+* Mon Jul 11 2011 Mo Morsi <mmorsi at redhat.com> - 3.1.2-1
+- updated to latest upstream release
+
* Tue Mar 29 2011 Mo Morsi <mmorsi at redhat.com> - 3.0.25-1
- updated to latest upstream release
diff --git a/sources b/sources
index f20612f..e6fcf68 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-88da935b08a8458d453a65da1a93f4de haml-3.0.25.gem
+f702720d62ec4138827abb1533f885ba haml-3.1.2.gem
More information about the scm-commits
mailing list