merge back again
This commit is contained in:
parent
77538bbfa0
commit
fa0f46c70b
3 changed files with 46 additions and 34 deletions
|
|
@ -1,29 +0,0 @@
|
|||
From 9e788e7f2a5b28748b6e55d9444a7e0428461145 Mon Sep 17 00:00:00 2001
|
||||
From: Kouhei Sutou <kou@clear-code.com>
|
||||
Date: Mon, 4 Aug 2014 21:37:04 +0900
|
||||
Subject: [PATCH] logger: replace invalid and undefined characters in encode
|
||||
error message
|
||||
|
||||
[shocker-ja:1228]
|
||||
|
||||
Reported by OBATA Akio. Thanks!!!
|
||||
---
|
||||
lib/rabbit/logger/stderr.rb | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/rabbit/logger/stderr.rb b/lib/rabbit/logger/stderr.rb
|
||||
index b5081ab..f2bf450 100644
|
||||
--- a/lib/rabbit/logger/stderr.rb
|
||||
+++ b/lib/rabbit/logger/stderr.rb
|
||||
@@ -13,7 +13,10 @@ def do_log(severity, prog_name, message)
|
||||
message = message.encode("locale")
|
||||
rescue EncodingError
|
||||
format = _("can't convert to current locale from UTF-8: %s")
|
||||
- $stderr.puts(format % message.encode(format.encoding))
|
||||
+ sanitized_message = message.encode(format.encoding,
|
||||
+ :invalid => :replace,
|
||||
+ :undef => :replace)
|
||||
+ $stderr.puts(format % sanitized_message)
|
||||
end
|
||||
$stderr.puts(format_severity(severity))
|
||||
$stderr.print("[#{prog_name}]: ") if prog_name
|
||||
36
rubygem-rabbit-2.1.4-0001-test-use-real-logger.patch
Normal file
36
rubygem-rabbit-2.1.4-0001-test-use-real-logger.patch
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
From 21a43670ae6db43a2b464662bcee33043fec8577 Mon Sep 17 00:00:00 2001
|
||||
From: Kouhei Sutou <kou@clear-code.com>
|
||||
Date: Mon, 23 Feb 2015 21:39:24 +0900
|
||||
Subject: [PATCH] test: use real logger
|
||||
|
||||
GitHub: fix #54
|
||||
|
||||
Reported by Mamoru TASAKA. Thanks!!!
|
||||
---
|
||||
test/parser/test-markdown.rb | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/test/parser/test-markdown.rb b/test/parser/test-markdown.rb
|
||||
index 243e5ef..be176f8 100644
|
||||
--- a/test/parser/test-markdown.rb
|
||||
+++ b/test/parser/test-markdown.rb
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
require "rabbit-test-utils"
|
||||
|
||||
+require "rabbit/logger"
|
||||
require "rabbit/slide"
|
||||
require "rabbit/source/memory"
|
||||
require "rabbit/parser/markdown"
|
||||
@@ -25,7 +26,7 @@ class RabbitParserMarkdownTest < Test::Unit::TestCase
|
||||
def parse(markdown)
|
||||
canvas = []
|
||||
def canvas.logger
|
||||
- nil
|
||||
+ Rabbit::Logger.default
|
||||
end
|
||||
source = Rabbit::Source::Memory.new("UTF-8", nil)
|
||||
source.source = markdown
|
||||
--
|
||||
2.1.0
|
||||
|
||||
|
|
@ -5,8 +5,8 @@ BuildRequires: %1 \
|
|||
%{nil}
|
||||
|
||||
Name: rubygem-%{gem_name}
|
||||
Version: 2.1.3
|
||||
Release: 3%{?dist}
|
||||
Version: 2.1.4
|
||||
Release: 1%{?dist}
|
||||
|
||||
Summary: RD-document-based presentation application
|
||||
# CC-BY: rubykaigi2011-background-white.jpg and
|
||||
|
|
@ -22,9 +22,9 @@ Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
|||
Source1: %{name}-2.1.2-test-missing-files.tar.gz
|
||||
Source10: rabbit.desktop
|
||||
Source11: rabbit.xml
|
||||
# http://www.cozmixng.org/~w3ml/index.rb/rabbit-shocker/msg/1228
|
||||
# https://github.com/rabbit-shocker/rabbit/commit/9e788e7f2a5b28748b6e55d9444a7e0428461145.patch
|
||||
Patch0: rubygem-rabbit-2.1.3-replace-invalid-character.patch
|
||||
# https://github.com/rabbit-shocker/rabbit/issues/54
|
||||
# https://github.com/rabbit-shocker/rabbit/commit/21a43670ae6db43a2b464662bcee33043fec8577.patch
|
||||
Patch0: rubygem-rabbit-2.1.4-0001-test-use-real-logger.patch
|
||||
|
||||
%BothRequires ruby(release)
|
||||
BuildRequires: rubygems-devel
|
||||
|
|
@ -41,6 +41,8 @@ Requires: ruby(rubygems)
|
|||
%BothRequires rubygem(rsvg2)
|
||||
%BothRequires rubygem(rdtool)
|
||||
%BothRequires rubygem(rttool)
|
||||
# test_codeblock_fence test needs below
|
||||
BuildRequires: %{_bindir}/blockdiag
|
||||
BuildRequires: desktop-file-utils
|
||||
# For rabbirc
|
||||
Requires: rubygem(net-irc)
|
||||
|
|
@ -177,6 +179,9 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
|
|||
%doc %{gem_instdir}/sample/
|
||||
|
||||
%changelog
|
||||
* Tue Feb 24 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.1.4-1
|
||||
- 2.1.4
|
||||
|
||||
* Fri Nov 7 2014 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.1.3-3
|
||||
- Rescue Encoding::UndefinedConversionError on logger
|
||||
(shocker-ja:1228)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue