Gentoo Archives: gentoo-commits

From: "Hans de Graaff (graaff)" <graaff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-ruby/sinatra/files: sinatra-1.3.1-rdoc-tests.patch sinatra-1.3.1-rdoc-require.patch
Date: Wed, 28 Dec 2011 12:32:47
Message-Id: 20111228123235.B6EAB2004B@flycatcher.gentoo.org
1 graaff 11/12/28 12:32:35
2
3 Added: sinatra-1.3.1-rdoc-tests.patch
4 sinatra-1.3.1-rdoc-require.patch
5 Log:
6 Version bump. Add ruby19. Drop arches due to new dependency, bug 396291.
7
8 (Portage version: 2.1.10.41/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.1 dev-ruby/sinatra/files/sinatra-1.3.1-rdoc-tests.patch
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ruby/sinatra/files/sinatra-1.3.1-rdoc-tests.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ruby/sinatra/files/sinatra-1.3.1-rdoc-tests.patch?rev=1.1&content-type=text/plain
15
16 Index: sinatra-1.3.1-rdoc-tests.patch
17 ===================================================================
18 commit 3d78b5ee6c18d5776ddf9c7d148158a3604f80e6
19 Author: Tim Felgentreff <timfelgentreff@×××××.com>
20 Date: Mon Oct 10 19:50:59 2011 -0700
21
22 fix rdoc tests for 3.10
23
24 diff --git a/test/helper.rb b/test/helper.rb
25 index 1f061d4..dc8fd40 100644
26 --- a/test/helper.rb
27 +++ b/test/helper.rb
28 @@ -69,7 +69,11 @@ class Test::Unit::TestCase
29 end
30
31 def assert_body(value)
32 - assert_equal value.lstrip.gsub(/\s*\n\s*/, ""), body.lstrip.gsub(/\s*\n\s*/, "")
33 + if value.respond_to? :to_str
34 + assert_equal value.lstrip.gsub(/\s*\n\s*/, ""), body.lstrip.gsub(/\s*\n\s*/, "")
35 + else
36 + assert_match value, body
37 + end
38 end
39
40 def assert_status(expected)
41 diff --git a/test/rdoc_test.rb b/test/rdoc_test.rb
42 index d28b16a..0d58856 100644
43 --- a/test/rdoc_test.rb
44 +++ b/test/rdoc_test.rb
45 @@ -16,13 +16,13 @@ class RdocTest < Test::Unit::TestCase
46 it 'renders inline rdoc strings' do
47 rdoc_app { rdoc '= Hiya' }
48 assert ok?
49 - assert_body "<h1>Hiya</h1>"
50 + assert_body /<h1[^>]*>Hiya<\/h1>/
51 end
52
53 it 'renders .rdoc files in views path' do
54 rdoc_app { rdoc :hello }
55 assert ok?
56 - assert_body "<h1>Hello From RDoc</h1>"
57 + assert_body /<h1[^>]*>Hello From RDoc<\/h1>/
58 end
59
60 it "raises error if template not found" do
61
62
63
64 1.1 dev-ruby/sinatra/files/sinatra-1.3.1-rdoc-require.patch
65
66 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ruby/sinatra/files/sinatra-1.3.1-rdoc-require.patch?rev=1.1&view=markup
67 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ruby/sinatra/files/sinatra-1.3.1-rdoc-require.patch?rev=1.1&content-type=text/plain
68
69 Index: sinatra-1.3.1-rdoc-require.patch
70 ===================================================================
71 commit dc1ff1867096c5ef036c7aff9b55e4e72e4eaa6a
72 Author: Tim Felgentreff <timfelgentreff@×××××.com>
73 Date: Mon Oct 10 18:57:14 2011 -0700
74
75 Update rdoc test to work with RDoc 3.10
76
77 diff --git a/test/rdoc_test.rb b/test/rdoc_test.rb
78 index ff547bc..d28b16a 100644
79 --- a/test/rdoc_test.rb
80 +++ b/test/rdoc_test.rb
81 @@ -1,6 +1,7 @@
82 require File.expand_path('../helper', __FILE__)
83
84 begin
85 +require 'rdoc'
86 require 'rdoc/markup/to_html'
87
88 class RdocTest < Test::Unit::TestCase