meta_project 0.4.8 → 0.4.9
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/CHANGES +6 -0
- data/README +1 -1
- data/Rakefile +1 -1
- data/lib/meta_project/scm_web/browser.rb +38 -17
- metadata +1 -1
data/CHANGES
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
= MetaProject Changelog
|
2
2
|
|
3
|
+
== Version 0.4.9
|
4
|
+
|
5
|
+
This release makes the validation of Browser objects more robust.
|
6
|
+
|
7
|
+
* Moved Browser spec attributes to validating setters.
|
8
|
+
|
3
9
|
== Version 0.4.8
|
4
10
|
|
5
11
|
This release fixes some bugs with XForge (RubyForge) Rake tasks.
|
data/README
CHANGED
data/Rakefile
CHANGED
@@ -15,20 +15,46 @@ module MetaProject
|
|
15
15
|
# * previous_revision
|
16
16
|
#
|
17
17
|
def initialize(dir_spec=nil, history_spec=nil, raw_spec=nil, html_spec=nil, diff_spec=nil, child_dirs_pattern=nil, child_files_pattern=nil)
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
18
|
+
self.dir_spec = dir_spec unless dir_spec.nil?
|
19
|
+
self.history_spec = history_spec unless history_spec.nil?
|
20
|
+
self.raw_spec = raw_spec unless raw_spec.nil?
|
21
|
+
self.html_spec = html_spec unless html_spec.nil?
|
22
|
+
self.diff_spec = diff_spec unless diff_spec.nil?
|
23
|
+
|
24
|
+
@child_dirs_pattern = child_dirs_pattern
|
25
|
+
@child_files_pattern = child_files_pattern
|
26
|
+
end
|
27
|
+
|
28
|
+
def dir_spec=(spec)
|
29
|
+
validate_presence_of("dir_spec", spec, "path")
|
30
|
+
@dir_spec = spec
|
31
|
+
end
|
32
|
+
|
33
|
+
def history_spec=(spec)
|
34
|
+
validate_presence_of("history_spec", spec, "path")
|
35
|
+
@history_spec = spec
|
36
|
+
end
|
37
|
+
|
38
|
+
def raw_spec=(spec)
|
39
|
+
validate_presence_of("raw_spec", spec, "path")
|
40
|
+
validate_presence_of("raw_spec", spec, "revision")
|
41
|
+
@raw_spec = spec
|
42
|
+
end
|
43
|
+
|
44
|
+
def html_spec=(spec)
|
45
|
+
validate_presence_of("html_spec", spec, "path")
|
46
|
+
validate_presence_of("html_spec", spec, "revision")
|
47
|
+
@html_spec = spec
|
48
|
+
end
|
49
|
+
|
50
|
+
def diff_spec=(spec)
|
51
|
+
validate_presence_of("diff_spec", spec, "revision")
|
52
|
+
# Can't assume path and previous_revision to be present (Trac doesn't use them)
|
27
53
|
#validate_presence_of("diff_spec", @diff_spec, "path")
|
28
|
-
validate_presence_of("diff_spec", @diff_spec, "revision")
|
29
54
|
#validate_presence_of("diff_spec", @diff_spec, "previous_revision")
|
55
|
+
@diff_spec = spec
|
30
56
|
end
|
31
|
-
|
57
|
+
|
32
58
|
def dir(path)
|
33
59
|
file_uri(path, nil, @dir_spec, nil)
|
34
60
|
end
|
@@ -71,13 +97,8 @@ module MetaProject
|
|
71
97
|
|
72
98
|
def validate_presence_of(spec_name, spec, var)
|
73
99
|
raise "Missing \#{#{var}} in #{spec_name}: '#{spec}'" unless spec =~ /\#\{#{var}\}/
|
74
|
-
|
100
|
+
end
|
75
101
|
|
76
|
-
# Returns the file URI for +path+. Valid options are:
|
77
|
-
#
|
78
|
-
# * :type => ["dir"|"html"|"diff"|"raw"]
|
79
|
-
# * :revision
|
80
|
-
# * :previous_revision
|
81
102
|
def file_uri(path, revision, spec, previous_revision)
|
82
103
|
begin
|
83
104
|
eval("\"#{spec}\"", binding)
|