meta_project 0.4.5 → 0.4.6

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
  = MetaProject Changelog
2
2
 
3
+ == Version 0.4.6
4
+
5
+ * Updated README.
6
+ * Added PathnameIterator mixin that can be used to iterate over Pathname and MetaProject::ScmWeb::Pathname to
7
+ do e.g. egrep or other operations.
8
+ * Fixed a bug in Project::RubyForge that prevented group_id from being recognised for some projects.
9
+ * Made the scm_web test for rubyforge be less fragile by storing the compared local file locally.
10
+
3
11
  == Version 0.4.5
4
12
 
5
13
  This version improves the MetaProject::ScmWeb::Pathname support, allowing online contents in scm web interfaces to be navigated and read in a similar fashion to the standard library's Pathname class.
data/README CHANGED
@@ -1,64 +1,98 @@
1
- = XForge
1
+ = MetaProject
2
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.
3
+ MetaProject (formerly XForge) is a library that allows interaction with various project hosting servers, issue trackers, SCMs and SCM browsers through a common API.
4
4
 
5
- XForge has the following features:
5
+ MetaProject also includes is a Quick Release System (QRS) for [RubyForge, SourceForge and other SourceForge clones] (commonly referred to as XForge throughout the documentation) as well as RAA and Freshmeat. QRS support for other hosts is in the pipe.
6
6
 
7
- * Look up projects by unix name (no need to worry about group_id or package_id).
7
+ == Feature overview
8
8
 
9
- * Create/Upload new releases (with multiple files if desired).
9
+ === RSCM related
10
10
 
11
- * Rake integration (use XForge from Rake scripts).
11
+ * Obtain preconfigured RSCM:http://rscm.rubyforge.org objects.
12
12
 
