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/forge/reference/ftptools.rb
DELETED
@@ -1,139 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
# = Tools for FTP uploading.
|
4
|
-
#
|
5
|
-
# This file is still under development and is not released for general
|
6
|
-
# use.
|
7
|
-
|
8
|
-
require 'date'
|
9
|
-
require 'parsedate'
|
10
|
-
require 'net/ftp'
|
11
|
-
|
12
|
-
module Rake # :nodoc:
|
13
|
-
|
14
|
-
####################################################################
|
15
|
-
# <b>Note:</b> <em> Not released for general use.</em>
|
16
|
-
class FtpFile
|
17
|
-
attr_reader :name, :size, :owner, :group, :time
|
18
|
-
|
19
|
-
def self.date
|
20
|
-
@date_class ||= Date
|
21
|
-
end
|
22
|
-
|
23
|
-
def initialize(path, entry)
|
24
|
-
@path = path
|
25
|
-
@mode, line, @owner, @group, size, d1, d2, d3, @name = entry.split(' ')
|
26
|
-
@size = size.to_i
|
27
|
-
@time = determine_time(d1, d2, d3)
|
28
|
-
end
|
29
|
-
|
30
|
-
def path
|
31
|
-
File.join(@path, @name)
|
32
|
-
end
|
33
|
-
|
34
|
-
def directory?
|
35
|
-
@mode[0] == ?d
|
36
|
-
end
|
37
|
-
|
38
|
-
def mode
|
39
|
-
parse_mode(@mode)
|
40
|
-
end
|
41
|
-
|
42
|
-
def symlink?
|
43
|
-
@mode[0] == ?l
|
44
|
-
end
|
45
|
-
|
46
|
-
private # --------------------------------------------------------
|
47
|
-
|
48
|
-
def parse_mode(m)
|
49
|
-
result = 0
|
50
|
-
(1..9).each do |i|
|
51
|
-
result = 2*result + ((m[i]==?-) ? 0 : 1)
|
52
|
-
end
|
53
|
-
result
|
54
|
-
end
|
55
|
-
|
56
|
-
def determine_time(d1, d2, d3)
|
57
|
-
elements = ParseDate.parsedate("#{d1} #{d2} #{d3}")
|
58
|
-
if elements[0].nil?
|
59
|
-
today = self.class.date.today
|
60
|
-
if elements[1] > today.month
|
61
|
-
elements[0] = today.year - 1
|
62
|
-
else
|
63
|
-
elements[0] = today.year
|
64
|
-
end
|
65
|
-
end
|
66
|
-
elements = elements.collect { |el| el.nil? ? 0 : el }
|
67
|
-
Time.mktime(*elements[0,7])
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
####################################################################
|
72
|
-
# Manage the uploading of files to an FTP account.
|
73
|
-
class FtpUploader
|
74
|
-
|
75
|
-
# Log uploads to standard output when true.
|
76
|
-
attr_accessor :verbose
|
77
|
-
|
78
|
-
class << FtpUploader
|
79
|
-
# Create an uploader and pass it to the given block as +up+.
|
80
|
-
# When the block is complete, close the uploader.
|
81
|
-
def connect(path, host, account, password)
|
82
|
-
up = self.new(path, host, account, password)
|
83
|
-
begin
|
84
|
-
yield(up)
|
85
|
-
ensure
|
86
|
-
up.close
|
87
|
-
end
|
88
|
-
end
|
89
|
-
end
|
90
|
-
|
91
|
-
# Create an FTP uploader targetting the directory +path+ on +host+
|
92
|
-
# using the given account and password. +path+ will be the root
|
93
|
-
# path of the uploader.
|
94
|
-
def initialize(path, host, account, password)
|
95
|
-
@created = Hash.new
|
96
|
-
@path = path
|
97
|
-
@ftp = Net::FTP.new(host, account, password)
|
98
|
-
makedirs(@path)
|
99
|
-
@ftp.chdir(@path)
|
100
|
-
end
|
101
|
-
|
102
|
-
# Create the directory +path+ in the uploader root path.
|
103
|
-
def makedirs(path)
|
104
|
-
route = []
|
105
|
-
File.split(path).each do |dir|
|
106
|
-
route << dir
|
107
|
-
current_dir = File.join(route)
|
108
|
-
if @created[current_dir].nil?
|
109
|
-
@created[current_dir] = true
|
110
|
-
puts "Creating Directory #{current_dir}" if @verbose
|
111
|
-
@ftp.mkdir(current_dir) rescue nil
|
112
|
-
end
|
113
|
-
end
|
114
|
-
end
|
115
|
-
|
116
|
-
# Upload all files matching +wildcard+ to the uploader's root
|
117
|
-
# path.
|
118
|
-
def upload_files(wildcard)
|
119
|
-
Dir[wildcard].each do |fn|
|
120
|
-
upload(fn)
|
121
|
-
end
|
122
|
-
end
|
123
|
-
|
124
|
-
# Close the uploader.
|
125
|
-
def close
|
126
|
-
@ftp.close
|
127
|
-
end
|
128
|
-
|
129
|
-
private # --------------------------------------------------------
|
130
|
-
|
131
|
-
# Upload a single file to the uploader's root path.
|
132
|
-
def upload(file)
|
133
|
-
puts "Uploading #{file}" if @verbose
|
134
|
-
dir = File.dirname(file)
|
135
|
-
makedirs(dir)
|
136
|
-
@ftp.putbinaryfile(file, file) unless File.directory?(file)
|
137
|
-
end
|
138
|
-
end
|
139
|
-
end
|