From d683aaf71753142a3d191065a5e005583d5876c0 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jun 04 2015 07:20:34 +0000 Subject: import rh-ror41-rubygem-erubis-2.7.0-8.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..27f6943 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SOURCES/erubis-2.7.0.gem +SOURCES/erubis-public_html.tgz diff --git a/.rh-ror41-rubygem-erubis.metadata b/.rh-ror41-rubygem-erubis.metadata new file mode 100644 index 0000000..31696bf --- /dev/null +++ b/.rh-ror41-rubygem-erubis.metadata @@ -0,0 +1,2 @@ +fb37414e8454f45a5674caa2a61707df46b370e9 SOURCES/erubis-2.7.0.gem +4adbb5a00ba33f4fe3788e99eff9137f5f8d9203 SOURCES/erubis-public_html.tgz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/rubygem-erubis-2.7.0-ruby-2.0-compatibility.patch b/SOURCES/rubygem-erubis-2.7.0-ruby-2.0-compatibility.patch new file mode 100644 index 0000000..ab31076 --- /dev/null +++ b/SOURCES/rubygem-erubis-2.7.0-ruby-2.0-compatibility.patch @@ -0,0 +1,409 @@ +From 81a56bce3a41896310bd1bed733b894b0c094979 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 5 Mar 2013 10:02:31 +0100 +Subject: [PATCH 1/5] Fix embedded YAML to be compatible with Psych. + +--- + test/test-engines.rb | 32 +++++++++++++++++++++----------- + 1 file changed, 21 insertions(+), 11 deletions(-) + +diff --git a/test/test-engines.rb b/test/test-engines.rb +index 8f0705a..a183231 100644 +--- a/test/test-engines.rb ++++ b/test/test-engines.rb +@@ -71,7 +71,8 @@ __END__ + - name: ruby2_options + lang: ruby + class: Eruby +- options: { :bufvar: '@_out_buf' } ++ options: ++ :bufvar: '@_out_buf' + input: | + + <% for item in @items %> +@@ -137,7 +138,9 @@ __END__ + - name: c1 + lang: c + class: Ec +- options: { :filename: foo.html, :indent: ' ' } ++ options: ++ :filename: foo.html ++ :indent: ' ' + input: |4 +
+ +@@ -167,7 +170,9 @@ __END__ + - name: cpp1 + lang: cpp + class: Ecpp +- options: { :filename: foo.html, :indent: ' ' } ++ options: ++ :filename: foo.html ++ :indent: ' ' + input: |4 +
+ +@@ -197,7 +202,10 @@ __END__ + - name: java1 + lang: java + class: Ejava +- options: { :buf: _buf, :bufclass: StringBuilder, :indent: ' ' } ++ options: ++ :buf: _buf, ++ :bufclass: StringBuilder ++ :indent: ' ' + input: | +
+ +@@ -220,19 +228,19 @@ __END__ + expected: |4 + StringBuilder _buf = new StringBuilder(); _buf.append("
\n" + + " \n"); +- ++ + int i = 0; + for (Iterator it = list.iterator(); it.hasNext(); ) { + String s = (String)it.next(); + i++; +- ++ + _buf.append(" \n" + + " \n" + + " \n" + + " \n"); +- ++ + } +- ++ + _buf.append(" \n" + + "
"); _buf.append(i); _buf.append(""); _buf.append(escape(s)); _buf.append("
\n"); + System.err.println("*** debug: i="+(i)); _buf.append("\n"); +@@ -242,7 +250,7 @@ __END__ + lang: scheme + class: Escheme + options: +- input: &scheme1_input| ++ input: &scheme1_input | + <% (let ((i 0)) %> + + +@@ -290,7 +298,8 @@ __END__ + - name: scheme2 + lang: scheme + class: Escheme +- options: { :func: 'display' } ++ options: ++ :func: 'display' + input: *scheme1_input + expected: |4 + (let ((i 0)) +@@ -401,7 +410,8 @@ __END__ + - name: javascript2 + lang: javascript + class: Ejavascript +- options: { :docwrite: false } ++ options: ++ :docwrite: false + input: *javascript_input + expected: |4 + var _buf = []; +-- +1.8.1.4 + + +From bbf33e57251d353ffe4789c7f4e445305b707d12 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 5 Mar 2013 10:03:23 +0100 +Subject: [PATCH 2/5] Fix embedded YAML to be compatible with Psych. + +--- + test/test-erubis.rb | 34 ++++++++++++++++++++-------------- + 1 file changed, 20 insertions(+), 14 deletions(-) + +diff --git a/test/test-erubis.rb b/test/test-erubis.rb +index ad00e5e..89e94f7 100644 +--- a/test/test-erubis.rb ++++ b/test/test-erubis.rb +@@ -220,13 +220,13 @@ y = 20 + + __END__ + - name: basic1 +- input: &basic1_input| ++ input: &basic1_input | +
    + <% for item in list %> +
  • <%= item %>
  • + <% end %> +
+- src: &basic1_src| ++ src: &basic1_src | + _buf = ''; _buf << '
    + '; for item in list + _buf << '
  • '; _buf << ( item ).to_s; _buf << '
  • +@@ -234,7 +234,7 @@ __END__ + _buf << '
+ '; + _buf.to_s +- output: &basic1_output| ++ output: &basic1_output | +
    +
  • +
  • b&b
  • +@@ -344,7 +344,7 @@ __END__ + - name: quotation1 + desc: single quotation and backslash + class: Eruby +- input: "ation1_input| ++ input: "ation1_input | + a = "'" + b = "\"" + c = '\'' +@@ -451,7 +451,9 @@ __END__ + ## + - name: bodyonly1 + testopt: skip_output +- options: { :preamble: no, :postamble: no } ++ options: ++ :preamble: no ++ :postamble: no + input: *basic1_input + src: |4 + _buf << '
      +@@ -496,7 +498,7 @@ __END__ + ## + - name: nomatch1 + desc: bug +- input: &nomatch1| ++ input: &nomatch1 | +
        +
      • foo
      • +
      +@@ -510,7 +512,8 @@ __END__ + + ## + - name: escape1 +- options: { :escape: true } ++ options: ++ :escape: true + input: | + <% str = '<>&"' %> + <%= str %> +@@ -570,7 +573,7 @@ __END__ + ## + - name: optimized1 + class: OptimizedEruby +- input: &optimized1_input| ++ input: &optimized1_input | +
+ <% for item in list %> + +@@ -677,7 +680,7 @@ __END__ + - name: optimized4 + desc: single quotation and backslash + class: OptimizedEruby +- input: &optimized4_input| ++ input: &optimized4_input | + a = "'" + b = "\"" + c = '\'' +@@ -751,14 +754,14 @@ __END__ + - name: pi1 + class: PI::Eruby + testopt: evaluate +- input: &input_pi1| ++ input: &input_pi1 | + +- src: &src_pi1| ++ src: &src_pi1 | + _buf = ''; _buf << ' + '; + _buf.to_s +- output: &output_pi1| ++ output: &output_pi1 | +
+ ! for item in list +-- +1.8.1.4 + + +From f993710234852a713a351fcd06ca027b1b46d809 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 5 Mar 2013 10:06:30 +0100 +Subject: [PATCH 4/5] Add support for Ruby 2.0.0 error messages. + +--- + test/test-main.rb | 13 +++++++++++++ + test/testutil.rb | 4 ++++ + 2 files changed, 17 insertions(+) + +diff --git a/test/test-main.rb b/test/test-main.rb +index 0e63229..e4d6c2a 100644 +--- a/test/test-main.rb ++++ b/test/test-main.rb +@@ -273,6 +273,19 @@ END + errmsgs << <<'END' + 7: syntax error, unexpected $end, expecting keyword_end + END ++ elsif ruby20? ++ errmsgs << <<'END' ++3: syntax error, unexpected ']', expecting ')' ++ _buf << '
  • '; _buf << ( item[:name]] ).to_s; _buf << '
  • ++ ^ ++-:4: syntax error, unexpected keyword_end, expecting ')' ++'; end ++ ^ ++-:7: syntax error, unexpected end-of-input, expecting ')' ++END ++ errmsgs << <<'END' ++7: syntax error, unexpected end-of-input, expecting keyword_end ++END + elsif rubinius? + errmsgs << <<'END' + 3: expecting ')' +diff --git a/test/testutil.rb b/test/testutil.rb +index e5293a5..59c3779 100644 +--- a/test/testutil.rb ++++ b/test/testutil.rb +@@ -17,6 +17,10 @@ def ruby19? # :nodoc: + RUBY_VERSION =~ /\A1.9/ + end + ++def ruby20? # :nodoc: ++ RUBY_VERSION =~ /\A2.0/ ++end ++ + def rubinius? # :nodoc: + defined?(RUBY_ENGINE) && RUBY_ENGINE == "rbx" + end +-- +1.8.1.4 + + +From 99d0db2f38d7a4b9cf782e2e4a73bde0d73277e9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 5 Mar 2013 10:07:02 +0100 +Subject: [PATCH 5/5] Add support for Ruby 2.0.0. + +--- + test/test-users-guide.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/test-users-guide.rb b/test/test-users-guide.rb +index 2687a83..b89706b 100644 +--- a/test/test-users-guide.rb ++++ b/test/test-users-guide.rb +@@ -28,7 +28,7 @@ class KwarkUsersGuideTest < Test::Unit::TestCase + s =~ /\A\$ (.*?)\n/ + command = $1 + expected = $' +- if ruby19? ++ if ruby19? || ruby20? + case @name + when 'test_main_program1_result' + expected.sub!('["eruby", "items", "x", "_buf"]', '[:_buf, :eruby, :items, :x]') +-- +1.8.1.4 + diff --git a/SPECS/rubygem-erubis.spec b/SPECS/rubygem-erubis.spec new file mode 100644 index 0000000..bc4a26c --- /dev/null +++ b/SPECS/rubygem-erubis.spec @@ -0,0 +1,167 @@ +%{!?scl:%global pkg_name %{name}} +%{?scl:%scl_package rubygem-%{gem_name}} + +# Generated from erubis-2.6.5.gem by gem2rpm -*- rpm-spec -*- +%global gem_name erubis + + +Summary: A fast and extensible eRuby implementation +Name: %{?scl:%scl_prefix}rubygem-%{gem_name} +Version: 2.7.0 +Release: 8%{?dist} +Group: Development/Languages +License: MIT +URL: http://www.kuwata-lab.com/erubis/ +Source0: http://gems.rubyforge.org/gems/%{gem_name}-%{version}.gem +# needed for tests, to get it, run +# git clone https://github.com/kwatch/erubis && cd erubis +# tar czvf erubis-public_html.tgz public_html +Source1: erubis-public_html.tgz +# Fixes issues with test suite using Psych. +# https://github.com/kwatch/erubis/pull/2 +Patch0: rubygem-erubis-2.7.0-ruby-2.0-compatibility.patch +Requires: %{?scl_prefix_ruby}ruby(rubygems) +Requires: %{?scl_prefix_ruby}ruby(release) +BuildRequires: %{?scl_prefix_ruby}rubygems-devel +BuildRequires: %{?scl_prefix_ruby}ruby(release) +BuildRequires: %{?scl_prefix_ruby}rubygem(minitest) +BuildArch: noarch +Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version} + +%description +Erubis is a very fast, secure, and extensible implementation of eRuby. + +%package doc +Summary: Documentation for %{pkg_name} +Group: Documentation +# contrib/erubis-run.rb is BSD +License: MIT and BSD + +Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release} + +%description doc +This package contains documentation for %{pkg_name}. + +%prep +mkdir -p .%{_bindir} +%{?scl:scl enable %scl - << \EOF} +%gem_install -n %{SOURCE0} +%{?scl:EOF} + +pushd .%{gem_instdir} +%patch0 -p1 +popd + +%build + +%install +mkdir -p %{buildroot}%{gem_dir} +mkdir -p %{buildroot}%{_bindir} + +cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}/ +cp -a .%{_bindir}/* %{buildroot}%{_bindir}/ + +# Wrong filename - reported upstream via +# http://rubyforge.org/tracker/?func=detail&aid=27330&group_id=1320&atid=5201 +mv %{buildroot}%{gem_instdir}/test/data/users-guide/Example.ejava \ + %{buildroot}%{gem_instdir}/test/data/users-guide/example.ejava + +find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x + +find %{buildroot}%{gem_instdir}/benchmark -type f | \ + xargs -n 1 sed -i -e '/^#!\/usr\/bin\/env ruby/d' + +%check +%{?scl:scl enable %scl - << \EOF} +export GEM_PATH=%{buildroot}%{gem_dir}:%{gem_dir} +export PATH=%{buildroot}%{_bindir}:$PATH + +pushd %{buildroot}%{gem_instdir} +tar xzf %{SOURCE1} +# test_untabify2(MainTest) test fails. It is not obvious how to make it run +# with Psych, since Psych by design denies tabified YAML, where it was +# acceptable for Syck (if I am not mistaken). +RUBYOPT=-I.:lib ruby -e "Dir.glob('./test/test-*.rb').each {|t| require t}" \ + | grep "159 tests, 237 assertions, 1 failures, 0 errors, 0 skips" +popd +%{?scl:EOF} + +%files +%{_bindir}/erubis +%doc %{gem_instdir}/CHANGES.txt +%doc %{gem_instdir}/MIT-LICENSE +%doc %{gem_instdir}/README.txt +%dir %{gem_instdir} + +# We install via gem +%exclude %{gem_instdir}/setup.rb +%exclude %{gem_instdir}/public_html + +%{gem_instdir}/bin +%{gem_libdir} +%exclude %{gem_cache} +%{gem_spec} + +%files doc +%{gem_instdir}/benchmark +%{gem_instdir}/test +%{gem_instdir}/examples +%{gem_instdir}/contrib + +# Prefer generated rdoc +%exclude %{gem_instdir}/doc-api + +%{gem_instdir}/doc +%{gem_docdir} + +%changelog +* Thu Jan 15 2015 Josef Stribny - 2.7.0-8 +- rebuilt for ror41 + +* Fri Mar 21 2014 Vít Ondruch - 2.7.0-7 +- Rebuid against new scl-utils to depend on -runtime package. + Resolves: rhbz#1069109 + +* Mon Feb 03 2014 Josef Stribny - 2.7.0-6 +- Fix license in -doc subpackage + +* Thu Jun 13 2013 Josef Stribny - 2.7.0-5 +- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0 + +* Wed Jul 25 2012 Bohuslav Kabrda - 2.7.0-4 +- Exclude cached gem, not libdir. + +* Wed Jul 25 2012 Bohuslav Kabrda - 2.7.0-3 +- Specfile cleanup + +* Thu May 31 2012 Bohuslav Kabrda - 2.7.0-2 +- Removed uneeded patch from specfile. + +* Mon Apr 02 2012 Bohuslav Kabrda - 2.7.0-1 +- Rebuilt for scl. +- Updated to 2.7.0. + +* Tue Jan 31 2012 Bohuslav Kabrda - 2.6.6-3 +- Rebuilt for Ruby 1.9.3. + +* Sat Jan 14 2012 Fedora Release Engineering - 2.6.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Feb 14 2011 Vít Ondruch - 2.6.6-1 +- Updated to the latest upstream (#670589). +- Removed flawed require check. +- Removed obsolete BuildRoot. +- Removed obsolete cleanup. +- Package setup and test execution reworked. +- Removed bindir magick. + +* Wed Feb 09 2011 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Oct 29 2009 Matthew Kent - 2.6.5-2 +- Move file rename to build stage (#530275). +- Simplify %%check stage (#530275). +- Remove disable of test_syntax2, fixed by new ruby build (#530275). + +* Mon Oct 19 2009 Matthew Kent - 2.6.5-1 +- Initial package