reap 6.0.2 → 9.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +6 -0
- data/COPYING +666 -395
- data/MANIFEST +139 -0
- data/NOTES +12 -0
- data/README +19 -163
- data/bin/reap-announce +7 -0
- data/bin/reap-check-load +8 -0
- data/bin/reap-check-syntax +7 -0
- data/bin/reap-clean +7 -0
- data/bin/reap-clobber +7 -0
- data/bin/reap-doc +7 -0
- data/bin/reap-doc-rdoc +7 -0
- data/bin/reap-doc-ri +7 -0
- data/bin/reap-init +69 -0
- data/bin/reap-inspect +7 -0
- data/bin/reap-install +8 -0
- data/bin/reap-install-gem +8 -0
- data/bin/reap-log +7 -0
- data/bin/reap-log-changes +8 -0
- data/bin/reap-log-notes +8 -0
- data/bin/reap-make +7 -0
- data/bin/reap-make-clean +7 -0
- data/bin/reap-make-distclean +7 -0
- data/bin/reap-make-extconf +7 -0
- data/bin/reap-make-static +8 -0
- data/bin/reap-package +8 -0
- data/bin/reap-package-gem +7 -0
- data/bin/reap-package-tgz +7 -0
- data/bin/reap-package-zip +7 -0
- data/bin/reap-prepare +7 -0
- data/bin/reap-publish +7 -0
- data/bin/reap-release +7 -0
- data/bin/reap-scaffold +8 -0
- data/bin/reap-scm-branch +7 -0
- data/bin/reap-scm-tag +7 -0
- data/bin/reap-spec +7 -0
- data/bin/reap-spec-doc +8 -0
- data/bin/reap-stamp +7 -0
- data/bin/reap-stats +7 -0
- data/bin/reap-test +7 -0
- data/bin/reap-test-cross +7 -0
- data/bin/reap-test-load +9 -0
- data/bin/reap-test-solo +7 -0
- data/bin/reap-uninstall +7 -0
- data/bin/reap-uninstall-gem +7 -0
- data/data/reap/base/CHANGES +19 -0
- data/data/reap/base/COPYING +674 -0
- data/data/reap/base/NOTES +12 -0
- data/data/reap/base/README +8 -0
- data/data/reap/build/rake/Rakefile +130 -0
- data/{forge/reference/installers → data/reap/build/rake}/setup.rb +155 -97
- data/data/reap/build/rake-lite/install.rb +79 -0
- data/data/reap/build/tasks/task/rdoc +211 -0
- data/data/reap/{setup.rb → build/tasks/task/setup} +248 -200
- data/data/reap/build/tasks/task/test +38 -0
- data/data/reap/init/meta/project.yaml +21 -0
- data/demo/README +15 -0
- data/demo/lib/foo/foo.rb +7 -0
- data/demo/meta/VERSION +1 -0
- data/demo/meta/project.yaml +21 -0
- data/lib/reap/application.rb +80 -0
- data/lib/reap/default.yaml +77 -0
- data/lib/reap/extensions/array.rb +50 -0
- data/lib/reap/extensions/hash.rb +63 -0
- data/lib/reap/extensions/string.rb +31 -0
- data/lib/reap/extensions.rb +6 -0
- data/lib/reap/iobject.rb +264 -0
- data/lib/reap/manager/announce.rb +193 -0
- data/lib/reap/manager/check.rb +109 -0
- data/lib/reap/manager/clean.rb +58 -0
- data/lib/reap/manager/gem.rb +200 -0
- data/lib/reap/manager/html.rb +69 -0
- data/lib/reap/manager/log.rb +214 -0
- data/lib/reap/manager/make.rb +109 -0
- data/lib/reap/manager/pack.rb +232 -0
- data/lib/reap/manager/publish.rb +72 -0
- data/lib/reap/manager/rdoc.rb +194 -0
- data/lib/reap/manager/release.rb +78 -0
- data/lib/reap/manager/rubyforge.rb +44 -0
- data/lib/reap/manager/scaffold.rb +138 -0
- data/lib/reap/manager/scm.rb +66 -0
- data/lib/reap/manager/site.rb +27 -0
- data/lib/reap/manager/spec.rb +94 -0
- data/lib/reap/manager/stats.rb +145 -0
- data/lib/reap/manager/svn.rb +76 -0
- data/lib/reap/manager/test.rb +389 -0
- data/lib/reap/manager.rb +74 -0
- data/lib/reap/metadata.rb +603 -0
- data/lib/reap/project.rb +165 -0
- data/lib/reap/settings.rb +67 -0
- data/lib/reap/systems/rubyforge.rb +737 -0
- data/lib/reap/systems/subversion.rb +333 -0
- data/lib/reap/utilities/fileutils.rb +304 -0
- data/lib/reap/utilities/netutils.rb +221 -0
- data/lib/reap/utilities/setuputils.rb +124 -0
- data/lib/reap/utilities/shellutils.rb +175 -0
- data/log/Changelog.txt +107 -0
- data/log/FIXME.txt +25 -0
- data/log/TODO.txt +72 -0
- data/meta/VERSION +1 -0
- data/meta/description +4 -0
- data/meta/project.yaml +20 -0
- data/task/man +14 -0
- data/task/rdoc +20 -0
- data/{data/reap/scaffold/standard/setup.rb → task/setup} +248 -200
- metadata +225 -153
- data/ProjectInfo +0 -105
- data/bin/reap +0 -5
- data/bin/rubytest +0 -5
- data/data/reap/install.rb +0 -62
- data/data/reap/scaffold/standard/COPYING +0 -403
- data/data/reap/scaffold/standard/ChangeLog +0 -0
- data/data/reap/scaffold/standard/INSTALL +0 -14
- data/data/reap/scaffold/standard/ProjectInfo +0 -77
- data/data/reap/scaffold/standard/README +0 -3
- data/data/reap/scaffold/standard/Rakefile +0 -10
- data/data/reap/scaffold/standard/TODO +0 -0
- data/data/reap/scaffold/subversion/trunk/COPYING +0 -403
- data/data/reap/scaffold/subversion/trunk/ChangeLog +0 -0
- data/data/reap/scaffold/subversion/trunk/INSTALL +0 -14
- data/data/reap/scaffold/subversion/trunk/ProjectInfo +0 -76
- data/data/reap/scaffold/subversion/trunk/README +0 -3
- data/data/reap/scaffold/subversion/trunk/Rakefile +0 -10
- data/data/reap/scaffold/subversion/trunk/TODO +0 -0
- data/data/reap/scaffold/subversion/trunk/setup.rb +0 -1568
- data/forge/ProjectInfo +0 -38
- data/forge/ProjectInfo.rb +0 -76
- data/forge/TODO +0 -10
- data/forge/installer.rb +0 -250
- data/forge/reference/Rakefile +0 -124
- data/forge/reference/Rakefile.htm +0 -69
- data/forge/reference/aRakefile +0 -60
- data/forge/reference/compositepublisher.rb +0 -24
- data/forge/reference/ftptools.rb +0 -139
- data/forge/reference/installers/package.rb +0 -629
- data/forge/reference/license-each.rb +0 -85
- data/forge/reference/publisher.rb +0 -75
- data/forge/reference/rubyforge.rb +0 -247
- data/forge/reference/rubyforgepublisher.rb +0 -18
- data/forge/reference/sshpublisher.rb +0 -47
- data/forge/reference/suby-cvs.rb +0 -46
- data/forge/scaffold.rb +0 -126
- data/forge/unit_runner/README +0 -6
- data/forge/unit_runner/commentrunner.rb +0 -62
- data/forge/unit_runner/cunit.rb +0 -17
- data/forge/unit_runner/forkedrunner.rb +0 -91
- data/forge/unit_runner/sample.rb +0 -16
- data/lib/reap/bin/reap.rb +0 -230
- data/lib/reap/bin/rubytest.rb +0 -53
- data/lib/reap/class/announce.rb +0 -220
- data/lib/reap/class/doap.rb +0 -80
- data/lib/reap/class/extest.rb +0 -146
- data/lib/reap/class/filer.rb +0 -62
- data/lib/reap/class/manifest.rb +0 -68
- data/lib/reap/class/package.rb +0 -576
- data/lib/reap/class/publish.rb +0 -152
- data/lib/reap/class/rdoc.rb +0 -123
- data/lib/reap/class/test.rb +0 -264
- data/lib/reap/projectinfo.rb +0 -208
- data/lib/reap/rake.rb +0 -42
- data/lib/reap/reap.rb +0 -89
- data/lib/reap/tasks.rb +0 -756
- data/lib/reap/taskutils.rb +0 -122
- data/note/LATEST +0 -44
- data/note/doap.xml +0 -28
- data/note/history/Rakefile-0.1 +0 -308
- data/sample/ProjectInfo +0 -96
- data/sample/Rakefile +0 -9
- data/sample/Reapfile +0 -11
- data/sample/task/demo.rb +0 -15
- data/setup.rb +0 -1568
- data/web/ProjectInfo.html +0 -75
- data/web/images/grape.jpg +0 -0
- data/web/index.html +0 -312
data/lib/reap/taskutils.rb
DELETED
@@ -1,122 +0,0 @@
|
|
1
|
-
require 'fileutils'
|
2
|
-
|
3
|
-
# Extensions to time to allow comparisons
|
4
|
-
# with an early time class. This was borrowed from Rake.
|
5
|
-
# --
|
6
|
-
# TODO Ultimately this might be able to be replaced
|
7
|
-
# by -Infinity (see Infinity class in development folder).
|
8
|
-
#++
|
9
|
-
|
10
|
-
class Time
|
11
|
-
require 'singleton'
|
12
|
-
|
13
|
-
# EarlyTime is a fake timestamp that occurs _before_
|
14
|
-
# any other time value.
|
15
|
-
class Earlier
|
16
|
-
include Comparable
|
17
|
-
include Singleton
|
18
|
-
|
19
|
-
def <=>(other)
|
20
|
-
-1
|
21
|
-
end
|
22
|
-
|
23
|
-
def to_s
|
24
|
-
"<EARLY TIME>"
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
EARLY = Earlier.instance
|
29
|
-
|
30
|
-
alias_method :rake_original_time_compare, :<=>
|
31
|
-
|
32
|
-
def <=>(other)
|
33
|
-
if Earlier === other
|
34
|
-
- other.<=>(self)
|
35
|
-
else
|
36
|
-
rake_original_time_compare(other)
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
# Reap module holds the TaskUtils.
|
42
|
-
|
43
|
-
module Reap
|
44
|
-
|
45
|
-
# Support module for task development.
|
46
|
-
|
47
|
-
module TaskUtils
|
48
|
-
|
49
|
-
# Useful for populating a class.
|
50
|
-
# Maybe this should have a different name --perhaps
|
51
|
-
# just use Facets #set_with.
|
52
|
-
|
53
|
-
def initialize( data={} )
|
54
|
-
data.each do |k,v|
|
55
|
-
send( "#{k}=", v ) if respond_to?("#{k}=")
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
# OpenCascade interface to teh ProjectInfo file.
|
60
|
-
|
61
|
-
def master
|
62
|
-
@taskutils_master ||= ProjectInfo.instance.to_opencascade
|
63
|
-
end
|
64
|
-
|
65
|
-
# If +name+ is a hash this will split the name => preq parameter
|
66
|
-
# into [name, preq], otherwise it just return +name+.
|
67
|
-
# Teh hash is expected to have only one element.
|
68
|
-
|
69
|
-
def preq_from_name( name )
|
70
|
-
if Hash === name
|
71
|
-
#a = [name.keys, name.values].flatten
|
72
|
-
return *(name.to_a.flatten)
|
73
|
-
else
|
74
|
-
name
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
78
|
-
# Output and then shellout a command. Doesn't actually
|
79
|
-
# shellout if $PRETEND is set.
|
80
|
-
|
81
|
-
def sh( arg )
|
82
|
-
tell arg
|
83
|
-
system arg unless $PRETEND
|
84
|
-
end
|
85
|
-
|
86
|
-
# Convenience method for puts. Using this instead of
|
87
|
-
# puts may help beautify or redirect output in
|
88
|
-
# future versions.
|
89
|
-
|
90
|
-
def tell( statement )
|
91
|
-
puts statement
|
92
|
-
end
|
93
|
-
|
94
|
-
# Conveniene method to get simple console reply.
|
95
|
-
|
96
|
-
def ask( question, answers=nil )
|
97
|
-
print "#{question}"
|
98
|
-
print " [#{answers}] " if answers
|
99
|
-
until inp = $stdin.gets[0,1] ; sleep 1 ; end ; puts
|
100
|
-
inp
|
101
|
-
end
|
102
|
-
|
103
|
-
# Makes sure there is a setup.rb file in the
|
104
|
-
# project directory.
|
105
|
-
|
106
|
-
def provide_setup_rb( trunk='.' )
|
107
|
-
setup_rb_file = File.join( trunk, 'setup.rb' )
|
108
|
-
return true if File.exists?( setup_rb_file )
|
109
|
-
if dir = Gem.gempath('reap')
|
110
|
-
src = File.join( dir, 'data', 'reap', 'setup.rb' )
|
111
|
-
else
|
112
|
-
src = File.join( Config::CONFIG['datadir'], 'reap', 'setup.rb' )
|
113
|
-
end
|
114
|
-
if File.exists?( src )
|
115
|
-
FileUtils.cp( src, trunk )
|
116
|
-
true
|
117
|
-
end
|
118
|
-
end
|
119
|
-
|
120
|
-
end
|
121
|
-
|
122
|
-
end
|
data/note/LATEST
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
|
2
|
-
One hop, a skip and a jump. In just suca a fashion we're on to
|
3
|
-
the next major veriosn of Reap. Reap 6 has now reached a whole
|
4
|
-
new level of elegance and capability. The core of the system has
|
5
|
-
been completely rewritten, thanks to lessons learned from the
|
6
|
-
previous incarnations and honoring the defacto standard of Rake's
|
7
|
-
task definitions, a Reap task is now easily defined like so:
|
8
|
-
|
9
|
-
module Tasks
|
10
|
-
|
11
|
-
def footask( name, &data )
|
12
|
-
|
13
|
-
desc "Describing a foo task"
|
14
|
-
|
15
|
-
task name do
|
16
|
-
data = data.to_openobject
|
17
|
-
puts "Doing what a foo task #{data.does}!"
|
18
|
-
end
|
19
|
-
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
23
|
-
|
24
|
-
See the resemblance? Does Reap require Rake? No! Reap has it's
|
25
|
-
own task system that work's like Rake's --provided by Facets'
|
26
|
-
taskable.rb library. And you can use Reap much like you'd use
|
27
|
-
Rake. Indeed, one can resuse Reap's built-in tasks without
|
28
|
-
even setting up a ProjectInfo file. In a Reapfile:
|
29
|
-
|
30
|
-
task_footask 'footask' do |data|
|
31
|
-
data.does = 'does'
|
32
|
-
end
|
33
|
-
|
34
|
-
Yep. You can do that. Of course why you would want to forgo
|
35
|
-
the beauty of the ProjectInfo file and this gorgeous solution?
|
36
|
-
|
37
|
-
footask: !!footask
|
38
|
-
does: 'does'
|
39
|
-
|
40
|
-
That's something for your own conscious to wrestle ;)
|
41
|
-
|
42
|
-
Enjoy,
|
43
|
-
T.
|
44
|
-
|
data/note/doap.xml
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
<Project xmlns="http://usefulinc.com/ns/doap#"
|
2
|
-
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
3
|
-
xmlns:foaf="http://xmlns.com/foaf/0.1/">
|
4
|
-
<name>Reap</name>
|
5
|
-
<shortname>reap</shortname>
|
6
|
-
<homepage rdf:resource="http://reap.rubyforge.org" />
|
7
|
-
<wiki rdf:resource="" />
|
8
|
-
<created>2004-04-01</created>
|
9
|
-
<shortdesc xml:lang="en">
|
10
|
-
The Flexible Ruby Project Management Assistant
|
11
|
-
</shortdesc>
|
12
|
-
<description xml:lang="en">
|
13
|
-
Reap comprises a set of tasks commonly needed by
|
14
|
-
Ruby package developers/deployers, such as
|
15
|
-
testing, packaging, releasing, etc. You can also
|
16
|
-
use Reap to create your own custom tasks. Reap
|
17
|
-
utilizes a YAML configuration file to harvest
|
18
|
-
common project information, significantly
|
19
|
-
simplifying these chores.
|
20
|
-
</description>
|
21
|
-
<maintainer>
|
22
|
-
<foaf:Person>
|
23
|
-
<foaf:name>Thomas Sawyer</foaf:name>
|
24
|
-
<foaf:email>transfire@gmail.com</foaf:name>
|
25
|
-
<foaf:homepage rdf:resource="http://reap.rubyforge.org" />
|
26
|
-
</foaf:Person>
|
27
|
-
</maintainer>
|
28
|
-
</Project>
|
data/note/history/Rakefile-0.1
DELETED
@@ -1,308 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
PKG_TITLE = 'WhiteCloth'
|
4
|
-
PKG_NAME = 'whitecloth'
|
5
|
-
PKG_VERSION = '1'
|
6
|
-
PKG_AUTHOR = 'Thomas Sawyer'
|
7
|
-
PKG_EMAIL = 'transami@runbox.com'
|
8
|
-
PKG_SUMMARY = 'WhiteCloth is an implementation of ArtML'
|
9
|
-
PKG_DESCRIPTION = 'WhiteCloth is a Ruby implementation of ArtML'
|
10
|
-
|
11
|
-
# site info
|
12
|
-
# remark out if you don't need
|
13
|
-
PKG_HOMEPAGE = 'http://whitecloth.rubyforge.org'
|
14
|
-
PKG_RUBYFORGE_PROJECT = 'whitecloth'
|
15
|
-
PKG_RUBYFORGE_PASS = nil
|
16
|
-
|
17
|
-
# all package files
|
18
|
-
PKG_FILES = [ 'lib/**/*', 'test/**/*', 'samples/**/*', 'doc/**/*', '[A-Z]*', 'Rakefile' ]
|
19
|
-
|
20
|
-
# rdoc
|
21
|
-
RDOC_TITLE = PKG_TITLE
|
22
|
-
RDOC_DIR = 'doc'
|
23
|
-
RDOC_TEMPLATE = 'kilmer'
|
24
|
-
RDOC_OPTIONS = ''
|
25
|
-
RDOC_INCLUDE = [ 'VERSION', 'README', 'CHANGELOG', 'TODO', 'COPYING', 'lib/**/*.rb', 'bin/**/*.rb' ]
|
26
|
-
RDOC_EXCLUDE = []
|
27
|
-
|
28
|
-
# include in distribution
|
29
|
-
PKG_DIST_DIRS = [ 'bin', 'lib', 'test', 'samples' ]
|
30
|
-
PKG_DIST_FILES = [ 'README', 'TODO', 'CHANGELOG', 'VERSION', 'LICENSE', 'Rakefile' ]
|
31
|
-
|
32
|
-
# tests
|
33
|
-
PKG_TEST_DIR = 'test'
|
34
|
-
PKG_TEST_FILES = [ 'test/*_test.rb', 'test/**/*_test.rb' ]
|
35
|
-
|
36
|
-
=begin
|
37
|
-
# library files for manual install
|
38
|
-
PKG_LIB_DIR = 'lib'
|
39
|
-
PKG_LIB_MKDIRS = '**/*/'
|
40
|
-
PKG_LIB_FILES = [ '**/*.rb', '**/*.yaml' ]
|
41
|
-
PKG_LIB_DEPRECATE = []
|
42
|
-
|
43
|
-
# binary files for manual install
|
44
|
-
PKG_BIN_DIR = 'bin'
|
45
|
-
PKG_BIN_FILES = '**/*'
|
46
|
-
PKG_BIN_DEPRECATE = []
|
47
|
-
=end
|
48
|
-
|
49
|
-
#***************************************************************************
|
50
|
-
# The PackMule Rakefile v0.1
|
51
|
-
# PackMule can run tests, build packages and gems, manually install,
|
52
|
-
# generate rdocs, and publish them. CVS support might be added later.
|
53
|
-
#
|
54
|
-
# In general, layout your project directory as follows:
|
55
|
-
# - lib/
|
56
|
-
# - lib/#{lib_name}/ if you need a lib dir
|
57
|
-
# - bin/
|
58
|
-
# - test/
|
59
|
-
# - demo/ -or- examples/ -or- samples/
|
60
|
-
# - doc/ -and;or- rdoc/
|
61
|
-
# The test dir can have subdirs, but tests should be named
|
62
|
-
# like '#{name}_test.rb' or 'test_#{name}.rb'.
|
63
|
-
#
|
64
|
-
# Then use the Rake.yaml config file designed for this form.
|
65
|
-
# To get a blank config for this form type:
|
66
|
-
# > rake form
|
67
|
-
# This will send the form to stdout. There may be a line like
|
68
|
-
# "(in ...)" at the beginning, just remove it or remark it.
|
69
|
-
#***************************************************************************
|
70
|
-
|
71
|
-
require 'rake'
|
72
|
-
require 'rubygems'
|
73
|
-
require 'rake/testtask'
|
74
|
-
require 'rake/rdoctask'
|
75
|
-
require 'rake/packagetask'
|
76
|
-
require 'rake/gempackagetask'
|
77
|
-
require 'rake/contrib/rubyforgepublisher'
|
78
|
-
|
79
|
-
#################################################
|
80
|
-
# load config from Rake.yaml and make constants #
|
81
|
-
#################################################
|
82
|
-
#YAML::load( File.open('Rake.yaml') ).each{|c,v| self.class.const_set(c,v)}
|
83
|
-
|
84
|
-
|
85
|
-
##
|
86
|
-
# = Default Task
|
87
|
-
##
|
88
|
-
|
89
|
-
desc "Default Task (test)"
|
90
|
-
task :default => [ :test ]
|
91
|
-
|
92
|
-
|
93
|
-
##
|
94
|
-
# = Run Unit Tests
|
95
|
-
##
|
96
|
-
|
97
|
-
Rake::TestTask.new("test") { |t|
|
98
|
-
#t.desc "Run all tests"
|
99
|
-
t.libs << PKG_TEST_DIR
|
100
|
-
PKG_TEST_FILES.each { |pat| t.pattern = pat }
|
101
|
-
t.verbose = true
|
102
|
-
}
|
103
|
-
|
104
|
-
|
105
|
-
##
|
106
|
-
# = Genereate RDoc Documentation
|
107
|
-
##
|
108
|
-
|
109
|
-
Rake::RDocTask.new { |rdoc|
|
110
|
-
rdoc.rdoc_dir = RDOC_DIR
|
111
|
-
rdoc.template = RDOC_TEMPLATE
|
112
|
-
rdoc.title = RDOC_TITLE
|
113
|
-
rdoc.options << '--line-numbers --inline-source ' + RDOC_OPTIONS
|
114
|
-
rdoc.rdoc_files.include(*RDOC_INCLUDE)
|
115
|
-
rdoc.rdoc_files.exclude(*RDOC_EXCLUDE)
|
116
|
-
rdoc.rdoc_files.delete_if { |f| ! File.exist?(f) }
|
117
|
-
}
|
118
|
-
|
119
|
-
|
120
|
-
##
|
121
|
-
# = Publish Documentation
|
122
|
-
##
|
123
|
-
|
124
|
-
# Publish documentation
|
125
|
-
#desc "Publish the API documentation"
|
126
|
-
#task :pdoc => [:rdoc] do
|
127
|
-
# Rake::SshDirPublisher.new("david@hunter.5th.dk", "sites/rubyonrails.org/ar", "doc").upload
|
128
|
-
#end
|
129
|
-
|
130
|
-
if PKG_RUBYFORGE_PROJECT
|
131
|
-
desc "Publish to RubyForge"
|
132
|
-
task :rubyforge do
|
133
|
-
Rake::RubyForgePublisher.new(PKG_RUBYFORGE_PROJECT, PKG_RUBYFORGE_PASS).upload
|
134
|
-
end
|
135
|
-
end
|
136
|
-
|
137
|
-
|
138
|
-
##
|
139
|
-
# = Create Compressed Packages
|
140
|
-
##
|
141
|
-
|
142
|
-
dist_dirs = PKG_DIST_DIRS
|
143
|
-
|
144
|
-
spec = Gem::Specification.new do |s|
|
145
|
-
s.name = PKG_NAME
|
146
|
-
s.version = PKG_VERSION
|
147
|
-
s.summary = PKG_SUMMARY
|
148
|
-
s.description = PKG_DESCRIPTION
|
149
|
-
|
150
|
-
s.files = PKG_DIST_FILES
|
151
|
-
dist_dirs.each do |dir|
|
152
|
-
s.files.concat Dir.glob( "#{dir}/**/*" ).delete_if { |item| item.include?( "CVS" ) }
|
153
|
-
end
|
154
|
-
#s.files.delete "test/fixtures/fixture_database.sqlite"
|
155
|
-
s.require_path = 'lib'
|
156
|
-
s.autorequire = '#{PKG_NAME}'
|
157
|
-
s.has_rdoc = true
|
158
|
-
s.author = PKG_AUTHOR
|
159
|
-
s.email = PKG_EMAIL
|
160
|
-
s.homepage = PKG_HOMEPAGE if PKG_HOMEPAGE
|
161
|
-
s.rubyforge_project = PKG_RUBYFORGE_PROJECT if PKG_RUBYFORGE_PROJECT
|
162
|
-
end
|
163
|
-
|
164
|
-
Rake::GemPackageTask.new(spec) do |p|
|
165
|
-
p.gem_spec = spec
|
166
|
-
p.need_tar = true
|
167
|
-
p.need_zip = true
|
168
|
-
end
|
169
|
-
|
170
|
-
|
171
|
-
##
|
172
|
-
# = Line Count
|
173
|
-
##
|
174
|
-
|
175
|
-
desc "Line Count"
|
176
|
-
task :lines do
|
177
|
-
lines = 0
|
178
|
-
codelines = 0
|
179
|
-
Dir.foreach("lib/#{PKG_NAME}") { |file_name|
|
180
|
-
next unless file_name =~ /.*rb/
|
181
|
-
|
182
|
-
f = File.open("lib/#{PKG_NAME}/" + file_name)
|
183
|
-
|
184
|
-
while line = f.gets
|
185
|
-
lines += 1
|
186
|
-
next if line =~ /^\s*$/
|
187
|
-
next if line =~ /^\s*#/
|
188
|
-
codelines += 1
|
189
|
-
end
|
190
|
-
}
|
191
|
-
puts "Lines #{lines}, LOC #{codelines}"
|
192
|
-
end
|
193
|
-
|
194
|
-
|
195
|
-
=begin
|
196
|
-
##
|
197
|
-
# = Manual Install
|
198
|
-
##
|
199
|
-
|
200
|
-
desc "Manual Installation"
|
201
|
-
task :install do
|
202
|
-
|
203
|
-
# install
|
204
|
-
# this was adapted from active record's install.rb
|
205
|
-
# by way of rdoc's install.rb
|
206
|
-
# by way of Log4r's install.rb
|
207
|
-
# with some modifications from ruby-gems' install.rb ;)
|
208
|
-
|
209
|
-
require 'rbconfig'
|
210
|
-
require 'find'
|
211
|
-
require 'ftools'
|
212
|
-
require 'fileutils'
|
213
|
-
|
214
|
-
include Config
|
215
|
-
|
216
|
-
#$sitedir = CONFIG["sitelibdir"]
|
217
|
-
#unless $sitedir
|
218
|
-
# version = CONFIG["MAJOR"] + "." + CONFIG["MINOR"]
|
219
|
-
# $libdir = File.join(CONFIG["libdir"], "ruby", version)
|
220
|
-
#
|
221
|
-
# $sitedir = $:.find {|x| x =~ /site_ruby/ }
|
222
|
-
# if !$sitedir
|
223
|
-
# $sitedir = File.join($libdir, "site_ruby")
|
224
|
-
# elsif $sitedir !~ Regexp.quote(version)
|
225
|
-
# $sitedir = File.join($sitedir, version)
|
226
|
-
# end
|
227
|
-
#end
|
228
|
-
|
229
|
-
$srcdir = CONFIG["srcdir"]
|
230
|
-
$version = CONFIG["MAJOR"]+"."+CONFIG["MINOR"]
|
231
|
-
$libdir = File.join(CONFIG["libdir"], "ruby", $version)
|
232
|
-
$bindir = CONFIG['bindir']
|
233
|
-
$archdir = File.join($libdir, CONFIG["arch"])
|
234
|
-
$sitedir = CONFIG["sitelibdir"]
|
235
|
-
if !$sitedir
|
236
|
-
$sitedir = $:.find {|x| x =~ /site_ruby$/}
|
237
|
-
if !$sitedir
|
238
|
-
$sitedir = File.join($libdir, "site_ruby")
|
239
|
-
elsif $sitedir !~ Regexp.new(Regexp.quote($version))
|
240
|
-
$sitedir = File.join($site_libdir, $version)
|
241
|
-
end
|
242
|
-
end
|
243
|
-
|
244
|
-
# get current dir
|
245
|
-
current_dir = Dir.pwd
|
246
|
-
|
247
|
-
### install lib files
|
248
|
-
|
249
|
-
if FileTest.directory?(PKG_LIB_DIR)
|
250
|
-
|
251
|
-
# change dir to package lib dir
|
252
|
-
Dir.chdir(PKG_LIB_DIR)
|
253
|
-
|
254
|
-
# make lib dirs in ruby sitelibdir
|
255
|
-
makedirs = FileList[*PKG_LIB_MKDIRS].to_a
|
256
|
-
makedirs.each {|f| File::makedirs( File.join( $sitedir, *f.split(/\//) ) ) }
|
257
|
-
|
258
|
-
# deprecated files that should be removed
|
259
|
-
deprecated = FileList[*PKG_LIB_DEPRECATE].to_a
|
260
|
-
|
261
|
-
# files to install in library path
|
262
|
-
files = FileList[*PKG_LIB_FILES].to_a
|
263
|
-
|
264
|
-
# the actual gruntwork
|
265
|
-
File::safe_unlink *deprecated.collect{|f| File.join($sitedir, f.split(/\//))}
|
266
|
-
files.each do |f|
|
267
|
-
File::install(f, File.join($sitedir, *f.split(/\//)), 0644, true)
|
268
|
-
end
|
269
|
-
|
270
|
-
# change dir back
|
271
|
-
Dir.chdir(current_dir)
|
272
|
-
|
273
|
-
end
|
274
|
-
|
275
|
-
### install bin files
|
276
|
-
|
277
|
-
if FileTest.directory?(PKG_BIN_DIR)
|
278
|
-
|
279
|
-
# change dir to package bin dir
|
280
|
-
Dir.chdir(PKG_BIN_DIR)
|
281
|
-
|
282
|
-
is_windows_platform = CONFIG["arch"] =~ /dos|win32/i
|
283
|
-
|
284
|
-
# files to install in bin path
|
285
|
-
files = FileList[*PKG_BIN_FILES].to_a
|
286
|
-
|
287
|
-
# deprecated files that should be removed
|
288
|
-
deprecated = FileList[*PKG_BIN_DEPRECATE].to_a
|
289
|
-
|
290
|
-
# the actual gruntwork
|
291
|
-
File::safe_unlink *deprecated.collect{|f| File.join($bindir, f.split(/\//))}
|
292
|
-
files.each do |f|
|
293
|
-
target = File.join($bindir, *f.split(/\//))
|
294
|
-
File::install(f, target, 0755, true)
|
295
|
-
if is_windows_platform
|
296
|
-
File.open("#{target}.cmd", "w") do |file|
|
297
|
-
file.puts "@ruby #{target} %1 %2 %3 %4 %5 %6 %7 %8 %9"
|
298
|
-
end
|
299
|
-
end
|
300
|
-
end
|
301
|
-
|
302
|
-
# change dir back
|
303
|
-
Dir.chdir(current_dir)
|
304
|
-
|
305
|
-
end
|
306
|
-
=end
|
307
|
-
|
308
|
-
end
|
data/sample/ProjectInfo
DELETED
@@ -1,96 +0,0 @@
|
|
1
|
-
--- %YAML:1.0
|
2
|
-
|
3
|
-
version : 1.0.0
|
4
|
-
status : 'beta'
|
5
|
-
|
6
|
-
title : Reap-Sample
|
7
|
-
name : reap
|
8
|
-
author : Thomas Sawyer
|
9
|
-
created : '2006-06-01'
|
10
|
-
email : &email transfire@gmail.com
|
11
|
-
homepage : "http://reap.rubyforge.org"
|
12
|
-
|
13
|
-
summary : The Flexible Ruby Project Management Assistant
|
14
|
-
|
15
|
-
description: >
|
16
|
-
Reap comprises a set of tasks commonly needed by Ruby package
|
17
|
-
developers/deployers, such as testing, packaging, releasing, etc.
|
18
|
-
You can also use Reap to create your own custom tasks.
|
19
|
-
Reap utilizes a YAML configuration file to harvest common project
|
20
|
-
information, significantly simplifying these chores.
|
21
|
-
|
22
|
-
rubyforge:
|
23
|
-
project : reap
|
24
|
-
username : transami
|
25
|
-
|
26
|
-
#install: !!installer
|
27
|
-
# template: |
|
28
|
-
# bin bin * .
|
29
|
-
# lib lib/reap **/* $name/$version
|
30
|
-
|
31
|
-
#package: !!package
|
32
|
-
# distribute : [ tar.bz2, gem ]
|
33
|
-
# dependencies : [ facets ]
|
34
|
-
# executables : [ reap, rubytest ]
|
35
|
-
# dir: release
|
36
|
-
# exclude:
|
37
|
-
# - dist
|
38
|
-
# - web
|
39
|
-
# - doc/dev
|
40
|
-
# - doc/scrap
|
41
|
-
|
42
|
-
#release: !!release
|
43
|
-
# host : rubyforge.org
|
44
|
-
# username : transami
|
45
|
-
# project : reap
|
46
|
-
# groupid : 811
|
47
|
-
# package : Reap
|
48
|
-
# dir : release
|
49
|
-
|
50
|
-
#publish: !!publish
|
51
|
-
# target : rubyforge
|
52
|
-
# type : web
|
53
|
-
# host : rubyforge.org
|
54
|
-
# username : transami
|
55
|
-
# dir : web
|
56
|
-
|
57
|
-
#rdoc: !!rdoc
|
58
|
-
# dir: 'web/doc/api'
|
59
|
-
# main: README
|
60
|
-
|
61
|
-
ann: !!announce
|
62
|
-
to : transfire@gmail.com # ruby-talk@ruby-lang.org
|
63
|
-
from : *email
|
64
|
-
domain : unit.rubyforge.org
|
65
|
-
server : smtp.gmail.com
|
66
|
-
port : 587
|
67
|
-
account : *email # transfire@gmail.com
|
68
|
-
type : login # cram_md5, plain
|
69
|
-
security : tls # ~, tls, ssl (not working yet)
|
70
|
-
#file : notes/LATEST # which file contains announcement
|
71
|
-
memo :
|
72
|
-
Congragulations! You've given Reap a try! Go ahead and
|
73
|
-
announce it the world!
|
74
|
-
slogan : REAP THE REWARDS!
|
75
|
-
links : []
|
76
|
-
|
77
|
-
doap: !!doap
|
78
|
-
|
79
|
-
loc: !!linecount
|
80
|
-
include: '*'
|
81
|
-
|
82
|
-
# perm: !!perm
|
83
|
-
# filemod: 644
|
84
|
-
# dirmod: 755
|
85
|
-
# user: trans
|
86
|
-
# group: users
|
87
|
-
|
88
|
-
demo: !!demo
|
89
|
-
desc: Give a task an alternate description.
|
90
|
-
message: Hello Baby!
|
91
|
-
|
92
|
-
# mytask: !!custom
|
93
|
-
# desc: This is a test of a cutom task.
|
94
|
-
# task:
|
95
|
-
# puts "Hello Moto!"
|
96
|
-
|
data/sample/Rakefile
DELETED
data/sample/Reapfile
DELETED