motiro 0.6.10 → 0.6.11
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +7 -11
- data/LICENSE +602 -262
- data/README +6 -7
- data/README.en +5 -6
- data/README.pt-br +6 -6
- data/app/controllers/account_controller.rb +5 -6
- data/app/controllers/application.rb +5 -6
- data/app/controllers/javascript_controller.rb +6 -7
- data/app/controllers/report_controller.rb +5 -6
- data/app/controllers/root_controller.rb +5 -1
- data/app/controllers/wiki_controller.rb +10 -8
- data/app/core/cache_reporter.rb +6 -7
- data/app/core/cache_reporter_fetcher.rb +6 -6
- data/app/core/chief_editor.rb +5 -6
- data/app/core/license.rb +598 -0
- data/app/core/reporter.rb +6 -7
- data/app/core/reporter_driver.rb +5 -5
- data/app/core/reporter_fetcher.rb +6 -7
- data/app/core/settings.rb +5 -6
- data/app/core/version.rb +1 -1
- data/app/core/wiki_reporter.rb +5 -6
- data/app/helpers/application_helper.rb +33 -16
- data/app/helpers/default_page_provider.rb +6 -7
- data/app/helpers/report_helper.rb +5 -6
- data/app/helpers/wiki_helper.rb +48 -0
- data/app/models/change.rb +5 -6
- data/app/models/chunk.rb +5 -6
- data/app/models/feed_observer.rb +6 -7
- data/app/models/headline.rb +5 -6
- data/app/models/page.rb +16 -7
- data/app/models/revision.rb +9 -9
- data/app/models/user.rb +6 -9
- data/app/models/wiki_reference.rb +5 -6
- data/app/models/wiki_sweeper.rb +6 -7
- data/app/ports/chdir_runner.rb +6 -7
- data/app/ports/runner.rb +5 -5
- data/app/reporters/darcs_connection.rb +6 -7
- data/app/reporters/darcs_reporter.rb +9 -10
- data/app/reporters/darcs_temp_repo.rb +5 -6
- data/app/reporters/events_reporter.rb +5 -6
- data/app/reporters/features_reporter.rb +5 -6
- data/app/reporters/subversion_reporter.rb +5 -6
- data/app/reporters/svn_connection.rb +6 -6
- data/app/reporters/svn_settings.rb +5 -5
- data/app/views/account/_authorization.rhtml +31 -23
- data/app/views/account/_availability.rhtml +1 -3
- data/app/views/javascript/motiro.rjs +6 -8
- data/app/views/layouts/_bottom.rhtml +7 -0
- data/app/views/report/list.rhtml +1 -1
- data/app/views/root/license.rhtml +5 -0
- data/app/views/wiki/_editbar.rhtml +2 -18
- data/app/views/wiki/_properties_show.rhtml +2 -1
- data/app/views/wiki/_show_event.rhtml +3 -1
- data/app/views/wiki/_show_feature.rhtml +2 -2
- data/app/views/wiki/diff.rhtml +2 -2
- data/app/views/wiki/page_feed.rxml +1 -13
- data/app/views/wiki/raw.rhtml +7 -0
- data/app/views/wiki/show.rhtml +1 -1
- data/app/views/wiki/sourcediff.rhtml +2 -2
- data/bin/motiro +5 -6
- data/config/initializers/motiro_core.rb +1 -0
- data/config/routes.rb +9 -6
- data/db/translation/pt-BR.rb +20 -6
- data/lib/array_extensions.rb +6 -7
- data/lib/diff_chunk_builder.rb +5 -6
- data/lib/differ.rb +5 -6
- data/lib/string_extensions.rb +5 -6
- data/lib/stub_hash.rb +5 -6
- data/lib/tasks/packaging.rake +7 -7
- data/lib/tasks/testing.rake +5 -6
- data/lib/tick_daemon.rb +5 -6
- data/lib/wiki_link_handler.rb +5 -6
- data/lib/wiki_renderer.rb +5 -6
- data/public/images/calendar.gif +0 -0
- data/public/images/done.gif +0 -0
- data/public/images/error.gif +0 -0
- data/public/images/not-done.gif +0 -0
- data/public/images/rss.gif +0 -0
- data/public/stylesheets/motiro.css +163 -170
- data/script/ticker +5 -6
- data/test/acceptance/account_test.rb +6 -7
- data/test/acceptance/darcs_test.rb +6 -7
- data/test/acceptance/events_test.rb +5 -6
- data/test/acceptance/main_page_test.rb +6 -7
- data/test/acceptance/subversion_test.rb +5 -6
- data/test/acceptance/ts_all_suites.rb +5 -6
- data/test/acceptance/wiki_test.rb +5 -6
- data/test/contract/darcs_test.rb +5 -6
- data/test/contract/svn_test.rb +5 -6
- data/test/fixtures/pages.yml +12 -0
- data/test/fixtures/revisions.yml +61 -0
- data/test/functional/report_controller_test.rb +5 -6
- data/test/functional/report_features_test.rb +5 -6
- data/test/functional/report_subversion_test.rb +5 -6
- data/test/functional/root_controller_test.rb +19 -4
- data/test/functional/wiki_controller_test.rb +66 -8
- data/test/lib/acceptance_test_case.rb +6 -7
- data/test/lib/darcs_excerpts.rb +5 -6
- data/test/lib/darcs_repo.rb +5 -6
- data/test/lib/hash_extensions.rb +5 -6
- data/test/lib/live_mode_test.rb +6 -7
- data/test/lib/netutils.rb +6 -7
- data/test/lib/platform_thread.rb +5 -5
- data/test/lib/selenium_extensions.rb +6 -7
- data/test/lib/stubio.rb +6 -7
- data/test/lib/webserver.rb +5 -6
- data/test/meta/darcs_repo_test.rb +6 -6
- data/test/meta/local_svn_test.rb +6 -7
- data/test/meta/platform_thread_test.rb +5 -5
- data/test/meta/stubio_test.rb +6 -7
- data/test/stubs/wiki_link_handler.rb +5 -6
- data/test/test_helper.rb +5 -6
- data/test/unit/array_extensions_test.rb +5 -6
- data/test/unit/cache_reporter_fetcher_test.rb +5 -6
- data/test/unit/cache_reporter_test.rb +5 -6
- data/test/unit/change_test.rb +5 -6
- data/test/unit/chdir_runner_test.rb +5 -6
- data/test/unit/chief_editor_test.rb +5 -6
- data/test/unit/darcs_connection_test.rb +5 -6
- data/test/unit/darcs_reporter_test.rb +14 -6
- data/test/unit/darcs_temp_repo_test.rb +5 -6
- data/test/unit/default_page_provider_test.rb +5 -6
- data/test/unit/diff_chunk_builder_test.rb +6 -7
- data/test/unit/headline_test.rb +5 -6
- data/test/unit/page_test.rb +45 -6
- data/test/unit/reporter_driver_test.rb +6 -7
- data/test/unit/reporter_test.rb +6 -7
- data/test/unit/revision_test.rb +17 -13
- data/test/unit/runner_test.rb +5 -6
- data/test/unit/string_extensions_test.rb +6 -7
- data/test/unit/svn_connection_test.rb +5 -5
- data/test/unit/svn_reporter_interaction_test.rb +6 -7
- data/test/unit/svn_reporter_test.rb +5 -6
- data/test/unit/svn_settings_test.rb +6 -7
- data/test/unit/user_test.rb +6 -11
- data/test/unit/wiki_link_handler_test.rb +5 -6
- data/test/unit/wiki_renderer_test.rb +7 -7
- data/test/unit/wiki_reporter_test.rb +5 -6
- data/vendor/mediacloth-trunk/lib/mediacloth/mediawikiast.rb +15 -0
- data/vendor/mediacloth-trunk/lib/mediacloth/mediawikihtmlgenerator.rb +18 -3
- data/vendor/mediacloth-trunk/lib/mediacloth/mediawikilexer.rb +48 -9
- data/vendor/mediacloth-trunk/lib/mediacloth/mediawikilinkhandler.rb +7 -0
- data/vendor/mediacloth-trunk/lib/mediacloth/mediawikiparser.rb +534 -485
- data/vendor/mediacloth-trunk/lib/mediacloth/mediawikiparser.y +25 -1
- data/vendor/mediacloth-trunk/lib/mediacloth/mediawikiwalker.rb +13 -0
- data/vendor/mediacloth-trunk/test/data/html1 +3 -3
- data/vendor/mediacloth-trunk/test/data/html10 +16 -16
- data/vendor/mediacloth-trunk/test/data/html11 +1 -1
- data/vendor/mediacloth-trunk/test/data/html13 +1 -1
- data/vendor/mediacloth-trunk/test/data/html4 +1 -1
- data/vendor/mediacloth-trunk/test/data/html5 +4 -4
- data/vendor/mediacloth-trunk/test/data/html7 +13 -1
- data/vendor/mediacloth-trunk/test/data/html9 +1 -1
- data/vendor/mediacloth-trunk/test/data/input1 +2 -0
- data/vendor/mediacloth-trunk/test/data/input7 +13 -1
- data/vendor/mediacloth-trunk/test/data/lex1 +1 -1
- data/vendor/mediacloth-trunk/test/data/lex7 +13 -1
- data/vendor/mediacloth-trunk/test/htmlgenerator.rb +26 -1
- data/vendor/mediacloth-trunk/test/lexer.rb +10 -0
- metadata +95 -103
- data/build/build.rb +0 -29
- data/config/report/subversion.yml +0 -26
- data/public/images/calendar.png +0 -0
- data/public/images/done.png +0 -0
- data/public/images/not-done.png +0 -0
- data/public/images/rss.png +0 -0
@@ -2,18 +2,17 @@
|
|
2
2
|
# Copyright (C) 2006-2008 Thiago Arrais
|
3
3
|
#
|
4
4
|
# This program is free software; you can redistribute it and/or modify
|
5
|
-
# it under the terms of the GNU General Public License as published by
|
6
|
-
# the Free Software Foundation; either version
|
5
|
+
# it under the terms of the GNU Affero General Public License as published by
|
6
|
+
# the Free Software Foundation; either version 3 of the License, or
|
7
7
|
# any later version.
|
8
8
|
#
|
9
9
|
# This program is distributed in the hope that it will be useful,
|
10
10
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
11
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
-
# GNU General Public License for more details.
|
12
|
+
# GNU Affero General Public License for more details.
|
13
13
|
#
|
14
|
-
# You should have received a copy of the GNU General Public License
|
15
|
-
# along with this program
|
16
|
-
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
14
|
+
# You should have received a copy of the GNU Affero General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
17
16
|
|
18
17
|
require File.dirname(__FILE__) + '/../test_helper'
|
19
18
|
|
@@ -82,4 +81,4 @@ class ReporterDriverTest < Test::Unit::TestCase
|
|
82
81
|
# TODO what when there are no headlines yet cached or the ones cached aren't
|
83
82
|
# filled?
|
84
83
|
|
85
|
-
end
|
84
|
+
end
|
data/test/unit/reporter_test.rb
CHANGED
@@ -2,18 +2,17 @@
|
|
2
2
|
# Copyright (C) 2006-2008 Thiago Arrais
|
3
3
|
#
|
4
4
|
# This program is free software; you can redistribute it and/or modify
|
5
|
-
# it under the terms of the GNU General Public License as published by
|
6
|
-
# the Free Software Foundation; either version
|
5
|
+
# it under the terms of the GNU Affero General Public License as published by
|
6
|
+
# the Free Software Foundation; either version 3 of the License, or
|
7
7
|
# any later version.
|
8
8
|
#
|
9
9
|
# This program is distributed in the hope that it will be useful,
|
10
10
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
11
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
-
# GNU General Public License for more details.
|
12
|
+
# GNU Affero General Public License for more details.
|
13
13
|
#
|
14
|
-
# You should have received a copy of the GNU General Public License
|
15
|
-
# along with this program
|
16
|
-
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
14
|
+
# You should have received a copy of the GNU Affero General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
17
16
|
|
18
17
|
require File.dirname(__FILE__) + '/../test_helper'
|
19
18
|
|
@@ -78,4 +77,4 @@ class MotiroReporterTest < Test::Unit::TestCase
|
|
78
77
|
assert_equal(expected_params, MyDefaultReporter.new.params_for('d25'))
|
79
78
|
end
|
80
79
|
|
81
|
-
end
|
80
|
+
end
|
data/test/unit/revision_test.rb
CHANGED
@@ -2,18 +2,17 @@
|
|
2
2
|
# Copyright (C) 2006-2008 Thiago Arrais
|
3
3
|
#
|
4
4
|
# This program is free software; you can redistribute it and/or modify
|
5
|
-
# it under the terms of the GNU General Public License as published by
|
6
|
-
# the Free Software Foundation; either version
|
5
|
+
# it under the terms of the GNU Affero General Public License as published by
|
6
|
+
# the Free Software Foundation; either version 3 of the License, or
|
7
7
|
# any later version.
|
8
8
|
#
|
9
9
|
# This program is distributed in the hope that it will be useful,
|
10
10
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
11
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
-
# GNU General Public License for more details.
|
12
|
+
# GNU Affero General Public License for more details.
|
13
13
|
#
|
14
|
-
# You should have received a copy of the GNU General Public License
|
15
|
-
# along with this program
|
16
|
-
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
14
|
+
# You should have received a copy of the GNU Affero General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
17
16
|
|
18
17
|
require File.dirname(__FILE__) + '/../test_helper'
|
19
18
|
|
@@ -34,12 +33,17 @@ class RevisionTest < Test::Unit::TestCase
|
|
34
33
|
|
35
34
|
assert_equal rev.page.revisions, rev.revisions
|
36
35
|
end
|
36
|
+
|
37
|
+
def test_revision_is_editable_by_current_page_editors
|
38
|
+
assert revisions('second_open_page_edition').editable_by?(bob)
|
39
|
+
assert revisions('open_page_creation').editable_by?(bob)
|
40
|
+
end
|
37
41
|
|
38
42
|
def test_diffs_one_line_modification
|
39
43
|
fst_rev = pages('changed_page').revisions[0]
|
40
44
|
snd_rev = pages('changed_page').revisions[1]
|
41
45
|
|
42
|
-
change_chunks = fst_rev.diff(
|
46
|
+
change_chunks = fst_rev.diff(snd_rev)
|
43
47
|
assert_equal 1, change_chunks.size
|
44
48
|
chunk = change_chunks.first
|
45
49
|
assert !chunk.unchanged?
|
@@ -60,7 +64,7 @@ class RevisionTest < Test::Unit::TestCase
|
|
60
64
|
:text => "This is the modified first line\n" +
|
61
65
|
"And this is the modified second line")
|
62
66
|
|
63
|
-
chunks = page.revisions[0].diff(
|
67
|
+
chunks = page.revisions[0].diff(page.revisions[1])
|
64
68
|
assert_equal 1, chunks.size
|
65
69
|
chunk = chunks.first
|
66
70
|
assert_equal :modification, chunk.action
|
@@ -83,7 +87,7 @@ class RevisionTest < Test::Unit::TestCase
|
|
83
87
|
"This line will not be changed\n" +
|
84
88
|
"And this is another modification")
|
85
89
|
|
86
|
-
chunks = page.revisions[0].diff(
|
90
|
+
chunks = page.revisions[0].diff(page.revisions[1])
|
87
91
|
assert_equal 3, chunks.size
|
88
92
|
assert !chunks[0].unchanged?
|
89
93
|
assert_equal :modification, chunks[0].action
|
@@ -111,7 +115,7 @@ class RevisionTest < Test::Unit::TestCase
|
|
111
115
|
"But I also inserted a new one\n" +
|
112
116
|
"This line will not be changed\n" +
|
113
117
|
"And this is the last one")
|
114
|
-
chunks = page.revisions[0].diff(
|
118
|
+
chunks = page.revisions[0].diff(page.revisions[1])
|
115
119
|
assert_equal 2, chunks.size
|
116
120
|
assert !chunks.first.unchanged?
|
117
121
|
assert chunks.last.unchanged?
|
@@ -135,7 +139,7 @@ class RevisionTest < Test::Unit::TestCase
|
|
135
139
|
page.revise(bob, now, :title => 'A good page',
|
136
140
|
:text => "This is the modified first line\n" +
|
137
141
|
"And this one won't be changed")
|
138
|
-
chunks = page.revisions[0].diff(
|
142
|
+
chunks = page.revisions[0].diff(page.revisions[1])
|
139
143
|
assert_equal 2, chunks.size
|
140
144
|
assert_equal 2, chunks.first.lines.size
|
141
145
|
assert_equal 'This is the first line', chunks.first.lines.first.original_text
|
@@ -155,7 +159,7 @@ class RevisionTest < Test::Unit::TestCase
|
|
155
159
|
"But it is not the last\n" +
|
156
160
|
"Because someone added other two")
|
157
161
|
|
158
|
-
chunks = page.revisions[0].diff(
|
162
|
+
chunks = page.revisions[0].diff(page.revisions[1])
|
159
163
|
assert_equal 2, chunks.size
|
160
164
|
assert chunks.first.unchanged?
|
161
165
|
assert !chunks.last.unchanged?
|
@@ -179,7 +183,7 @@ class RevisionTest < Test::Unit::TestCase
|
|
179
183
|
:text => "This is the first line\n" +
|
180
184
|
"And this is the last one")
|
181
185
|
|
182
|
-
chunks = page.revisions[0].diff(
|
186
|
+
chunks = page.revisions[0].diff(page.revisions[1])
|
183
187
|
assert_equal 3, chunks.size
|
184
188
|
assert chunks[0].unchanged?
|
185
189
|
assert !chunks[1].unchanged?
|
data/test/unit/runner_test.rb
CHANGED
@@ -2,18 +2,17 @@
|
|
2
2
|
# Copyright (C) 2006-2008 Thiago Arrais
|
3
3
|
#
|
4
4
|
# This program is free software; you can redistribute it and/or modify
|
5
|
-
# it under the terms of the GNU General Public License as published by
|
6
|
-
# the Free Software Foundation; either version
|
5
|
+
# it under the terms of the GNU Affero General Public License as published by
|
6
|
+
# the Free Software Foundation; either version 3 of the License, or
|
7
7
|
# any later version.
|
8
8
|
#
|
9
9
|
# This program is distributed in the hope that it will be useful,
|
10
10
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
11
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
-
# GNU General Public License for more details.
|
12
|
+
# GNU Affero General Public License for more details.
|
13
13
|
#
|
14
|
-
# You should have received a copy of the GNU General Public License
|
15
|
-
# along with this program
|
16
|
-
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
14
|
+
# You should have received a copy of the GNU Affero General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
17
16
|
|
18
17
|
require File.dirname(__FILE__) + '/../test_helper'
|
19
18
|
|
@@ -2,18 +2,17 @@
|
|
2
2
|
# Copyright (C) 2006-2008 Thiago Arrais
|
3
3
|
#
|
4
4
|
# This program is free software; you can redistribute it and/or modify
|
5
|
-
# it under the terms of the GNU General Public License as published by
|
6
|
-
# the Free Software Foundation; either version
|
5
|
+
# it under the terms of the GNU Affero General Public License as published by
|
6
|
+
# the Free Software Foundation; either version 3 of the License, or
|
7
7
|
# any later version.
|
8
8
|
#
|
9
9
|
# This program is distributed in the hope that it will be useful,
|
10
10
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
11
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
-
# GNU General Public License for more details.
|
12
|
+
# GNU Affero General Public License for more details.
|
13
13
|
#
|
14
|
-
# You should have received a copy of the GNU General Public License
|
15
|
-
# along with this program
|
16
|
-
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
14
|
+
# You should have received a copy of the GNU Affero General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
17
16
|
|
18
17
|
require File.dirname(__FILE__) + '/../test_helper'
|
19
18
|
|
@@ -21,7 +20,7 @@ class StringExtensionsTest < Test::Unit::TestCase
|
|
21
20
|
|
22
21
|
def test_medialize
|
23
22
|
str = "= Motiro =\n\nAnother paragraph"
|
24
|
-
assert_equal "<h1><a name='Motiro'></a> Motiro </h1><p
|
23
|
+
assert_equal "<h1><a name='Motiro'></a> Motiro </h1><p><br />\n\n</p><p>Another paragraph</p>",
|
25
24
|
str.medialize
|
26
25
|
end
|
27
26
|
|
@@ -2,17 +2,17 @@
|
|
2
2
|
# Copyright (C) 2006-2008 Thiago Arrais
|
3
3
|
#
|
4
4
|
# This program is free software; you can redistribute it and/or modify
|
5
|
-
# it under the terms of the GNU General Public License as published by
|
6
|
-
# the Free Software Foundation; either version
|
5
|
+
# it under the terms of the GNU Affero General Public License as published by
|
6
|
+
# the Free Software Foundation; either version 3 of the License, or
|
7
7
|
# any later version.
|
8
8
|
#
|
9
9
|
# This program is distributed in the hope that it will be useful,
|
10
10
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
11
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
-
# GNU General Public License for more details.
|
12
|
+
# GNU Affero General Public License for more details.
|
13
13
|
#
|
14
|
-
# You should have received a copy of the GNU General Public License
|
15
|
-
# along with this program
|
14
|
+
# You should have received a copy of the GNU Affero General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
16
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
17
17
|
|
18
18
|
require File.dirname(__FILE__) + '/../test_helper'
|
@@ -2,18 +2,17 @@
|
|
2
2
|
# Copyright (C) 2006-2008 Thiago Arrais
|
3
3
|
#
|
4
4
|
# This program is free software; you can redistribute it and/or modify
|
5
|
-
# it under the terms of the GNU General Public License as published by
|
6
|
-
# the Free Software Foundation; either version
|
5
|
+
# it under the terms of the GNU Affero General Public License as published by
|
6
|
+
# the Free Software Foundation; either version 3 of the License, or
|
7
7
|
# any later version.
|
8
8
|
#
|
9
9
|
# This program is distributed in the hope that it will be useful,
|
10
10
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
11
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
-
# GNU General Public License for more details.
|
12
|
+
# GNU Affero General Public License for more details.
|
13
13
|
#
|
14
|
-
# You should have received a copy of the GNU General Public License
|
15
|
-
# along with this program
|
16
|
-
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
14
|
+
# You should have received a copy of the GNU Affero General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
17
16
|
|
18
17
|
require File.dirname(__FILE__) + '/../test_helper'
|
19
18
|
|
@@ -35,4 +34,4 @@ class SubversionReporterInteractionTest < Test::Unit::TestCase
|
|
35
34
|
end
|
36
35
|
end
|
37
36
|
|
38
|
-
end
|
37
|
+
end
|
@@ -2,18 +2,17 @@
|
|
2
2
|
# Copyright (C) 2006-2008 Thiago Arrais
|
3
3
|
#
|
4
4
|
# This program is free software; you can redistribute it and/or modify
|
5
|
-
# it under the terms of the GNU General Public License as published by
|
6
|
-
# the Free Software Foundation; either version
|
5
|
+
# it under the terms of the GNU Affero General Public License as published by
|
6
|
+
# the Free Software Foundation; either version 3 of the License, or
|
7
7
|
# any later version.
|
8
8
|
#
|
9
9
|
# This program is distributed in the hope that it will be useful,
|
10
10
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
11
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
-
# GNU General Public License for more details.
|
12
|
+
# GNU Affero General Public License for more details.
|
13
13
|
#
|
14
|
-
# You should have received a copy of the GNU General Public License
|
15
|
-
# along with this program
|
16
|
-
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
14
|
+
# You should have received a copy of the GNU Affero General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
17
16
|
|
18
17
|
require File.dirname(__FILE__) + '/../test_helper'
|
19
18
|
|
@@ -2,18 +2,17 @@
|
|
2
2
|
# Copyright (C) 2006-2008 Thiago Arrais
|
3
3
|
#
|
4
4
|
# This program is free software; you can redistribute it and/or modify
|
5
|
-
# it under the terms of the GNU General Public License as published by
|
6
|
-
# the Free Software Foundation; either version
|
5
|
+
# it under the terms of the GNU Affero General Public License as published by
|
6
|
+
# the Free Software Foundation; either version 3 of the License, or
|
7
7
|
# any later version.
|
8
8
|
#
|
9
9
|
# This program is distributed in the hope that it will be useful,
|
10
10
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
11
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
-
# GNU General Public License for more details.
|
12
|
+
# GNU Affero General Public License for more details.
|
13
13
|
#
|
14
|
-
# You should have received a copy of the GNU General Public License
|
15
|
-
# along with this program
|
16
|
-
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
14
|
+
# You should have received a copy of the GNU Affero General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
17
16
|
|
18
17
|
require File.dirname(__FILE__) + '/../test_helper'
|
19
18
|
|
@@ -83,4 +82,4 @@ class SubversionSettingsProviderAuthenticatedTest < Test::Unit::TestCase
|
|
83
82
|
end
|
84
83
|
end
|
85
84
|
|
86
|
-
end
|
85
|
+
end
|
data/test/unit/user_test.rb
CHANGED
@@ -2,18 +2,17 @@
|
|
2
2
|
# Copyright (C) 2006-2008 Thiago Arrais
|
3
3
|
#
|
4
4
|
# This program is free software; you can redistribute it and/or modify
|
5
|
-
# it under the terms of the GNU General Public License as published by
|
6
|
-
# the Free Software Foundation; either version
|
5
|
+
# it under the terms of the GNU Affero General Public License as published by
|
6
|
+
# the Free Software Foundation; either version 3 of the License, or
|
7
7
|
# any later version.
|
8
8
|
#
|
9
9
|
# This program is distributed in the hope that it will be useful,
|
10
10
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
11
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
-
# GNU General Public License for more details.
|
12
|
+
# GNU Affero General Public License for more details.
|
13
13
|
#
|
14
|
-
# You should have received a copy of the GNU General Public License
|
15
|
-
# along with this program
|
16
|
-
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
14
|
+
# You should have received a copy of the GNU Affero General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
17
16
|
|
18
17
|
require File.dirname(__FILE__) + '/../test_helper'
|
19
18
|
|
@@ -21,13 +20,9 @@ class UserTest < Test::Unit::TestCase
|
|
21
20
|
|
22
21
|
self.use_instantiated_fixtures = true
|
23
22
|
|
24
|
-
fixtures :users, :pages
|
25
|
-
|
26
23
|
def test_auth
|
27
|
-
|
28
24
|
assert_equal @bob, User.authenticate("bob", "test")
|
29
25
|
assert_nil User.authenticate("nonbob", "test")
|
30
|
-
|
31
26
|
end
|
32
27
|
|
33
28
|
def test_disallowed_passwords
|
@@ -105,9 +100,9 @@ class UserTest < Test::Unit::TestCase
|
|
105
100
|
|
106
101
|
def test_page_edition_authorization
|
107
102
|
u = User.new(:login => 'john')
|
108
|
-
attrs = { :name => 'TestPage', :text => '' }
|
109
103
|
|
110
104
|
assert u.can_edit?(revise_brand_new_page(:editors => 'john'))
|
105
|
+
assert u.can_edit?(revise_brand_new_page(:editors => 'eric john'))
|
111
106
|
assert !u.can_edit?(revise_brand_new_page(:editors => 'eric'))
|
112
107
|
assert u.can_edit?(revise_brand_new_page(:editors => ' '))
|
113
108
|
end
|
@@ -2,18 +2,17 @@
|
|
2
2
|
# Copyright (C) 2006-2008 Thiago Arrais
|
3
3
|
#
|
4
4
|
# This program is free software; you can redistribute it and/or modify
|
5
|
-
# it under the terms of the GNU General Public License as published by
|
6
|
-
# the Free Software Foundation; either version
|
5
|
+
# it under the terms of the GNU Affero General Public License as published by
|
6
|
+
# the Free Software Foundation; either version 3 of the License, or
|
7
7
|
# any later version.
|
8
8
|
#
|
9
9
|
# This program is distributed in the hope that it will be useful,
|
10
10
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
11
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
-
# GNU General Public License for more details.
|
12
|
+
# GNU Affero General Public License for more details.
|
13
13
|
#
|
14
|
-
# You should have received a copy of the GNU General Public License
|
15
|
-
# along with this program
|
16
|
-
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
14
|
+
# You should have received a copy of the GNU Affero General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
17
16
|
|
18
17
|
require File.dirname(__FILE__) + '/../test_helper'
|
19
18
|
|
@@ -2,18 +2,17 @@
|
|
2
2
|
# Copyright (C) 2006-2008 Thiago Arrais
|
3
3
|
#
|
4
4
|
# This program is free software; you can redistribute it and/or modify
|
5
|
-
# it under the terms of the GNU General Public License as published by
|
6
|
-
# the Free Software Foundation; either version
|
5
|
+
# it under the terms of the GNU Affero General Public License as published by
|
6
|
+
# the Free Software Foundation; either version 3 of the License, or
|
7
7
|
# any later version.
|
8
8
|
#
|
9
9
|
# This program is distributed in the hope that it will be useful,
|
10
10
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
11
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
-
# GNU General Public License for more details.
|
12
|
+
# GNU Affero General Public License for more details.
|
13
13
|
#
|
14
|
-
# You should have received a copy of the GNU General Public License
|
15
|
-
# along with this program
|
16
|
-
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
14
|
+
# You should have received a copy of the GNU Affero General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
17
16
|
|
18
17
|
require File.dirname(__FILE__) + '/../test_helper'
|
19
18
|
|
@@ -35,7 +34,7 @@ class WikiRendererTest < Test::Unit::TestCase
|
|
35
34
|
def test_breaks_paragraphs_on_linebreak_and_return_feed
|
36
35
|
line_break_only_text = "= Motiro =\n\nThis is project Motiro"
|
37
36
|
feed_return_text = "= Motiro =\r\n\r\nThis is project Motiro"
|
38
|
-
expected_text = "<h1><a name='Motiro'></a> Motiro </h1><p>This is project Motiro</p>"
|
37
|
+
expected_text = "<h1><a name='Motiro'></a> Motiro </h1><p><br /></p><p>This is project Motiro</p>"
|
39
38
|
|
40
39
|
assert_equal expected_text, renderer.render_wiki_text(line_break_only_text)
|
41
40
|
assert_equal expected_text, renderer.render_wiki_text(feed_return_text)
|
@@ -241,6 +240,7 @@ class WikiRendererTest < Test::Unit::TestCase
|
|
241
240
|
'<a name=\'Super_title\'><span style="background: #b8ffb8"></span></a> ' +
|
242
241
|
'<span style="background: #ffb8b8">Sub</span>' +
|
243
242
|
'<span style="background: #b8ffb8">Super</span> title</h2> ' +
|
243
|
+
'<p><br /></p> ' +
|
244
244
|
'<p>Paragraph</p>',
|
245
245
|
renderer.render_wiki_diff(previous, current)
|
246
246
|
end
|
@@ -2,18 +2,17 @@
|
|
2
2
|
# Copyright (C) 2006-2008 Thiago Arrais
|
3
3
|
#
|
4
4
|
# This program is free software; you can redistribute it and/or modify
|
5
|
-
# it under the terms of the GNU General Public License as published by
|
6
|
-
# the Free Software Foundation; either version
|
5
|
+
# it under the terms of the GNU Affero General Public License as published by
|
6
|
+
# the Free Software Foundation; either version 3 of the License, or
|
7
7
|
# any later version.
|
8
8
|
#
|
9
9
|
# This program is distributed in the hope that it will be useful,
|
10
10
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
11
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
-
# GNU General Public License for more details.
|
12
|
+
# GNU Affero General Public License for more details.
|
13
13
|
#
|
14
|
-
# You should have received a copy of the GNU General Public License
|
15
|
-
# along with this program
|
16
|
-
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
14
|
+
# You should have received a copy of the GNU Affero General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
17
16
|
|
18
17
|
require File.dirname(__FILE__) + '/../test_helper'
|
19
18
|
|