meta_project 0.4.12 → 0.4.13
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +283 -277
- data/MIT-LICENSE +21 -21
- data/README +130 -126
- data/Rakefile +152 -152
- data/doc/base_attrs.rdoc +2 -2
- data/lib/meta_project.rb +11 -11
- data/lib/meta_project/core_ext/open_uri.rb +22 -22
- data/lib/meta_project/core_ext/pathname.rb +36 -36
- data/lib/meta_project/core_ext/string.rb +4 -4
- data/lib/meta_project/http/multipart.rb +31 -31
- data/lib/meta_project/patois/parser.rb +98 -98
- data/lib/meta_project/project.rb +4 -4
- data/lib/meta_project/project/base.rb +8 -8
- data/lib/meta_project/project/codehaus.rb +1 -1
- data/lib/meta_project/project/codehaus/codehaus_project_svn.rb +30 -30
- data/lib/meta_project/project/trac.rb +1 -1
- data/lib/meta_project/project/trac/trac_project.rb +53 -53
- data/lib/meta_project/project/xforge.rb +5 -5
- data/lib/meta_project/project/xforge/ruby_forge.rb +46 -46
- data/lib/meta_project/project/xforge/session.rb +177 -177
- data/lib/meta_project/project/xforge/source_forge.rb +49 -49
- data/lib/meta_project/project/xforge/xfile.rb +44 -44
- data/lib/meta_project/project/xforge/xforge_base.rb +81 -81
- data/lib/meta_project/project_analyzer.rb +35 -35
- data/lib/meta_project/release/freshmeat.rb +267 -267
- data/lib/meta_project/release/raa.rb +572 -572
- data/lib/meta_project/scm_web.rb +1 -1
- data/lib/meta_project/scm_web/browser.rb +111 -111
- data/lib/meta_project/scm_web/pathname.rb +88 -88
- data/lib/meta_project/tracker.rb +6 -6
- data/lib/meta_project/tracker/base.rb +23 -23
- data/lib/meta_project/tracker/digit_issues.rb +33 -33
- data/lib/meta_project/tracker/issue.rb +56 -56
- data/lib/meta_project/tracker/jira.rb +2 -2
- data/lib/meta_project/tracker/jira/jira_issues.rb +34 -34
- data/lib/meta_project/tracker/jira/jira_tracker.rb +148 -123
- data/lib/meta_project/tracker/trac.rb +1 -1
- data/lib/meta_project/tracker/trac/trac_tracker.rb +32 -32
- data/lib/meta_project/tracker/xforge.rb +3 -3
- data/lib/meta_project/tracker/xforge/ruby_forge_tracker.rb +17 -17
- data/lib/meta_project/tracker/xforge/source_forge_tracker.rb +17 -17
- data/lib/meta_project/tracker/xforge/xforge_tracker.rb +190 -190
- data/lib/meta_project/version_parser.rb +52 -52
- data/lib/rake/contrib/xforge.rb +3 -3
- data/lib/rake/contrib/xforge/base.rb +64 -64
- data/lib/rake/contrib/xforge/news_publisher.rb +97 -97
- data/lib/rake/contrib/xforge/release.rb +134 -134
- metadata +4 -3
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,130 @@
|
|
1
|
-
= MetaProject 0.4.
|
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
|
-
==
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
release.
|
94
|
-
release.
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
[<b>
|
108
|
-
|
109
|
-
[<b>
|
110
|
-
|
111
|
-
[<b>
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
1
|
+
= MetaProject 0.4.13
|
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
|
+
== Screen Scraping
|
48
|
+
|
49
|
+
MetaProject uses <a href="http://www.catb.org/~esr/jargon/html/S/screen-scraping.html">screen scraping</a> heavily. This is a last-resort technique which is only used when there is no other approach (XML-RPC/SOAP/REST) to retrieve data more reliably. As a result, some of the functionality might break if the HTML of the hosts MetaProject scrapes data from changes. If you think MetaProject is misbehaving because of changed HTML on some external system that MetaProject interacts with, please file a bug report in MetaProject's bug tracker on RubyForge.
|
50
|
+
|
51
|
+
== Download/Installation
|
52
|
+
|
53
|
+
The latest version of MetaProject can be found at
|
54
|
+
|
55
|
+
* http://rubyforge.org/project/showfiles.php?group_id=801
|
56
|
+
|
57
|
+
Download and install MetaProject with the following.
|
58
|
+
|
59
|
+
gem install meta_project
|
60
|
+
|
61
|
+
(You may need administrative privileges (sudo) for this).
|
62
|
+
|
63
|
+
== Usage
|
64
|
+
|
65
|
+
=== QRS
|
66
|
+
|
67
|
+
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.
|
68
|
+
|
69
|
+
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.
|
70
|
+
|
71
|
+
=== Other parts of the API
|
72
|
+
|
73
|
+
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.)
|
74
|
+
|
75
|
+
---
|
76
|
+
|
77
|
+
== FAQ
|
78
|
+
|
79
|
+
=== I don't have a CHANGES file that MetaProject's Rake tasks understands. How do I disable it?
|
80
|
+
When using the Rake tasks Rake::XForge::Release and Rake::XForge::NewsPublisher, you can omit parsing
|
81
|
+
of the CHANGES file by telling the task to omit it. In this case, you also have to specify +release_notes+
|
82
|
+
and +release_changes+ to the task. Example:
|
83
|
+
|
84
|
+
task :release_files => [:gem] do
|
85
|
+
release_files = FileList[
|
86
|
+
"pkg/#{PKG_FILE_NAME}.gem"
|
87
|
+
]
|
88
|
+
|
89
|
+
Rake::XForge::Release.new(MetaProject::Project::XForge::RubyForge.new('xforge')) do |release|
|
90
|
+
# If you omit user_name and/or password, you'll be prompted at the command line.
|
91
|
+
release.user_name = ENV['RUBYFORGE_USER']
|
92
|
+
release.password = ENV['RUBYFORGE_PASSWORD']
|
93
|
+
release.files = release_files.to_a
|
94
|
+
release.release_name = "MetaProject #{PKG_VERSION}"
|
95
|
+
|
96
|
+
# The code below is for disabling parsing of CHANGES
|
97
|
+
release.changes_file = nil
|
98
|
+
release.release_notes = "This is release notes. They will show up at the release summary"
|
99
|
+
release.release_changes = ["This is", "a list of String", "and will also show up", "under the release summary"]
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
== Credits
|
104
|
+
|
105
|
+
(In alphabetical order)
|
106
|
+
|
107
|
+
[<b>Aslak Hellesoy</b>] Creator and main contributor of this project.
|
108
|
+
|
109
|
+
[<b>Austin Ziegler</b>] Bugfixes and documentation improvements for XForge release code.
|
110
|
+
|
111
|
+
[<b>David Heinemeier Hansson</b>] For the HTTP POST code and the idea to parse XForge ids from project pages.
|
112
|
+
|
113
|
+
[<b>Jim Weirich</b>] For Rake and feedback on some problems with the Rake tasks.
|
114
|
+
|
115
|
+
[<b>Thomas Leitner</b>] For Freshmeat and RAA support.
|
116
|
+
|
117
|
+
== Support
|
118
|
+
|
119
|
+
The MetaProject homepage is http://xforge.rubyforge.org. You can find the MetaProject
|
120
|
+
RubyForge page at http://rubyforge.org/projects/xforge.
|
121
|
+
|
122
|
+
Feel free to submit patches, bug reports or feature requests via MetaProject's issue tracker on RubyForge.
|
123
|
+
|
124
|
+
For discussions and questions, please use the mailing list: http://rubyforge.org/mail/?group_id=801
|
125
|
+
|
126
|
+
== License
|
127
|
+
|
128
|
+
MetaProject is available under an MIT-style license.
|
129
|
+
|
130
|
+
: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.
|
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
|
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
|
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.13"
|
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 library for interacting with project hosting servers, scms and issue trackers."
|
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 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
|