xforge 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,5 +1,13 @@
1
1
  = XForge Changelog
2
2
 
3
+ == Version 0.3.4
4
+
5
+ This release simplifies ViewCvs configuration
6
+
7
+ * Removed project_unix_name from ViewCvs' uri_specs
8
+ * Tuned how XForge::Project is YAMLed, to avoid backreferences
9
+ * Renamed some Tracker classes to be prefixed with the module name. This was to ease DamageControl integration.
10
+
3
11
  == Version 0.3.3
4
12
 
5
13
  This is a minor refactoring release
data/Rakefile CHANGED
@@ -24,7 +24,7 @@ require 'rake/rdoctask'
24
24
  #
25
25
  # REMEMBER TO KEEP PKG_VERSION IN SYNC WITH THE CHANGES FILE!
26
26
  PKG_NAME = "xforge"
27
- PKG_VERSION = "0.3.3"
27
+ PKG_VERSION = "0.3.4"
28
28
  PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
29
29
  PKG_FILES = FileList[
30
30
  '[A-Z]*',
@@ -3,7 +3,7 @@ module ScmWeb
3
3
  def self.classes
4
4
  [
5
5
  ViewCvs,
6
- ::Tracker::Trac::Project
6
+ ::Tracker::Trac::TracProject
7
7
  ]
8
8
  end
9
9
  end
@@ -1,7 +1,7 @@
1
1
  module ScmWeb
2
2
  # The variables to use in uri_specs are:
3
3
  #
4
- # * project_unix_name
4
+ # * path
5
5
  # * revision
6
6
  # * previous_revision
7
7
  #
@@ -7,9 +7,9 @@ module Tracker
7
7
  class Base
8
8
  def self.classes
9
9
  [
10
- ::Tracker::Jira::Project,
11
- ::Tracker::XForge::RubyForge,
12
- ::Tracker::Trac::Project
10
+ ::Tracker::Jira::JiraProject,
11
+ ::Tracker::XForge::RubyForgeProject,
12
+ ::Tracker::Trac::TracProject
13
13
  ]
14
14
  end
15
15
  end
@@ -12,7 +12,7 @@ module Tracker
12
12
  end
13
13
 
14
14
  def project(identifier)
15
- Project.new(self, identifier)
15
+ JiraProject.new(self, identifier)
16
16
  end
17
17
 
18
18
  def login
@@ -1,12 +1,12 @@
1
1
  module Tracker
2
2
  module Jira
3
- class Project < Base
3
+ class JiraProject < Base
4
4
  attr_accessor :host, :identifier
5
5
 
6
6
  def initialize(host=nil, identifier=nil)
7
7
  @host, @identifier = host, identifier
8
8
  end
9
-
9
+
10
10
  def identifier_regexp
11
11
  /([A-Z]+-[\d]+)/
12
12
  end
@@ -1,13 +1,13 @@
1
1
  module Tracker
2
2
  module Trac
3
- class Project < Base
3
+ class TracProject < Base
4
4
  include DigitIssues
5
5
 
6
6
  attr_accessor :uri, :svn_path
7
7
  def initialize(uri=nil, svn_path=nil)
8
8
  @uri, @svn_path = uri, svn_path
9
9
  end
10
-
10
+
11
11
  def issue(issue_identifier)
12
12
  issue_uri = "#{@uri}/ticket/#{issue_identifier}"
13
13
  begin
@@ -1,6 +1,7 @@
1
1
  module Tracker
2
2
  module XForge
3
- class RubyForge < Base
3
+ class RubyForgeProject < Base
4
+
4
5
  end
5
6
  end
6
7
  end
@@ -13,6 +13,10 @@ module XForge
13
13
  @host = host
14
14
  @unix_name = unix_name
15
15
  end
16
+
17
+ def to_yaml_properties
18
+ ["@host", "@unix_name"]
19
+ end
16
20
 
17
21
  # Logs in and returns a Session
18
22
  def login(user_name, password)
@@ -1,15 +1,5 @@
1
1
  module XForge
2
2
  class RubyForge < Host
3
- VIEW_CVS = "http://rubyforge.org/cgi-bin/viewcvs.cgi/"
4
- CVSROOT = "?cvsroot=\#{project_unix_name}"
5
- PATH_CVSROOT = "\#{path}#{CVSROOT}"
6
- PATH_CVSROOT_REV = "#{PATH_CVSROOT}&rev=\#{revision}"
7
-
8
- OVERVIEW = "#{VIEW_CVS}#{PATH_CVSROOT}"
9
- RAW = "#{VIEW_CVS}*checkout*/#{PATH_CVSROOT_REV}"
10
- HTML = "#{VIEW_CVS}#{PATH_CVSROOT_REV}&content-type=text/vnd.viewcvs-markup"
11
- DIFF = "#{VIEW_CVS}\#{path}.diff#{CVSROOT}&r1=\#{previous_revision}&r2=\#{revision}"
12
-
13
3
  def initialize
14
4
  super('rubyforge.org')
15
5
  end
@@ -27,9 +17,19 @@ module XForge
27
17
  end
28
18
 
29
19
  def scm_web(project)
20
+ view_cvs = "http://rubyforge.org/cgi-bin/viewcvs.cgi/"
21
+ cvsroot = "?cvsroot=#{project.unix_name}"
22
+ path_cvs_root = "\#{path}#{cvsroot}"
23
+ path_cvs_root_rev = "#{path_cvs_root}&rev=\#{revision}"
24
+
25
+ overview = "#{view_cvs}#{path_cvs_root}"
26
+ raw = "#{view_cvs}*checkout*/#{path_cvs_root_rev}"
27
+ html = "#{view_cvs}#{path_cvs_root_rev}&content-type=text/vnd.viewcvs-markup"
28
+ diff = "#{view_cvs}\#{path}.diff#{cvsroot}&r1=\#{previous_revision}&r2=\#{revision}"
29
+
30
30
  module_regexp = /href=\"(\w+)\/\?cvsroot=#{project.unix_name}/
31
31
  ::ScmWeb::ViewCvs.new(
32
- {"overview" => OVERVIEW, "raw" => RAW, "html" => HTML, "diff" => DIFF},
32
+ {"overview" => overview, "raw" => raw, "html" => html, "diff" => diff},
33
33
  cvs_host_name,
34
34
  cvs_server_path,
35
35
  project.unix_name,
@@ -44,7 +44,7 @@ module XForge
44
44
  end
45
45
 
46
46
  def tracker(project)
47
- Tracker::XForge::RubyForge.new(project.group_id_uri("tracker"), project)
47
+ Tracker::XForge::RubyForgeProject.new(project.group_id_uri("tracker"), project)
48
48
  end
49
49
  end
50
50
  end
@@ -1,14 +1,5 @@
1
1
  module XForge
2
2
  class SourceForge < Host
3
- VIEW_CVS = "http://cvs.sourceforge.net/viewcvs.py/"
4
- PROJECT_PATH = "\#{project_unix_name}/\#{path}"
5
- REV = "rev=\#{revision}"
6
-
7
- OVERVIEW = "#{VIEW_CVS}#{PROJECT_PATH}"
8
- RAW = "#{VIEW_CVS}*checkout*/#{PROJECT_PATH}?#{REV}"
9
- HTML = "#{OVERVIEW}?#{REV}&view=markup"
10
- DIFF = "#{OVERVIEW}?r1=\#{previous_revision}&r2=\#{revision}"
11
-
12
3
  def initialize
13
4
  super("sourceforge.net")
14
5
  end
@@ -26,9 +17,18 @@ module XForge
26
17
  end
27
18
 
28
19
  def scm_web(project)
20
+ view_cvs = "http://cvs.sourceforge.net/viewcvs.py/"
21
+ project_path = "#{project.unix_name}/\#{path}"
22
+ rev = "rev=\#{revision}"
23
+
24
+ overview = "#{view_cvs}#{project_path}"
25
+ raw = "#{view_cvs}*checkout*/#{project_path}?#{rev}"
26
+ html = "#{overview}?#{rev}&view=markup"
27
+ diff = "#{overview}?r1=\#{previous_revision}&r2=\#{revision}"
28
+
29
29
  module_regexp = /viewcvs\.py\/#{project.unix_name}\/(\w+)\//
30
30
  ::ScmWeb::ViewCvs.new(
31
- {"overview" => OVERVIEW, "raw" => RAW, "html" => HTML, "diff" => DIFF},
31
+ {"overview" => overview, "raw" => raw, "html" => html, "diff" => diff},
32
32
  cvs_host_name,
33
33
  cvs_server_path,
34
34
  project.unix_name,
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: xforge
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.3.3
7
- date: 2005-08-16 00:00:00 -04:00
6
+ version: 0.3.4
7
+ date: 2005-08-17 00:00:00 -04:00
8
8
  summary: Ruby based make-like utility.
9
9
  require_paths:
10
10
  - lib