reap 4.0 → 4.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/ProjectInfo +18 -6
- data/lib/reap/bin/reap.rb +47 -16
- data/lib/reap/interface/interface.rb +0 -0
- data/lib/reap/interface/rubyforge.rb +247 -0
- data/lib/reap/lint.rb +1 -0
- data/lib/reap/projectinfo.rb +47 -18
- data/lib/reap/reap.rb +0 -0
- data/lib/reap/task/announce.rb +11 -13
- data/lib/reap/task/fileperm.rb +2 -5
- data/lib/reap/task/info.rb +2 -4
- data/lib/reap/task/install.rb +1 -3
- data/lib/reap/task/noop.rb +1 -3
- data/lib/reap/task/package.rb +163 -65
- data/lib/reap/task/publish.rb +2 -4
- data/lib/reap/task/rdoc.rb +1 -3
- data/lib/reap/task/release.rb +273 -0
- data/lib/reap/task/test.rb +19 -5
- data/lib/reap/task/testext.rb +5 -5
- data/lib/reap/task.rb +94 -69
- metadata +70 -256
- data/dev/Rakefile +0 -60
- data/dev/composite_task.rb +0 -27
- data/dev/compositepublisher.rb +0 -24
- data/dev/ftptools.rb +0 -139
- data/dev/license-each.rb +0 -85
- data/dev/publisher.rb +0 -75
- data/dev/rubyforgepublisher.rb +0 -18
- data/dev/sshpublisher.rb +0 -47
- data/dev/suby-cvs.rb +0 -46
- data/dev/template.rb +0 -72
- data/lib/reap/readymade.rb +0 -21
- data/lib/reap/task/webpublish.rb +0 -43
- data/lib/reap/tasks.rb +0 -13
- data/lib/reap/test.rb +0 -138
- data/web/ProjectInfo +0 -57
- data/web/images/appleboy.jpg +0 -0
- data/web/images/grape.jpg +0 -0
- data/web/index.html +0 -124
- data/web/rdoc/classes/Object.html +0 -121
- data/web/rdoc/classes/ProjectInfo.html +0 -207
- data/web/rdoc/classes/ProjectInfo.src/M000094.html +0 -18
- data/web/rdoc/classes/ProjectInfo.src/M000095.html +0 -24
- data/web/rdoc/classes/ProjectInfo.src/M000096.html +0 -22
- data/web/rdoc/classes/ProjectInfo.src/M000097.html +0 -21
- data/web/rdoc/classes/ProjectInfo.src/M000098.html +0 -18
- data/web/rdoc/classes/Reap/Announce.html +0 -262
- data/web/rdoc/classes/Reap/Announce.src/M000030.html +0 -18
- data/web/rdoc/classes/Reap/Announce.src/M000031.html +0 -114
- data/web/rdoc/classes/Reap/Announce.src/M000032.html +0 -46
- data/web/rdoc/classes/Reap/Info.html +0 -176
- data/web/rdoc/classes/Reap/Info.src/M000033.html +0 -18
- data/web/rdoc/classes/Reap/Info.src/M000034.html +0 -17
- data/web/rdoc/classes/Reap/Info.src/M000035.html +0 -18
- data/web/rdoc/classes/Reap/Install.html +0 -193
- data/web/rdoc/classes/Reap/Install.src/M000036.html +0 -18
- data/web/rdoc/classes/Reap/Install.src/M000037.html +0 -20
- data/web/rdoc/classes/Reap/Install.src/M000038.html +0 -26
- data/web/rdoc/classes/Reap/Noop.html +0 -192
- data/web/rdoc/classes/Reap/Noop.src/M000027.html +0 -18
- data/web/rdoc/classes/Reap/Noop.src/M000028.html +0 -17
- data/web/rdoc/classes/Reap/Noop.src/M000029.html +0 -18
- data/web/rdoc/classes/Reap/Package.html +0 -310
- data/web/rdoc/classes/Reap/Package.src/M000055.html +0 -18
- data/web/rdoc/classes/Reap/Package.src/M000056.html +0 -68
- data/web/rdoc/classes/Reap/Package.src/M000057.html +0 -84
- data/web/rdoc/classes/Reap/Package.src/M000058.html +0 -61
- data/web/rdoc/classes/Reap/Perm.html +0 -236
- data/web/rdoc/classes/Reap/Perm.src/M000078.html +0 -18
- data/web/rdoc/classes/Reap/Perm.src/M000079.html +0 -21
- data/web/rdoc/classes/Reap/Perm.src/M000080.html +0 -42
- data/web/rdoc/classes/Reap/Perm.src/M000081.html +0 -26
- data/web/rdoc/classes/Reap/Perm.src/M000082.html +0 -18
- data/web/rdoc/classes/Reap/Publish.html +0 -213
- data/web/rdoc/classes/Reap/Publish.src/M000070.html +0 -18
- data/web/rdoc/classes/Reap/Publish.src/M000071.html +0 -22
- data/web/rdoc/classes/Reap/Publish.src/M000072.html +0 -37
- data/web/rdoc/classes/Reap/RDoc.html +0 -218
- data/web/rdoc/classes/Reap/RDoc.src/M000059.html +0 -18
- data/web/rdoc/classes/Reap/RDoc.src/M000060.html +0 -24
- data/web/rdoc/classes/Reap/RDoc.src/M000061.html +0 -70
- data/web/rdoc/classes/Reap/Task.html +0 -396
- data/web/rdoc/classes/Reap/Task.src/M000039.html +0 -18
- data/web/rdoc/classes/Reap/Task.src/M000040.html +0 -16
- data/web/rdoc/classes/Reap/Task.src/M000041.html +0 -16
- data/web/rdoc/classes/Reap/Task.src/M000042.html +0 -16
- data/web/rdoc/classes/Reap/Task.src/M000043.html +0 -16
- data/web/rdoc/classes/Reap/Task.src/M000044.html +0 -22
- data/web/rdoc/classes/Reap/Task.src/M000045.html +0 -16
- data/web/rdoc/classes/Reap/Task.src/M000046.html +0 -16
- data/web/rdoc/classes/Reap/Task.src/M000047.html +0 -16
- data/web/rdoc/classes/Reap/Task.src/M000048.html +0 -16
- data/web/rdoc/classes/Reap/Task.src/M000049.html +0 -16
- data/web/rdoc/classes/Reap/Task.src/M000050.html +0 -27
- data/web/rdoc/classes/Reap/Task.src/M000051.html +0 -19
- data/web/rdoc/classes/Reap/Task.src/M000052.html +0 -18
- data/web/rdoc/classes/Reap/Task.src/M000053.html +0 -18
- data/web/rdoc/classes/Reap/Task.src/M000054.html +0 -19
- data/web/rdoc/classes/Reap/Test/TestResults.html +0 -205
- data/web/rdoc/classes/Reap/Test/TestResults.src/M000067.html +0 -21
- data/web/rdoc/classes/Reap/Test/TestResults.src/M000068.html +0 -21
- data/web/rdoc/classes/Reap/Test/TestResults.src/M000069.html +0 -23
- data/web/rdoc/classes/Reap/Test.html +0 -253
- data/web/rdoc/classes/Reap/Test.src/M000062.html +0 -18
- data/web/rdoc/classes/Reap/Test.src/M000063.html +0 -26
- data/web/rdoc/classes/Reap/Test.src/M000064.html +0 -77
- data/web/rdoc/classes/Reap/Test.src/M000065.html +0 -27
- data/web/rdoc/classes/Reap/Test.src/M000066.html +0 -50
- data/web/rdoc/classes/Reap/TestExt.html +0 -234
- data/web/rdoc/classes/Reap/TestExt.src/M000073.html +0 -18
- data/web/rdoc/classes/Reap/TestExt.src/M000074.html +0 -20
- data/web/rdoc/classes/Reap/TestExt.src/M000075.html +0 -49
- data/web/rdoc/classes/Reap/TestExt.src/M000076.html +0 -34
- data/web/rdoc/classes/Reap/TestExt.src/M000077.html +0 -27
- data/web/rdoc/classes/Reap/WebPublish.html +0 -213
- data/web/rdoc/classes/Reap/WebPublish.src/M000083.html +0 -18
- data/web/rdoc/classes/Reap/WebPublish.src/M000084.html +0 -21
- data/web/rdoc/classes/Reap/WebPublish.src/M000085.html +0 -32
- data/web/rdoc/classes/Reap.html +0 -248
- data/web/rdoc/classes/Reap.src/M000023.html +0 -16
- data/web/rdoc/classes/Reap.src/M000024.html +0 -21
- data/web/rdoc/classes/Reap.src/M000025.html +0 -16
- data/web/rdoc/classes/Reap.src/M000026.html +0 -21
- data/web/rdoc/classes/ReapCommand.html +0 -425
- data/web/rdoc/classes/ReapCommand.src/M000001.html +0 -16
- data/web/rdoc/classes/ReapCommand.src/M000003.html +0 -16
- data/web/rdoc/classes/ReapCommand.src/M000005.html +0 -16
- data/web/rdoc/classes/ReapCommand.src/M000007.html +0 -16
- data/web/rdoc/classes/ReapCommand.src/M000009.html +0 -16
- data/web/rdoc/classes/ReapCommand.src/M000011.html +0 -16
- data/web/rdoc/classes/ReapCommand.src/M000013.html +0 -18
- data/web/rdoc/classes/ReapCommand.src/M000014.html +0 -19
- data/web/rdoc/classes/ReapCommand.src/M000015.html +0 -19
- data/web/rdoc/classes/ReapCommand.src/M000016.html +0 -24
- data/web/rdoc/classes/ReapCommand.src/M000018.html +0 -29
- data/web/rdoc/classes/Scaffold.html +0 -211
- data/web/rdoc/classes/Scaffold.src/M000086.html +0 -16
- data/web/rdoc/classes/Scaffold.src/M000087.html +0 -28
- data/web/rdoc/classes/Scaffold.src/M000088.html +0 -32
- data/web/rdoc/classes/Scaffold.src/M000089.html +0 -18
- data/web/rdoc/classes/UnitTestKernel.html +0 -176
- data/web/rdoc/classes/UnitTestKernel.src/M000019.html +0 -18
- data/web/rdoc/classes/UnitTestKernel.src/M000020.html +0 -18
- data/web/rdoc/classes/UnitTestKernel.src/M000021.html +0 -22
- data/web/rdoc/classes/UnitTestKernel.src/M000022.html +0 -22
- data/web/rdoc/classes/UnitTesting/Failure.html +0 -156
- data/web/rdoc/classes/UnitTesting/Failure.src/M000092.html +0 -18
- data/web/rdoc/classes/UnitTesting/Failure.src/M000093.html +0 -21
- data/web/rdoc/classes/UnitTesting.html +0 -165
- data/web/rdoc/classes/UnitTesting.src/M000090.html +0 -34
- data/web/rdoc/classes/UnitTesting.src/M000091.html +0 -18
- data/web/rdoc/created.rid +0 -1
- data/web/rdoc/files/ANN.html +0 -107
- data/web/rdoc/files/COPYING.html +0 -119
- data/web/rdoc/files/ChangeLog.html +0 -144
- data/web/rdoc/files/ProjectInfo.html +0 -190
- data/web/rdoc/files/README.html +0 -274
- data/web/rdoc/files/Rakefile.html +0 -101
- data/web/rdoc/files/lib/reap/bin/reap_rb.html +0 -129
- data/web/rdoc/files/lib/reap/lint_rb.html +0 -101
- data/web/rdoc/files/lib/reap/projectinfo_rb.html +0 -110
- data/web/rdoc/files/lib/reap/readymade_rb.html +0 -123
- data/web/rdoc/files/lib/reap/task/announce_rb.html +0 -114
- data/web/rdoc/files/lib/reap/task/fileperm_rb.html +0 -108
- data/web/rdoc/files/lib/reap/task/info_rb.html +0 -108
- data/web/rdoc/files/lib/reap/task/install_rb.html +0 -108
- data/web/rdoc/files/lib/reap/task/noop_rb.html +0 -108
- data/web/rdoc/files/lib/reap/task/package_rb.html +0 -109
- data/web/rdoc/files/lib/reap/task/publish_rb.html +0 -108
- data/web/rdoc/files/lib/reap/task/rdoc_rb.html +0 -108
- data/web/rdoc/files/lib/reap/task/scaffold_rb.html +0 -107
- data/web/rdoc/files/lib/reap/task/test_rb.html +0 -110
- data/web/rdoc/files/lib/reap/task/testext_rb.html +0 -109
- data/web/rdoc/files/lib/reap/task/webpublish_rb.html +0 -108
- data/web/rdoc/files/lib/reap/task_rb.html +0 -120
- data/web/rdoc/files/lib/reap/tasks_rb.html +0 -116
- data/web/rdoc/files/lib/reap/test_rb.html +0 -109
- data/web/rdoc/fr_class_index.html +0 -47
- data/web/rdoc/fr_file_index.html +0 -51
- data/web/rdoc/fr_method_index.html +0 -124
- data/web/rdoc/index.html +0 -24
- data/web/rdoc/rdoc-style.css +0 -208
data/dev/compositepublisher.rb
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
module Rake
|
4
|
-
|
5
|
-
# Manage several publishers as a single entity.
|
6
|
-
class CompositePublisher
|
7
|
-
def initialize
|
8
|
-
@publishers = []
|
9
|
-
end
|
10
|
-
|
11
|
-
# Add a publisher to the composite.
|
12
|
-
def add(pub)
|
13
|
-
@publishers << pub
|
14
|
-
end
|
15
|
-
|
16
|
-
# Upload all the individual publishers.
|
17
|
-
def upload
|
18
|
-
@publishers.each { |p| p.upload }
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
23
|
-
|
24
|
-
|
data/dev/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
|
data/dev/license-each.rb
DELETED
@@ -1,85 +0,0 @@
|
|
1
|
-
# Ruby Treasures 0.4
|
2
|
-
# Copyright (C) 2002 Paul Brannan <paul@atdesk.com>
|
3
|
-
#
|
4
|
-
# You may distribute this software under the same terms as Ruby (see the file
|
5
|
-
# COPYING that was distributed with this library).
|
6
|
-
#
|
7
|
-
# Ruby Treasures 0.2
|
8
|
-
# Copyright (C) 2002 Paul Brannan <paul@atdesk.com>
|
9
|
-
#
|
10
|
-
# You may distribute this software under the same terms as Ruby (see the file
|
11
|
-
# COPYING that was distributed with this library).
|
12
|
-
#
|
13
|
-
# Run this Ruby script to prepare the RubyTreasures distribution for
|
14
|
-
# publication.
|
15
|
-
|
16
|
-
require 'find'
|
17
|
-
require 'ftools'
|
18
|
-
|
19
|
-
|
20
|
-
# Add licences to the top of every file and remove unnecessary files
|
21
|
-
|
22
|
-
license = IO.readlines('LICENSE')
|
23
|
-
ruby_license_comment = license.map { |i| i.sub(/^/, '# ') }
|
24
|
-
c_license_comment = ["/*\n"] + license.map { |i| i.sub(/^/, ' * ') } + [" */\n"]
|
25
|
-
|
26
|
-
def rm_rf(dir)
|
27
|
-
Dir.foreach(dir) do |f|
|
28
|
-
if not f =~ /\.?\.$/ then
|
29
|
-
filename = File.join(dir, f)
|
30
|
-
if File.directory?(filename) then
|
31
|
-
rm_rf(filename)
|
32
|
-
else
|
33
|
-
puts "Removing file #{filename}"
|
34
|
-
File.rm_f(filename)
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
puts "Removing directory #{dir}"
|
39
|
-
Dir.rmdir(dir)
|
40
|
-
end
|
41
|
-
|
42
|
-
Find.find('.') do |file|
|
43
|
-
if File.directory?(file) then
|
44
|
-
case file
|
45
|
-
when /\/CVS$/
|
46
|
-
# Remove CVS directories
|
47
|
-
rm_rf(file)
|
48
|
-
else
|
49
|
-
# Remove empty directories
|
50
|
-
entries = Dir.entries(file)
|
51
|
-
entries.delete('.')
|
52
|
-
entries.delete('..')
|
53
|
-
entries.delete('CVS')
|
54
|
-
if entries.length == 0 then
|
55
|
-
rm_rf(file)
|
56
|
-
end
|
57
|
-
end
|
58
|
-
else
|
59
|
-
case file
|
60
|
-
when /\.rb$/
|
61
|
-
# Add LICENSE to ruby sources
|
62
|
-
puts "Adding license to #{file}"
|
63
|
-
lines = ruby_license_comment + IO.readlines(file)
|
64
|
-
File.open(file, 'w') do |out|
|
65
|
-
lines.each do |line|
|
66
|
-
out.puts line
|
67
|
-
end
|
68
|
-
end
|
69
|
-
when /\.c$/
|
70
|
-
# Add LICENSE to C sources
|
71
|
-
puts "Adding license to #{file}"
|
72
|
-
lines = c_license_comment + IO.readlines(file)
|
73
|
-
File.open(file, 'w') do |out|
|
74
|
-
lines.each do |line|
|
75
|
-
out.puts line
|
76
|
-
end
|
77
|
-
end
|
78
|
-
when /~$/
|
79
|
-
# Remove temporary files
|
80
|
-
puts "Removing file #{file}"
|
81
|
-
File.rm_f(file)
|
82
|
-
end
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
data/dev/publisher.rb
DELETED
@@ -1,75 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
# Copyright 2003, 2004 by Jim Weirich (jim@weirichhouse.org)
|
4
|
-
# All rights reserved.
|
5
|
-
|
6
|
-
# Permission is granted for use, copying, modification, distribution,
|
7
|
-
# and distribution of modified versions of this work as long as the
|
8
|
-
# above copyright notice is included.
|
9
|
-
|
10
|
-
# Configuration information about an upload host system.
|
11
|
-
# * name :: Name of host system.
|
12
|
-
# * webdir :: Base directory for the web information for the
|
13
|
-
# application. The application name (APP) is appended to
|
14
|
-
# this directory before using.
|
15
|
-
# * pkgdir :: Directory on the host system where packages can be
|
16
|
-
# placed.
|
17
|
-
HostInfo = Struct.new(:name, :webdir, :pkgdir)
|
18
|
-
|
19
|
-
# Manage several publishers as a single entity.
|
20
|
-
class CompositePublisher
|
21
|
-
def initialize
|
22
|
-
@publishers = []
|
23
|
-
end
|
24
|
-
|
25
|
-
# Add a publisher to the composite.
|
26
|
-
def add(pub)
|
27
|
-
@publishers << pub
|
28
|
-
end
|
29
|
-
|
30
|
-
# Upload all the individual publishers.
|
31
|
-
def upload
|
32
|
-
@publishers.each { |p| p.upload }
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
# Publish an entire directory to an existing remote directory using
|
37
|
-
# SSH.
|
38
|
-
class SshDirPublisher
|
39
|
-
def initialize(host, remote_dir, local_dir)
|
40
|
-
@host = host
|
41
|
-
@remote_dir = remote_dir
|
42
|
-
@local_dir = local_dir
|
43
|
-
end
|
44
|
-
|
45
|
-
def upload
|
46
|
-
run %{scp -rq #{@local_dir}/* #{@host}:#{@remote_dir}}
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
# Publish an entire directory to a fresh remote directory using SSH.
|
51
|
-
class SshFreshDirPublisher < SshDirPublisher
|
52
|
-
def upload
|
53
|
-
run %{ssh #{@host} rm -rf #{@remote_dir}} rescue nil
|
54
|
-
run %{ssh #{@host} mkdir #{@remote_dir}}
|
55
|
-
super
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
# Publish a list of files to an existing remote directory.
|
60
|
-
class SshFilePublisher
|
61
|
-
# Create a publisher using the give host information.
|
62
|
-
def initialize(host, remote_dir, local_dir, *files)
|
63
|
-
@host = host
|
64
|
-
@remote_dir = remote_dir
|
65
|
-
@local_dir = local_dir
|
66
|
-
@files = files
|
67
|
-
end
|
68
|
-
|
69
|
-
# Upload the local directory to the remote directory.
|
70
|
-
def upload
|
71
|
-
@files.each do |fn|
|
72
|
-
run %{scp -q #{@local_dir}/#{fn} #{@host}:#{@remote_dir}}
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
data/dev/rubyforgepublisher.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'rake/contrib/sshpublisher'
|
4
|
-
|
5
|
-
module Rake
|
6
|
-
|
7
|
-
class RubyForgePublisher < SshDirPublisher
|
8
|
-
attr_reader :project, :proj_id, :user
|
9
|
-
|
10
|
-
def initialize(projname, user)
|
11
|
-
super(
|
12
|
-
"#{user}@rubyforge.org",
|
13
|
-
"/var/www/gforge-projects/#{projname}",
|
14
|
-
"html")
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
end
|
data/dev/sshpublisher.rb
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'rake/contrib/compositepublisher'
|
4
|
-
|
5
|
-
module Rake
|
6
|
-
|
7
|
-
# Publish an entire directory to an existing remote directory using
|
8
|
-
# SSH.
|
9
|
-
class SshDirPublisher
|
10
|
-
def initialize(host, remote_dir, local_dir)
|
11
|
-
@host = host
|
12
|
-
@remote_dir = remote_dir
|
13
|
-
@local_dir = local_dir
|
14
|
-
end
|
15
|
-
|
16
|
-
def upload
|
17
|
-
sh %{scp -rq #{@local_dir}/* #{@host}:#{@remote_dir}}
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
# Publish an entire directory to a fresh remote directory using SSH.
|
22
|
-
class SshFreshDirPublisher < SshDirPublisher
|
23
|
-
def upload
|
24
|
-
sh %{ssh #{@host} rm -rf #{@remote_dir}} rescue nil
|
25
|
-
sh %{ssh #{@host} mkdir #{@remote_dir}}
|
26
|
-
super
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
# Publish a list of files to an existing remote directory.
|
31
|
-
class SshFilePublisher
|
32
|
-
# Create a publisher using the give host information.
|
33
|
-
def initialize(host, remote_dir, local_dir, *files)
|
34
|
-
@host = host
|
35
|
-
@remote_dir = remote_dir
|
36
|
-
@local_dir = local_dir
|
37
|
-
@files = files
|
38
|
-
end
|
39
|
-
|
40
|
-
# Upload the local directory to the remote directory.
|
41
|
-
def upload
|
42
|
-
@files.each do |fn|
|
43
|
-
sh %{scp -q #{@local_dir}/#{fn} #{@host}:#{@remote_dir}}
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
data/dev/suby-cvs.rb
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby
|
2
|
-
|
3
|
-
DEBUG = false
|
4
|
-
URI = "-dtransami@cvs.suby.berlios.de:/cvsroot/suby"
|
5
|
-
|
6
|
-
cmd = nil
|
7
|
-
|
8
|
-
case ARGV[0]
|
9
|
-
when 'checkout', 'co'
|
10
|
-
if ARGV[1] and ARGV[1] != ''
|
11
|
-
cmd = %Q{cvs -z3 #{URI} co "#{ARGV[1]}"}
|
12
|
-
else
|
13
|
-
puts "no module given"
|
14
|
-
cmd = nil
|
15
|
-
end
|
16
|
-
when 'commit'
|
17
|
-
if ARGV[1] and ARGV[1] != ''
|
18
|
-
cmd = %Q{cvs -z3 #{URI} commit -m "#{ARGV[1]}"}
|
19
|
-
else
|
20
|
-
puts "no commit message given"
|
21
|
-
cmd = nil
|
22
|
-
end
|
23
|
-
when 'update'
|
24
|
-
cmd = %Q{cvs -z3 #{URI} update}
|
25
|
-
when 'add'
|
26
|
-
if ARGV[1]
|
27
|
-
cmd = %Q{cvs -z3 #{URI} add #{ARGV[1..-1].join(' ')}}
|
28
|
-
else
|
29
|
-
puts "no files given to add"
|
30
|
-
cmd = nil
|
31
|
-
end
|
32
|
-
when 'remove'
|
33
|
-
if ARGV[1]
|
34
|
-
cmd = %Q{cvs -z3 #{URI} remove #{ARGV[1..-1].join(' ')}}
|
35
|
-
else
|
36
|
-
puts "no file given to remove"
|
37
|
-
cmd = nil
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
if DEBUG
|
42
|
-
puts cmd
|
43
|
-
elsif cmd
|
44
|
-
`#{cmd}`
|
45
|
-
end
|
46
|
-
|
data/dev/template.rb
DELETED
@@ -1,72 +0,0 @@
|
|
1
|
-
--- %YAML:1.0
|
2
|
-
|
3
|
-
TITLE: &title Your Package
|
4
|
-
NAME: &pkg your_package_name
|
5
|
-
VERSION: '0.0.1'
|
6
|
-
AUTHOR: Your Name
|
7
|
-
EMAIL: &email youremail@address.com
|
8
|
-
HOMEPAGE: "http://your_package_name.rubyforge.org"
|
9
|
-
SUMMARY: One line summary
|
10
|
-
DESCRIPTION: >
|
11
|
-
Multline description goes here.
|
12
|
-
|
13
|
-
RUBYFORGE:
|
14
|
-
PROJECT: 'your_project_name'
|
15
|
-
USERNAME: your_rubyforge_username
|
16
|
-
|
17
|
-
TEST:
|
18
|
-
FILES:
|
19
|
-
- 'test/**/tc_*.rb'
|
20
|
-
OPTIONS: ~
|
21
|
-
|
22
|
-
RDOC:
|
23
|
-
TITLE: *title
|
24
|
-
DIR: 'doc' #'rdoc'
|
25
|
-
TEMPLATE: html #ruby-red
|
26
|
-
OPTIONS: ['--merge', '--promiscuous', '--all']
|
27
|
-
MAIN: README
|
28
|
-
INCLUDE:
|
29
|
-
- 'README'
|
30
|
-
- 'LICEN*'
|
31
|
-
- 'lib/**/*.rb'
|
32
|
-
- 'bin/**/*.rb'
|
33
|
-
EXCLUDE: []
|
34
|
-
|
35
|
-
PACKAGE:
|
36
|
-
DIR: pkg
|
37
|
-
INCLUDE:
|
38
|
-
- 'lib/**/*'
|
39
|
-
- 'bin/**/*'
|
40
|
-
- 'bench/**/*'
|
41
|
-
- 'test/**/*'
|
42
|
-
- 'doc/**/*'
|
43
|
-
- 'rdoc/**/*'
|
44
|
-
- 'pub/**/*'
|
45
|
-
- 'www/**/*'
|
46
|
-
- 'demo/**/*'
|
47
|
-
- 'samples/**/*'
|
48
|
-
- 'examples/**/*'
|
49
|
-
- 'setup.rb'
|
50
|
-
- '[A-Z]*'
|
51
|
-
EXCLUDE:
|
52
|
-
- InstalledFiles
|
53
|
-
ZIP: true
|
54
|
-
GZIP: true
|
55
|
-
BZIP2: true
|
56
|
-
|
57
|
-
ANNOUNCE:
|
58
|
-
TO: ruby-talk@ruby-lang.org
|
59
|
-
FROM: *email
|
60
|
-
DOMAIN: your_domain.net
|
61
|
-
SERVER: smtp.your_email_server.com
|
62
|
-
PORT: 25
|
63
|
-
ACCOUNT: email_account_name
|
64
|
-
AUTHTYPE: login #cram_md5 #plain
|
65
|
-
FILE: ANN #which file contains tha announcement text
|
66
|
-
SLOGAN: ALL YOUR BASE ARE BELONG TO RUBY!
|
67
|
-
INFO:
|
68
|
-
- http://your_homepage.org
|
69
|
-
|
70
|
-
GEMSPEC:
|
71
|
-
ACTIVE: true
|
72
|
-
|
data/lib/reap/readymade.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
|
2
|
-
# This loads in the reap tasks and setsup
|
3
|
-
# some tasks that are typically ready to go
|
4
|
-
# without additional paramaters.
|
5
|
-
|
6
|
-
require 'reap/task/announce'
|
7
|
-
require 'reap/task/extract_tests'
|
8
|
-
require 'reap/task/fileperm'
|
9
|
-
require 'reap/task/info'
|
10
|
-
require 'reap/task/install'
|
11
|
-
require 'reap/task/package'
|
12
|
-
require 'reap/task/publish'
|
13
|
-
require 'reap/task/rdoc'
|
14
|
-
require 'reap/task/test'
|
15
|
-
|
16
|
-
rdoc_task( :rdoc )
|
17
|
-
tests_task( :test )
|
18
|
-
install_task( :install )
|
19
|
-
info_task( :info )
|
20
|
-
package_task( :package )
|
21
|
-
extract_tests_task( :exttests )
|
data/lib/reap/task/webpublish.rb
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
|
2
|
-
require 'reap/task'
|
3
|
-
|
4
|
-
#
|
5
|
-
# Web Publish Task
|
6
|
-
#
|
7
|
-
class Reap::WebPublish < Reap::Task
|
8
|
-
|
9
|
-
section_required true
|
10
|
-
|
11
|
-
def task_desc
|
12
|
-
"publish project website to your internet host *"
|
13
|
-
end
|
14
|
-
|
15
|
-
attr_accessor :host, :type, :dir, :project, :username
|
16
|
-
attr_accessor :exclude # not using yet
|
17
|
-
|
18
|
-
def init
|
19
|
-
@host ||= 'rubyforge.org'
|
20
|
-
@project ||= master['rubyforge']['project'] || master['name']
|
21
|
-
@username ||= master['rubyforge']['username']
|
22
|
-
@exclude ||= []
|
23
|
-
end
|
24
|
-
|
25
|
-
def run
|
26
|
-
cmd = ''; skip = false
|
27
|
-
|
28
|
-
case @host
|
29
|
-
when 'rubyforge'
|
30
|
-
cmd = %{scp -r #{@dir}/* #{@username}@rubyforge.org:/var/www/gforge-projects/#{@project}/}
|
31
|
-
else
|
32
|
-
puts %{Unrecognized publishing host '#{@host}'. Skipped.}
|
33
|
-
skip = true
|
34
|
-
end
|
35
|
-
|
36
|
-
unless skip
|
37
|
-
puts "Reap is shelling out publishing work..."
|
38
|
-
puts cmd
|
39
|
-
sh(cmd) unless $PRETEND
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
end
|
data/lib/reap/tasks.rb
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
|
2
|
-
require 'reap/task/fileperm'
|
3
|
-
require 'reap/task/test'
|
4
|
-
require 'reap/task/testext'
|
5
|
-
require 'reap/task/rdoc'
|
6
|
-
require 'reap/task/announce'
|
7
|
-
require 'reap/task/package'
|
8
|
-
require 'reap/task/publish'
|
9
|
-
require 'reap/task/info'
|
10
|
-
require 'reap/task/install'
|
11
|
-
#require 'reap/task/noop'
|
12
|
-
#require 'reap/webpublish'
|
13
|
-
|