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/gruff/files: gruff-0.3.6-sort-filenames.patch gruff-0.3.6-fix-tests.patch gruff-0.3.6-spider.patch
Date: Thu, 07 Jan 2010 07:28:55
Message-Id: E1NSmnZ-0000Zn-SB@stork.gentoo.org
1 graaff 10/01/07 07:28:49
2
3 Added: gruff-0.3.6-sort-filenames.patch
4 gruff-0.3.6-fix-tests.patch
5 gruff-0.3.6-spider.patch
6 Log:
7 Move here from ruby-ng testbed, including two patches. Add additional patch for broken spider graph label.
8 (Portage version: 2.1.6.13/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.1 dev-ruby/gruff/files/gruff-0.3.6-sort-filenames.patch
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/gruff/files/gruff-0.3.6-sort-filenames.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/gruff/files/gruff-0.3.6-sort-filenames.patch?rev=1.1&content-type=text/plain
15
16 Index: gruff-0.3.6-sort-filenames.patch
17 ===================================================================
18 From 60d0bcc1de340d29c5bad3c707b49be7195e119b Mon Sep 17 00:00:00 2001
19 From: =?UTF-8?q?Diego=20Elio=20'Flameeyes'=20Petten=C3=B2?= <flameeyes@×××××.com>
20 Date: Sat, 5 Sep 2009 21:52:18 +0200
21 Subject: [PATCH 1/2] Make sure the Gruff::Layer::filenames array is sorted when creating.
22
23 If the array is not sorted, the rest of the class fails to work as intended
24 and the tests fail:
25
26 2) Failure:
27 test_layer(TestGruffScene) [./test/test_scene.rb:54]:
28 <["cloudy.png", "partly_cloudy.png", "stormy.png"]> expected but was
29 <["stormy.png", "partly_cloudy.png", "cloudy.png"]>.
30
31 and
32
33 2) Failure:
34 test_layer(TestGruffScene) [./test/test_scene.rb:61]:
35 <"1200.png"> expected but was
36 <"0600.png">.
37 ---
38 lib/gruff/scene.rb | 2 +-
39 1 files changed, 1 insertions(+), 1 deletions(-)
40
41 diff --git a/lib/gruff/scene.rb b/lib/gruff/scene.rb
42 index 47943db..ef93656 100644
43 --- a/lib/gruff/scene.rb
44 +++ b/lib/gruff/scene.rb
45 @@ -133,7 +133,7 @@ class Gruff::Layer
46 def initialize(base_dir, folder_name)
47 @base_dir = base_dir.to_s
48 @name = folder_name.to_s
49 - @filenames = Dir.open(File.join(base_dir, folder_name)).entries.select { |file| file =~ /^[^.]+\.png$/ }
50 + @filenames = Dir.open(File.join(base_dir, folder_name)).entries.select { |file| file =~ /^[^.]+\.png$/ }.sort
51 @selected_filename = select_default
52 end
53
54 --
55 1.6.4.2
56
57
58
59
60 1.1 dev-ruby/gruff/files/gruff-0.3.6-fix-tests.patch
61
62 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/gruff/files/gruff-0.3.6-fix-tests.patch?rev=1.1&view=markup
63 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/gruff/files/gruff-0.3.6-fix-tests.patch?rev=1.1&content-type=text/plain
64
65 Index: gruff-0.3.6-fix-tests.patch
66 ===================================================================
67 From 83c3ce9b01311dd18da0eff717d46734d5e96b83 Mon Sep 17 00:00:00 2001
68 From: =?UTF-8?q?Diego=20Elio=20'Flameeyes'=20Petten=C3=B2?= <flameeyes@×××××.com>
69 Date: Sat, 5 Sep 2009 21:54:24 +0200
70 Subject: [PATCH 2/2] Remove a call to set label_max_decimals on Gruff::Line that doesn't exist.
71
72 ---
73 test/test_line.rb | 1 -
74 1 files changed, 0 insertions(+), 1 deletions(-)
75
76 diff --git a/test/test_line.rb b/test/test_line.rb
77 index 4135b1e..1531931 100644
78 --- a/test/test_line.rb
79 +++ b/test/test_line.rb
80 @@ -462,7 +462,6 @@ class TestGruffLine < GruffTestCase
81 g.legend_font_size = 12
82 g.marker_font_size = 16
83 g.hide_dots = false
84 - g.label_max_decimals = 1
85
86 g.write('test/output/line_jruby_error.png')
87 end
88 --
89 1.6.4.2
90
91
92
93
94 1.1 dev-ruby/gruff/files/gruff-0.3.6-spider.patch
95
96 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/gruff/files/gruff-0.3.6-spider.patch?rev=1.1&view=markup
97 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/gruff/files/gruff-0.3.6-spider.patch?rev=1.1&content-type=text/plain
98
99 Index: gruff-0.3.6-spider.patch
100 ===================================================================
101 --- lib/gruff/spider.rb.orig 2007-03-08 10:22:36.000000000 +0100
102 +++ lib/gruff/spider.rb 2007-03-08 10:38:50.000000000 +0100
103 @@ -34,8 +34,8 @@
104 return unless @has_data
105
106 # Setup basic positioning
107 - diameter = @graph_height
108 - radius = @graph_height / 2.0
109 + diameter = @graph_height - 50
110 + radius = diameter / 2.0
111 top_x = @graph_left + (@graph_width - diameter) / 2.0
112 center_x = @graph_left + (@graph_width / 2.0)
113 center_y = @graph_top + (@graph_height / 2.0) - 25 # Move graph up a bit