subtrigger 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/subtrigger/repository.rb +1 -1
- data/subtrigger.gemspec +1 -1
- data/test/test_repository.rb +3 -3
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.7
|
@@ -78,7 +78,7 @@ module Subtrigger
|
|
78
78
|
project_name = $1
|
79
79
|
top_level_dir = case dir
|
80
80
|
when /^(.*\/trunk)/: $1
|
81
|
-
when /^(.*\/(?:tags|branches)
|
81
|
+
when /^(.*\/(?:tags|branches)\/[\w\-]+)/: $1
|
82
82
|
end
|
83
83
|
projects << project_name
|
84
84
|
yield top_level_dir, project_name if block_given?
|
data/subtrigger.gemspec
CHANGED
data/test/test_repository.rb
CHANGED
@@ -42,7 +42,7 @@ class TestRepository < Test::Unit::TestCase
|
|
42
42
|
should 'return changed project names' do
|
43
43
|
lines = <<-EOS
|
44
44
|
www.project1.com/trunk
|
45
|
-
www.project2.com/
|
45
|
+
www.project2.com/branches/FB-feature
|
46
46
|
sub/www.project2.com/tags/v1
|
47
47
|
sub/www.project2.com/tags/v1/test
|
48
48
|
EOS
|
@@ -53,14 +53,14 @@ EOS
|
|
53
53
|
should 'yield changed directories' do
|
54
54
|
lines = <<-EOS
|
55
55
|
www.project1.com/trunk
|
56
|
-
www.project2.com/
|
56
|
+
www.project2.com/branches/FB-feature
|
57
57
|
sub/www.project2.com/tags/v1
|
58
58
|
sub/www.project2.com/tags/v1/test
|
59
59
|
EOS
|
60
60
|
@r.expects(:look_at).with('dirs-changed').returns(lines)
|
61
61
|
yieldings = [
|
62
62
|
['www.project1.com/trunk', 'www.project1.com'],
|
63
|
-
['www.project2.com/
|
63
|
+
['www.project2.com/branches/FB-feature', 'www.project2.com'],
|
64
64
|
['sub/www.project2.com/tags/v1', 'www.project2.com'],
|
65
65
|
['sub/www.project2.com/tags/v1', 'www.project2.com']
|
66
66
|
]
|