rabbit 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +0 -27
- data/data/locale/en/LC_MESSAGES/rabbit.mo +0 -0
- data/data/locale/fr/LC_MESSAGES/rabbit.mo +0 -0
- data/data/locale/ja/LC_MESSAGES/rabbit.mo +0 -0
- data/doc/_config.yml +2 -2
- data/doc/en/index.rd +5 -5
- data/doc/en/news.rd +87 -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.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.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.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/index.rd +5 -5
- data/doc/ja/news.rd +85 -0
- data/lib/rabbit/author-configuration.rb +30 -15
- data/lib/rabbit/command/rabbit-slide.rb +70 -184
- data/lib/rabbit/command/rabbit-theme.rb +46 -125
- data/lib/rabbit/command/rabbit.rb +2 -1
- data/lib/rabbit/path-manipulatable.rb +0 -3
- data/lib/rabbit/readme-parser.rb +49 -0
- data/lib/rabbit/slide-configuration.rb +127 -0
- data/lib/rabbit/source-generator.rb +39 -0
- data/lib/rabbit/source-generator/hiki.rb +63 -0
- data/lib/rabbit/source-generator/markdown.rb +61 -0
- data/lib/rabbit/source-generator/rd.rb +65 -0
- data/lib/rabbit/task/slide.rb +68 -31
- data/lib/rabbit/task/theme.rb +46 -11
- data/lib/rabbit/theme-configuration.rb +104 -0
- data/lib/rabbit/theme/default-title-text/default-title-text.rb +2 -2
- data/lib/rabbit/theme/entry.rb +3 -2
- data/lib/rabbit/theme/nari/nari.rb +2 -0
- data/lib/rabbit/theme/slide-number/slide-number.rb +2 -2
- data/lib/rabbit/version.rb +1 -1
- data/po/rabbit.pot +1548 -1419
- data/test/run-test.rb +3 -1
- data/test/source-generator/test-hiki.rb +68 -0
- data/test/source-generator/test-markdown.rb +67 -0
- data/test/source-generator/test-rd.rb +69 -0
- data/test/{test_applier.rb → test-applier.rb} +0 -0
- data/test/test-author-configuration.rb +36 -0
- data/test/{test_color.rb → test-color.rb} +0 -0
- data/test/{test_element.rb → test-element.rb} +0 -0
- data/test/test-readme-parser.rb +57 -0
- data/test/test-slide-configuration.rb +56 -0
- data/test/{test_source.rb → test-source.rb} +0 -0
- data/test/test-theme-configuration.rb +47 -0
- data/test/{test_utils.rb → test-utils.rb} +0 -0
- metadata +65 -12
data/test/run-test.rb
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
|
|
3
3
|
require "test-unit"
|
|
4
|
+
require "test/unit/notify"
|
|
5
|
+
require "test/unit/rr"
|
|
4
6
|
|
|
5
|
-
test_file = "test
|
|
7
|
+
test_file = "test/**/test-*.rb"
|
|
6
8
|
|
|
7
9
|
$LOAD_PATH.unshift(File.join(File.expand_path("."), "lib"))
|
|
8
10
|
$LOAD_PATH.unshift(File.join(File.expand_path("."), "test"))
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Copyright (C) 2012 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/source-generator/hiki"
|
|
18
|
+
|
|
19
|
+
class TestSourceGeneratorHiki < Test::Unit::TestCase
|
|
20
|
+
def setup
|
|
21
|
+
@generator = Rabbit::SourceGenerator::Hiki.new
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def test_heading1
|
|
25
|
+
assert_equal("! Hello",
|
|
26
|
+
@generator.heading(1, "Hello"))
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def test_heading2
|
|
30
|
+
assert_equal("!! Hello",
|
|
31
|
+
@generator.heading(2, "Hello"))
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def test_heading3
|
|
35
|
+
assert_equal("!!! Hello",
|
|
36
|
+
@generator.heading(3, "Hello"))
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def test_definition_list_item
|
|
40
|
+
item = @generator.definition_list_item("Rabbit",
|
|
41
|
+
"The presentation tool for Rubyist")
|
|
42
|
+
assert_equal(":Rabbit:The presentation tool for Rubyist",
|
|
43
|
+
item)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def test_unordered_list_item
|
|
47
|
+
assert_equal("* Hello",
|
|
48
|
+
@generator.unordered_list_item("Hello"))
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def test_image
|
|
52
|
+
image = @generator.image("lavie.png", :relative_height => 90)
|
|
53
|
+
assert_equal(<<-EOR.rstrip, image)
|
|
54
|
+
{{image("lavie.png",
|
|
55
|
+
{
|
|
56
|
+
"relative_height" => 90,
|
|
57
|
+
})}}
|
|
58
|
+
EOR
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def test_preformatted_line
|
|
62
|
+
assert_equal(" Hello", @generator.preformatted_line("Hello"))
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def test_comment
|
|
66
|
+
assert_equal("// Hello", @generator.comment("Hello"))
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Copyright (C) 2012 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/source-generator/markdown"
|
|
18
|
+
|
|
19
|
+
class TestSourceGeneratorMarkdown < Test::Unit::TestCase
|
|
20
|
+
def setup
|
|
21
|
+
@generator = Rabbit::SourceGenerator::Markdown.new
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def test_heading1
|
|
25
|
+
assert_equal("# Hello",
|
|
26
|
+
@generator.heading(1, "Hello"))
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def test_heading2
|
|
30
|
+
assert_equal("## Hello",
|
|
31
|
+
@generator.heading(2, "Hello"))
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def test_heading3
|
|
35
|
+
assert_equal("### Hello",
|
|
36
|
+
@generator.heading(3, "Hello"))
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def test_definition_list_item
|
|
40
|
+
item = @generator.definition_list_item("Rabbit",
|
|
41
|
+
"The presentation tool for Rubyist")
|
|
42
|
+
assert_equal(<<-EOM.rstrip, item)
|
|
43
|
+
Rabbit
|
|
44
|
+
The presentation tool for Rubyist
|
|
45
|
+
EOM
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def test_unordered_list_item
|
|
49
|
+
assert_equal("* Hello",
|
|
50
|
+
@generator.unordered_list_item("Hello"))
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def test_image
|
|
54
|
+
image = @generator.image("lavie.png", :relative_height => 90)
|
|
55
|
+
assert_equal(<<-EOR.rstrip, image)
|
|
56
|
+
{:relative_height='90'}
|
|
57
|
+
EOR
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def test_preformatted_line
|
|
61
|
+
assert_equal(" Hello", @generator.preformatted_line("Hello"))
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def test_comment
|
|
65
|
+
assert_equal("", @generator.comment("Hello"))
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Copyright (C) 2012 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/source-generator/rd"
|
|
18
|
+
|
|
19
|
+
class TestSourceGeneratorRD < Test::Unit::TestCase
|
|
20
|
+
def setup
|
|
21
|
+
@generator = Rabbit::SourceGenerator::RD.new
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def test_heading1
|
|
25
|
+
assert_equal("= Hello",
|
|
26
|
+
@generator.heading(1, "Hello"))
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def test_heading2
|
|
30
|
+
assert_equal("== Hello",
|
|
31
|
+
@generator.heading(2, "Hello"))
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def test_heading3
|
|
35
|
+
assert_equal("=== Hello",
|
|
36
|
+
@generator.heading(3, "Hello"))
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def test_definition_list_item
|
|
40
|
+
item = @generator.definition_list_item("Rabbit",
|
|
41
|
+
"The presentation tool for Rubyist")
|
|
42
|
+
assert_equal(<<-EOR.rstrip, item)
|
|
43
|
+
: Rabbit
|
|
44
|
+
The presentation tool for Rubyist
|
|
45
|
+
EOR
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def test_unordered_list_item
|
|
49
|
+
assert_equal(" * Hello",
|
|
50
|
+
@generator.unordered_list_item("Hello"))
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def test_image
|
|
54
|
+
image = @generator.image("lavie.png", :relative_height => 90)
|
|
55
|
+
assert_equal(<<-EOR.rstrip, image)
|
|
56
|
+
# image
|
|
57
|
+
# src = lavie.png
|
|
58
|
+
# relative_height = 90
|
|
59
|
+
EOR
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def test_preformatted_line
|
|
63
|
+
assert_equal(" Hello", @generator.preformatted_line("Hello"))
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def test_comment
|
|
67
|
+
assert_equal("# Hello", @generator.comment("Hello"))
|
|
68
|
+
end
|
|
69
|
+
end
|
|
File without changes
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Copyright (C) 2012 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/author-configuration"
|
|
18
|
+
|
|
19
|
+
class TestAuthorConfiguration < Test::Unit::TestCase
|
|
20
|
+
def setup
|
|
21
|
+
@author = Rabbit::AuthorConfiguration.new
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def test_merge!
|
|
25
|
+
conf = {
|
|
26
|
+
"markup_language" => "rd",
|
|
27
|
+
"name" => "Kouhei Sutou",
|
|
28
|
+
"email" => "kou@cozmixng.org",
|
|
29
|
+
"rubygems_user" => "kou",
|
|
30
|
+
"slideshare_user" => "kou",
|
|
31
|
+
"speaker_deck_user" => "kou",
|
|
32
|
+
}
|
|
33
|
+
@author.merge!(conf)
|
|
34
|
+
assert_equal(conf, @author.to_hash)
|
|
35
|
+
end
|
|
36
|
+
end
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Copyright (C) 2012 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/readme-parser"
|
|
18
|
+
|
|
19
|
+
class TestREADMEParser < Test::Unit::TestCase
|
|
20
|
+
def setup
|
|
21
|
+
@parser = Rabbit::READMEParser.new
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def test_rd
|
|
25
|
+
title = "Theme benchmark"
|
|
26
|
+
description = <<-EOD.strip
|
|
27
|
+
It's a slide for checking a Rabbit's theme. It contains many
|
|
28
|
+
elements. So it's useful for confirming your theme.
|
|
29
|
+
EOD
|
|
30
|
+
|
|
31
|
+
assert_parse(title, description, <<-EOR)
|
|
32
|
+
= #{title}
|
|
33
|
+
|
|
34
|
+
#{description}
|
|
35
|
+
|
|
36
|
+
== For author
|
|
37
|
+
|
|
38
|
+
=== Show
|
|
39
|
+
|
|
40
|
+
rake
|
|
41
|
+
EOR
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
private
|
|
45
|
+
def assert_parse(title, description, content)
|
|
46
|
+
stub(File).read("README") {content}
|
|
47
|
+
@parser.parse("README")
|
|
48
|
+
assert_equal({
|
|
49
|
+
:title => title,
|
|
50
|
+
:description => description,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
:title => @parser.title,
|
|
54
|
+
:description => @parser.description,
|
|
55
|
+
})
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Copyright (C) 2012 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/slide-configuration"
|
|
18
|
+
|
|
19
|
+
class TestSlideConfiguration < Test::Unit::TestCase
|
|
20
|
+
def setup
|
|
21
|
+
@slide = Rabbit::SlideConfiguration.new
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def test_merge!
|
|
25
|
+
author_conf = {
|
|
26
|
+
"markup_language" => "rd",
|
|
27
|
+
"name" => "Kouhei Sutou",
|
|
28
|
+
"email" => "kou@cozmixng.org",
|
|
29
|
+
"rubygems_user" => "kou",
|
|
30
|
+
"slideshare_user" => "kou",
|
|
31
|
+
"speaker_deck_user" => "kou",
|
|
32
|
+
}
|
|
33
|
+
conf = {
|
|
34
|
+
"id" => "sprk2012",
|
|
35
|
+
"base_name" => "how-to-make-clear-code",
|
|
36
|
+
"tags" => ["rabbit", "sprk2012", "clear code"],
|
|
37
|
+
"presentation_date" => ["2012/09/16"],
|
|
38
|
+
"version" => "2012.09.16",
|
|
39
|
+
"licenses" => ["GPLv3+", "GFDL", "CC BY-SA 3.0"],
|
|
40
|
+
"author" => author_conf,
|
|
41
|
+
}
|
|
42
|
+
@slide.merge!(conf)
|
|
43
|
+
assert_equal(conf, @slide.to_hash)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
class TestDefaultVersion < self
|
|
47
|
+
def test_have_presentation_date
|
|
48
|
+
@slide.presentation_date = "2012/09/16"
|
|
49
|
+
assert_equal("2012.09.16", @slide.version)
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def test_no_presentation_date
|
|
53
|
+
assert_equal("1.0.0", @slide.version)
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
File without changes
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Copyright (C) 2012 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/theme-configuration"
|
|
18
|
+
|
|
19
|
+
class TestThemeConfiguration < Test::Unit::TestCase
|
|
20
|
+
def setup
|
|
21
|
+
@theme = Rabbit::ThemeConfiguration.new
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def test_merge!
|
|
25
|
+
author_conf = {
|
|
26
|
+
"markup_language" => "rd",
|
|
27
|
+
"name" => "Kouhei Sutou",
|
|
28
|
+
"email" => "kou@cozmixng.org",
|
|
29
|
+
"rubygems_user" => "kou",
|
|
30
|
+
"slideshare_user" => "kou",
|
|
31
|
+
"speaker_deck_user" => "kou",
|
|
32
|
+
}
|
|
33
|
+
conf = {
|
|
34
|
+
"id" => "clear-blue",
|
|
35
|
+
"tags" => ["blue"],
|
|
36
|
+
"version" => "1.0.2",
|
|
37
|
+
"licenses" => ["GPLv3+", "GFDL", "CC BY-SA 3.0"],
|
|
38
|
+
"author" => author_conf,
|
|
39
|
+
}
|
|
40
|
+
@theme.merge!(conf)
|
|
41
|
+
assert_equal(conf, @theme.to_hash)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def test_default_version
|
|
45
|
+
assert_equal("1.0.0", @theme.version)
|
|
46
|
+
end
|
|
47
|
+
end
|
|
File without changes
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rabbit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.2
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-
|
|
12
|
+
date: 2012-09-02 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: gtk2
|
|
@@ -203,6 +203,38 @@ dependencies:
|
|
|
203
203
|
- - ! '>='
|
|
204
204
|
- !ruby/object:Gem::Version
|
|
205
205
|
version: '0'
|
|
206
|
+
- !ruby/object:Gem::Dependency
|
|
207
|
+
name: test-unit-notify
|
|
208
|
+
requirement: !ruby/object:Gem::Requirement
|
|
209
|
+
none: false
|
|
210
|
+
requirements:
|
|
211
|
+
- - ! '>='
|
|
212
|
+
- !ruby/object:Gem::Version
|
|
213
|
+
version: '0'
|
|
214
|
+
type: :development
|
|
215
|
+
prerelease: false
|
|
216
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
217
|
+
none: false
|
|
218
|
+
requirements:
|
|
219
|
+
- - ! '>='
|
|
220
|
+
- !ruby/object:Gem::Version
|
|
221
|
+
version: '0'
|
|
222
|
+
- !ruby/object:Gem::Dependency
|
|
223
|
+
name: test-unit-rr
|
|
224
|
+
requirement: !ruby/object:Gem::Requirement
|
|
225
|
+
none: false
|
|
226
|
+
requirements:
|
|
227
|
+
- - ! '>='
|
|
228
|
+
- !ruby/object:Gem::Version
|
|
229
|
+
version: '0'
|
|
230
|
+
type: :development
|
|
231
|
+
prerelease: false
|
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
233
|
+
none: false
|
|
234
|
+
requirements:
|
|
235
|
+
- - ! '>='
|
|
236
|
+
- !ruby/object:Gem::Version
|
|
237
|
+
version: '0'
|
|
206
238
|
- !ruby/object:Gem::Dependency
|
|
207
239
|
name: rake
|
|
208
240
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -305,9 +337,11 @@ files:
|
|
|
305
337
|
- lib/rabbit/action/toggle.rb
|
|
306
338
|
- lib/rabbit/action/radio.rb
|
|
307
339
|
- lib/rabbit/config.rb
|
|
340
|
+
- lib/rabbit/theme-configuration.rb
|
|
308
341
|
- lib/rabbit/gesture/processor.rb
|
|
309
342
|
- lib/rabbit/gesture/handler.rb
|
|
310
343
|
- lib/rabbit/frame.rb
|
|
344
|
+
- lib/rabbit/source-generator.rb
|
|
311
345
|
- lib/rabbit/gem-finder.rb
|
|
312
346
|
- lib/rabbit/cursor-manager.rb
|
|
313
347
|
- lib/rabbit/stock.rb
|
|
@@ -319,6 +353,9 @@ files:
|
|
|
319
353
|
- lib/rabbit/theme-browser/document.rb
|
|
320
354
|
- lib/rabbit/theme-browser/default-tag.yaml
|
|
321
355
|
- lib/rabbit/menu.rb
|
|
356
|
+
- lib/rabbit/source-generator/hiki.rb
|
|
357
|
+
- lib/rabbit/source-generator/markdown.rb
|
|
358
|
+
- lib/rabbit/source-generator/rd.rb
|
|
322
359
|
- lib/rabbit/console.rb
|
|
323
360
|
- lib/rabbit/theme/slide-show/slide-show.rb
|
|
324
361
|
- lib/rabbit/theme/slide-show/property.rb
|
|
@@ -588,6 +625,7 @@ files:
|
|
|
588
625
|
- lib/rabbit/progress.rb
|
|
589
626
|
- lib/rabbit/console/roff.rb
|
|
590
627
|
- lib/rabbit/rabbit.rb
|
|
628
|
+
- lib/rabbit/slide-configuration.rb
|
|
591
629
|
- lib/rabbit/source/memory.rb
|
|
592
630
|
- lib/rabbit/source/hiki.rb
|
|
593
631
|
- lib/rabbit/source/file.rb
|
|
@@ -628,6 +666,7 @@ files:
|
|
|
628
666
|
- lib/rabbit/element/enum-list.rb
|
|
629
667
|
- lib/rabbit/element/preformatted.rb
|
|
630
668
|
- lib/rabbit/element/method-list.rb
|
|
669
|
+
- lib/rabbit/readme-parser.rb
|
|
631
670
|
- lib/rabbit/canvas.rb
|
|
632
671
|
- lib/rabbit/parser/pdf.rb
|
|
633
672
|
- lib/rabbit/parser/wiki/output.rb
|
|
@@ -1010,13 +1049,20 @@ files:
|
|
|
1010
1049
|
- po/en/rabbit.po~
|
|
1011
1050
|
- po/ja/rabbit.po
|
|
1012
1051
|
- po/ja/rabbit.po~
|
|
1052
|
+
- test/test-element.rb
|
|
1053
|
+
- test/test-readme-parser.rb
|
|
1054
|
+
- test/test-theme-configuration.rb
|
|
1055
|
+
- test/test-utils.rb
|
|
1056
|
+
- test/test-slide-configuration.rb
|
|
1013
1057
|
- test/rabbit-test-utils.rb
|
|
1014
1058
|
- test/run-test.rb
|
|
1015
|
-
- test/
|
|
1016
|
-
- test/
|
|
1017
|
-
- test/
|
|
1018
|
-
- test/
|
|
1019
|
-
- test/
|
|
1059
|
+
- test/source-generator/test-rd.rb
|
|
1060
|
+
- test/source-generator/test-markdown.rb
|
|
1061
|
+
- test/source-generator/test-hiki.rb
|
|
1062
|
+
- test/test-source.rb
|
|
1063
|
+
- test/test-author-configuration.rb
|
|
1064
|
+
- test/test-applier.rb
|
|
1065
|
+
- test/test-color.rb
|
|
1020
1066
|
- bin/rabbit-slide
|
|
1021
1067
|
- bin/rabbit
|
|
1022
1068
|
- bin/rabbit-theme
|
|
@@ -1049,11 +1095,18 @@ signing_key:
|
|
|
1049
1095
|
specification_version: 3
|
|
1050
1096
|
summary: Rabbit is an RD-document-based presentation application.
|
|
1051
1097
|
test_files:
|
|
1098
|
+
- test/test-element.rb
|
|
1099
|
+
- test/test-readme-parser.rb
|
|
1100
|
+
- test/test-theme-configuration.rb
|
|
1101
|
+
- test/test-utils.rb
|
|
1102
|
+
- test/test-slide-configuration.rb
|
|
1052
1103
|
- test/rabbit-test-utils.rb
|
|
1053
1104
|
- test/run-test.rb
|
|
1054
|
-
- test/
|
|
1055
|
-
- test/
|
|
1056
|
-
- test/
|
|
1057
|
-
- test/
|
|
1058
|
-
- test/
|
|
1105
|
+
- test/source-generator/test-rd.rb
|
|
1106
|
+
- test/source-generator/test-markdown.rb
|
|
1107
|
+
- test/source-generator/test-hiki.rb
|
|
1108
|
+
- test/test-source.rb
|
|
1109
|
+
- test/test-author-configuration.rb
|
|
1110
|
+
- test/test-applier.rb
|
|
1111
|
+
- test/test-color.rb
|
|
1059
1112
|
has_rdoc:
|