diff --git a/.gitignore b/.gitignore index 54a9c34..0e4ec03 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ haml-2.2.24.gem haml-3.0.17.gem /haml-3.0.25.gem /haml-3.1.2.gem +/haml-3.1.6.gem diff --git a/haml-issue-403-bugfix.patch b/haml-issue-403-bugfix.patch deleted file mode 100644 index 6660d09..0000000 --- a/haml-issue-403-bugfix.patch +++ /dev/null @@ -1,45 +0,0 @@ ---- 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("
Foo Bar\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 449bbd6..aa9a08c 100644 --- a/rubygem-haml.spec +++ b/rubygem-haml.spec @@ -3,30 +3,28 @@ Summary: An elegant, structured XHTML/XML templating engine Name: rubygem-%{gem_name} -Version: 3.1.2 -Release: 6%{?dist} +Version: 3.1.6 +Release: 1%{?dist} Group: Development/Languages License: MIT and WTFPL URL: http://haml-lang.com/ Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem -# interim fix for https://github.com/nex3/haml/issues/403 -Patch0: haml-issue-403-bugfix.patch - Requires: ruby(rubygems) Requires: ruby(abi) = 1.9.1 # for html2haml +Requires: rubygem(erubis) Requires: rubygem(hpricot) -Requires: rubygem(yard) >= 0.5.3 -Requires: rubygem(maruku) >= 0.5.9 +Requires: rubygem(ruby_parser) Requires: rubygem(sass) BuildRequires: rubygems-devel -BuildRequires: rubygem(rails) -BuildRequires: rubygem(hpricot) BuildRequires: rubygem(erubis) -BuildRequires: rubygem(ruby_parser) +BuildRequires: rubygem(hpricot) BuildRequires: rubygem(minitest) +BuildRequires: rubygem(rails) +BuildRequires: rubygem(ruby_parser) +BuildRequires: rubygem(sass) BuildArch: noarch Provides: rubygem(%{gem_name}) = %{version} @@ -39,88 +37,69 @@ tags and allowing Ruby to be embedded with ease. It was originally envisioned as a plugin for Ruby on Rails, but it can function as a stand-alone templating engine. +%package doc +Summary: Documentation for %{name} +Group: Documentation +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description doc +Documentation for %{name} %prep %setup -q -c -T -%{__mkdir_p} .%{gem_dir} +mkdir -p .%{gem_dir} gem install --local --install-dir .%{gem_dir} --force -V --rdoc %{SOURCE0} -pushd .%{gem_instdir} -%patch0 -popd - %build -%check -pushd %{buildroot}%{gem_instdir} -# The following -path list is from Rakefile -find * \ - -path 'test/*/*_test.rb' \ - -not -path 'test/rails/*' \ - -not -path 'test/plugins/*' \ - -not -path 'test/haml/spec/*' | \ -while read f -do - ruby -I. $f -done -popd - %install mkdir -p %{buildroot}%{gem_dir} -mv .%{gem_dir}/* %{buildroot}%{gem_dir} +cp -a .%{gem_dir}/* %{buildroot}%{gem_dir} mkdir -p %{buildroot}/%{_bindir} mv %{buildroot}%{gem_dir}/bin/* %{buildroot}/%{_bindir} rmdir %{buildroot}%{gem_dir}/bin -find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x - -rm %{buildroot}%{gem_instdir}/.yardopts - -# Fix anything executable that does not have a shebang -for file in `find %{buildroot}/%{gem_instdir} -type f -perm /a+x`; do - [ -z "`head -n 1 $file | grep \"^#!/\"`" ] && chmod -v 644 $file -done - -# Find files with a shebang that do not have executable permissions -for file in `find %{buildroot}/%{gem_instdir} -type f ! -perm /a+x -name "*.rb"`; do - [ ! -z "`head -n 1 $file | grep \"^#!/\"`" ] && chmod -v 755 $file -done - -# Find files that have non-standard-executable-perm -find %{buildroot}/%{gem_instdir} -type f -perm /g+wx -exec chmod -v g-w {} \; -# Find files that are not readable -find %{buildroot}/%{gem_instdir} -type f ! -perm /go+r -exec chmod -v go+r {} \; - -# Don't search env - use the expected ruby -find %{buildroot}%{gem_instdir}/bin -type f | \ - xargs -n 1 sed -i -e 's"^#!/usr/bin/env ruby"#!/usr/bin/ruby"' +%check +pushd %{buildroot}%{gem_instdir} +ruby -I. -e "Dir.glob('test/**/*_test.rb').each {|t| require t}" +popd %files %{_bindir}/haml %{_bindir}/html2haml %dir %{gem_instdir} -%{gem_instdir}/Rakefile +%{gem_libdir} %{gem_instdir}/bin -%{gem_instdir}/extra %{gem_instdir}/init.rb -%{gem_libdir} %{gem_instdir}/rails -%{gem_instdir}/test +%{gem_instdir}/REVISION %{gem_instdir}/VERSION %{gem_instdir}/VERSION_NAME +%exclude %{gem_instdir}/.* # No vendored libraries thanks %exclude %{gem_instdir}/vendor -%doc %{gem_docdir} %doc %{gem_instdir}/MIT-LICENSE -%doc %{gem_instdir}/README.md -%doc %{gem_instdir}/REVISION -%doc %{gem_instdir}/CONTRIBUTING -%{gem_cache} +%exclude %{gem_cache} %{gem_spec} +%files doc +%doc %{gem_docdir} +%doc %{gem_instdir}/CONTRIBUTING +%doc %{gem_instdir}/README.md +%{gem_instdir}/extra +%{gem_instdir}/Rakefile +%{gem_instdir}/test %changelog +* Fri Jul 27 2012 Bohuslav Kabrda