jaz303-repo-man 0.1.2 → 0.1.3
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/bin/repo-man +13 -7
- metadata +1 -1
data/bin/repo-man
CHANGED
@@ -9,7 +9,7 @@ module RepoMan
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def roots
|
12
|
-
RootDetector.new(@path).roots
|
12
|
+
@roots ||= RootDetector.new(@path).roots
|
13
13
|
end
|
14
14
|
|
15
15
|
def to_httpd_conf
|
@@ -20,8 +20,7 @@ module RepoMan
|
|
20
20
|
out << " DAV svn\n"
|
21
21
|
out << " SVNParentPath #{r}\n"
|
22
22
|
|
23
|
-
access_file =
|
24
|
-
if File.exists?(access_file)
|
23
|
+
if access_file = find_access_file(r)
|
25
24
|
out << " AuthzSVNAccessFile #{access_file}\n"
|
26
25
|
end
|
27
26
|
|
@@ -39,6 +38,15 @@ module RepoMan
|
|
39
38
|
def normalize_location(r)
|
40
39
|
r.gsub(/^#{Regexp.quote(@path)}/, '') + '/'
|
41
40
|
end
|
41
|
+
|
42
|
+
def find_access_file(root)
|
43
|
+
while true
|
44
|
+
access_file = File.join(root, 'svn_access')
|
45
|
+
return access_file if File.exists?(access_file)
|
46
|
+
return nil if root.length <= @path.length
|
47
|
+
root = File.dirname(root)
|
48
|
+
end
|
49
|
+
end
|
42
50
|
|
43
51
|
end
|
44
52
|
|
@@ -50,10 +58,8 @@ module RepoMan
|
|
50
58
|
end
|
51
59
|
|
52
60
|
def roots
|
53
|
-
|
54
|
-
|
55
|
-
find_roots(@path)
|
56
|
-
end
|
61
|
+
@roots = []
|
62
|
+
find_roots(@path)
|
57
63
|
@roots
|
58
64
|
end
|
59
65
|
|