meta_project 0.4.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.
Files changed (39) hide show
  1. data/CHANGES +178 -0
  2. data/MIT-LICENSE +21 -0
  3. data/README +64 -0
  4. data/Rakefile +166 -0
  5. data/TODO +9 -0
  6. data/doc/base_attrs.rdoc +2 -0
  7. data/lib/meta_project/project/base.rb +7 -0
  8. data/lib/meta_project/project/codehaus/codehaus_project_svn.rb +26 -0
  9. data/lib/meta_project/project/codehaus.rb +1 -0
  10. data/lib/meta_project/project/trac/trac_project.rb +26 -0
  11. data/lib/meta_project/project/trac.rb +1 -0
  12. data/lib/meta_project/project/xforge/ruby_forge.rb +46 -0
  13. data/lib/meta_project/project/xforge/session.rb +162 -0
  14. data/lib/meta_project/project/xforge/source_forge.rb +46 -0
  15. data/lib/meta_project/project/xforge/xfile.rb +45 -0
  16. data/lib/meta_project/project/xforge/xforge_base.rb +76 -0
  17. data/lib/meta_project/project/xforge.rb +5 -0
  18. data/lib/meta_project/project.rb +4 -0
  19. data/lib/meta_project/project_analyzer.rb +36 -0
  20. data/lib/meta_project/scm_web.rb +53 -0
  21. data/lib/meta_project/tracker/base.rb +18 -0
  22. data/lib/meta_project/tracker/digit_issues.rb +24 -0
  23. data/lib/meta_project/tracker/issue.rb +11 -0
  24. data/lib/meta_project/tracker/jira/jira_tracker.rb +68 -0
  25. data/lib/meta_project/tracker/jira.rb +1 -0
  26. data/lib/meta_project/tracker/trac/trac_tracker.rb +29 -0
  27. data/lib/meta_project/tracker/trac.rb +1 -0
  28. data/lib/meta_project/tracker/xforge/ruby_forge_tracker.rb +17 -0
  29. data/lib/meta_project/tracker/xforge/source_forge_tracker.rb +17 -0
  30. data/lib/meta_project/tracker/xforge/xforge_tracker.rb +83 -0
  31. data/lib/meta_project/tracker/xforge.rb +3 -0
  32. data/lib/meta_project/tracker.rb +6 -0
  33. data/lib/meta_project/version_parser.rb +48 -0
  34. data/lib/meta_project.rb +6 -0
  35. data/lib/rake/contrib/xforge/base.rb +42 -0
  36. data/lib/rake/contrib/xforge/news_publisher.rb +34 -0
  37. data/lib/rake/contrib/xforge/release.rb +78 -0
  38. data/lib/rake/contrib/xforge.rb +3 -0
  39. metadata +85 -0
