ohloh_scm 2.0.0 → 2.0.1
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/lib/ohloh_scm/adapters/svn/commits.rb +1 -1
- data/lib/ohloh_scm/commit.rb +1 -1
- data/lib/ohloh_scm/diff.rb +4 -4
- data/lib/ohloh_scm/parsers/bzr_parser.rb +4 -4
- data/lib/ohloh_scm/parsers/bzr_xml_parser.rb +13 -13
- data/lib/ohloh_scm/parsers/cvs_parser.rb +1 -1
- data/lib/ohloh_scm/parsers/git_parser.rb +2 -2
- data/lib/ohloh_scm/parsers/git_styled_parser.rb +2 -2
- data/lib/ohloh_scm/parsers/hg_parser.rb +2 -2
- data/lib/ohloh_scm/parsers/hg_styled_parser.rb +2 -2
- data/lib/ohloh_scm/parsers/svn_parser.rb +2 -2
- data/lib/ohloh_scm/parsers/svn_xml_parser.rb +2 -2
- data/lib/ohloh_scm/scratch_dir.rb +1 -1
- data/lib/ohloh_scm/version.rb +2 -2
- data/ohloh_scm.gemspec +1 -1
- data/test/test_helper.rb +2 -2
- data/test/unit/abstract_adapter_test.rb +4 -4
- data/test/unit/adapter_factory_test.rb +7 -7
- data/test/unit/array_writer_test.rb +1 -1
- data/test/unit/bzr_cat_file_test.rb +12 -12
- data/test/unit/bzr_commits_test.rb +12 -12
- data/test/unit/bzr_head_test.rb +1 -1
- data/test/unit/bzr_misc_test.rb +2 -2
- data/test/unit/bzr_parser_test.rb +5 -5
- data/test/unit/bzr_pull_test.rb +2 -2
- data/test/unit/bzr_push_test.rb +2 -2
- data/test/unit/bzr_validation_test.rb +3 -3
- data/test/unit/bzr_xml_parser_test.rb +20 -20
- data/test/unit/bzrlib_cat_file_test.rb +10 -10
- data/test/unit/bzrlib_head_test.rb +1 -1
- data/test/unit/cvs_branch_number_test.rb +1 -1
- data/test/unit/cvs_commits_test.rb +1 -1
- data/test/unit/cvs_convert_test.rb +2 -2
- data/test/unit/cvs_misc_test.rb +1 -1
- data/test/unit/cvs_parser_test.rb +1 -1
- data/test/unit/cvs_validation_test.rb +1 -1
- data/test/unit/git_cat_file_test.rb +2 -2
- data/test/unit/git_commit_all_test.rb +3 -3
- data/test/unit/git_commits_test.rb +1 -1
- data/test/unit/git_head_test.rb +1 -1
- data/test/unit/git_log_parser_test.rb +2 -2
- data/test/unit/git_misc_test.rb +4 -4
- data/test/unit/git_parser_test.rb +1 -1
- data/test/unit/git_patch_test.rb +1 -1
- data/test/unit/git_pull_test.rb +2 -2
- data/test/unit/git_push_test.rb +3 -3
- data/test/unit/git_rev_list_test.rb +1 -1
- data/test/unit/git_styled_parser_test.rb +4 -4
- data/test/unit/git_token_test.rb +6 -6
- data/test/unit/git_validation_test.rb +1 -1
- data/test/unit/hg_cat_file_test.rb +6 -6
- data/test/unit/hg_commits_test.rb +1 -1
- data/test/unit/hg_head_test.rb +1 -1
- data/test/unit/hg_misc_test.rb +2 -2
- data/test/unit/hg_parser_test.rb +1 -1
- data/test/unit/hg_patch_test.rb +1 -1
- data/test/unit/hg_pull_test.rb +2 -2
- data/test/unit/hg_push_test.rb +2 -2
- data/test/unit/hg_rev_list_test.rb +1 -1
- data/test/unit/hg_validation_test.rb +1 -1
- data/test/unit/hglib_cat_file_test.rb +6 -6
- data/test/unit/hglib_head_test.rb +1 -1
- data/test/unit/ohlog_command_line_test.rb +1 -1
- data/test/unit/shellout_test.rb +1 -1
- data/test/unit/string_encoder_command_line_test.rb +1 -1
- data/test/unit/svn_cat_file_test.rb +3 -3
- data/test/unit/svn_chain_cat_file_test.rb +3 -3
- data/test/unit/svn_chain_commits_test.rb +1 -1
- data/test/unit/svn_chain_test.rb +2 -2
- data/test/unit/svn_commits_test.rb +15 -15
- data/test/unit/svn_convert_test.rb +2 -2
- data/test/unit/svn_head_test.rb +1 -1
- data/test/unit/svn_misc_test.rb +2 -2
- data/test/unit/svn_parser_test.rb +1 -1
- data/test/unit/svn_patch_test.rb +1 -1
- data/test/unit/svn_pull_test.rb +5 -5
- data/test/unit/svn_push_test.rb +3 -3
- data/test/unit/svn_validation_test.rb +3 -3
- data/test/unit/svn_xml_parser_test.rb +2 -2
- metadata +2 -2
@@ -1,7 +1,7 @@
|
|
1
1
|
require_relative '../test_helper'
|
2
2
|
|
3
3
|
module OhlohScm::Adapters
|
4
|
-
class BzrCommitsTest <
|
4
|
+
class BzrCommitsTest < OhlohScm::Test
|
5
5
|
|
6
6
|
def test_commit_count
|
7
7
|
with_bzr_repository('bzr') do |bzr|
|
@@ -63,7 +63,7 @@ module OhlohScm::Adapters
|
|
63
63
|
assert_equal [
|
64
64
|
'test@example.com-20090206214301-s93cethy9atcqu9h',
|
65
65
|
'test@example.com-20090206214451-lzjngefdyw3vmgms',
|
66
|
-
'test@example.com-20090206214350-rqhdpz92l11eoq2t', # branch commit
|
66
|
+
'test@example.com-20090206214350-rqhdpz92l11eoq2t', # branch commit
|
67
67
|
'test@example.com-20090206214515-21lkfj3dbocao5pr' # merge commit
|
68
68
|
], bzr.commit_tokens(:trunk_only => false)
|
69
69
|
end
|
@@ -95,8 +95,8 @@ module OhlohScm::Adapters
|
|
95
95
|
'test@example.com-20110803170648-o0xcbni7lwp97azj',
|
96
96
|
'test@example.com-20110803170818-v44umypquqg8migo'
|
97
97
|
], bzr.commit_tokens(:trunk_only => false)
|
98
|
-
end
|
99
|
-
end
|
98
|
+
end
|
99
|
+
end
|
100
100
|
|
101
101
|
def test_nested_branches_commit_tokens_trunk_only_true
|
102
102
|
with_bzr_repository('bzr_with_nested_branches') do |bzr|
|
@@ -109,15 +109,15 @@ module OhlohScm::Adapters
|
|
109
109
|
'obnox@samba.org-20090204004942-73rnw0izen42f154',
|
110
110
|
'test@example.com-20110803170818-v44umypquqg8migo'
|
111
111
|
], bzr.commit_tokens(:trunk_only => true)
|
112
|
-
end
|
113
|
-
end
|
112
|
+
end
|
113
|
+
end
|
114
114
|
|
115
115
|
def test_commits_trunk_only_false
|
116
116
|
with_bzr_repository('bzr_with_branch') do |bzr|
|
117
117
|
assert_equal [
|
118
118
|
'test@example.com-20090206214301-s93cethy9atcqu9h',
|
119
119
|
'test@example.com-20090206214451-lzjngefdyw3vmgms',
|
120
|
-
'test@example.com-20090206214350-rqhdpz92l11eoq2t', # branch commit
|
120
|
+
'test@example.com-20090206214350-rqhdpz92l11eoq2t', # branch commit
|
121
121
|
'test@example.com-20090206214515-21lkfj3dbocao5pr' # merge commit
|
122
122
|
], bzr.commits(:trunk_only => false).map { |c| c.token }
|
123
123
|
end
|
@@ -163,8 +163,8 @@ module OhlohScm::Adapters
|
|
163
163
|
'test@example.com-20110803170648-o0xcbni7lwp97azj',
|
164
164
|
'test@example.com-20110803170818-v44umypquqg8migo'
|
165
165
|
], bzr.commits(:trunk_only => false).map { |c| c.token }
|
166
|
-
end
|
167
|
-
end
|
166
|
+
end
|
167
|
+
end
|
168
168
|
|
169
169
|
def test_nested_branches_commits_trunk_only_true
|
170
170
|
with_bzr_repository('bzr_with_nested_branches') do |bzr|
|
@@ -177,8 +177,8 @@ module OhlohScm::Adapters
|
|
177
177
|
'obnox@samba.org-20090204004942-73rnw0izen42f154',
|
178
178
|
'test@example.com-20110803170818-v44umypquqg8migo'
|
179
179
|
], bzr.commits(:trunk_only => true).map { |c| c.token }
|
180
|
-
end
|
181
|
-
end
|
180
|
+
end
|
181
|
+
end
|
182
182
|
|
183
183
|
def test_commits
|
184
184
|
with_bzr_repository('bzr') do |bzr|
|
@@ -345,7 +345,7 @@ module OhlohScm::Adapters
|
|
345
345
|
assert_equal 'Abhay Mujumdar', commits[0].committer_name
|
346
346
|
assert_equal nil, commits[0].author_name
|
347
347
|
assert_equal nil, commits[0].author_email
|
348
|
-
|
348
|
+
|
349
349
|
assert_equal 'Updated.', commits[1].message
|
350
350
|
assert_equal 'Abhay Mujumdar', commits[1].committer_name
|
351
351
|
assert_equal 'John Doe', commits[1].author_name
|
data/test/unit/bzr_head_test.rb
CHANGED
data/test/unit/bzr_misc_test.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
require_relative '../test_helper'
|
3
3
|
|
4
4
|
module OhlohScm::Adapters
|
5
|
-
class BzrMiscTest <
|
5
|
+
class BzrMiscTest < OhlohScm::Test
|
6
6
|
|
7
7
|
def test_exist
|
8
8
|
save_bzr = nil
|
@@ -26,7 +26,7 @@ module OhlohScm::Adapters
|
|
26
26
|
|
27
27
|
def test_export
|
28
28
|
with_bzr_repository('bzr') do |bzr|
|
29
|
-
|
29
|
+
OhlohScm::ScratchDir.new do |dir|
|
30
30
|
bzr.export(dir)
|
31
31
|
assert_equal ['.', '..', 'Cédric.txt', 'file1.txt', 'file3.txt', 'file4.txt', 'file5.txt'], Dir.entries(dir).sort
|
32
32
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require_relative '../test_helper'
|
2
2
|
|
3
3
|
module OhlohScm::Parsers
|
4
|
-
class BzrParserTest <
|
4
|
+
class BzrParserTest < OhlohScm::Test
|
5
5
|
|
6
6
|
def test_empty_array
|
7
7
|
assert_equal([], BzrParser.parse(''))
|
@@ -305,8 +305,8 @@ renamed:
|
|
305
305
|
end
|
306
306
|
|
307
307
|
def test_remove_dupes_add_remove
|
308
|
-
diffs = BzrParser.remove_dupes([
|
309
|
-
|
308
|
+
diffs = BzrParser.remove_dupes([ OhlohScm::Diff.new(:action => "A", :path => "foo"),
|
309
|
+
OhlohScm::Diff.new(:action => "D", :path => "foo") ])
|
310
310
|
assert_equal 1, diffs.size
|
311
311
|
assert_equal 'M', diffs.first.action
|
312
312
|
assert_equal 'foo', diffs.first.path
|
@@ -378,9 +378,9 @@ message:
|
|
378
378
|
This is a tricky commit message to confirm fix
|
379
379
|
to Ticket 5. We're including a line of dashes in
|
380
380
|
the message that resembles a log delimiter.
|
381
|
-
|
381
|
+
|
382
382
|
------------------------------------------------------------
|
383
|
-
|
383
|
+
|
384
384
|
Happy parsing!
|
385
385
|
added:
|
386
386
|
goodbyeworld.c
|
data/test/unit/bzr_pull_test.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
require_relative '../test_helper'
|
2
2
|
|
3
3
|
module OhlohScm::Adapters
|
4
|
-
class BzrPullTest <
|
4
|
+
class BzrPullTest < OhlohScm::Test
|
5
5
|
|
6
6
|
def test_pull
|
7
7
|
with_bzr_repository('bzr') do |src|
|
8
|
-
|
8
|
+
OhlohScm::ScratchDir.new do |dest_dir|
|
9
9
|
|
10
10
|
dest = BzrAdapter.new(:url => dest_dir).normalize
|
11
11
|
assert !dest.exist?
|
data/test/unit/bzr_push_test.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require_relative '../test_helper'
|
2
2
|
|
3
3
|
module OhlohScm::Adapters
|
4
|
-
class BzrPushTest <
|
4
|
+
class BzrPushTest < OhlohScm::Test
|
5
5
|
|
6
6
|
def test_hostname
|
7
7
|
assert !BzrAdapter.new.hostname
|
@@ -36,7 +36,7 @@ module OhlohScm::Adapters
|
|
36
36
|
|
37
37
|
def test_push
|
38
38
|
with_bzr_repository('bzr') do |src|
|
39
|
-
|
39
|
+
OhlohScm::ScratchDir.new do |dest_dir|
|
40
40
|
|
41
41
|
dest = BzrAdapter.new(:url => dest_dir).normalize
|
42
42
|
assert !dest.exist?
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require_relative '../test_helper'
|
2
2
|
|
3
3
|
module OhlohScm::Adapters
|
4
|
-
class BzrValidationTest <
|
4
|
+
class BzrValidationTest < OhlohScm::Test
|
5
5
|
def test_rejected_urls
|
6
6
|
[ nil, "", "foo", "http:/", "http:://", "http://", "http://a",
|
7
7
|
"www.selenic.com/repo/hello", # missing a protool prefix
|
@@ -21,8 +21,8 @@ module OhlohScm::Adapters
|
|
21
21
|
"http://www.selenic.com:80/repo/hello",
|
22
22
|
"https://www.selenic.com/repo/hello",
|
23
23
|
"bzr://www.selenic.com/repo/hello",
|
24
|
-
"lp:foobar",
|
25
|
-
"lp:~foobar/bar",
|
24
|
+
"lp:foobar",
|
25
|
+
"lp:~foobar/bar",
|
26
26
|
].each do |url|
|
27
27
|
bzr = BzrAdapter.new(:url => url, :public_urls_only => true)
|
28
28
|
assert !bzr.validate_url
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require_relative '../test_helper'
|
2
2
|
|
3
3
|
module OhlohScm::Parsers
|
4
|
-
class BzrXmlParserTest <
|
4
|
+
class BzrXmlParserTest < OhlohScm::Test
|
5
5
|
|
6
6
|
def test_empty_array
|
7
7
|
assert_equal([], BzrXmlParser.parse(''))
|
@@ -10,7 +10,7 @@ module OhlohScm::Parsers
|
|
10
10
|
def test_empty_xml
|
11
11
|
assert_equal("<?xml version=\"1.0\"?>\n<ohloh_log scm=\"bzr\">\n</ohloh_log>\n", BzrXmlParser.parse('', :writer => XmlWriter.new))
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
def test_basic_xml
|
15
15
|
xml = <<-XML
|
16
16
|
<?xml version="1.0" encoding="UTF-8"?>
|
@@ -31,7 +31,7 @@ module OhlohScm::Parsers
|
|
31
31
|
commits = BzrXmlParser.parse(xml)
|
32
32
|
assert_equal 1, commits.size
|
33
33
|
c = commits.first
|
34
|
-
assert_equal 0, c.diffs.size
|
34
|
+
assert_equal 0, c.diffs.size
|
35
35
|
assert_equal "Renamed test1.txt to subdir/test_b.txt, removed test2.txt and added test_a.txt.", c.message
|
36
36
|
assert_equal "test@example.com-20110725174345-brbpkwumeh07aoh8", c.token
|
37
37
|
end
|
@@ -71,7 +71,7 @@ module OhlohScm::Parsers
|
|
71
71
|
|
72
72
|
assert_equal "test2.txt", c.diffs[0].path
|
73
73
|
assert_equal "D", c.diffs[0].action
|
74
|
-
|
74
|
+
|
75
75
|
assert_equal "test_a.txt", c.diffs[1].path
|
76
76
|
assert_equal "A", c.diffs[1].action
|
77
77
|
|
@@ -83,9 +83,9 @@ module OhlohScm::Parsers
|
|
83
83
|
end
|
84
84
|
|
85
85
|
# When an directory is deleted, bzr outputs one delete entry
|
86
|
-
# per file and one for the directory. For empty dirs, there
|
87
|
-
# is only one directory remove entry.
|
88
|
-
# Ohloh keeps file delete entries but ignores directory
|
86
|
+
# per file and one for the directory. For empty dirs, there
|
87
|
+
# is only one directory remove entry.
|
88
|
+
# Ohloh keeps file delete entries but ignores directory
|
89
89
|
# delete entry.
|
90
90
|
def test_ignore_dir_delete_xml
|
91
91
|
xml = <<-XML
|
@@ -114,7 +114,7 @@ module OhlohScm::Parsers
|
|
114
114
|
XML
|
115
115
|
commits = BzrXmlParser.parse(xml)
|
116
116
|
assert_equal 1, commits.size
|
117
|
-
|
117
|
+
|
118
118
|
c = commits.first
|
119
119
|
assert_equal 1, c.diffs.size
|
120
120
|
assert_equal "uspace/lib/net/include/nil_interface.h", c.diffs.first.path
|
@@ -243,12 +243,12 @@ module OhlohScm::Parsers
|
|
243
243
|
assert_equal "test", c.committer_name
|
244
244
|
assert_equal "test@example.com", c.committer_email
|
245
245
|
assert_equal nil, c.author_name
|
246
|
-
assert_equal nil, c.author_email
|
246
|
+
assert_equal nil, c.author_email
|
247
247
|
end
|
248
248
|
|
249
249
|
def test_rename
|
250
250
|
xml = <<-XML
|
251
|
-
<logs>
|
251
|
+
<logs>
|
252
252
|
<log>
|
253
253
|
<revno>10</revno>
|
254
254
|
<revisionid>test@example.com-20110725174345-brbpkwumeh07aoh8</revisionid>
|
@@ -265,7 +265,7 @@ module OhlohScm::Parsers
|
|
265
265
|
</renamed>
|
266
266
|
</affected-files>
|
267
267
|
</log>
|
268
|
-
</logs>
|
268
|
+
</logs>
|
269
269
|
XML
|
270
270
|
commits = BzrXmlParser.parse(xml)
|
271
271
|
assert_equal 1, commits.size
|
@@ -278,21 +278,21 @@ module OhlohScm::Parsers
|
|
278
278
|
end
|
279
279
|
|
280
280
|
def test_remove_dupes_add_remove
|
281
|
-
diffs = BzrXmlParser.remove_dupes([
|
282
|
-
|
281
|
+
diffs = BzrXmlParser.remove_dupes([ OhlohScm::Diff.new(:action => "A", :path => "foo"),
|
282
|
+
OhlohScm::Diff.new(:action => "D", :path => "foo") ])
|
283
283
|
assert_equal 1, diffs.size
|
284
284
|
assert_equal 'M', diffs.first.action
|
285
285
|
assert_equal 'foo', diffs.first.path
|
286
|
-
end
|
286
|
+
end
|
287
287
|
|
288
|
-
# A complex delete/rename/modify test.
|
289
|
-
# Removed test_a.txt, Renamed test3.txt to test_a.txt, edited test_a.txt
|
290
|
-
#
|
288
|
+
# A complex delete/rename/modify test.
|
289
|
+
# Removed test_a.txt, Renamed test3.txt to test_a.txt, edited test_a.txt
|
290
|
+
#
|
291
291
|
# This is what Ohloh expects to see:
|
292
|
-
#
|
293
|
-
# D test3.txt
|
292
|
+
#
|
293
|
+
# D test3.txt
|
294
294
|
# M test_a.txt
|
295
|
-
#
|
295
|
+
#
|
296
296
|
def test_complex_rename
|
297
297
|
xml = <<-XML
|
298
298
|
<logs>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
require_relative '../test_helper'
|
3
3
|
|
4
4
|
module OhlohScm::Adapters
|
5
|
-
class BzrlibCatFileTest <
|
5
|
+
class BzrlibCatFileTest < OhlohScm::Test
|
6
6
|
|
7
7
|
def test_cat_file
|
8
8
|
with_bzrlib_repository('bzr') do |bzr|
|
@@ -11,12 +11,12 @@ first file
|
|
11
11
|
second line
|
12
12
|
EXPECTED
|
13
13
|
assert_equal expected,
|
14
|
-
bzr.cat_file(
|
15
|
-
|
14
|
+
bzr.cat_file(OhlohScm::Commit::new(:token => 6),
|
15
|
+
OhlohScm::Diff.new(:path => "file1.txt"))
|
16
16
|
|
17
17
|
# file2.txt has been removed in commit #5
|
18
18
|
assert_equal nil, bzr.cat_file(bzr.head,
|
19
|
-
|
19
|
+
OhlohScm::Diff.new(:path => "file2.txt"))
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
@@ -27,8 +27,8 @@ first file
|
|
27
27
|
second line
|
28
28
|
EXPECTED
|
29
29
|
assert_equal expected,
|
30
|
-
bzr.cat_file(
|
31
|
-
|
30
|
+
bzr.cat_file(OhlohScm::Commit::new(:token => 7),
|
31
|
+
OhlohScm::Diff.new(:path => "Cédric.txt"))
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
@@ -39,16 +39,16 @@ first file
|
|
39
39
|
second line
|
40
40
|
EXPECTED
|
41
41
|
assert_equal expected,
|
42
|
-
bzr.cat_file_parent(
|
43
|
-
|
42
|
+
bzr.cat_file_parent(OhlohScm::Commit::new(:token => 6),
|
43
|
+
OhlohScm::Diff.new(:path => "file1.txt"))
|
44
44
|
|
45
45
|
# file2.txt has been removed in commit #5
|
46
46
|
expected = <<-EXPECTED
|
47
47
|
another file
|
48
48
|
EXPECTED
|
49
49
|
assert_equal expected,
|
50
|
-
bzr.cat_file_parent(
|
51
|
-
|
50
|
+
bzr.cat_file_parent(OhlohScm::Commit.new(:token => 5),
|
51
|
+
OhlohScm::Diff.new(:path => "file2.txt"))
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require_relative '../test_helper'
|
2
2
|
|
3
3
|
module OhlohScm::Parsers
|
4
|
-
class CvsBranchNumberTest <
|
4
|
+
class CvsBranchNumberTest < OhlohScm::Test
|
5
5
|
def test_basic
|
6
6
|
assert_equal [1,1], BranchNumber.new('1.1').to_a
|
7
7
|
assert_equal [1234,1234], BranchNumber.new('1234.1234').to_a
|
@@ -1,11 +1,11 @@
|
|
1
1
|
require_relative '../test_helper'
|
2
2
|
|
3
3
|
module OhlohScm::Adapters
|
4
|
-
class CvsConvertTest <
|
4
|
+
class CvsConvertTest < OhlohScm::Test
|
5
5
|
|
6
6
|
def test_basic_convert
|
7
7
|
with_cvs_repository('cvs', 'simple') do |src|
|
8
|
-
|
8
|
+
OhlohScm::ScratchDir.new do |dest_dir|
|
9
9
|
dest = GitAdapter.new(:url => dest_dir).normalize
|
10
10
|
assert !dest.exist?
|
11
11
|
|
data/test/unit/cvs_misc_test.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require_relative '../test_helper'
|
2
2
|
|
3
3
|
module OhlohScm::Adapters
|
4
|
-
class CvsMiscTest <
|
4
|
+
class CvsMiscTest < OhlohScm::Test
|
5
5
|
def test_local_directory_trim
|
6
6
|
r = CvsAdapter.new(:url => "/Users/robin/cvs_repo/", :module_name => "simple")
|
7
7
|
assert_equal "/Users/robin/cvs_repo/simple/foo.rb", r.trim_directory('/Users/robin/cvs_repo/simple/foo.rb')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require_relative '../test_helper'
|
2
2
|
|
3
3
|
module OhlohScm::Adapters
|
4
|
-
class CvsValidationTest <
|
4
|
+
class CvsValidationTest < OhlohScm::Test
|
5
5
|
def test_rejected_urls
|
6
6
|
[ nil, "", "foo", "http:/", "http:://", "http://", "http://a",
|
7
7
|
":pserver", # that's not enough
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require_relative '../test_helper'
|
2
2
|
|
3
3
|
module OhlohScm::Adapters
|
4
|
-
class GitCatFileTest <
|
4
|
+
class GitCatFileTest < OhlohScm::Test
|
5
5
|
|
6
6
|
def test_cat_file
|
7
7
|
with_git_repository('git') do |git|
|
@@ -13,7 +13,7 @@ main()
|
|
13
13
|
printf("Hello, World!\\n");
|
14
14
|
}
|
15
15
|
EXPECTED
|
16
|
-
assert_equal expected, git.cat_file(nil,
|
16
|
+
assert_equal expected, git.cat_file(nil, OhlohScm::Diff.new(:sha1 => '4c734ad53b272c9b3d719f214372ac497ff6c068'))
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|