Class: MetaProject::Project::Codehaus::CodehausProjectSvn

Inherits:
Base
  • Object
show all
Defined in:
lib/meta_project/project/codehaus/codehaus_project_svn.rb

Instance Attribute Summary

Attributes inherited from Base

#name, #scm, #scm_web, #tracker

Instance Method Summary collapse

Constructor Details

#initialize(unix_name, svn_path, jira_id) ⇒ CodehausProjectSvn

Returns a new instance of CodehausProjectSvn.



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/meta_project/project/codehaus/codehaus_project_svn.rb', line 6

def initialize(unix_name, svn_path, jira_id)
  @unix_name = unix_name
  @name = unix_name
  @scm = RSCM::Subversion.new("svn://svn.#{unix_name}.codehaus.org/#{unix_name}/scm/#{svn_path}", svn_path)
  @tracker = ::MetaProject::Tracker::Jira::JiraTracker.new("http://jira.codehaus.org", jira_id)

  dir       = "http://svn.#{unix_name}.codehaus.org/#{svn_path}/\#{path}"
  history   = dir
  raw       = "#{history}?rev=\#{revision}"
  html      = "#{raw}&view=markup"
  # 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
  diff      = "#{history}?r1=\#{previous_revision}&r2=\#{revision}&p1=#{svn_path}/\#{path}&p2=#{svn_path}/\#{path}"
  child_dirs_pattern = /<a name="([^"]+)" href="([^"]+)">[\r\n\s]+<img src="\/icons\/small\/dir.gif"/
  child_files_pattern = /<a href="[^"]+\/([^\?]+)\?rev=([\d]+)&view=auto">/

  @scm_web = ScmWeb::Browser.new(dir, history, raw, html, diff, child_dirs_pattern, child_files_pattern)
end

Instance Method Details

#home_pageObject



24
25
26
# File 'lib/meta_project/project/codehaus/codehaus_project_svn.rb', line 24

def home_page
  "http://#{@unix_name}.codehaus.org/"
end