reap 9.3.5 → 9.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +10 -0
- data/MANIFEST +37 -21
- data/NOTES +13 -11
- data/bin/reap-announce +40 -2
- data/bin/reap-check-load +20 -2
- data/bin/reap-check-syntax +20 -2
- data/bin/reap-clean +24 -2
- data/bin/reap-clobber +17 -2
- data/bin/reap-doc +12 -2
- data/bin/reap-doc-rdoc +17 -2
- data/bin/reap-doc-ri +16 -2
- data/bin/reap-doc-spec +18 -0
- data/bin/reap-init +9 -0
- data/bin/reap-inspect +20 -2
- data/bin/reap-install +13 -2
- data/bin/reap-install-gem +14 -2
- data/bin/reap-log +15 -2
- data/bin/reap-log-changes +15 -2
- data/bin/reap-log-notes +20 -2
- data/bin/reap-make +16 -2
- data/bin/reap-make-clean +10 -2
- data/bin/reap-make-distclean +18 -2
- data/bin/reap-make-extconf +14 -2
- data/bin/reap-make-static +14 -2
- data/bin/reap-package +25 -2
- data/bin/reap-package-gem +14 -2
- data/bin/reap-package-tgz +14 -2
- data/bin/reap-package-zip +14 -2
- data/bin/reap-prepare +21 -2
- data/bin/reap-publish +25 -2
- data/bin/reap-release +22 -2
- data/bin/reap-rollout +32 -2
- data/bin/reap-scaffold +16 -2
- data/bin/reap-scm-branch +13 -2
- data/bin/reap-scm-tag +13 -2
- data/bin/reap-spec +14 -2
- data/bin/reap-stats +21 -2
- data/bin/reap-test +14 -2
- data/bin/reap-test-cross +23 -2
- data/bin/reap-test-load +17 -2
- data/bin/reap-test-solo +19 -2
- data/bin/reap-uninstall +14 -2
- data/bin/reap-uninstall-gem +17 -2
- data/bin/reap-version +10 -2
- data/lib/reap/announcement.rb +136 -0
- data/lib/reap/application.rb +3 -1
- data/lib/reap/default.yaml +12 -12
- data/lib/reap/defaults.rb +49 -0
- data/lib/reap/emailer.rb +189 -0
- data/lib/reap/extensions.rb +1 -2
- data/lib/reap/hosts.rb +4 -0
- data/lib/reap/hosts/host.rb +69 -0
- data/lib/reap/hosts/mailinglist.rb +83 -0
- data/lib/reap/{systems → hosts}/rubyforge.rb +72 -60
- data/lib/reap/hosts/rubytalk.rb +39 -0
- data/lib/reap/iobject.rb +5 -3
- data/lib/reap/metadata.rb +31 -4
- data/lib/reap/project.rb +101 -41
- data/lib/reap/project/announce.rb +50 -180
- data/lib/reap/project/check.rb +1 -1
- data/lib/reap/project/gem.rb +32 -68
- data/lib/reap/project/log.rb +12 -7
- data/lib/reap/project/make.rb +0 -1
- data/lib/reap/project/package.rb +228 -75
- data/lib/reap/project/rdoc.rb +9 -8
- data/lib/reap/project/release.rb +52 -6
- data/lib/reap/project/scm.rb +40 -25
- data/lib/reap/project/spec.rb +3 -3
- data/lib/reap/project/test.rb +1 -2
- data/lib/reap/project/version.rb +18 -4
- data/lib/reap/runmodes.rb +24 -0
- data/lib/reap/settings.rb +3 -14
- data/lib/reap/systems.rb +4 -0
- data/lib/reap/systems/git.rb +0 -0
- data/lib/reap/systems/hg.rb +0 -0
- data/lib/reap/systems/{subversion.rb → svn.rb} +47 -16
- data/lib/reap/systems/system.rb +53 -0
- data/lib/reap/tool.rb +38 -0
- data/lib/reap/utilities.rb +43 -86
- data/log/{Changelog.txt → changelog.rdoc} +56 -0
- data/log/fixme.rdoc +25 -0
- data/log/todo.rdoc +85 -0
- data/meta/project.yaml +13 -2
- data/meta/version +1 -0
- data/setup.rb +74 -64
- data/task/allshare.rb +109 -0
- data/task/clean +13 -0
- data/task/compile +28 -0
- data/task/configure +372 -0
- data/task/install +1481 -0
- data/test/case/test_init.rb +32 -0
- data/test/case/test_scaffold.rb +32 -0
- data/test/data/scaffold/meta/project.yaml +28 -0
- data/test/lib/case_testable.rb +23 -0
- metadata +64 -31
- data/bin/reap-spec-doc +0 -8
- data/demo/README +0 -15
- data/demo/lib/foo/foo.rb +0 -7
- data/demo/meta/VERSION +0 -1
- data/demo/meta/project.yaml +0 -21
- data/lib/reap/project/rubyforge.rb +0 -71
- data/lib/reap/project/svn.rb +0 -76
- data/log/Fixme.txt +0 -22
- data/log/Todo.txt +0 -84
- data/meta/VERSION +0 -1
data/bin/reap-scaffold
CHANGED
@@ -2,7 +2,21 @@
|
|
2
2
|
|
3
3
|
require 'reap/application'
|
4
4
|
|
5
|
-
|
5
|
+
HELP = <<-END
|
6
|
+
Usage: #{File.basename($0)} [options]
|
6
7
|
|
7
|
-
|
8
|
+
Reap scaffold will generate a conventional Ruby project
|
9
|
+
layout of directories and files. It uses information from
|
10
|
+
project metadata to improve upon the scaffolding if it
|
11
|
+
is available (see reap-init). reap-scaffold will not
|
12
|
+
overwite pre-existing files of the same name unless the
|
13
|
+
--force option is supplied.
|
14
|
+
END
|
15
|
+
|
16
|
+
if ARGV.include?('--help')
|
17
|
+
puts HELP
|
18
|
+
else
|
19
|
+
app = Reap::Application.new
|
20
|
+
app.scaffold
|
21
|
+
end
|
8
22
|
|
data/bin/reap-scm-branch
CHANGED
@@ -2,6 +2,17 @@
|
|
2
2
|
|
3
3
|
require 'reap/application'
|
4
4
|
|
5
|
-
|
5
|
+
HELP = <<-END
|
6
|
+
Usage: #{File.basename($0)} [options]
|
7
|
+
|
8
|
+
Branch the project via a supported source control manager
|
9
|
+
(currently only SVN is supported).
|
10
|
+
END
|
11
|
+
|
12
|
+
if ARGV.include?('--help')
|
13
|
+
puts HELP
|
14
|
+
else
|
15
|
+
app = Reap::Application.new
|
16
|
+
app.scm_branch
|
17
|
+
end
|
6
18
|
|
7
|
-
app.scm_branch
|
data/bin/reap-scm-tag
CHANGED
@@ -2,6 +2,17 @@
|
|
2
2
|
|
3
3
|
require 'reap/application'
|
4
4
|
|
5
|
-
|
5
|
+
HELP = <<-END
|
6
|
+
Usage: #{File.basename($0)} [options]
|
7
|
+
|
8
|
+
Tag the project via a supported source control manager
|
9
|
+
(currently only SVN is supported).
|
10
|
+
END
|
11
|
+
|
12
|
+
if ARGV.include?('--help')
|
13
|
+
puts HELP
|
14
|
+
else
|
15
|
+
app = Reap::Application.new
|
16
|
+
app.scm_tag
|
17
|
+
end
|
6
18
|
|
7
|
-
app.scm_tag
|
data/bin/reap-spec
CHANGED
@@ -2,6 +2,18 @@
|
|
2
2
|
|
3
3
|
require 'reap/application'
|
4
4
|
|
5
|
-
|
5
|
+
HELP = <<-END
|
6
|
+
Usage: #{File.basename($0)} [options]
|
7
|
+
|
8
|
+
Run specifications. This is a general specifications runner, which
|
9
|
+
loads all specs into a single process and and then runs them
|
10
|
+
consecutively. This shells out to the 'spec' command per RSpec.
|
11
|
+
END
|
12
|
+
|
13
|
+
if ARGV.include?('--help')
|
14
|
+
puts HELP
|
15
|
+
else
|
16
|
+
app = Reap::Application.new
|
17
|
+
app.spec
|
18
|
+
end
|
6
19
|
|
7
|
-
app.spec
|
data/bin/reap-stats
CHANGED
@@ -2,6 +2,25 @@
|
|
2
2
|
|
3
3
|
require 'reap/application'
|
4
4
|
|
5
|
-
|
5
|
+
HELP = <<-END
|
6
|
+
Usage: #{File.basename($0)} [options]
|
7
|
+
|
8
|
+
Scan source code counting files, lines of code and comments
|
9
|
+
and presents a report of it's findings.
|
10
|
+
|
11
|
+
loadpath Path to include in analysis. The default
|
12
|
+
is the project's loadpath.
|
13
|
+
|
14
|
+
exclude File globs to exclude from analysis. Default is
|
15
|
+
'ext' b/c this does not yet support C analysis.
|
16
|
+
|
17
|
+
This command does not currently support C coded extensions.
|
18
|
+
END
|
19
|
+
|
20
|
+
if ARGV.include?('--help')
|
21
|
+
puts HELP
|
22
|
+
else
|
23
|
+
app = Reap::Application.new
|
24
|
+
app.stats
|
25
|
+
end
|
6
26
|
|
7
|
-
app.stats
|
data/bin/reap-test
CHANGED
@@ -2,6 +2,18 @@
|
|
2
2
|
|
3
3
|
require 'reap/application'
|
4
4
|
|
5
|
-
|
5
|
+
HELP = <<-END
|
6
|
+
Usage: #{File.basename($0)} [options]
|
7
|
+
|
8
|
+
Run unit tests. This is a general unit test runner, which
|
9
|
+
loads all tests into a single process and and then runs
|
10
|
+
them consecutively.
|
11
|
+
END
|
12
|
+
|
13
|
+
if ARGV.include?('--help')
|
14
|
+
puts HELP
|
15
|
+
else
|
16
|
+
app = Reap::Application.new
|
17
|
+
app.test_unit
|
18
|
+
end
|
6
19
|
|
7
|
-
app.test_unit
|
data/bin/reap-test-cross
CHANGED
@@ -2,6 +2,27 @@
|
|
2
2
|
|
3
3
|
require 'reap/application'
|
4
4
|
|
5
|
-
|
5
|
+
HELP = <<-END
|
6
|
+
Usage: #{File.basename($0)} [options]
|
7
|
+
|
8
|
+
This command runs unit tests in pairs to make sure there is cross
|
9
|
+
library compatibility. Each pair is run in a separate interpretor
|
10
|
+
to prevent script clash. This makes for a more robust test
|
11
|
+
facility and prevents potential conflicts between scripts.
|
12
|
+
|
13
|
+
tests Test files (eg. test/tc_**/*.rb) [test/**/*]
|
14
|
+
loadpath Directories to include in load path.
|
15
|
+
require List of files to require prior to running tests.
|
16
|
+
live Deactive use of local libs and test against install.
|
17
|
+
|
18
|
+
This command is especially useful to large library collection type
|
19
|
+
projects.
|
20
|
+
END
|
21
|
+
|
22
|
+
if ARGV.include?('--help')
|
23
|
+
puts HELP
|
24
|
+
else
|
25
|
+
app = Reap::Application.new
|
26
|
+
app.test_cross
|
27
|
+
end
|
6
28
|
|
7
|
-
app.test_cross
|
data/bin/reap-test-load
CHANGED
@@ -4,6 +4,21 @@
|
|
4
4
|
|
5
5
|
require 'reap/application'
|
6
6
|
|
7
|
-
|
7
|
+
HELP = <<-END
|
8
|
+
Usage: #{File.basename($0)} [options]
|
9
|
+
|
10
|
+
Simple load testing. Each test is loaded to ensure their
|
11
|
+
are no require issues in the tests themselves. This is
|
12
|
+
largey redudant since any other test command will report
|
13
|
+
these errors as well. The advantage here howver, is that
|
14
|
+
this command isolates test load issues from actual test
|
15
|
+
failures.
|
16
|
+
END
|
17
|
+
|
18
|
+
if ARGV.include?('--help')
|
19
|
+
puts HELP
|
20
|
+
else
|
21
|
+
app = Reap::Application.new
|
22
|
+
app.test_load
|
23
|
+
end
|
8
24
|
|
9
|
-
app.test_load
|
data/bin/reap-test-solo
CHANGED
@@ -2,6 +2,23 @@
|
|
2
2
|
|
3
3
|
require 'reap/application'
|
4
4
|
|
5
|
-
|
5
|
+
HELP = <<-END
|
6
|
+
Usage: #{File.basename($0)} [options]
|
7
|
+
|
8
|
+
Run unit-tests independently. Each test is run in a separate
|
9
|
+
interpretor to prevent script clash. This adds to a more robust
|
10
|
+
test facility, and prevents potential conflicts between test scripts.
|
11
|
+
|
12
|
+
tests Test files (eg. test/tc_**/*.rb) [test/**/*]
|
13
|
+
loadpath Directories to include in load path [lib].
|
14
|
+
require List of files to require prior to running tests.
|
15
|
+
live Deactive use of local libs and test against install.
|
16
|
+
END
|
17
|
+
|
18
|
+
if ARGV.include?('--help')
|
19
|
+
puts HELP
|
20
|
+
else
|
21
|
+
app = Reap::Application.new
|
22
|
+
app.test_solo
|
23
|
+
end
|
6
24
|
|
7
|
-
app.test_solo
|
data/bin/reap-uninstall
CHANGED
@@ -2,6 +2,18 @@
|
|
2
2
|
|
3
3
|
require 'reap/application'
|
4
4
|
|
5
|
-
|
5
|
+
HELP = <<-END
|
6
|
+
Usage: #{File.basename($0)} [options]
|
7
|
+
|
8
|
+
Uninstall previous installation to site_ruby via reap-install.
|
9
|
+
This only works if the underlying install script (e.g. setup.rb)
|
10
|
+
supports an uninstall subcommand.
|
11
|
+
END
|
12
|
+
|
13
|
+
if ARGV.include?('--help')
|
14
|
+
puts HELP
|
15
|
+
else
|
16
|
+
app = Reap::Application.new
|
17
|
+
app.site_uninstall
|
18
|
+
end
|
6
19
|
|
7
|
-
app.site_uninstall
|
data/bin/reap-uninstall-gem
CHANGED
@@ -2,6 +2,21 @@
|
|
2
2
|
|
3
3
|
require 'reap/application'
|
4
4
|
|
5
|
-
|
5
|
+
HELP = <<-END
|
6
|
+
Usage: #{File.basename($0)} [options]
|
7
|
+
|
8
|
+
Remove previsously installed gem. This is equivalent to
|
9
|
+
|
10
|
+
$ gem uninstall {project name}
|
11
|
+
|
12
|
+
The reap command is provided as a convenience when testing
|
13
|
+
gem installation using reap-install-gem.
|
14
|
+
END
|
15
|
+
|
16
|
+
if ARGV.include?('--help')
|
17
|
+
puts HELP
|
18
|
+
else
|
19
|
+
app = Reap::Application.new
|
20
|
+
app.gem_uninstall
|
21
|
+
end
|
6
22
|
|
7
|
-
app.gem_uninstall
|
data/bin/reap-version
CHANGED
@@ -0,0 +1,136 @@
|
|
1
|
+
#require 'erb'
|
2
|
+
|
3
|
+
module Reap
|
4
|
+
|
5
|
+
# = Announcement
|
6
|
+
#
|
7
|
+
# Announcment class is used to generate an announcement message.
|
8
|
+
# By default this is a Release Announcment.
|
9
|
+
|
10
|
+
class Announcement
|
11
|
+
|
12
|
+
# Project metadata
|
13
|
+
|
14
|
+
attr_accessor :metadata
|
15
|
+
|
16
|
+
attr_accessor :cutoff
|
17
|
+
|
18
|
+
attr_accessor :template
|
19
|
+
|
20
|
+
#
|
21
|
+
|
22
|
+
def initialize(options={}, &block)
|
23
|
+
populate(options, &block)
|
24
|
+
|
25
|
+
@cutoff ||= 30
|
26
|
+
@template ||= "{ANNOUNCE}{,.txt}"
|
27
|
+
end
|
28
|
+
|
29
|
+
# Make a release announcement. Generates and can email a release
|
30
|
+
# announcements. These are nicely formated message and can
|
31
|
+
# email the message to the specified address(es).
|
32
|
+
#
|
33
|
+
# The following settings apply:
|
34
|
+
#
|
35
|
+
# template Announcement file/template.
|
36
|
+
# cutoff Max number of lines of changelog to show.
|
37
|
+
#
|
38
|
+
# A template file can be specified that uses "$setting" as
|
39
|
+
# substitutes for poject information.
|
40
|
+
|
41
|
+
def message
|
42
|
+
template = Dir.glob(template(), File::FNM_CASEFOLD).first
|
43
|
+
|
44
|
+
if template
|
45
|
+
readme = File.read(template)
|
46
|
+
readme = unfold_paragraphs(readme)
|
47
|
+
else
|
48
|
+
readme = ''
|
49
|
+
#readme << "= #{metadata.title} v#{metadata.version}\n\n"
|
50
|
+
readme << "#{metadata.description}\n\n"
|
51
|
+
readme << "#{metadata.homepage}\n\n"
|
52
|
+
readme << "Please see the NOTES file.\n\n"
|
53
|
+
readme << "Please see the CHANGES file.\n"
|
54
|
+
end
|
55
|
+
|
56
|
+
# changelog
|
57
|
+
file = Dir.glob('change{s,log}{,.txt}', File::FNM_CASEFOLD)[0]
|
58
|
+
changelog = file ? File.read(file).strip : ''
|
59
|
+
#changelog = unfold_paragraphs(changelog)
|
60
|
+
changelog = changelog.split("\n")[0..cutoff].join("\n")
|
61
|
+
unless changelog =~ /^=/
|
62
|
+
changelog = "\n== Changes\n\n" + changelog
|
63
|
+
end
|
64
|
+
|
65
|
+
# noteslog
|
66
|
+
file = Dir.glob('note{s,log}{,.txt}', File::FNM_CASEFOLD)[0]
|
67
|
+
notelog = file ? File.read(file).strip : ''
|
68
|
+
notelog = unfold_paragraphs(notelog)
|
69
|
+
unless notelog =~ /^=/
|
70
|
+
notelog = "\n== Release Notes\n\n" + notelog
|
71
|
+
end
|
72
|
+
|
73
|
+
# Strip tiny version zero.
|
74
|
+
#if keys['version'] =~ /[.].*?[.]/
|
75
|
+
# keys['version'] = keys['version'].chomp('.0')
|
76
|
+
#end
|
77
|
+
|
78
|
+
# Make announcement message
|
79
|
+
message = readme.dup
|
80
|
+
|
81
|
+
#message.gsub!('$readme$', readme || '')
|
82
|
+
message.sub!(/^\s*please\ see(\ the)?\ notes(.*?)$/i, "\n" + notelog) if notelog
|
83
|
+
message.sub!(/^\s*please\ see(\ the)?\ change(.*?)$/i, "\n" + changelog) if changelog
|
84
|
+
|
85
|
+
template = message.dup
|
86
|
+
|
87
|
+
template.scan(/\$(\w+?)\$/m) do |key|
|
88
|
+
#key = key.strip
|
89
|
+
name = $1.strip #key[1..-1]
|
90
|
+
if metadata.respond_to?(name.downcase)
|
91
|
+
value = metadata.send(name.downcase)
|
92
|
+
message.gsub!("$#{name}$", value.to_s.strip)
|
93
|
+
else
|
94
|
+
puts "Warning: Unknown project metadata field -- #{name}."
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
message.gsub!(/(^|[ ])[$].*?(?=[ ]|$)/,'') # remove unused vars
|
99
|
+
message.gsub!(/\n\s*\n\s*\n/m,"\n\n") # remove any triple blank lines
|
100
|
+
message.rstrip!
|
101
|
+
|
102
|
+
message = "\n" + message
|
103
|
+
|
104
|
+
return message
|
105
|
+
end
|
106
|
+
|
107
|
+
#
|
108
|
+
|
109
|
+
def unfold_paragraphs(string)
|
110
|
+
blank = false
|
111
|
+
text = ''
|
112
|
+
string.split(/\n/).each do |line|
|
113
|
+
if /\S/ !~ line
|
114
|
+
text << "\n\n"
|
115
|
+
blank = true
|
116
|
+
else
|
117
|
+
if /^(\s+|[*])/ =~ line
|
118
|
+
text << (line.rstrip + "\n")
|
119
|
+
else
|
120
|
+
text << (line.rstrip + " ")
|
121
|
+
end
|
122
|
+
blank = false
|
123
|
+
end
|
124
|
+
end
|
125
|
+
return text
|
126
|
+
end
|
127
|
+
|
128
|
+
|
129
|
+
def to_s
|
130
|
+
message
|
131
|
+
end
|
132
|
+
|
133
|
+
end
|
134
|
+
|
135
|
+
end
|
136
|
+
|
data/lib/reap/application.rb
CHANGED
data/lib/reap/default.yaml
CHANGED
@@ -1,16 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
template: '{ANNOUNCE}{,.txt}' # Announcement template file glob.
|
4
|
-
mail_to: rubytalk@ruby-lange.org # Email address(es) to send announcemnt.
|
5
|
-
mail_from: #{metadata.email} # Message FROM address.
|
6
|
-
subject: "%s v%s released" # Subject of email message. Sprintf'd against name and version.
|
1
|
+
email:
|
2
|
+
server: nil # Email server to route message.
|
7
3
|
account: #{metadata.email} # Email account name [email].
|
8
|
-
domain: rubyforge.org # Your domain. (Not sure why one needs this for an email.)
|
9
|
-
server: smtp.goolge.com # Email server to route message.
|
10
4
|
port: 25 # Email server's port, if not secure.
|
11
|
-
port_secure: 465 # Email server's port, if secure.
|
12
5
|
secure: false # Uses TLS security, true or false?
|
13
6
|
login: plain # Login type: plain, cram_md5 or login.
|
7
|
+
domain: rubyforge.org # Your domain. (Not sure why one needs this for an email.)
|
8
|
+
from: #{metadata.email} # Message FROM address.
|
9
|
+
to: #{metadata.email} # Email address(es) to send announcemnt.
|
10
|
+
|
11
|
+
announce:
|
12
|
+
subject: "%s v%s released" # Subject of email message. Sprintf'd against name and version.
|
13
|
+
template: '{ANNOUNCE}{,.txt}' # Announcement template file glob.
|
14
14
|
cutoff: 30 # How many lines of changelog to provide.
|
15
15
|
|
16
16
|
check:
|
@@ -47,8 +47,8 @@
|
|
47
47
|
exclude: [.svn, scrap] # Used as defaults for creating .rsync-filter (after that edit .rsync-filter)
|
48
48
|
|
49
49
|
rdoc:
|
50
|
-
template:
|
51
|
-
output: doc
|
50
|
+
template: ~ # Template to use (defaults to ENV['RDOC_TEMPLATE'] or 'html'
|
51
|
+
output: doc/rdoc # Where to save rdoc files.
|
52
52
|
main: 'README{,.txt}' # Main file (pattern).
|
53
53
|
inline: true # Inline source?
|
54
54
|
merge: true # Merge code?
|
@@ -58,7 +58,7 @@
|
|
58
58
|
targets: ~ # If you need more then one rdoc set, use targets.
|
59
59
|
|
60
60
|
ri:
|
61
|
-
output: ri
|
61
|
+
output: doc/ri # Where to save ri files.
|
62
62
|
include: ~ # Defaults to metadata.loadpath.
|
63
63
|
exclude: [] # Paths to specifically exclude.
|
64
64
|
|