meta_project 0.4.11 → 0.4.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. data/CHANGES +277 -269
  2. data/MIT-LICENSE +21 -21
  3. data/README +126 -126
  4. data/Rakefile +152 -152
  5. data/doc/base_attrs.rdoc +2 -2
  6. data/lib/meta_project.rb +11 -10
  7. data/lib/meta_project/core_ext/open_uri.rb +22 -22
  8. data/lib/meta_project/core_ext/pathname.rb +36 -36
  9. data/lib/meta_project/core_ext/string.rb +4 -4
  10. data/lib/meta_project/http/multipart.rb +32 -0
  11. data/lib/meta_project/patois/parser.rb +98 -98
  12. data/lib/meta_project/project.rb +4 -4
  13. data/lib/meta_project/project/base.rb +8 -8
  14. data/lib/meta_project/project/codehaus.rb +1 -1
  15. data/lib/meta_project/project/codehaus/codehaus_project_svn.rb +30 -30
  16. data/lib/meta_project/project/trac.rb +1 -1
  17. data/lib/meta_project/project/trac/trac_project.rb +53 -53
  18. data/lib/meta_project/project/xforge.rb +5 -5
  19. data/lib/meta_project/project/xforge/ruby_forge.rb +46 -48
  20. data/lib/meta_project/project/xforge/session.rb +177 -191
  21. data/lib/meta_project/project/xforge/source_forge.rb +49 -49
  22. data/lib/meta_project/project/xforge/xfile.rb +44 -44
  23. data/lib/meta_project/project/xforge/xforge_base.rb +81 -79
  24. data/lib/meta_project/project_analyzer.rb +35 -35
  25. data/lib/meta_project/release/freshmeat.rb +267 -267
  26. data/lib/meta_project/release/raa.rb +572 -572
  27. data/lib/meta_project/scm_web.rb +1 -1
  28. data/lib/meta_project/scm_web/browser.rb +111 -111
  29. data/lib/meta_project/scm_web/pathname.rb +88 -88
  30. data/lib/meta_project/tracker.rb +6 -6
  31. data/lib/meta_project/tracker/base.rb +23 -23
  32. data/lib/meta_project/tracker/digit_issues.rb +33 -32
  33. data/lib/meta_project/tracker/issue.rb +56 -52
  34. data/lib/meta_project/tracker/jira.rb +2 -2
  35. data/lib/meta_project/tracker/jira/jira_issues.rb +34 -33
  36. data/lib/meta_project/tracker/jira/jira_tracker.rb +123 -123
  37. data/lib/meta_project/tracker/trac.rb +1 -1
  38. data/lib/meta_project/tracker/trac/trac_tracker.rb +32 -32
  39. data/lib/meta_project/tracker/xforge.rb +3 -3
  40. data/lib/meta_project/tracker/xforge/ruby_forge_tracker.rb +17 -17
  41. data/lib/meta_project/tracker/xforge/source_forge_tracker.rb +17 -17
  42. data/lib/meta_project/tracker/xforge/xforge_tracker.rb +190 -105
  43. data/lib/meta_project/version_parser.rb +52 -52
  44. data/lib/rake/contrib/xforge.rb +3 -3
  45. data/lib/rake/contrib/xforge/base.rb +64 -64
  46. data/lib/rake/contrib/xforge/news_publisher.rb +97 -97
  47. data/lib/rake/contrib/xforge/release.rb +134 -134
  48. metadata +3 -3
  49. data/TODO +0 -9
