[rubygem-treetop] Update to Treetop 1.4.14.
Vít Ondruch
vondruch at fedoraproject.org
Fri Aug 16 11:11:47 UTC 2013
commit 8b2b563373e3332e32dc5e0ed6dc70507d84c56d
Author: Vít Ondruch <vondruch at redhat.com>
Date: Fri Aug 16 13:11:32 2013 +0200
Update to Treetop 1.4.14.
.gitignore | 2 +-
...14-Avoid-collision-with-ActiveSupport-4.0.patch | 50 ++++++++++++++++++++
rubygem-treetop.spec | 21 ++++++--
sources | 2 +-
4 files changed, 67 insertions(+), 8 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 0c0e374..2896b2a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-treetop-1.4.12.gem
\ No newline at end of file
+treetop-1.4.12.gem/treetop-1.4.14.gem
diff --git a/rubygem-treetop-1.4.14-Avoid-collision-with-ActiveSupport-4.0.patch b/rubygem-treetop-1.4.14-Avoid-collision-with-ActiveSupport-4.0.patch
new file mode 100644
index 0000000..2557c98
--- /dev/null
+++ b/rubygem-treetop-1.4.14-Avoid-collision-with-ActiveSupport-4.0.patch
@@ -0,0 +1,50 @@
+From 4ebd34c62342e04fb8c4452b20f48d6f8cb66c40 Mon Sep 17 00:00:00 2001
+From: Clifford Heath <clifford.heath at gmail.com>
+Date: Fri, 14 Jun 2013 11:45:53 +1000
+Subject: [PATCH] Inlined the String#indent method to avoid collision with
+ ActiveSupport 4.0
+
+---
+ lib/treetop/ruby_extensions/string.rb | 20 ++++++++------------
+ 1 file changed, 8 insertions(+), 12 deletions(-)
+
+diff --git a/lib/treetop/ruby_extensions/string.rb b/lib/treetop/ruby_extensions/string.rb
+index 9ea5dbf..15c1a41 100644
+--- a/lib/treetop/ruby_extensions/string.rb
++++ b/lib/treetop/ruby_extensions/string.rb
+@@ -22,23 +22,19 @@ def blank?
+ # The following methods are lifted from Facets 2.0.2
+ def tabto(n)
+ if self =~ /^( *)\S/
+- indent(n - $1.length)
+- else
+- self
+- end
+- end
+-
+- unless method_defined?(:indent)
+- def indent(n)
+- if n >= 0
+- gsub(/^/, ' ' * n)
++ # Inlined due to collision with ActiveSupport 4.0: indent(n - $1.length)
++ m = n - $1.length
++ if m >= 0
++ gsub(/^/, ' ' * m)
+ else
+- gsub(/^ {0,#{-n}}/, "")
++ gsub(/^ {0,#{-m}}/, "")
+ end
++ else
++ self
+ end
+ end
+
+ def treetop_camelize
+ to_s.gsub(/\/(.?)/){ "::" + $1.upcase }.gsub(/(^|_)(.)/){ $2.upcase }
+ end
+-end
+\ No newline at end of file
++end
+--
+1.8.1.6
+
diff --git a/rubygem-treetop.spec b/rubygem-treetop.spec
index 3064ec2..5271c8d 100644
--- a/rubygem-treetop.spec
+++ b/rubygem-treetop.spec
@@ -2,12 +2,15 @@
Summary: A Ruby-based text parsing and interpretation DSL
Name: rubygem-%{gem_name}
-Version: 1.4.12
-Release: 4%{?dist}
+Version: 1.4.14
+Release: 1%{?dist}
Group: Development/Languages
License: MIT
URL: http://treetop.rubyforge.org/
Source0: http://rubygems.org/downloads/%{gem_name}-%{version}.gem
+# Avoid collision with ActiveSupport 4.0.
+# https://github.com/cjheath/treetop/commit/4ebd34c62342e04fb8c4452b20f48d6f8cb66c40
+Patch0: rubygem-treetop-1.4.14-Avoid-collision-with-ActiveSupport-4.0.patch
Requires: ruby(release)
Requires: ruby(rubygems)
Requires: rubygem(polyglot)
@@ -36,6 +39,10 @@ Documentation for %{name}
%setup -q -c -T
%gem_install -n %{SOURCE0}
+pushd .%{gem_instdir}
+%patch0 -p1
+popd
+
%build
@@ -51,10 +58,9 @@ cp -pa .%{_bindir}/* \
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
-# Fix the permissions and shebangs.
-# https://groups.google.com/forum/?fromgroups=#!topic/treetop-dev/mfyCGee_dv4
-find %{buildroot}%{gem_instdir}/{doc,examples,lib,spec} -executable -type f | xargs chmod a-x
-sed -i '/^#!/d' %{buildroot}%{gem_instdir}/spec/compiler/multibyte_chars_spec.rb
+# Fix the permissions.
+# https://github.com/cjheath/treetop/issues/7
+find %{buildroot}%{gem_instdir}/doc -executable -type f | xargs chmod a-x
%check
pushd .%{gem_instdir}
@@ -81,6 +87,9 @@ popd
%changelog
+* Fri Aug 16 2013 Vít Ondruch <vondruch at redhat.com> - 1.4.14-1
+- Update to Treetop 1.4.14.
+
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.12-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
diff --git a/sources b/sources
index 4da3047..8ad5c6d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-8e3b8d62cc3fa48d0f8b70e1ddfa236e treetop-1.4.12.gem
+4c43f531ed8421b0f2184ba9997ff766 treetop-1.4.14.gem
More information about the scm-commits
mailing list