13
- * Query SCM meta information (using RSCM - http://rscm.rubyforge.org).
13
+ === SCM browser related
14
14
 
15
- * Publish news items about a project.
15
+ * Obtain preconfigured SCM browser proxy objects that can generate various links with a simple API.
16
+
17
+ * Treat files in the SCM browser just as stdlib Pathname object (only a subset is provided)
18
+
19
+ === QRS related
20
+
21
+ * QRS: Create/Upload new releases (with multiple files if desired).
22
+
23
+ * Rake integration (use the QRS from Rake scripts).
24
+
25
+ * Publish XForge news items for a project.
26
+
27
+ * Publish on RAA (SOAP under the hood)
28
+
29
+ * Publish on Freshmeat (XMLRPC under the hood)
30
+
31
+ === Issue tracker related
32
+
33
+ * Close and comment on issues
34
+
35
+ * Recognise issue ids and create links in e.g. SCM commit messages
36
+
37
+ * Patois parsing, a DSL for issue and release management.
38
+
39
+ === XForge related
40
+
41
+ * Look up XForge projects by unix name (no need to worry about group_id or package_id).
42
+
43
+ * Also see QRS related
16
44
 
17
45
  * Query home page URLs for a project.
18
46
 
19
47
  == Download/Installation
20
48
 
21
- The latest version of XForge can be found at
49
+ The latest version of MetaProject can be found at
22
50
 
23
51
  * http://rubyforge.org/project/showfiles.php?group_id=801
24
52
 
25
- Download and install XForge with the following.
53
+ Download and install MetaProject with the following.
26
54
 
27
- gem install xforge
55
+ gem install meta_project
28
56
 
29
- (You may need administrative privileges for this).
57
+ (You may need administrative privileges (sudo) for this).
30
58
 
31
59
  == Usage
32
60
 
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.
61
+ === QRS
62
+
63
+ MetaProject itself is released with MetaProject's QRS Rake tasks, so check out MetaProject's own Rakefile (http://tinyurl.com/a23u5) and CHANGES (http://tinyurl.com/9qxxf) files for the best examples on how to use it.
34
64
 
35
65
  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
66
 
37
- If you're writing an application that interacts with XForge, check out the RDoc API.
67
+ === Other parts of the API
68
+
69
+ If you're writing an application that interacts with MetaProject, please refer to the RDoc API and the RSpec:http://rspec.rubyforge.org specifications in the CVS source tree (kinda like unit tests, just better.)
38
70
 
39
71
  ---
40
72
 
41
73
  == Credits
42
74
 
75
+ (In alphabetical order)
76
+
43
77
  [<b>Aslak Hellesoy</b>] Maintainer of this project.
44
78
 
45
79
  [<b>David Heinemeier Hansson</b>] For the HTTP POST code and the idea to parse ids from project pages.
46
80
 
47
81
  [<b>Jim Weirich</b>] For Rake, making XForge easier to use from Ruby build scripts.
48
82
 
83
+ [<b>Thomas Leitner</b>] For Freshmeat and RAA support.
84
+
49
85
  == Support
50
86
 
51
- The XForge homepage is http://xforge.rubyforge.org. You can find the XForge
87
+ The MetaProject homepage is http://xforge.rubyforge.org. You can find the MetaProject
52
88
  RubyForge page at http://rubyforge.org/projects/xforge.
53
89
 
54
- Feel free to submit patches, bug reports or feature requests via XForge's issue tracker on RubyForge.
90
+ Feel free to submit patches, bug reports or feature requests via MetaProject's issue tracker on RubyForge.
55
91
 
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.
92
+ For discussions and questions, please use the mailing list: http://rubyforge.org/mail/?group_id=801
59
93
 
60
94
  == License
61
95
 
62
- XForge is available under an MIT-style license.
96
+ MetaProject is available under an MIT-style license.
63
97
 
64
98
  :include: MIT-LICENSE
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 = "meta_project"
27
- PKG_VERSION = "0.4.5"
27
+ PKG_VERSION = "0.4.6"
28
28
  PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
29
29
  PKG_FILES = FileList[
30
30
  '[A-Z]*',
@@ -98,23 +98,11 @@ task :gem => [:test]
98
98
 
99
99
  # Support Tasks ------------------------------------------------------
100
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
101
  desc "Look for TODO and FIXME tags in the code"
116
102
  task :todo do
117
- egrep /#.*(FIXME|TODO|TBD|DEPRECATED)/
103
+ Pathname.new(File.dirname(__FILE__)).egrep(/#.*(FIXME|TODO|TBD|DEPRECATED)/) do |match|
104
+ puts match
105
+ end
118
106
  end
119
107
 
120
108
  task :release => [:verify_env_vars, :release_files, :publish_doc, :publish_news, :tag]
data/lib/meta_project.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'meta_project/core_ext/string'
2
+ require 'meta_project/core_ext/pathname'
2
3
  require 'meta_project/project_analyzer'
3
4
  require 'meta_project/patois'
4
5
  require 'meta_project/project'
@@ -0,0 +1,36 @@
1
+ require 'pathname'
2
+
3
+ # TODO: extend this to find comments
4
+ # http://ostermiller.org/findcomment.html
5
+
6
+ module PathnameIterator
7
+ def iterate(proc, &block)
8
+ if directory?
9
+ children.each do |c|
10
+ c.iterate(proc)
11
+ end
12
+ else
13
+ proc.call(self, &block)
14
+ end
15
+ end
16
+
17
+ def egrep(regexp, &block)
18
+ proc = Proc.new do |file|
19
+ file.open do |io|
20
+ count = 0
21
+ while line = io.gets
22
+ count += 1
23
+ if line =~ regexp
24
+ block.call("#{file.cleanpath}:#{count}:#{line}")
25
+ end
26
+ end
27
+ end
28
+ end
29
+ iterate(proc, &block)
30
+ end
31
+
32
+ end
33
+
34
+ class Pathname
35
+ include PathnameIterator
36
+ end
@@ -45,10 +45,10 @@ module MetaProject
45
45
  # The group_id of this project
46
46
  def group_id
47
47
  unless(@group_id)
48
- regexp = /stats\/[?&]group_id=(\d+)/
48
+ regexp = /project\/memberlist.php\?group_id=(\d+)/
49
49
  html = open(xforge_project_url).read
50
50
  @group_id = html[regexp, 1]
51
- raise "Couldn't get group_id" unless @group_id
51
+ raise "Couldn't get group_id from #{xforge_project_url}" unless @group_id
52
52
  end
53
53
  @group_id
54
54
  end
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: meta_project
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.4.5
6
+ version: 0.4.6
7
7
  date: 2005-09-01 00:00:00 -04:00
8
8
  summary: Ruby based make-like utility.
9
9
  require_paths:
@@ -42,6 +42,7 @@ files:
42
42
  - lib/meta_project/scm_web.rb
43
43
  - lib/meta_project/tracker.rb
44
44
  - lib/meta_project/version_parser.rb
45
+ - lib/meta_project/core_ext/pathname.rb
45
46
  - lib/meta_project/core_ext/string.rb
46
47
  - lib/meta_project/patois/parser.rb
47
48
  - lib/meta_project/project/base.rb