data/MIT-LICENSE CHANGED
@@ -1,21 +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
-
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 CHANGED
@@ -1,126 +1,126 @@
1
- = MetaProject 0.4.11
2
-
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
-
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
-
7
- == Feature overview
8
-
9
- === RSCM related
10
-
11
- * Obtain preconfigured RSCM:http://rscm.rubyforge.org objects.
12
-
13
- === SCM browser related
14
-
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
44
-
45
- * Query home page URLs for a project.
46
-
47
- == Download/Installation
48
-
49
- The latest version of MetaProject can be found at
50
-
51
- * http://rubyforge.org/project/showfiles.php?group_id=801
52
-
53
- Download and install MetaProject with the following.
54
-
55
- gem install meta_project
56
-
57
- (You may need administrative privileges (sudo) for this).
58
-
59
- == Usage
60
-
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.
64
-
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.
66
-
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.)
70
-
71
- ---
72
-
73
- == FAQ
74
-
75
- === I don't have a CHANGES file that MetaProject's Rake tasks understands. How do I disable it?
76
- When using the Rake tasks Rake::XForge::Release and Rake::XForge::NewsPublisher, you can omit parsing
77
- of the CHANGES file by telling the task to omit it. In this case, you also have to specify +release_notes+
78
- and +release_changes+ to the task. Example:
79
-
80
- task :release_files => [:gem] do
81
- release_files = FileList[
82
- "pkg/#{PKG_FILE_NAME}.gem"
83
- ]
84
-
85
- Rake::XForge::Release.new(MetaProject::Project::XForge::RubyForge.new('xforge')) do |release|
86
- # If you omit user_name and/or password, you'll be prompted at the command line.
87
- release.user_name = ENV['RUBYFORGE_USER']
88
- release.password = ENV['RUBYFORGE_PASSWORD']
89
- release.files = release_files.to_a
90
- release.release_name = "MetaProject #{PKG_VERSION}"
91
-
92
- # The code below is for disabling parsing of CHANGES
93
- release.changes_file = nil
94
- release.release_notes = "This is release notes. They will show up at the release summary"
95
- release.release_changes = ["This is", "a list of String", "and will also show up", "under the release summary"]
96
- end
97
- end
98
-
99
- == Credits
100
-
101
- (In alphabetical order)
102
-
103
- [<b>Aslak Hellesoy</b>] Creator and main contributor of this project.
104
-
105
- [<b>Austin Ziegler</b>] Bugfixes and documentation improvements for XForge release code.
106
-
107
- [<b>David Heinemeier Hansson</b>] For the HTTP POST code and the idea to parse XForge ids from project pages.
108
-
109
- [<b>Jim Weirich</b>] For Rake and feedback on some problems with the Rake tasks.
110
-
111
- [<b>Thomas Leitner</b>] For Freshmeat and RAA support.
112
-
113
- == Support
114
-
115
- The MetaProject homepage is http://xforge.rubyforge.org. You can find the MetaProject
116
- RubyForge page at http://rubyforge.org/projects/xforge.
117
-
118
- Feel free to submit patches, bug reports or feature requests via MetaProject's issue tracker on RubyForge.
119
-
120
- For discussions and questions, please use the mailing list: http://rubyforge.org/mail/?group_id=801
121
-
122
- == License
123
-
124
- MetaProject is available under an MIT-style license.
125
-
126
- :include: MIT-LICENSE
1
+ = MetaProject 0.4.12
2
+
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
+
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
+
7
+ == Feature overview
8
+
9
+ === RSCM related
10
+
11
+ * Obtain preconfigured RSCM:http://rscm.rubyforge.org objects.
12
+
13
+ === SCM browser related
14
+
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
44
+
45
+ * Query home page URLs for a project.
46
+
47
+ == Download/Installation
48
+
49
+ The latest version of MetaProject can be found at
50
+
51
+ * http://rubyforge.org/project/showfiles.php?group_id=801
52
+
53
+ Download and install MetaProject with the following.
54
+
55
+ gem install meta_project
56
+
57
+ (You may need administrative privileges (sudo) for this).
58
+
59
+ == Usage
60
+
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.
64
+
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.
66
+
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.)
70
+
71
+ ---
72
+
73
+ == FAQ
74
+
75
+ === I don't have a CHANGES file that MetaProject's Rake tasks understands. How do I disable it?
76
+ When using the Rake tasks Rake::XForge::Release and Rake::XForge::NewsPublisher, you can omit parsing
77
+ of the CHANGES file by telling the task to omit it. In this case, you also have to specify +release_notes+
78
+ and +release_changes+ to the task. Example:
79
+
80
+ task :release_files => [:gem] do
81
+ release_files = FileList[
82
+ "pkg/#{PKG_FILE_NAME}.gem"
83
+ ]
84
+
85
+ Rake::XForge::Release.new(MetaProject::Project::XForge::RubyForge.new('xforge')) do |release|
86
+ # If you omit user_name and/or password, you'll be prompted at the command line.
87
+ release.user_name = ENV['RUBYFORGE_USER']
88
+ release.password = ENV['RUBYFORGE_PASSWORD']
89
+ release.files = release_files.to_a
90
+ release.release_name = "MetaProject #{PKG_VERSION}"
91
+
92
+ # The code below is for disabling parsing of CHANGES
93
+ release.changes_file = nil
94
+ release.release_notes = "This is release notes. They will show up at the release summary"
95
+ release.release_changes = ["This is", "a list of String", "and will also show up", "under the release summary"]
96
+ end
97
+ end
98
+
99
+ == Credits
100
+
101
+ (In alphabetical order)
102
+
103
+ [<b>Aslak Hellesoy</b>] Creator and main contributor of this project.
104
+
105
+ [<b>Austin Ziegler</b>] Bugfixes and documentation improvements for XForge release code.
106
+
107
+ [<b>David Heinemeier Hansson</b>] For the HTTP POST code and the idea to parse XForge ids from project pages.
108
+
109
+ [<b>Jim Weirich</b>] For Rake and feedback on some problems with the Rake tasks.
110
+
111
+ [<b>Thomas Leitner</b>] For Freshmeat and RAA support.
112
+
113
+ == Support
114
+
115
+ The MetaProject homepage is http://xforge.rubyforge.org. You can find the MetaProject
116
+ RubyForge page at http://rubyforge.org/projects/xforge.
117
+
118
+ Feel free to submit patches, bug reports or feature requests via MetaProject's issue tracker on RubyForge.
119
+
120
+ For discussions and questions, please use the mailing list: http://rubyforge.org/mail/?group_id=801
121
+
122
+ == License
123
+
124
+ MetaProject is available under an MIT-style license.
125
+
126
+ :include: MIT-LICENSE
data/Rakefile CHANGED
@@ -1,152 +1,152 @@
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.11"
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
- desc "Execute RSpec specifications (rspec gem must be installed)"
38
- task :spec do
39
- ruby 'behaviours/suite.rb'
40
- end
41
-
42
- # Create a task to build the RDOC documentation tree.
43
- rd = Rake::RDocTask.new("rdoc") do |rdoc|
44
- rdoc.rdoc_dir = 'html'
45
- # rdoc.template = 'kilmer'
46
- # rdoc.template = 'css2'
47
- # rdoc.template = 'doc/jamis.rb'
48
- rdoc.title = "MetaProject"
49
- rdoc.options << '--line-numbers' << '--inline-source' << '--main' << 'README'
50
- rdoc.rdoc_files.include('README', 'MIT-LICENSE', 'CHANGES')
51
- rdoc.rdoc_files.include('lib/**/*.rb', 'doc/**/*.rdoc')
52
- rdoc.rdoc_files.exclude('doc/**/*_attrs.rdoc')
53
- end
54
-
55
- # ====================================================================
56
- # Create a task that will package the Rake software into distributable
57
- # tar, zip and gem files.
58
-
59
- spec = Gem::Specification.new do |s|
60
-
61
- #### Basic information.
62
-
63
- s.name = PKG_NAME
64
- s.version = PKG_VERSION
65
- s.summary = "Ruby based make-like utility."
66
- s.description = <<-EOF
67
- MetaProject (formerly XForge) is a library that allows interaction with various project hosting servers, issue trackers, scms and scm browsers.
68
- EOF
69
-
70
- s.files = PKG_FILES.to_a
71
- s.require_path = 'lib'
72
- s.autorequire = 'meta_project'
73
-
74
- #### Documentation and testing.
75
-
76
- s.has_rdoc = true
77
- s.extra_rdoc_files = rd.rdoc_files.reject { |fn| fn =~ /\.rb$/ }.to_a
78
- s.rdoc_options <<
79
- '--title' << 'MetaProject' <<
80
- '--main' << 'README' <<
81
- '--line-numbers'
82
-
83
- #### Author and project details.
84
-
85
- s.author = "Aslak Hellesoy"
86
- s.email = "aslak.hellesoy@gmail.com"
87
- s.homepage = "http://xforge.rubyforge.org"
88
- s.rubyforge_project = "xforge"
89
- end
90
-
91
- desc "Build Gem"
92
- Rake::GemPackageTask.new(spec) do |pkg|
93
- pkg.need_zip = true
94
- pkg.need_tar = true
95
- end
96
-
97
- # Support Tasks ------------------------------------------------------
98
-
99
- desc "Look for TODO and FIXME tags in the code"
100
- task :todo do
101
- Pathname.new(File.dirname(__FILE__)).egrep(/#.*(FIXME|TODO|TBD|DEPRECATED)/) do |match|
102
- puts match
103
- end
104
- end
105
-
106
- task :release => [:verify_env_vars, :release_files, :publish_doc, :publish_news, :tag]
107
-
108
- task :verify_env_vars do
109
- raise "RUBYFORGE_USER environment variable not set!" unless ENV['RUBYFORGE_USER']
110
- raise "RUBYFORGE_PASSWORD environment variable not set!" unless ENV['RUBYFORGE_PASSWORD']
111
- end
112
-
113
- task :publish_doc => [:rdoc] do
114
- publisher = Rake::RubyForgePublisher.new('xforge', ENV['RUBYFORGE_USER'])
115
- publisher.upload
116
- end
117
-
118
- desc "Release files on RubyForge"
119
- task :release_files => [:gem] do
120
- release_files = FileList[
121
- "pkg/#{PKG_FILE_NAME}.gem"
122
- ]
123
-
124
- Rake::XForge::Release.new(MetaProject::Project::XForge::RubyForge.new('xforge')) do |release|
125
- # Never hardcode user name and password in the Rakefile!
126
- release.user_name = ENV['RUBYFORGE_USER']
127
- release.password = ENV['RUBYFORGE_PASSWORD']
128
- release.files = release_files.to_a
129
- release.release_name = "MetaProject #{PKG_VERSION}"
130
- # The rest of the options are defaults (among others, release_notes and release_changes, parsed from CHANGES)
131
- end
132
- end
133
-
134
- desc "Publish news on RubyForge"
135
- task :publish_news => [:gem] do
136
- release_files = FileList[
137
- "pkg/#{PKG_FILE_NAME}.gem"
138
- ]
139
-
140
- Rake::XForge::NewsPublisher.new(MetaProject::Project::XForge::RubyForge.new('xforge')) do |news|
141
- # Never hardcode user name and password in the Rakefile!
142
- news.user_name = ENV['RUBYFORGE_USER']
143
- news.password = ENV['RUBYFORGE_PASSWORD']
144
- end
145
- end
146
-
147
- desc "Tag all the CVS files with the latest release number (REL=x.y.z)"
148
- task :tag do
149
- reltag = "REL_#{PKG_VERSION.gsub(/\./, '_')}"
150
- puts "Tagging CVS with [#{reltag}]"
151
- sh %{cvs tag #{reltag}}
152
- end
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.12"
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
+ desc "Execute RSpec specifications (rspec gem must be installed)"
38
+ task :spec do
39
+ ruby 'behaviours/suite.rb'
40
+ end
41
+
42
+ # Create a task to build the RDOC documentation tree.
43
+ rd = Rake::RDocTask.new("rdoc") do |rdoc|
44
+ rdoc.rdoc_dir = 'html'
45
+ # rdoc.template = 'kilmer'
46
+ # rdoc.template = 'css2'
47
+ # rdoc.template = 'doc/jamis.rb'
48
+ rdoc.title = "MetaProject"
49
+ rdoc.options << '--line-numbers' << '--inline-source' << '--main' << 'README'
50
+ rdoc.rdoc_files.include('README', 'MIT-LICENSE', 'CHANGES')
51
+ rdoc.rdoc_files.include('lib/**/*.rb', 'doc/**/*.rdoc')
52
+ rdoc.rdoc_files.exclude('doc/**/*_attrs.rdoc')
53
+ end
54
+
55
+ # ====================================================================
56
+ # Create a task that will package the Rake software into distributable
57
+ # tar, zip and gem files.
58
+
59
+ spec = Gem::Specification.new do |s|
60
+
61
+ #### Basic information.
62
+
63
+ s.name = PKG_NAME
64
+ s.version = PKG_VERSION
65
+ s.summary = "Ruby based make-like utility."
66
+ s.description = <<-EOF
67
+ MetaProject (formerly XForge) is a library that allows interaction with various project hosting servers, issue trackers, scms and scm browsers.
68
+ EOF
69
+
70
+ s.files = PKG_FILES.to_a
71
+ s.require_path = 'lib'
72
+ s.autorequire = 'meta_project'
73
+
74
+ #### Documentation and testing.
75
+
76
+ s.has_rdoc = true
77
+ s.extra_rdoc_files = rd.rdoc_files.reject { |fn| fn =~ /\.rb$/ }.to_a
78
+ s.rdoc_options <<
79
+ '--title' << 'MetaProject' <<
80
+ '--main' << 'README' <<
81
+ '--line-numbers'
82
+
83
+ #### Author and project details.
84
+
85
+ s.author = "Aslak Hellesoy"
86
+ s.email = "aslak.hellesoy@gmail.com"
87
+ s.homepage = "http://xforge.rubyforge.org"
88
+ s.rubyforge_project = "xforge"
89
+ end
90
+
91
+ desc "Build Gem"
92
+ Rake::GemPackageTask.new(spec) do |pkg|
93
+ pkg.need_zip = true
94
+ pkg.need_tar = true
95
+ end
96
+
97
+ # Support Tasks ------------------------------------------------------
98
+
99
+ desc "Look for TODO and FIXME tags in the code"
100
+ task :todo do
101
+ Pathname.new(File.dirname(__FILE__)).egrep(/#.*(FIXME|TODO|TBD|DEPRECATED)/) do |match|
102
+ puts match
103
+ end
104
+ end
105
+
106
+ task :release => [:verify_env_vars, :release_files, :publish_doc, :publish_news, :tag]
107
+
108
+ task :verify_env_vars do
109
+ raise "RUBYFORGE_USER environment variable not set!" unless ENV['RUBYFORGE_USER']
110
+ raise "RUBYFORGE_PASSWORD environment variable not set!" unless ENV['RUBYFORGE_PASSWORD']
111
+ end
112
+
113
+ task :publish_doc => [:rdoc] do
114
+ publisher = Rake::RubyForgePublisher.new('xforge', ENV['RUBYFORGE_USER'])
115
+ publisher.upload
116
+ end
117
+
118
+ desc "Release files on RubyForge"
119
+ task :release_files => [:gem] do
120
+ release_files = FileList[
121
+ "pkg/#{PKG_FILE_NAME}.gem"
122
+ ]
123
+
124
+ Rake::XForge::Release.new(MetaProject::Project::XForge::RubyForge.new('xforge')) do |release|
125
+ # Never hardcode user name and password in the Rakefile!
126
+ release.user_name = ENV['RUBYFORGE_USER']
127
+ release.password = ENV['RUBYFORGE_PASSWORD']
128
+ release.files = release_files.to_a
129
+ release.release_name = "MetaProject #{PKG_VERSION}"
130
+ # The rest of the options are defaults (among others, release_notes and release_changes, parsed from CHANGES)
131
+ end
132
+ end
133
+
134
+ desc "Publish news on RubyForge"
135
+ task :publish_news => [:gem] do
136
+ release_files = FileList[
137
+ "pkg/#{PKG_FILE_NAME}.gem"
138
+ ]
139
+
140
+ Rake::XForge::NewsPublisher.new(MetaProject::Project::XForge::RubyForge.new('xforge')) do |news|
141
+ # Never hardcode user name and password in the Rakefile!
142
+ news.user_name = ENV['RUBYFORGE_USER']
143
+ news.password = ENV['RUBYFORGE_PASSWORD']
144
+ end
145
+ end
146
+
147
+ desc "Tag all the CVS files with the latest release number (REL=x.y.z)"
148
+ task :tag do
149
+ reltag = "REL_#{PKG_VERSION.gsub(/\./, '_')}"
150
+ puts "Tagging CVS with [#{reltag}]"
151
+ sh %{cvs tag #{reltag}}
152
+ end