data/CHANGES ADDED
@@ -0,0 +1,178 @@
1
+ = XForge Changelog
2
+
3
+ == Version 0.4.1
4
+
5
+ This version renames xforge to meta_project. This is because the scope of this project
6
+ has grown beyond SourceForge clones.
7
+
8
+ * renamed gem
9
+
10
+ == Version 0.4.0
11
+
12
+ This release of XForge completely reorganises classes and modules into a more
13
+ coherent API for accessing projects' issue trackers, scms and scm browsers. The toplevel
14
+ namespace is now MetaProject.
15
+
16
+ The new ScmWeb class now supports *any* scm browser through its flexible
17
+ configuration options.
18
+
19
+ In order to easily gather information from various hosting services, XForge comes with a ProjectAnalyzer
20
+ class, which given an scm browser URL will discover the associated issue tracker, preconfigured scm_web,
21
+ project home page and of course, an RSCM object.
22
+
23
+ Supported project sources:
24
+ - RubyForge.org
25
+ - SourceForge.org
26
+ - Codehaus.org
27
+ - Trac projects
28
+
29
+ Supported issue trackers:
30
+ - RubyForge.org
31
+ - SourceForge.org
32
+ - JIRA
33
+ - Trac projects
34
+
35
+ Supported SCM browsers:
36
+ - *Any* scm browser through its flexible configuration options.
37
+
38
+ Supported SCMs:
39
+ - Any SCM implemented in the <a href="http://rscm.rubyforge.org/">RSCM</a> project.
40
+
41
+ The QRS Rake tasks for releasing files and news on RubyForge has changed slightly. Please refer to XForge's
42
+ own Rakefile for details.
43
+
44
+ == Version 0.3.5
45
+
46
+ This is a bugfix release that fixes some bugs in ViewCvs.
47
+
48
+ * Changed the way the server path of RSCM::Cvs objects are initialised from ViewCvs to fix a subtle bug.
49
+ * Factored out generic file_uri to ScmWeb::FileUri.
50
+ * Fixed bug in RubyForge's recognition of modules in ViewCvs.
51
+
52
+ == Version 0.3.4
53
+
54
+ This release simplifies ViewCvs configuration
55
+
56
+ * Removed project_unix_name from ViewCvs' uri_specs
57
+ * Tuned how XForge::Project is YAMLed, to avoid backreferences
58
+ * Renamed some Tracker classes to be prefixed with the module name. This was to ease DamageControl integration.
59
+
60
+ == Version 0.3.3
61
+
62
+ This is a minor refactoring release
63
+
64
+ * Decoupled Trac::Project from RSCM::Subversion
65
+ * Made Tracker::ViewCvs use Strings as values instead of symbols (to make it easier to post from a web form)
66
+
67
+ == Version 0.3.2
68
+
69
+ This release adds more support for other issue trackers ans scm browsers.
70
+
71
+ * Fixed #2242
72
+ * Added a lot of tracker and scm_web classes (factored out from DamageControl)
73
+ * Decoupled view_cvs from rubyforge/sourceforge
74
+
75
+ == Version 0.3.1
76
+
77
+ This XForge release adds initial support for Trac and JIRA.
78
+
79
+ * Added support for formatting of text containing issue identifiers
80
+ * Refactored trackers into other modules
81
+ * Added support for JIRA issue tracker
82
+ * Added support for Trac's issue tracker
83
+ * Added support for diff URLs on SourceForge and RubyForge
84
+
85
+ == Version 0.2.1
86
+
87
+ This XForge release adds support for tracker meta info
88
+
89
+ * Added Project.tracker method
90
+ * Require Rake tasks from toplevel xforge.rb
91
+
92
+ == Version 0.2.0
93
+
94
+ First stable release of the XForge QRS.
95
+
96
+ * Renamed Project.name to Project.unix_name
97
+ * Wrote better documentation
98
+ * Included CVS tagging in the Rakefile
99
+
100
+ == Version 0.1.9
101
+
102
+ This release adds more functionality for news publishing
103
+
104
+ * Added Session.publish_news
105
+
106
+ == Version 0.1.8
107
+
108
+ This release adds more functionality for RubyForge projects' home page
109
+
110
+ * Added Project.home_page_uri and Project.project_uri
111
+
112
+ == Version 0.1.7
113
+
114
+ Updated README
115
+
116
+ == Version 0.1.6
117
+
118
+ This release of XForge improves scm browser capabilities.
119
+
120
+ * Added ViewCvs.uri(path, options) method to get an URI to a file on the web
121
+ * Added an rspec suite
122
+ * Added logic for parsing top-level CVS modules
123
+ * Made Rake Release task use RubyForge by default
124
+
125
+ == Version 0.1.5
126
+
127
+ This release of XForge adds functionality to access scm browsers (ViewCvs) and RSCM objects.
128
+
129
+ * Refactored classes into separate files
130
+ * Added Project.scm_web to access a ViewCvs object
131
+ * Added ViewCvs.scms to access an array of RSCM::Cvs
132
+
133
+ == Version 0.1.4
134
+
135
+ This is the first functional release of XForge, a Ruby library and Rake task to automate release of
136
+ files on RubyForge and other SourceForge clones.
137
+
138
+ It's as simple as this:
139
+
140
+ require 'xforge'
141
+
142
+ desc "Create a new release on RubyForge"
143
+ task :publish_files => [:gem] do
144
+ release_files = FileList[
145
+ "pkg/#{PKG_FILE_NAME}.gem"
146
+ ]
147
+
148
+ Rake::XForge::Release.new(PKG_NAME) do |release|
149
+ # Never hardcode user name and password in the Rakefile!
150
+ release.user_name = ENV['RUBYFORGE_USER']
151
+ release.password = ENV['RUBYFORGE_PASSWORD']
152
+ release.files = release_files.to_a
153
+ release.release_name = "XForge #{PKG_VERSION}"
154
+ # The rest of the options are defaults (among others, release_notes and release_changes, parsed from CHANGES)
155
+ end
156
+ end
157
+
158
+ * Added logic for parsing of CHANGES files and include it in the release notes when publishing.
159
+ * Wrote some proper release notes for once.
160
+
161
+ == Version 0.1.3
162
+
163
+ * Added logic for parsing of CHANGES files and include it in the release notes when publishing.
164
+
165
+ == Version 0.1.2
166
+
167
+ This release is a minor release with fixes in the Rake script.
168
+
169
+ * Fixed RDoc for gem
170
+ * Cleaned up documentation
171
+
172
+ == Version 0.1.1
173
+
174
+ * Rakefile: Don't include old gems in release.
175
+
176
+ == Version 0.1
177
+
178
+ * Added support for file releases
data/MIT-LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ Copyright (c) 2005 Aslak Hellesoy
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
data/README ADDED
@@ -0,0 +1,64 @@
1
+ = XForge
2
+
3
+ XForge is a Quick Release System (QRS) for RubyForge, SourceForge and other SourceForge clones. XForge also allows users to query SCM information and other metadata about hosted projects.
4
+
5
+ XForge has the following features:
6
+
7
+ * Look up projects by unix name (no need to worry about group_id or package_id).
8
+
9
+ * Create/Upload new releases (with multiple files if desired).
10
+
11
+ * Rake integration (use XForge from Rake scripts).
12
+
13
+ * Query SCM meta information (using RSCM - http://rscm.rubyforge.org).
14
+
15
+ * Publish news items about a project.
16
+
17
+ * Query home page URLs for a project.
18
+
19
+ == Download/Installation
20
+
21
+ The latest version of XForge can be found at
22
+
23
+ * http://rubyforge.org/project/showfiles.php?group_id=801
24
+
25
+ Download and install XForge with the following.
26
+
27
+ gem install xforge
28
+
29
+ (You may need administrative privileges for this).
30
+
31
+ == Usage
32
+
33
+ XForge itself is released with XForge. so check out XForge's own Rakefile (http://tinyurl.com/a23u5) and CHANGES (http://tinyurl.com/9qxxf) files for the best examples on how to use it.
34
+
35
+ XForge can parse release summary and changes from CHANGES if you format it the way XForge's own CHANGES is formatted. Also make sure your Rakefile's PKG_VERSION is in sync with the latest version specified in the CHANGES file.
36
+
37
+ If you're writing an application that interacts with XForge, check out the RDoc API.
38
+
39
+ ---
40
+
41
+ == Credits
42
+
43
+ [<b>Aslak Hellesoy</b>] Maintainer of this project.
44
+
45
+ [<b>David Heinemeier Hansson</b>] For the HTTP POST code and the idea to parse ids from project pages.
46
+
47
+ [<b>Jim Weirich</b>] For Rake, making XForge easier to use from Ruby build scripts.
48
+
49
+ == Support
50
+
51
+ The XForge homepage is http://xforge.rubyforge.org. You can find the XForge
52
+ RubyForge page at http://rubyforge.org/projects/xforge.
53
+
54
+ Feel free to submit patches, bug reports or feature requests via XForge's issue tracker on RubyForge.
55
+
56
+ For other information, feel free to ask on the ruby-talk mailing list
57
+ (which is mirrored to comp.lang.ruby) or contact
58
+ aslak hellesoy gmail com.
59
+
60
+ == License
61
+
62
+ XForge is available under an MIT-style license.
63
+
64
+ :include: MIT-LICENSE
data/Rakefile ADDED
@@ -0,0 +1,166 @@
1
+ # Rakefile for MetaProject
2
+
3
+ # Copyright 2005 by Aslak Hellesoy (aslak.hellesoy@gmail.org)
4
+ # All rights reserved.
5
+
6
+ # This file is may be distributed under an MIT style license. See
7
+ # MIT-LICENSE for details.
8
+
9
+ $:.unshift('lib')
10
+ require 'meta_project'
11
+ require 'rake/gempackagetask'
12
+ require 'rake/contrib/rubyforgepublisher'
13
+ require 'rake/contrib/xforge'
14
+ require 'rake/clean'
15
+ require 'rake/testtask'
16
+ require 'rake/rdoctask'
17
+
18
+ # Versioning scheme: MAJOR.MINOR.PATCH
19
+ # MAJOR bumps when API is broken backwards
20
+ # MINOR bumps when the API is broken backwards in a very slight/subtle (but not fatal) way
21
+ # -OR when a new release is made and propaganda is sent out.
22
+ # PATCH is bumped for every API addition and/or bugfix (ideally for every commit)
23
+ # Later DamageControl can bump PATCH automatically.
24
+ #
25
+ # REMEMBER TO KEEP PKG_VERSION IN SYNC WITH THE CHANGES FILE!
26
+ PKG_NAME = "meta_project"
27
+ PKG_VERSION = "0.4.1"
28
+ PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
29
+ PKG_FILES = FileList[
30
+ '[A-Z]*',
31
+ 'lib/**/*.rb',
32
+ 'doc/**/*'
33
+ ]
34
+
35
+ task :default => [:gem]
36
+
37
+ Rake::TestTask.new do |t|
38
+ t.libs << "test"
39
+ t.test_files = FileList['**/*_test.rb']
40
+ t.verbose = true
41
+ end
42
+
43
+ # Create a task to build the RDOC documentation tree.
44
+ rd = Rake::RDocTask.new("rdoc") do |rdoc|
45
+ rdoc.rdoc_dir = 'html'
46
+ # rdoc.template = 'kilmer'
47
+ # rdoc.template = 'css2'
48
+ # rdoc.template = 'doc/jamis.rb'
49
+ rdoc.title = "MetaProject"
50
+ rdoc.options << '--line-numbers' << '--inline-source' << '--main' << 'README'
51
+ rdoc.rdoc_files.include('README', 'MIT-LICENSE', 'CHANGES')
52
+ rdoc.rdoc_files.include('lib/**/*.rb', 'doc/**/*.rdoc')
53
+ rdoc.rdoc_files.exclude('doc/**/*_attrs.rdoc')
54
+ end
55
+
56
+ # ====================================================================
57
+ # Create a task that will package the Rake software into distributable
58
+ # tar, zip and gem files.
59
+
60
+ spec = Gem::Specification.new do |s|
61
+
62
+ #### Basic information.
63
+
64
+ s.name = PKG_NAME
65
+ s.version = PKG_VERSION
66
+ s.summary = "Ruby based make-like utility."
67
+ s.description = <<-EOF
68
+ MetaProject (formerly XForge) is a library that allows interaction with various project hosting servers, issue trackers, scms and scm browsers.
69
+ EOF
70
+
71
+ s.files = PKG_FILES.to_a
72
+ s.require_path = 'lib'
73
+ s.autorequire = 'meta_project'
74
+
75
+ #### Documentation and testing.
76
+
77
+ s.has_rdoc = true
78
+ s.extra_rdoc_files = rd.rdoc_files.reject { |fn| fn =~ /\.rb$/ }.to_a
79
+ s.rdoc_options <<
80
+ '--title' << 'MetaProject' <<
81
+ '--main' << 'README' <<
82
+ '--line-numbers'
83
+
84
+ #### Author and project details.
85
+
86
+ s.author = "Aslak Hellesoy"
87
+ s.email = "aslak.hellesoy@gmail.com"
88
+ s.homepage = "http://xforge.rubyforge.org"
89
+ s.rubyforge_project = "xforge"
90
+ end
91
+
92
+ desc "Build Gem"
93
+ Rake::GemPackageTask.new(spec) do |pkg|
94
+ pkg.need_zip = true
95
+ pkg.need_tar = true
96
+ end
97
+ task :gem => [:test]
98
+
99
+ # Support Tasks ------------------------------------------------------
100
+
101
+ def egrep(pattern)
102
+ Dir['**/*.rb'].each do |fn|
103
+ count = 0
104
+ open(fn) do |f|
105
+ while line = f.gets
106
+ count += 1
107
+ if line =~ pattern
108
+ puts "#{fn}:#{count}:#{line}"
109
+ end
110
+ end
111
+ end
112
+ end
113
+ end
114
+
115
+ desc "Look for TODO and FIXME tags in the code"
116
+ task :todo do
117
+ egrep /#.*(FIXME|TODO|TBD|DEPRECATED)/
118
+ end
119
+
120
+ task :release => [:verify_env_vars, :release_files, :publish_doc, :publish_news, :tag]
121
+
122
+ task :verify_env_vars do
123
+ raise "RUBYFORGE_USER environment variable not set!" unless ENV['RUBYFORGE_USER']
124
+ raise "RUBYFORGE_PASSWORD environment variable not set!" unless ENV['RUBYFORGE_PASSWORD']
125
+ end
126
+
127
+ task :publish_doc => [:rdoc] do
128
+ publisher = Rake::RubyForgePublisher.new(PKG_NAME, ENV['RUBYFORGE_USER'])
129
+ publisher.upload
130
+ end
131
+
132
+ desc "Release files on RubyForge"
133
+ task :release_files => [:gem] do
134
+ release_files = FileList[
135
+ "pkg/#{PKG_FILE_NAME}.gem"
136
+ ]
137
+
138
+ Rake::XForge::Release.new(MetaProject::Project::XForge::RubyForge.new('xforge')) do |release|
139
+ # Never hardcode user name and password in the Rakefile!
140
+ release.user_name = ENV['RUBYFORGE_USER']
141
+ release.password = ENV['RUBYFORGE_PASSWORD']
142
+ release.files = release_files.to_a
143
+ release.release_name = "MetaProject #{PKG_VERSION}"
144
+ # The rest of the options are defaults (among others, release_notes and release_changes, parsed from CHANGES)
145
+ end
146
+ end
147
+
148
+ desc "Publish news on RubyForge"
149
+ task :publish_news => [:gem] do
150
+ release_files = FileList[
151
+ "pkg/#{PKG_FILE_NAME}.gem"
152
+ ]
153
+
154
+ Rake::XForge::NewsPublisher.new(MetaProject::Project::XForge::RubyForge.new('xforge')) do |news|
155
+ # Never hardcode user name and password in the Rakefile!
156
+ news.user_name = ENV['RUBYFORGE_USER']
157
+ news.password = ENV['RUBYFORGE_PASSWORD']
158
+ end
159
+ end
160
+
161
+ desc "Tag all the CVS files with the latest release number (REL=x.y.z)"
162
+ task :tag do
163
+ reltag = "REL_#{PKG_VERSION.gsub(/\./, '_')}"
164
+ puts "Tagging CVS with [#{reltag}]"
165
+ sh %{cvs tag #{reltag}}
166
+ end
data/TODO ADDED
@@ -0,0 +1,9 @@
1
+ = XForge Project -- To Do List
2
+
3
+ Send suggestions for this list to mailto:aslak.hellesoy@gmail.org.
4
+
5
+ === To Do
6
+ * Retrieve SCM info as RSCM objects
7
+ * Retrieve tracker info
8
+
9
+ (moved DONE list to CHANGES file)
@@ -0,0 +1,2 @@
1
+ * user_name
2
+ * password
@@ -0,0 +1,7 @@
1
+ module MetaProject
2
+ module Project
3
+ class Base
4
+ attr_reader :scm, :scm_web, :tracker
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,26 @@
1
+ module MetaProject
2
+ module Project
3
+ module Codehaus
4
+ class CodehausProjectSvn < Base
5
+
6
+ def initialize(project_id, svn_path, jira_id)
7
+ @scm = RSCM::Subversion.new("svn://svn.#{project_id}.codehaus.org/#{project_id}/scm/#{svn_path}", svn_path)
8
+ @tracker = ::MetaProject::Tracker::Jira::JiraTracker.new("http://jira.codehaus.org", jira_id)
9
+
10
+ overview = "http://svn.#{project_id}.codehaus.org/#{svn_path}/"
11
+ history = "#{overview}\#{path}"
12
+ raw = "#{history}?rev=\#{revision}"
13
+ html = "#{raw}&view=markup"
14
+ # http://svn.picocontainer.codehaus.org/java/picocontainer/trunk/container/project.xml?r1=2220&r2=2234&p1=java/picocontainer/trunk/container/project.xml&p2=java/picocontainer/trunk/container/project.xml
15
+ diff = "#{history}?r1=\#{previous_revision}&r2=\#{revision}&p1=#{svn_path}/\#{path}&p2=#{svn_path}/\#{path}"
16
+ @scm_web = ScmWeb.new(overview, history, raw, html, diff)
17
+ end
18
+
19
+ def home_page
20
+ "http://#{@project_id}.codehaus.org/"
21
+ end
22
+
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1 @@
1
+ require 'meta_project/project/codehaus/codehaus_project_svn'
@@ -0,0 +1,26 @@
1
+ module MetaProject
2
+ module Project
3
+ module Trac
4
+ class TracProject < Base
5
+
6
+ def initialize(trac_base_url, svn_root_url, svn_path)
7
+ @trac_base_url = trac_base_url
8
+ @scm = RSCM::Subversion.new("#{svn_root_url}#{svn_path}", svn_path)
9
+ @tracker = ::MetaProject::Tracker::Trac::TracTracker.new(trac_base_url)
10
+
11
+ overview = "#{trac_base_url}/browser/#{svn_path}/"
12
+ history = "#{trac_base_url}/log/#{svn_path}/\#{path}"
13
+ html = "#{trac_base_url}/file/#{svn_path}/\#{path}?rev=\#{revision}"
14
+ raw = "#{html}&format=txt"
15
+ diff = "#{trac_base_url}/changeset/\#{revision}"
16
+ @scm_web = ScmWeb.new(overview, history, raw, html, diff)
17
+ end
18
+
19
+ def home_page
20
+ "#{@trac_base_url}/wiki"
21
+ end
22
+
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1 @@
1
+ require 'meta_project/project/trac/trac_project'
@@ -0,0 +1,46 @@
1
+ require 'meta_project/tracker/xforge'
2
+
3
+ module MetaProject
4
+ module Project
5
+ module XForge
6
+ class RubyForge < XForgeBase
7
+
8
+ def initialize(unix_name, cvs_mod=nil)
9
+ super("rubyforge.org", unix_name, cvs_mod)
10
+ end
11
+
12
+ def tracker_class
13
+ ::MetaProject::Tracker::XForge::RubyForgeTracker
14
+ end
15
+
16
+ protected
17
+
18
+ def create_cvs(unix_name, mod)
19
+ RSCM::Cvs.new(":pserver:anonymous@rubyforge.org:/var/cvs/#{unix_name}", mod)
20
+ end
21
+
22
+ def create_view_cvs(unix_name, mod)
23
+ view_cvs = "http://rubyforge.org/cgi-bin/viewcvs.cgi/"
24
+ cvsroot = "?cvsroot=#{unix_name}"
25
+ path_cvs_root = "#{mod}/\#{path}#{cvsroot}"
26
+ path_cvs_root_rev = "#{path_cvs_root}&rev=\#{revision}"
27
+
28
+ overview = "#{view_cvs}#{mod}/#{cvsroot}"
29
+ history = "#{view_cvs}#{path_cvs_root}"
30
+ raw = "#{view_cvs}*checkout*/#{path_cvs_root_rev}"
31
+ html = "#{view_cvs}#{path_cvs_root_rev}&content-type=text/vnd.viewcvs-markup"
32
+ diff = "#{view_cvs}#{mod}/\#{path}.diff#{cvsroot}&r1=\#{previous_revision}&r2=\#{revision}"
33
+
34
+ ScmWeb.new(overview, history, raw, html, diff)
35
+ end
36
+
37
+ # Regexp used to find projects' home page
38
+ def home_page_regexp
39
+ # This seems a little volatile
40
+ /<a href=\"(\w*:\/\/[^\"]*)\"><img src=\"\/themes\/osx\/images\/ic\/home/
41
+ end
42
+
43
+ end
44
+ end
45
+ end
46
+ end