]> git.pld-linux.org Git - packages/cvsspam.git/commitdiff
- ruby19 fix on users file encoding reading auto/th/cvsspam-0_2_12-13
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 7 Apr 2010 15:28:38 +0000 (15:28 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    cvsspam.spec -> 1.45
    ruby19.patch -> 1.1

cvsspam.spec
ruby19.patch [new file with mode: 0644]

index e6a6e3c571d52e1f07df076251f4e87af1e40f55..b81b19a9064c7c4d4472717a81675cd730f0fc2f 100644 (file)
@@ -2,7 +2,7 @@ Summary:        CVSspam emails you diffs when someone commits a change to your CVS repo
 Summary(pl.UTF-8):     CVSspam - wysyłanie różnic po wykonaniu zmiany w repozytorium CVS
 Name:          cvsspam
 Version:       0.2.12
-Release:       12
+Release:       13
 License:       GPL
 Group:         Applications/System
 Source0:       http://www.badgers-in-foil.co.uk/projects/cvsspam/releases/%{name}-%{version}.tar.gz
@@ -11,6 +11,7 @@ Source1:      %{name}-branch.sh
 Patch100:      %{name}-branch.diff
 Patch0:                %{name}-textdiff.patch
 Patch1:                %{name}-tracfunc.patch
+Patch2:                ruby19.patch
 URL:           http://www.badgers-in-foil.co.uk/projects/cvsspam/
 BuildRequires: rpmbuild(macros) >= 1.277
 Requires:      cvs-client
@@ -40,6 +41,7 @@ rm svn_post_commit_hook.rb
 %patch100 -p0
 %patch0 -p0
 %patch1 -p1
+%patch2 -p1
 
 %install
 rm -rf $RPM_BUILD_ROOT
diff --git a/ruby19.patch b/ruby19.patch
new file mode 100644 (file)
index 0000000..97117ea
--- /dev/null
@@ -0,0 +1,19 @@
+--- cvsspam-0.2.12/cvsspam.rb~ 2010-04-07 18:25:49.252489451 +0300
++++ cvsspam-0.2.12/cvsspam.rb  2010-04-07 18:27:22.000000000 +0300
+@@ -169,7 +171,7 @@
+   # test to see of the given string contains non-ASCII characters
+   def requires_rfc2047?(word)
+-    (word =~ /[\177-\377]/) != nil
++    (word.force_encoding('ASCII-8BIT') =~ /[\177-\377]/) != nil
+   end
+ end
+@@ -2242,6 +2244,7 @@
+   if File.exists?($users_file)
+     File.open($users_file) do |io|
+       io.each_line do |line|
++        line.force_encoding($users_file_charset)
+         if line =~ /^([^:]+)\s*:\s*(['"]?)([^\n\r]+)(\2)/
+           if email.address == $1
+             return EmailAddress.new($3, $users_file_charset)
This page took 0.087274 seconds and 4 git commands to generate.