[DRE-commits] [ruby-gollum-lib] 02/02: new upstream release with rouge2 support

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Thu Jul 14 08:25:09 UTC 2016


This is an automated email from the git hooks/post-receive script.

praveen pushed a commit to branch master
in repository ruby-gollum-lib.

commit e125c66ab6e3ba71921e573c0c259d63e4865db9
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date:   Thu Jul 14 13:43:08 2016 +0530

    new upstream release with rouge2 support
---
 debian/changelog                    |  7 +++++
 debian/patches/relax-stringex.patch |  8 ++++--
 debian/patches/rouge2.patch         | 56 -------------------------------------
 debian/patches/series               |  1 -
 debian/patches/use-rugged.patch     |  4 +--
 5 files changed, 14 insertions(+), 62 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index aa94100..1d45350 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+ruby-gollum-lib (4.2.1-1) unstable; urgency=medium
+
+  * New upstream release
+  * Remove rouge2.patch (already included upstream)
+
+ -- Pirate Praveen <praveen at debian.org>  Thu, 14 Jul 2016 13:41:55 +0530
+
 ruby-gollum-lib (4.2.0-3) unstable; urgency=medium
 
   * Team upload
diff --git a/debian/patches/relax-stringex.patch b/debian/patches/relax-stringex.patch
index 3c8844a..5e9ec96 100644
--- a/debian/patches/relax-stringex.patch
+++ b/debian/patches/relax-stringex.patch
@@ -3,9 +3,11 @@ Author: Cédric Boutillier <boutil at debian.org>
 Last-Update: 2016-07-09
 Forwarded: no
 
---- a/gemspec.rb
-+++ b/gemspec.rb
-@@ -27,7 +27,7 @@
+Index: ruby-gollum-lib/gemspec.rb
+===================================================================
+--- ruby-gollum-lib.orig/gemspec.rb
++++ ruby-gollum-lib/gemspec.rb
+@@ -27,7 +27,7 @@ def specification(version, default_adapt
      s.add_dependency *default_adapter
      s.add_dependency 'rouge', '~> 2.0'
      s.add_dependency 'nokogiri', '~> 1.6.4'
diff --git a/debian/patches/rouge2.patch b/debian/patches/rouge2.patch
deleted file mode 100644
index 590da36..0000000
--- a/debian/patches/rouge2.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From: "http://jneen.net/" <jneen at jneen.net>
-Origin: https://github.com/gollum/gollum-lib/commit/f43f905ca952ee9f55376d990921de147dbaa8be
-Date: Tue, 14 Jun 2016 16:23:22 -0700
-Subject: [PATCH] use rouge 2.0 and manual wrapping
-
----
- gemspec.rb                    |  2 +-
- lib/gollum-lib/filter/code.rb | 18 +++++++++++-------
- 2 files changed, 12 insertions(+), 8 deletions(-)
-
-diff --git a/gemspec.rb b/gemspec.rb
-index 02f2d70..3dd3438 100644
---- a/gemspec.rb
-+++ b/gemspec.rb
-@@ -25,7 +25,7 @@ def specification(version, default_adapter, platform = nil)
-     s.extra_rdoc_files = %w(README.md LICENSE)
- 
-     s.add_dependency *default_adapter
--    s.add_dependency 'rouge', '~> 1.10'
-+    s.add_dependency 'rouge', '~> 2.0'
-     s.add_dependency 'nokogiri', '~> 1.6.4'
-     s.add_dependency 'stringex', '~> 2.5.1'
-     s.add_dependency 'sanitize', '~> 2.1.0'
-diff --git a/lib/gollum-lib/filter/code.rb b/lib/gollum-lib/filter/code.rb
-index 9236814..088e15b 100644
---- a/lib/gollum-lib/filter/code.rb
-+++ b/lib/gollum-lib/filter/code.rb
-@@ -82,17 +82,21 @@ def process(data)
-         hl_code = lexer.highlight(code, :options => { :encoding => encoding.to_s, :startinline => true })
-       else # Rouge
-         begin
-+          lexer = Rouge::Lexer.find_fancy(lang || 'plaintext')
-+          formatter = Rouge::Formatters::HTML.new
-+
-           # if `lang` was not defined then assume plaintext
-           # if `lang` is defined but cannot be found then wrap it and escape it
--          lang ||= 'plaintext'
--          if Rouge::Lexer.find(lang).nil?
--            lexer     = Rouge::Lexers::PlainText.new
--            formatter = Rouge::Formatters::HTML.new(:wrap => false)
--            hl_code   = formatter.format(lexer.lex(code))
--            hl_code   = "<pre class='highlight'><span class='err'>#{CGI.escapeHTML(hl_code)}</span></pre>"
-+          if lexer.nil?
-+            lexer = Rouge::Lexers::PlainText
-+            wrap_template = '<pre class="highlight"><span class="err">%s</span></pre>'
-           else
--            hl_code = Rouge.highlight(code, lang, 'html')
-+            wrap_template = '<pre class="highlight"><code>%s</code></pre>'
-           end
-+
-+          formatted = formatter.format(lexer.lex(code))
-+
-+          hl_code = Kernel.sprintf(wrap_template, formatted)
-         rescue
-           hl_code = code
-         end
diff --git a/debian/patches/series b/debian/patches/series
index 168aed8..8faf39f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,2 @@
 use-rugged.patch
-rouge2.patch
 relax-stringex.patch
diff --git a/debian/patches/use-rugged.patch b/debian/patches/use-rugged.patch
index 292bef7..6954777 100644
--- a/debian/patches/use-rugged.patch
+++ b/debian/patches/use-rugged.patch
@@ -16,9 +16,9 @@ Index: ruby-gollum-lib/lib/gollum-lib.rb
 ===================================================================
 --- ruby-gollum-lib.orig/lib/gollum-lib.rb
 +++ ruby-gollum-lib/lib/gollum-lib.rb
-@@ -4,7 +4,7 @@ require 'digest/md5'
- require 'digest/sha1'
+@@ -5,7 +5,7 @@ require 'digest/sha1'
  require 'ostruct'
+ require 'pathname'
  
 -DEFAULT_ADAPTER = RUBY_PLATFORM == 'java' ? 'rjgit_adapter' : 'grit_adapter'
 +DEFAULT_ADAPTER = RUBY_PLATFORM == 'java' ? 'rjgit_adapter' : 'rugged_adapter'

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-gollum-lib.git



More information about the Pkg-ruby-extras-commits mailing list