[rubygem-syntax/f21] Update to Syntax 1.2.0.
Vít Ondruch
vondruch at fedoraproject.org
Thu Jul 31 12:38:51 UTC 2014
commit ecea121e10ce94f8cab432490ef7b7ce1377792b
Author: Vít Ondruch <vondruch at redhat.com>
Date: Thu Jul 31 14:37:45 2014 +0200
Update to Syntax 1.2.0.
.gitignore | 2 +
rubygem-syntax-1.2.0-Explicitly-require-set.patch | 64 +++++++++++++++
rubygem-syntax-fix-yaml-parse-for-ruby-1.9.patch | 11 ---
rubygem-syntax.spec | 87 ++++++++++++++-------
sources | 3 +-
syntax-LICENSE | 44 -----------
6 files changed, 126 insertions(+), 85 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index cca3b2f..9dc347e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
syntax-1.0.0.gem
+/syntax-1.2.0-tests.tgz
+/syntax-1.2.0.gem
diff --git a/rubygem-syntax-1.2.0-Explicitly-require-set.patch b/rubygem-syntax-1.2.0-Explicitly-require-set.patch
new file mode 100644
index 0000000..dbcbff0
--- /dev/null
+++ b/rubygem-syntax-1.2.0-Explicitly-require-set.patch
@@ -0,0 +1,64 @@
+From 22430510b9662edd64e3792c560629daf8aebc82 Mon Sep 17 00:00:00 2001
+From: Jan Berkel <jan at soundcloud.com>
+Date: Tue, 1 Apr 2014 07:00:17 -0400
+Subject: [PATCH] Explicitly require 'set'.
+
+---
+ CHANGELOG | 3 +++
+ Gemfile.lock | 20 ++++++++++++++++++++
+ lib/syntax/lang/ruby.rb | 1 +
+ 3 files changed, 24 insertions(+)
+ create mode 100644 Gemfile.lock
+
+diff --git a/CHANGELOG b/CHANGELOG
+index 7947d3a..82d7d29 100644
+--- a/CHANGELOG
++++ b/CHANGELOG
+@@ -1,5 +1,8 @@
+ Syntax: a syntax highlighting library for Ruby.
+
++1.2.1 Next
++ Explicitly require 'set' - @jberkel.
++
+ 1.2.0 02 Jan 2014
+ Cleaned up Gemspec, added license and homepage - @grosser.
+
+diff --git a/Gemfile.lock b/Gemfile.lock
+new file mode 100644
+index 0000000..e017cda
+--- /dev/null
++++ b/Gemfile.lock
+@@ -0,0 +1,20 @@
++PATH
++ remote: .
++ specs:
++ syntax (1.2.0)
++
++GEM
++ remote: https://rubygems.org/
++ specs:
++ RedCloth (4.2.9)
++ rake (10.1.1)
++ syck (1.0.1)
++
++PLATFORMS
++ ruby
++
++DEPENDENCIES
++ RedCloth
++ rake
++ syck
++ syntax!
+diff --git a/lib/syntax/lang/ruby.rb b/lib/syntax/lang/ruby.rb
+index edccda0..90eca56 100644
+--- a/lib/syntax/lang/ruby.rb
++++ b/lib/syntax/lang/ruby.rb
+@@ -1,4 +1,5 @@
+ require 'syntax'
++require 'set'
+
+ module Syntax
+
+--
+2.0.3
+
diff --git a/rubygem-syntax.spec b/rubygem-syntax.spec
index 67f7bb5..47167c9 100644
--- a/rubygem-syntax.spec
+++ b/rubygem-syntax.spec
@@ -2,62 +2,91 @@
Summary: Ruby library for performing simple syntax highlighting
Name: rubygem-%{gem_name}
-Version: 1.0.0
-Release: 11%{?dist}
+Version: 1.2.0
+Release: 1%{?dist}
Group: Development/Languages
-License: Public Domain
-URL: http://syntax.rubyforge.org/
-Source0: http://gems.rubyforge.org/gems/%{gem_name}-%{version}.gem
-Source1: %{gem_name}-LICENSE
-Patch0: rubygem-syntax-fix-yaml-parse-for-ruby-1.9.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Requires: ruby(release)
-Requires: ruby(rubygems)
+License: BSD
+URL: https://github.com/dblock/syntax
+Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
+# git clone https://github.com/dblock/syntax.git && cd syntax && git checkout v1.2.0
+# tar czvf syntax-1.2.0-tests.tgz test/
+Source1: %{gem_name}-%{version}-tests.tgz
+# Avoid NameError: uninitialized constant Syntax::Ruby::Set.
+# https://github.com/dblock/syntax/commit/22430510b9662edd64e3792c560629daf8aebc82
+Patch0: rubygem-syntax-1.2.0-Explicitly-require-set.patch
BuildRequires: rubygems-devel
-BuildRequires: rubygem(minitest)
+BuildRequires: rubygem(minitest) > 5
BuildArch: noarch
-Provides: rubygem(%{gem_name}) = %{version}
%description
Syntax is a lexical analysis framework. It supports pluggable syntax
modules, and comes with modules for Ruby, XML, and YAML.
+%package doc
+Summary: Documentation for %{name}
+Group: Documentation
+Requires: %{name} = %{version}-%{release}
+BuildArch: noarch
+
+%description doc
+Documentation for %{name}.
+
%prep
-install -pm 0644 %{SOURCE1} LICENSE
-mkdir -p .{gem_dir}
+%setup -q -c -T
%gem_install -n %{SOURCE0}
pushd .%{gem_instdir}
-%patch0
+%patch0 -p1
popd
%build
%install
-rm -rf $RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT%{gem_dir}
-cp -a .%{gem_dir}/* $RPM_BUILD_ROOT%{gem_dir}
-
-%clean
-rm -rf $RPM_BUILD_ROOT
+mkdir -p %{buildroot}%{gem_dir}
+cp -a .%{gem_dir}/* \
+ %{buildroot}%{gem_dir}/
%check
pushd .%{gem_instdir}
-ruby -Itest test/ALL-TESTS.rb
+tar xzvf %{SOURCE1}
+
+# Run the tests using minitest 5.
+ruby -rminitest/autorun - << \EOF
+ module Kernel
+ alias orig_require require
+ remove_method :require
+
+ def require path
+ orig_require path unless path == 'test/unit'
+ end
+ end
+
+ Test = Minitest
+
+ require './test/ALL-TESTS.rb'
+EOF
popd
%files
-%defattr(-,root,root,-)
-%{gem_instdir}/
-%doc %{gem_docdir}
-%{gem_cache}
+%doc %{gem_instdir}/LICENSE
+%dir %{gem_instdir}
+%{gem_libdir}
+%exclude %{gem_cache}
%{gem_spec}
-%doc LICENSE
+
+%files doc
+%doc %{gem_docdir}
+%doc %{gem_instdir}/CHANGELOG
+%{gem_instdir}/Gemfile.lock
+%doc %{gem_instdir}/README.rdoc
%changelog
+* Thu Jul 31 2014 Vít Ondruch <vondruch at redhat.com> - 1.2.0-1
+- Update to Syntax 1.2.0.
+
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
@@ -87,12 +116,12 @@ popd
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
-* Mon Jul 08 2009 Lubomir Rintel (Good Data) <lubo.rintel at gooddata.com> - 1.0.0-2
+* Mon Jun 08 2009 Lubomir Rintel (Good Data) <lubo.rintel at gooddata.com> - 1.0.0-2
- Bring tests back
- Depend on ruby(abi)
- Replace defines with globals
-* Fri Jul 05 2009 Lubomir Rintel (Good Data) <lubo.rintel at gooddata.com> - 1.0.0-1
+* Fri Jun 05 2009 Lubomir Rintel (Good Data) <lubo.rintel at gooddata.com> - 1.0.0-1
- Package generated by gem2rpm
- Don't ship tests
- Fix up License
diff --git a/sources b/sources
index b646e76..3a89135 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
-d9d2eabc03bc937adfa00e35f228f9a8 syntax-1.0.0.gem
+4026dabe65650593be76c89d90538a2b syntax-1.2.0-tests.tgz
+c16e70913056a199b4221c47e089d49e syntax-1.2.0.gem
More information about the scm-commits
mailing list