xforge 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,5 +1,11 @@
1
1
  = XForge Changelog
2
2
 
3
+ == Version 0.1.8
4
+
5
+ XForge projects now know the home page
6
+
7
+ * Added Project.home_page_uri and Project.project_uri
8
+
3
9
  == Version 0.1.7
4
10
 
5
11
  Updated README
data/README CHANGED
@@ -11,7 +11,7 @@ XForge has the following features:
11
11
 
12
12
  * Rake integration.
13
13
 
14
- * Automatically create RSCM (http://rscm.rubyforge.org/) objects from projects
14
+ * Automatically create RSCM (http://rscm.rubyforge.org) objects from projects.
15
15
 
16
16
  == Download/Installation
17
17
 
data/Rakefile CHANGED
@@ -24,7 +24,7 @@ require 'rake/rdoctask'
24
24
  #
25
25
  # REMEMBER TO KEEP PKG_VERSION IN SYNC WITH CHANGELOG
26
26
  PKG_NAME = "xforge"
27
- PKG_VERSION = "0.1.7"
27
+ PKG_VERSION = "0.1.8"
28
28
  PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
29
29
  PKG_FILES = FileList[
30
30
  '[A-Z]*',
@@ -70,6 +70,7 @@ spec = Gem::Specification.new do |s|
70
70
 
71
71
  s.files = PKG_FILES.to_a
72
72
  s.require_path = 'lib'
73
+ s.autorequire = 'xforge'
73
74
 
74
75
  #### Documentation and testing.
75
76
 
@@ -0,0 +1,2 @@
1
+ * user_name
2
+ * password
@@ -44,7 +44,6 @@ module XForge
44
44
  def group_id
45
45
  unless(@group_id)
46
46
  regexp = /stats\/[?&]group_id=(\d+)/
47
- project_uri = "http://#{@host.name}/projects/#{@name}/"
48
47
  project_data = open(project_uri) { |data| data.read }
49
48
  @group_id = project_data[regexp, 1]
50
49
  raise "Couldn't get group_id" unless @group_id
@@ -56,6 +55,21 @@ module XForge
56
55
  def scm_web
57
56
  @scm_web ||= host.scm_web(self)
58
57
  end
58
+
59
+ def project_uri
60
+ "http://#{@host.name}/projects/#{@name}/"
61
+ end
62
+
63
+ # The home page of this project
64
+ def home_page_uri
65
+ # This regexp seems a little volatile...
66
+ unless(@home_page)
67
+ project_data = open(project_uri) { |data| data.read }
68
+ @home_page = project_data[@host.home_page_regexp, 1]
69
+ raise "Couldn't get home_page" unless @home_page
70
+ end
71
+ @home_page
72
+ end
59
73
  end
60
74
 
61
75
  end
@@ -29,5 +29,11 @@ module XForge
29
29
  ::ScmWeb::ViewCvs.new({:overview => OVERVIEW, :raw => RAW, :html => HTML}, project, module_regexp)
30
30
  end
31
31
 
32
+ # Regexp used to find projects' home page
33
+ def home_page_regexp
34
+ # This seems a little volatile
35
+ /<a href=\"(\w*:\/\/[^\"]*)\"><img src=\"\/themes\/osx\/images\/ic\/home/
36
+ end
37
+
32
38
  end
33
39
  end
@@ -29,5 +29,11 @@ module XForge
29
29
  ::ScmWeb::ViewCvs.new({:overview => OVERVIEW, :raw => RAW, :html => HTML}, project, module_regexp)
30
30
  end
31
31
 
32
+ # Regexp used to find projects' home page
33
+ def home_page_regexp
34
+ # This seems a little volatile
35
+ /<A href=\"(\w*:\/\/[^\"]*)\">&nbsp;Project Home Page<\/A>/
36
+ end
37
+
32
38
  end
33
39
  end
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.8.8
3
3
  specification_version: 1
4
4
  name: xforge
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.7
6
+ version: 0.1.8
7
7
  date: 2005-08-13
8
8
  summary: Ruby based make-like utility.
9
9
  require_paths:
@@ -13,7 +13,7 @@ homepage: http://xforge.rubyforge.org
13
13
  rubyforge_project: xforge
14
14
  description: "XForge is a simple library to interact with RubyForge, SourceForge, GForge or
15
15
  other SourceForge clones."
16
- autorequire:
16
+ autorequire: xforge
17
17
  default_executable:
18
18
  bindir: bin
19
19
  has_rdoc: true
@@ -45,6 +45,7 @@ files:
45
45
  - lib/xforge/sourceforge.rb
46
46
  - lib/xforge/version_parser.rb
47
47
  - lib/xforge/xfile.rb
48
+ - doc/base_attrs.rdoc
48
49
  test_files: []
49
50
  rdoc_options:
50
51
  - "--title"