rabbit 2.2.1 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/data/locale/ja/LC_MESSAGES/rabbit.mo +0 -0
- data/doc/_config.yml +2 -2
- data/doc/_layouts/en.html +1 -1
- data/doc/_layouts/ja.html +1 -1
- data/doc/en/news.rd +140 -0
- data/doc/en/sample/hiki/rabbit.hiki +2 -2
- data/doc/en/sample/markdown/rabbit.md +1 -1
- data/doc/en/sample/rd/rabbit.rd +1 -1
- data/doc/en/usage/rabbit-slide.rd +3 -3
- data/doc/images/screenshots/en/blue-circle-raw.png +0 -0
- data/doc/images/screenshots/en/blue-circle.png +0 -0
- data/doc/images/screenshots/en/clear-blue-raw.png +0 -0
- data/doc/images/screenshots/en/clear-blue.png +0 -0
- data/doc/images/screenshots/en/cozmixng-raw.png +0 -0
- data/doc/images/screenshots/en/cozmixng.png +0 -0
- data/doc/images/screenshots/en/dark-gradation-raw.png +0 -0
- data/doc/images/screenshots/en/dark-gradation.png +0 -0
- data/doc/images/screenshots/en/day-white-raw.png +0 -0
- data/doc/images/screenshots/en/day-white.png +0 -0
- data/doc/images/screenshots/en/debian-raw.png +0 -0
- data/doc/images/screenshots/en/debian.png +0 -0
- data/doc/images/screenshots/en/green-circle-raw.png +0 -0
- data/doc/images/screenshots/en/green-circle.png +0 -0
- data/doc/images/screenshots/en/night-black-raw.png +0 -0
- data/doc/images/screenshots/en/night-black.png +0 -0
- data/doc/images/screenshots/en/rabbit-raw.png +0 -0
- data/doc/images/screenshots/en/rabbit.png +0 -0
- data/doc/images/screenshots/en/ranguba-raw.png +0 -0
- data/doc/images/screenshots/en/ranguba.png +0 -0
- data/doc/images/screenshots/en/red-frame-raw.png +0 -0
- data/doc/images/screenshots/en/red-frame.png +0 -0
- data/doc/images/screenshots/en/ruby-gnome2-raw.png +0 -0
- data/doc/images/screenshots/en/ruby-gnome2.png +0 -0
- data/doc/images/screenshots/en/rubykaigi2011-raw.png +0 -0
- data/doc/images/screenshots/en/rubykaigi2011.png +0 -0
- data/doc/images/screenshots/ja/blue-circle-raw.png +0 -0
- data/doc/images/screenshots/ja/blue-circle.png +0 -0
- data/doc/images/screenshots/ja/clear-blue-raw.png +0 -0
- data/doc/images/screenshots/ja/clear-blue.png +0 -0
- data/doc/images/screenshots/ja/cozmixng-raw.png +0 -0
- data/doc/images/screenshots/ja/cozmixng.png +0 -0
- data/doc/images/screenshots/ja/dark-gradation-raw.png +0 -0
- data/doc/images/screenshots/ja/dark-gradation.png +0 -0
- data/doc/images/screenshots/ja/day-white-raw.png +0 -0
- data/doc/images/screenshots/ja/day-white.png +0 -0
- data/doc/images/screenshots/ja/debian-raw.png +0 -0
- data/doc/images/screenshots/ja/debian.png +0 -0
- data/doc/images/screenshots/ja/green-circle-raw.png +0 -0
- data/doc/images/screenshots/ja/green-circle.png +0 -0
- data/doc/images/screenshots/ja/night-black-raw.png +0 -0
- data/doc/images/screenshots/ja/night-black.png +0 -0
- data/doc/images/screenshots/ja/rabbit-raw.png +0 -0
- data/doc/images/screenshots/ja/rabbit.png +0 -0
- data/doc/images/screenshots/ja/ranguba-raw.png +0 -0
- data/doc/images/screenshots/ja/ranguba.png +0 -0
- data/doc/images/screenshots/ja/red-frame-raw.png +0 -0
- data/doc/images/screenshots/ja/red-frame.png +0 -0
- data/doc/images/screenshots/ja/ruby-gnome2-raw.png +0 -0
- data/doc/images/screenshots/ja/ruby-gnome2.png +0 -0
- data/doc/images/screenshots/ja/rubykaigi2011-raw.png +0 -0
- data/doc/images/screenshots/ja/rubykaigi2011.png +0 -0
- data/doc/ja/how-to-make/index.rd +1 -1
- data/doc/ja/news.rd +143 -0
- data/doc/ja/sample/hiki/rabbit.hiki +2 -2
- data/doc/ja/sample/markdown/rabbit.md +1 -1
- data/doc/ja/sample/rd/rabbit.rd +1 -1
- data/doc/ja/slides.rd +1 -1
- data/doc/ja/usage/rabbit-slide.rd +3 -3
- data/doc/ja/users.rd +1 -1
- data/lib/rabbit/action.rb +23 -4
- data/lib/rabbit/canvas.rb +70 -14
- data/lib/rabbit/command/rabbit-slide.rb +252 -67
- data/lib/rabbit/command/rabbit-slide.ui +180 -0
- data/lib/rabbit/command/rabbit.rb +14 -20
- data/lib/rabbit/console.rb +9 -3
- data/lib/rabbit/dependency-canvas.rb +19 -1
- data/lib/rabbit/element.rb +34 -7
- data/lib/rabbit/element/poppler-page.rb +1 -2
- data/lib/rabbit/element/text-container-element.rb +2 -2
- data/lib/rabbit/element/text-renderer.rb +5 -4
- data/lib/rabbit/element/title-slide.rb +8 -0
- data/lib/rabbit/element/video.rb +1 -2
- data/lib/rabbit/filename.rb +39 -0
- data/lib/rabbit/formatter.rb +61 -30
- data/lib/rabbit/frame.rb +1 -19
- data/lib/rabbit/front.rb +23 -2
- data/lib/rabbit/gesture/handler.rb +21 -2
- data/lib/rabbit/graffiti/config-dialog.rb +15 -18
- data/lib/rabbit/gtk.rb +2 -191
- data/lib/rabbit/html/generator.rb +38 -30
- data/lib/rabbit/image-data-loader.rb +6 -1
- data/lib/rabbit/image.rb +22 -4
- data/lib/rabbit/image/base.rb +34 -2
- data/lib/rabbit/image/default.rb +1 -1
- data/lib/rabbit/image/eps.rb +1 -1
- data/lib/rabbit/image/gimp.rb +1 -1
- data/lib/rabbit/info-window.rb +27 -15
- data/lib/rabbit/logger/gui.rb +21 -23
- data/lib/rabbit/logger/stderr.rb +1 -1
- data/lib/rabbit/pango-markup.rb +44 -0
- data/lib/rabbit/parser.rb +20 -3
- data/lib/rabbit/parser/ext/image.rb +25 -8
- data/lib/rabbit/parser/ext/video.rb +21 -2
- data/lib/rabbit/parser/markdown.rb +1 -2
- data/lib/rabbit/parser/pdf.rb +23 -7
- data/lib/rabbit/parser/rd/rd2rabbit-lib.rb +20 -0
- data/lib/rabbit/progress.rb +34 -23
- data/lib/rabbit/renderer.rb +17 -23
- data/lib/rabbit/renderer/base.rb +31 -57
- data/lib/rabbit/renderer/color.rb +46 -53
- data/lib/rabbit/renderer/display/base.rb +71 -62
- data/lib/rabbit/renderer/display/button-handler.rb +2 -1
- data/lib/rabbit/renderer/display/clutter-embed.rb +60 -26
- data/lib/rabbit/renderer/display/drawing-area-base.rb +1 -1
- data/lib/rabbit/renderer/display/drawing-area-primitive.rb +34 -21
- data/lib/rabbit/renderer/display/graffiti.rb +1 -3
- data/lib/rabbit/renderer/display/hook-handler.rb +8 -4
- data/lib/rabbit/renderer/display/key-handler.rb +7 -2
- data/lib/rabbit/renderer/display/magnifier.rb +2 -2
- data/lib/rabbit/renderer/display/progress.rb +10 -2
- data/lib/rabbit/renderer/display/spotlight.rb +2 -2
- data/lib/rabbit/renderer/engine/cairo.rb +0 -3
- data/lib/rabbit/renderer/kernel.rb +54 -0
- data/lib/rabbit/renderer/offscreen.rb +14 -6
- data/lib/rabbit/renderer/print-layout.rb +150 -0
- data/lib/rabbit/renderer/printer.rb +236 -0
- data/lib/rabbit/renderer/screen.rb +288 -0
- data/lib/rabbit/renderer/widget/drawing-area.rb +93 -0
- data/lib/rabbit/size.rb +52 -25
- data/lib/rabbit/slide-configuration.rb +56 -12
- data/lib/rabbit/source.rb +24 -8
- data/lib/rabbit/task/slide.rb +1 -1
- data/lib/rabbit/theme/applier.rb +26 -9
- data/lib/rabbit/theme/base/base.rb +7 -7
- data/lib/rabbit/theme/clear-blue/clear-blue.rb +1 -1
- data/lib/rabbit/theme/image-timer/image-timer.rb +3 -1
- data/lib/rabbit/theme/image-viewer/image-viewer.rb +13 -1
- data/lib/rabbit/theme/image/image.rb +4 -4
- data/lib/rabbit/theme/lightning-talk-toolkit/lightning-talk-toolkit.rb +3 -1
- data/lib/rabbit/theme/tag/tag.rb +12 -4
- data/lib/rabbit/version.rb +2 -2
- data/lib/rabbit/video-window.rb +75 -89
- data/misc/emacs/rabbit-mode.el +11 -7
- data/po/en/rabbit.edit.po +189 -185
- data/po/en/rabbit.po +15 -12
- data/po/fr/rabbit.edit.po +189 -185
- data/po/fr/rabbit.po +15 -12
- data/po/ja/rabbit.edit.po +190 -186
- data/po/ja/rabbit.po +16 -13
- data/rabbit.gemspec +34 -16
- data/test/command/test-rabbit.rb +100 -0
- data/test/{rabbit-test-utils.rb → helper.rb} +7 -4
- data/test/{rabbit-test-utils → helper}/fixture.rb +2 -2
- data/test/{rabbit-test-utils → helper}/parser.rb +2 -2
- data/test/image/test-dia.rb +2 -2
- data/test/image/test-eps.rb +2 -2
- data/test/parser/test-markdown.rb +3 -5
- data/test/parser/test-rd.rb +1 -3
- data/test/parser/test-wiki.rb +3 -5
- data/test/run-test.rb +3 -3
- data/test/test-applier.rb +60 -29
- data/test/test-canvas.rb +70 -0
- data/test/test-color.rb +18 -9
- data/test/test-element.rb +15 -3
- data/test/test-size.rb +25 -22
- data/test/test-slide-configuration.rb +16 -6
- data/test/test-source.rb +15 -5
- data/test/test-utils.rb +15 -1
- metadata +55 -84
- data/lib/rabbit/renderer/print.rb +0 -31
- data/lib/rabbit/renderer/print/base.rb +0 -78
- data/lib/rabbit/renderer/print/cairo.rb +0 -122
- data/lib/rabbit/renderer/print/layout.rb +0 -123
- data/lib/rabbit/renderer/print/multiple.rb +0 -202
- data/lib/rabbit/source/hiki.rb +0 -36
- data/lib/rabbit/source/slide-share.rb +0 -53
data/test/test-canvas.rb
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
# Copyright (C) 2017-2019 Kouhei Sutou <kou@cozmixng.org>
|
2
|
+
#
|
3
|
+
# This program is free software; you can redistribute it and/or modify
|
4
|
+
# it under the terms of the GNU General Public License as published by
|
5
|
+
# the Free Software Foundation; either version 2 of the License, or
|
6
|
+
# (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This program is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
+
# GNU General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU General Public License along
|
14
|
+
# with this program; if not, write to the Free Software Foundation, Inc.,
|
15
|
+
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
16
|
+
|
17
|
+
require "rabbit/canvas"
|
18
|
+
|
19
|
+
class RabbitCanvasTest < Test::Unit::TestCase
|
20
|
+
setup do
|
21
|
+
@logger = Rabbit::Logger::STDERR.new
|
22
|
+
@canvas = Rabbit::Canvas.new(@logger, Rabbit::Renderer::Offscreen)
|
23
|
+
end
|
24
|
+
|
25
|
+
def create_slide(title)
|
26
|
+
title_element = Rabbit::Element::Text.new(title)
|
27
|
+
slide = Rabbit::Element::Slide.new(title_element)
|
28
|
+
slide
|
29
|
+
end
|
30
|
+
|
31
|
+
sub_test_case("#have_previous?") do
|
32
|
+
test("no slides") do
|
33
|
+
assert_false(@canvas.have_previous?)
|
34
|
+
end
|
35
|
+
|
36
|
+
test("first slide") do
|
37
|
+
@canvas.slides << create_slide("Title")
|
38
|
+
@canvas.slides << create_slide("Page1")
|
39
|
+
@canvas.move_to_first
|
40
|
+
assert_false(@canvas.have_previous?)
|
41
|
+
end
|
42
|
+
|
43
|
+
test("last slide") do
|
44
|
+
@canvas.slides << create_slide("Title")
|
45
|
+
@canvas.slides << create_slide("Page1")
|
46
|
+
@canvas.move_to_last
|
47
|
+
assert_true(@canvas.have_previous?)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
sub_test_case("#have_next?") do
|
52
|
+
test("no slides") do
|
53
|
+
assert_false(@canvas.have_next?)
|
54
|
+
end
|
55
|
+
|
56
|
+
test("first slide") do
|
57
|
+
@canvas.slides << create_slide("Title")
|
58
|
+
@canvas.slides << create_slide("Page1")
|
59
|
+
@canvas.move_to_first
|
60
|
+
assert_true(@canvas.have_next?)
|
61
|
+
end
|
62
|
+
|
63
|
+
test("last slide") do
|
64
|
+
@canvas.slides << create_slide("Title")
|
65
|
+
@canvas.slides << create_slide("Page1")
|
66
|
+
@canvas.move_to_last
|
67
|
+
assert_false(@canvas.have_next?)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
data/test/test-color.rb
CHANGED
@@ -1,6 +1,18 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
# Copyright (C) 2005-2019 Kouhei Sutou <kou@cozmixng.org>
|
2
|
+
#
|
3
|
+
# This program is free software; you can redistribute it and/or modify
|
4
|
+
# it under the terms of the GNU General Public License as published by
|
5
|
+
# the Free Software Foundation; either version 2 of the License, or
|
6
|
+
# (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This program is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
+
# GNU General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU General Public License along
|
14
|
+
# with this program; if not, write to the Free Software Foundation, Inc.,
|
15
|
+
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
4
16
|
|
5
17
|
require "rabbit/renderer/color"
|
6
18
|
|
@@ -10,7 +22,7 @@ class RabbitColorTest < Test::Unit::TestCase
|
|
10
22
|
assert_color_parse(0, 0, 0, nil, "#000000")
|
11
23
|
assert_color_parse(0, 0, 0, nil, "#000000000000")
|
12
24
|
assert_color_parse(0, 0, 0, nil, "black")
|
13
|
-
|
25
|
+
|
14
26
|
assert_color_parse(65535, 65535, 65535, nil, "#fff")
|
15
27
|
assert_color_parse(65535, 65535, 65535, nil, "#ffffff")
|
16
28
|
assert_color_parse(65535, 65535, 65535, nil, "#ffffffffffff")
|
@@ -32,11 +44,8 @@ class RabbitColorTest < Test::Unit::TestCase
|
|
32
44
|
def assert_color_parse(r, g, b, a, spec, message=nil)
|
33
45
|
_wrap_assertion do
|
34
46
|
color = parse(spec)
|
35
|
-
assert_equal([r, g, b, a || 65535],
|
36
|
-
|
37
|
-
gdk_color = color.to_gdk_color
|
38
|
-
assert_equal([r, g, b],
|
39
|
-
[gdk_color.red, gdk_color.green, gdk_color.blue])
|
47
|
+
assert_equal([r, g, b, a || 65535],
|
48
|
+
color.to_a.collect {|x| (x * 65535).ceil})
|
40
49
|
end
|
41
50
|
end
|
42
51
|
end
|
data/test/test-element.rb
CHANGED
@@ -1,6 +1,18 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
# Copyright (C) 2005-2019 Kouhei Sutou <kou@cozmixng.org>
|
2
|
+
#
|
3
|
+
# This program is free software; you can redistribute it and/or modify
|
4
|
+
# it under the terms of the GNU General Public License as published by
|
5
|
+
# the Free Software Foundation; either version 2 of the License, or
|
6
|
+
# (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This program is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
+
# GNU General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU General Public License along
|
14
|
+
# with this program; if not, write to the Free Software Foundation, Inc.,
|
15
|
+
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
4
16
|
|
5
17
|
require "rabbit/element"
|
6
18
|
|
data/test/test-size.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2015 Kouhei Sutou <kou@cozmixng.org>
|
1
|
+
# Copyright (C) 2015-2019 Kouhei Sutou <kou@cozmixng.org>
|
2
2
|
#
|
3
3
|
# This program is free software; you can redistribute it and/or modify
|
4
4
|
# it under the terms of the GNU General Public License as published by
|
@@ -14,30 +14,28 @@
|
|
14
14
|
# with this program; if not, write to the Free Software Foundation, Inc.,
|
15
15
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
16
16
|
|
17
|
-
require "rabbit-test-utils"
|
18
|
-
|
19
17
|
require "rabbit/size"
|
20
18
|
|
21
19
|
class RabbitSizeTest < Test::Unit::TestCase
|
22
20
|
sub_test_case("width > height") do
|
23
21
|
setup do
|
24
|
-
@size = Rabbit::Size.new(1920, 1018, 4.0 / 3.0)
|
22
|
+
@size = Rabbit::Size.new(800, 600, 1920, 1018, 4.0 / 3.0)
|
25
23
|
end
|
26
24
|
|
27
25
|
test "#logical_width" do
|
28
|
-
assert_equal(
|
26
|
+
assert_equal(800, @size.logical_width.round)
|
29
27
|
end
|
30
28
|
|
31
29
|
test "#logical_height" do
|
32
|
-
assert_equal(
|
30
|
+
assert_equal(600, @size.logical_height)
|
33
31
|
end
|
34
32
|
|
35
33
|
test "#logical_margin_left" do
|
36
|
-
assert_equal(
|
34
|
+
assert_equal(166, @size.logical_margin_left.round)
|
37
35
|
end
|
38
36
|
|
39
37
|
test "#logical_margin_right" do
|
40
|
-
assert_equal(
|
38
|
+
assert_equal(166, @size.logical_margin_right.round)
|
41
39
|
end
|
42
40
|
|
43
41
|
test "#logical_margin_top" do
|
@@ -51,15 +49,15 @@ class RabbitSizeTest < Test::Unit::TestCase
|
|
51
49
|
|
52
50
|
sub_test_case("width < height") do
|
53
51
|
setup do
|
54
|
-
@size = Rabbit::Size.new(1018, 1920, 4.0 / 3.0)
|
52
|
+
@size = Rabbit::Size.new(800, 600, 1018, 1920, 4.0 / 3.0)
|
55
53
|
end
|
56
54
|
|
57
55
|
test "#logical_width" do
|
58
|
-
assert_equal(
|
56
|
+
assert_equal(800, @size.logical_width)
|
59
57
|
end
|
60
58
|
|
61
59
|
test "#logical_height" do
|
62
|
-
assert_equal(
|
60
|
+
assert_equal(600, @size.logical_height.round)
|
63
61
|
end
|
64
62
|
|
65
63
|
test "#logical_margin_left" do
|
@@ -71,32 +69,37 @@ class RabbitSizeTest < Test::Unit::TestCase
|
|
71
69
|
end
|
72
70
|
|
73
71
|
test "#logical_margin_top" do
|
74
|
-
assert_equal(
|
72
|
+
assert_equal(454, @size.logical_margin_top.round)
|
75
73
|
end
|
76
74
|
|
77
75
|
test "#logical_margin_bottom" do
|
78
|
-
assert_equal(
|
76
|
+
assert_equal(454, @size.logical_margin_bottom.round)
|
77
|
+
end
|
78
|
+
|
79
|
+
test "#logical_scale" do
|
80
|
+
assert_equal([1.27, 1.27],
|
81
|
+
@size.logical_scale.collect {|scale| scale.round(2)})
|
79
82
|
end
|
80
83
|
end
|
81
84
|
|
82
85
|
sub_test_case("predicates") do
|
83
86
|
sub_test_case("#have_logical_margin_x?") do
|
84
87
|
test "width > height" do
|
85
|
-
size = Rabbit::Size.new(1920, 1018, 4.0 / 3.0)
|
88
|
+
size = Rabbit::Size.new(800, 600, 1920, 1018, 4.0 / 3.0)
|
86
89
|
assert do
|
87
90
|
size.have_logical_margin_x?
|
88
91
|
end
|
89
92
|
end
|
90
93
|
|
91
94
|
test "width < height" do
|
92
|
-
size = Rabbit::Size.new(1018, 1920, 4.0 / 3.0)
|
95
|
+
size = Rabbit::Size.new(800, 600, 1018, 1920, 4.0 / 3.0)
|
93
96
|
assert do
|
94
97
|
not size.have_logical_margin_x?
|
95
98
|
end
|
96
99
|
end
|
97
100
|
|
98
101
|
test "width / height == ratio" do
|
99
|
-
size = Rabbit::Size.new(800, 600, 4.0 / 3.0)
|
102
|
+
size = Rabbit::Size.new(800, 600, 1600, 1200, 4.0 / 3.0)
|
100
103
|
assert do
|
101
104
|
not size.have_logical_margin_x?
|
102
105
|
end
|
@@ -105,21 +108,21 @@ class RabbitSizeTest < Test::Unit::TestCase
|
|
105
108
|
|
106
109
|
sub_test_case("#have_logical_margin_y?") do
|
107
110
|
test "width > height" do
|
108
|
-
size = Rabbit::Size.new(1920, 1018, 4.0 / 3.0)
|
111
|
+
size = Rabbit::Size.new(800, 600, 1920, 1018, 4.0 / 3.0)
|
109
112
|
assert do
|
110
113
|
not size.have_logical_margin_y?
|
111
114
|
end
|
112
115
|
end
|
113
116
|
|
114
117
|
test "width < height" do
|
115
|
-
size = Rabbit::Size.new(1018, 1920, 4.0 / 3.0)
|
118
|
+
size = Rabbit::Size.new(800, 600, 1018, 1920, 4.0 / 3.0)
|
116
119
|
assert do
|
117
120
|
size.have_logical_margin_y?
|
118
121
|
end
|
119
122
|
end
|
120
123
|
|
121
124
|
test "width / height == ratio" do
|
122
|
-
size = Rabbit::Size.new(800, 600, 4.0 / 3.0)
|
125
|
+
size = Rabbit::Size.new(800, 600, 1600, 1200, 4.0 / 3.0)
|
123
126
|
assert do
|
124
127
|
not size.have_logical_margin_y?
|
125
128
|
end
|
@@ -128,21 +131,21 @@ class RabbitSizeTest < Test::Unit::TestCase
|
|
128
131
|
|
129
132
|
sub_test_case("#have_logical_margin?") do
|
130
133
|
test "width > height" do
|
131
|
-
size = Rabbit::Size.new(1920, 1018, 4.0 / 3.0)
|
134
|
+
size = Rabbit::Size.new(800, 600, 1920, 1018, 4.0 / 3.0)
|
132
135
|
assert do
|
133
136
|
size.have_logical_margin?
|
134
137
|
end
|
135
138
|
end
|
136
139
|
|
137
140
|
test "width < height" do
|
138
|
-
size = Rabbit::Size.new(1018, 1920, 4.0 / 3.0)
|
141
|
+
size = Rabbit::Size.new(800, 600, 1018, 1920, 4.0 / 3.0)
|
139
142
|
assert do
|
140
143
|
size.have_logical_margin?
|
141
144
|
end
|
142
145
|
end
|
143
146
|
|
144
147
|
test "width / height == ratio" do
|
145
|
-
size = Rabbit::Size.new(800, 600, 4.0 / 3.0)
|
148
|
+
size = Rabbit::Size.new(800, 600, 1600, 1200, 4.0 / 3.0)
|
146
149
|
assert do
|
147
150
|
not size.have_logical_margin?
|
148
151
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2012-
|
1
|
+
# Copyright (C) 2012-2017 Kouhei Sutou <kou@cozmixng.org>
|
2
2
|
#
|
3
3
|
# This program is free software; you can redistribute it and/or modify
|
4
4
|
# it under the terms of the GNU General Public License as published by
|
@@ -34,8 +34,10 @@ class TestSlideConfiguration < Test::Unit::TestCase
|
|
34
34
|
"id" => "sprk2012",
|
35
35
|
"base_name" => "how-to-make-clear-code",
|
36
36
|
"tags" => ["rabbit", "sprk2012", "clear code"],
|
37
|
-
"presentation_date" =>
|
38
|
-
"
|
37
|
+
"presentation_date" => "2012-09-16",
|
38
|
+
"presentation_start_time" => "2012-09-16T10:00:00+0900",
|
39
|
+
"presentation_end_time" => "2012-09-16T10:30:00+0900",
|
40
|
+
"version" => "2012.09.16.0",
|
39
41
|
"licenses" => ["GPLv3+", "GFDL", "CC BY-SA 3.0"],
|
40
42
|
"slideshare_id" => "rabbit-14073776",
|
41
43
|
"speaker_deck_id" => "rabbit-debian",
|
@@ -46,13 +48,21 @@ class TestSlideConfiguration < Test::Unit::TestCase
|
|
46
48
|
}
|
47
49
|
@slide.id = "RubyKaigi2012"
|
48
50
|
@slide.merge!(conf)
|
49
|
-
|
51
|
+
|
52
|
+
object_conf = conf.dup
|
53
|
+
object_conf["presentation_date"] = Date.parse(conf["presentation_date"])
|
54
|
+
object_conf["presentation_start_time"] =
|
55
|
+
Time.parse(conf["presentation_start_time"])
|
56
|
+
object_conf["presentation_end_time"] =
|
57
|
+
Time.parse(conf["presentation_end_time"])
|
58
|
+
assert_equal(object_conf,
|
59
|
+
@slide.to_hash)
|
50
60
|
end
|
51
61
|
|
52
62
|
class TestDefaultVersion < self
|
53
63
|
def test_have_presentation_date
|
54
|
-
@slide.presentation_date = "2012
|
55
|
-
assert_equal("2012.
|
64
|
+
@slide.presentation_date = "2012-09-16"
|
65
|
+
assert_equal("2012.9.16.0", @slide.version)
|
56
66
|
end
|
57
67
|
|
58
68
|
def test_no_presentation_date
|
data/test/test-source.rb
CHANGED
@@ -1,8 +1,18 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
# Copyright (C) 2004-2019 Kouhei Sutou <kou@cozmixng.org>
|
2
|
+
#
|
3
|
+
# This program is free software; you can redistribute it and/or modify
|
4
|
+
# it under the terms of the GNU General Public License as published by
|
5
|
+
# the Free Software Foundation; either version 2 of the License, or
|
6
|
+
# (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This program is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
+
# GNU General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU General Public License along
|
14
|
+
# with this program; if not, write to the Free Software Foundation, Inc.,
|
15
|
+
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
6
16
|
|
7
17
|
require "rabbit/source"
|
8
18
|
require "rabbit/logger"
|
data/test/test-utils.rb
CHANGED
@@ -1,4 +1,18 @@
|
|
1
|
-
|
1
|
+
# Copyright (C) 2005-2019 Kouhei Sutou <kou@cozmixng.org>
|
2
|
+
#
|
3
|
+
# This program is free software; you can redistribute it and/or modify
|
4
|
+
# it under the terms of the GNU General Public License as published by
|
5
|
+
# the Free Software Foundation; either version 2 of the License, or
|
6
|
+
# (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This program is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
+
# GNU General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU General Public License along
|
14
|
+
# with this program; if not, write to the Free Software Foundation, Inc.,
|
15
|
+
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2
16
|
|
3
17
|
require "rabbit/utils"
|
4
18
|
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rabbit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: gio2
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: gdk_pixbuf2
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,7 +25,7 @@ dependencies:
|
|
39
25
|
- !ruby/object:Gem::Version
|
40
26
|
version: 3.0.9
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
28
|
+
name: gtk3
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
44
30
|
requirements:
|
45
31
|
- - ">="
|
@@ -72,14 +58,14 @@ dependencies:
|
|
72
58
|
requirements:
|
73
59
|
- - ">="
|
74
60
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
61
|
+
version: 3.2.5
|
76
62
|
type: :runtime
|
77
63
|
prerelease: false
|
78
64
|
version_requirements: !ruby/object:Gem::Requirement
|
79
65
|
requirements:
|
80
66
|
- - ">="
|
81
67
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
68
|
+
version: 3.2.5
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: hikidoc
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -151,7 +137,7 @@ dependencies:
|
|
151
137
|
- !ruby/object:Gem::Version
|
152
138
|
version: 1.0.0
|
153
139
|
- !ruby/object:Gem::Dependency
|
154
|
-
name: kramdown
|
140
|
+
name: kramdown-parser-gfm
|
155
141
|
requirement: !ruby/object:Gem::Requirement
|
156
142
|
requirements:
|
157
143
|
- - ">="
|
@@ -206,20 +192,6 @@ dependencies:
|
|
206
192
|
- - ">="
|
207
193
|
- !ruby/object:Gem::Version
|
208
194
|
version: '0'
|
209
|
-
- !ruby/object:Gem::Dependency
|
210
|
-
name: gtk3
|
211
|
-
requirement: !ruby/object:Gem::Requirement
|
212
|
-
requirements:
|
213
|
-
- - ">="
|
214
|
-
- !ruby/object:Gem::Version
|
215
|
-
version: '0'
|
216
|
-
type: :development
|
217
|
-
prerelease: false
|
218
|
-
version_requirements: !ruby/object:Gem::Requirement
|
219
|
-
requirements:
|
220
|
-
- - ">="
|
221
|
-
- !ruby/object:Gem::Version
|
222
|
-
version: '0'
|
223
195
|
- !ruby/object:Gem::Dependency
|
224
196
|
name: test-unit
|
225
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -234,20 +206,6 @@ dependencies:
|
|
234
206
|
- - ">="
|
235
207
|
- !ruby/object:Gem::Version
|
236
208
|
version: '0'
|
237
|
-
- !ruby/object:Gem::Dependency
|
238
|
-
name: test-unit-notify
|
239
|
-
requirement: !ruby/object:Gem::Requirement
|
240
|
-
requirements:
|
241
|
-
- - ">="
|
242
|
-
- !ruby/object:Gem::Version
|
243
|
-
version: '0'
|
244
|
-
type: :development
|
245
|
-
prerelease: false
|
246
|
-
version_requirements: !ruby/object:Gem::Requirement
|
247
|
-
requirements:
|
248
|
-
- - ">="
|
249
|
-
- !ruby/object:Gem::Version
|
250
|
-
version: '0'
|
251
209
|
- !ruby/object:Gem::Dependency
|
252
210
|
name: test-unit-rr
|
253
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -296,23 +254,32 @@ dependencies:
|
|
296
254
|
requirements:
|
297
255
|
- - ">="
|
298
256
|
- !ruby/object:Gem::Version
|
299
|
-
version:
|
257
|
+
version: '0'
|
300
258
|
type: :development
|
301
259
|
prerelease: false
|
302
260
|
version_requirements: !ruby/object:Gem::Requirement
|
303
261
|
requirements:
|
304
262
|
- - ">="
|
305
263
|
- !ruby/object:Gem::Version
|
306
|
-
version:
|
307
|
-
description:
|
264
|
+
version: '0'
|
265
|
+
description: |-
|
266
|
+
You can create your slide as a text file. It means that you can version controlyour slide like your Ruby scripts. You can custom your slide style by Ruby.So Rabbit is for Rubyist.
|
267
|
+
|
268
|
+
You can use RD, Markdown and Wiki format as slide source.
|
269
|
+
|
270
|
+
Rabbit provides programmer friendly keyboard interface. It uses Emacs and Vistyle keybindings by default.
|
271
|
+
|
272
|
+
You can use PDF and image as slide source. Rabbit can show PDF and imagedirectly. You can create your slide by other presentation tool and show yourslide by Rabbit. If you show your slide by Rabbit, you can use programmerfriendly keyboard interface provided by Rabbit to control your slide.
|
273
|
+
|
274
|
+
You can upload your slide as a gem. If you publish your slide as a gem, youcan see your slide at https://slide.rabbit-shocker.org/ .
|
308
275
|
email:
|
309
276
|
- kou@cozmixng.org
|
310
277
|
executables:
|
311
|
-
-
|
278
|
+
- rabbit
|
279
|
+
- rabbit-command
|
312
280
|
- rabbit-theme
|
313
281
|
- rabbit-slide
|
314
|
-
-
|
315
|
-
- rabbit
|
282
|
+
- rabbirc
|
316
283
|
extensions: []
|
317
284
|
extra_rdoc_files: []
|
318
285
|
files:
|
@@ -581,6 +548,7 @@ files:
|
|
581
548
|
- lib/rabbit/author-configuration.rb
|
582
549
|
- lib/rabbit/canvas.rb
|
583
550
|
- lib/rabbit/command/rabbit-slide.rb
|
551
|
+
- lib/rabbit/command/rabbit-slide.ui
|
584
552
|
- lib/rabbit/command/rabbit-theme.rb
|
585
553
|
- lib/rabbit/command/rabbit.rb
|
586
554
|
- lib/rabbit/config.rb
|
@@ -619,6 +587,7 @@ files:
|
|
619
587
|
- lib/rabbit/element/title-slide.rb
|
620
588
|
- lib/rabbit/element/video.rb
|
621
589
|
- lib/rabbit/error.rb
|
590
|
+
- lib/rabbit/filename.rb
|
622
591
|
- lib/rabbit/formatter.rb
|
623
592
|
- lib/rabbit/frame.rb
|
624
593
|
- lib/rabbit/front.rb
|
@@ -649,6 +618,7 @@ files:
|
|
649
618
|
- lib/rabbit/logger/gui.rb
|
650
619
|
- lib/rabbit/logger/stderr.rb
|
651
620
|
- lib/rabbit/menu.rb
|
621
|
+
- lib/rabbit/pango-markup.rb
|
652
622
|
- lib/rabbit/parser.rb
|
653
623
|
- lib/rabbit/parser/base.rb
|
654
624
|
- lib/rabbit/parser/ext/aafigure.rb
|
@@ -716,11 +686,10 @@ files:
|
|
716
686
|
- lib/rabbit/renderer/gl.rb
|
717
687
|
- lib/rabbit/renderer/kernel.rb
|
718
688
|
- lib/rabbit/renderer/offscreen.rb
|
719
|
-
- lib/rabbit/renderer/print.rb
|
720
|
-
- lib/rabbit/renderer/
|
721
|
-
- lib/rabbit/renderer/
|
722
|
-
- lib/rabbit/renderer/
|
723
|
-
- lib/rabbit/renderer/print/multiple.rb
|
689
|
+
- lib/rabbit/renderer/print-layout.rb
|
690
|
+
- lib/rabbit/renderer/printer.rb
|
691
|
+
- lib/rabbit/renderer/screen.rb
|
692
|
+
- lib/rabbit/renderer/widget/drawing-area.rb
|
724
693
|
- lib/rabbit/search-window.rb
|
725
694
|
- lib/rabbit/searcher.rb
|
726
695
|
- lib/rabbit/size.rb
|
@@ -738,9 +707,7 @@ files:
|
|
738
707
|
- lib/rabbit/source/argf.rb
|
739
708
|
- lib/rabbit/source/base.rb
|
740
709
|
- lib/rabbit/source/file.rb
|
741
|
-
- lib/rabbit/source/hiki.rb
|
742
710
|
- lib/rabbit/source/memory.rb
|
743
|
-
- lib/rabbit/source/slide-share.rb
|
744
711
|
- lib/rabbit/source/uri.rb
|
745
712
|
- lib/rabbit/stock.rb
|
746
713
|
- lib/rabbit/task.rb
|
@@ -1076,20 +1043,22 @@ files:
|
|
1076
1043
|
- sample/table.hiki
|
1077
1044
|
- sample/table.rd
|
1078
1045
|
- sample/usagi.png
|
1046
|
+
- test/command/test-rabbit.rb
|
1047
|
+
- test/helper.rb
|
1048
|
+
- test/helper/fixture.rb
|
1049
|
+
- test/helper/parser.rb
|
1079
1050
|
- test/image/test-dia.rb
|
1080
1051
|
- test/image/test-eps.rb
|
1081
1052
|
- test/parser/test-markdown.rb
|
1082
1053
|
- test/parser/test-rd.rb
|
1083
1054
|
- test/parser/test-wiki.rb
|
1084
|
-
- test/rabbit-test-utils.rb
|
1085
|
-
- test/rabbit-test-utils/fixture.rb
|
1086
|
-
- test/rabbit-test-utils/parser.rb
|
1087
1055
|
- test/run-test.rb
|
1088
1056
|
- test/source-generator/test-hiki.rb
|
1089
1057
|
- test/source-generator/test-markdown.rb
|
1090
1058
|
- test/source-generator/test-rd.rb
|
1091
1059
|
- test/test-applier.rb
|
1092
1060
|
- test/test-author-configuration.rb
|
1061
|
+
- test/test-canvas.rb
|
1093
1062
|
- test/test-color.rb
|
1094
1063
|
- test/test-element.rb
|
1095
1064
|
- test/test-readme-parser.rb
|
@@ -1111,39 +1080,41 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
1111
1080
|
requirements:
|
1112
1081
|
- - ">="
|
1113
1082
|
- !ruby/object:Gem::Version
|
1114
|
-
version: 2.
|
1083
|
+
version: 2.4.0
|
1115
1084
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1116
1085
|
requirements:
|
1117
1086
|
- - ">="
|
1118
1087
|
- !ruby/object:Gem::Version
|
1119
1088
|
version: '0'
|
1120
1089
|
requirements: []
|
1121
|
-
rubyforge_project:
|
1122
|
-
rubygems_version: 2.
|
1090
|
+
rubyforge_project:
|
1091
|
+
rubygems_version: 2.7.6.2
|
1123
1092
|
signing_key:
|
1124
1093
|
specification_version: 4
|
1125
|
-
summary: Rabbit is
|
1094
|
+
summary: Rabbit is a presentation tool for Rubyist
|
1126
1095
|
test_files:
|
1127
|
-
- test/
|
1128
|
-
- test/
|
1096
|
+
- test/test-utils.rb
|
1097
|
+
- test/helper.rb
|
1098
|
+
- test/run-test.rb
|
1129
1099
|
- test/test-color.rb
|
1130
|
-
- test/test-
|
1131
|
-
- test/test-author-configuration.rb
|
1132
|
-
- test/test-element.rb
|
1133
|
-
- test/test-slide-configuration.rb
|
1134
|
-
- test/rabbit-test-utils/parser.rb
|
1135
|
-
- test/rabbit-test-utils/fixture.rb
|
1136
|
-
- test/test-theme-configuration.rb
|
1100
|
+
- test/test-canvas.rb
|
1137
1101
|
- test/test-slideshare.rb
|
1138
|
-
- test/run-test.rb
|
1139
1102
|
- test/parser/test-markdown.rb
|
1140
|
-
- test/parser/test-rd.rb
|
1141
1103
|
- test/parser/test-wiki.rb
|
1142
|
-
- test/test-
|
1143
|
-
- test/
|
1104
|
+
- test/parser/test-rd.rb
|
1105
|
+
- test/test-element.rb
|
1106
|
+
- test/command/test-rabbit.rb
|
1107
|
+
- test/test-slide-configuration.rb
|
1108
|
+
- test/test-author-configuration.rb
|
1109
|
+
- test/test-theme-configuration.rb
|
1110
|
+
- test/test-size.rb
|
1111
|
+
- test/test-applier.rb
|
1144
1112
|
- test/source-generator/test-markdown.rb
|
1113
|
+
- test/source-generator/test-hiki.rb
|
1145
1114
|
- test/source-generator/test-rd.rb
|
1146
|
-
- test/test-source.rb
|
1147
|
-
- test/image/test-dia.rb
|
1148
1115
|
- test/image/test-eps.rb
|
1149
|
-
- test/test-
|
1116
|
+
- test/image/test-dia.rb
|
1117
|
+
- test/test-readme-parser.rb
|
1118
|
+
- test/test-source.rb
|
1119
|
+
- test/helper/fixture.rb
|
1120
|
+
- test/helper/parser.rb
|