drake 0.8.1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +386 -0
- data/MIT-LICENSE +21 -0
- data/README +396 -0
- data/Rakefile +505 -0
- data/TODO +20 -0
- data/bin/drake +31 -0
- data/bin/rake +31 -0
- data/doc/example/Rakefile1 +38 -0
- data/doc/example/Rakefile2 +35 -0
- data/doc/example/a.c +6 -0
- data/doc/example/b.c +6 -0
- data/doc/example/main.c +11 -0
- data/doc/glossary.rdoc +51 -0
- data/doc/jamis.rb +591 -0
- data/doc/proto_rake.rdoc +127 -0
- data/doc/rake.1.gz +0 -0
- data/doc/rakefile.rdoc +534 -0
- data/doc/rational.rdoc +151 -0
- data/doc/release_notes/rake-0.4.14.rdoc +23 -0
- data/doc/release_notes/rake-0.4.15.rdoc +35 -0
- data/doc/release_notes/rake-0.5.0.rdoc +53 -0
- data/doc/release_notes/rake-0.5.3.rdoc +78 -0
- data/doc/release_notes/rake-0.5.4.rdoc +46 -0
- data/doc/release_notes/rake-0.6.0.rdoc +141 -0
- data/doc/release_notes/rake-0.7.0.rdoc +119 -0
- data/doc/release_notes/rake-0.7.1.rdoc +59 -0
- data/doc/release_notes/rake-0.7.2.rdoc +121 -0
- data/doc/release_notes/rake-0.7.3.rdoc +47 -0
- data/doc/release_notes/rake-0.8.0.rdoc +114 -0
- data/doc/release_notes/rake-0.8.2.rdoc +163 -0
- data/install.rb +88 -0
- data/lib/rake.rb +2538 -0
- data/lib/rake/classic_namespace.rb +8 -0
- data/lib/rake/clean.rb +33 -0
- data/lib/rake/comp_tree/algorithm.rb +234 -0
- data/lib/rake/comp_tree/bucket_ipc.rb +175 -0
- data/lib/rake/comp_tree/driver.rb +291 -0
- data/lib/rake/comp_tree/error.rb +51 -0
- data/lib/rake/comp_tree/node.rb +189 -0
- data/lib/rake/comp_tree/quix/builtin/kernel/tap.rb +57 -0
- data/lib/rake/comp_tree/quix/diagnostic.rb +92 -0
- data/lib/rake/comp_tree/quix/kernel.rb +109 -0
- data/lib/rake/comp_tree/retriable_fork.rb +66 -0
- data/lib/rake/comp_tree/task_node.rb +46 -0
- data/lib/rake/contrib/compositepublisher.rb +24 -0
- data/lib/rake/contrib/ftptools.rb +153 -0
- data/lib/rake/contrib/publisher.rb +75 -0
- data/lib/rake/contrib/rubyforgepublisher.rb +18 -0
- data/lib/rake/contrib/sshpublisher.rb +47 -0
- data/lib/rake/contrib/sys.rb +209 -0
- data/lib/rake/gempackagetask.rb +103 -0
- data/lib/rake/loaders/makefile.rb +35 -0
- data/lib/rake/packagetask.rb +185 -0
- data/lib/rake/parallel.rb +54 -0
- data/lib/rake/rake_test_loader.rb +5 -0
- data/lib/rake/rdoctask.rb +147 -0
- data/lib/rake/ruby182_test_unit_fix.rb +23 -0
- data/lib/rake/runtest.rb +23 -0
- data/lib/rake/tasklib.rb +23 -0
- data/lib/rake/testtask.rb +161 -0
- data/test/capture_stdout.rb +26 -0
- data/test/check_expansion.rb +5 -0
- data/test/contrib/test_sys.rb +47 -0
- data/test/data/chains/Rakefile +15 -0
- data/test/data/default/Rakefile +19 -0
- data/test/data/dryrun/Rakefile +22 -0
- data/test/data/file_creation_task/Rakefile +33 -0
- data/test/data/imports/Rakefile +19 -0
- data/test/data/imports/deps.mf +1 -0
- data/test/data/multidesc/Rakefile +17 -0
- data/test/data/namespace/Rakefile +57 -0
- data/test/data/rakelib/test1.rb +3 -0
- data/test/data/rbext/rakefile.rb +3 -0
- data/test/data/sample.mf +12 -0
- data/test/data/statusreturn/Rakefile +8 -0
- data/test/data/unittest/Rakefile +1 -0
- data/test/filecreation.rb +32 -0
- data/test/functional.rb +15 -0
- data/test/in_environment.rb +30 -0
- data/test/parallel.rb +3 -0
- data/test/rake_test_setup.rb +5 -0
- data/test/reqfile.rb +3 -0
- data/test/reqfile2.rb +3 -0
- data/test/session_functional.rb +324 -0
- data/test/shellcommand.rb +3 -0
- data/test/single_threaded.rb +2 -0
- data/test/test_application.rb +714 -0
- data/test/test_clean.rb +14 -0
- data/test/test_definitions.rb +82 -0
- data/test/test_earlytime.rb +35 -0
- data/test/test_extension.rb +63 -0
- data/test/test_file_creation_task.rb +62 -0
- data/test/test_file_task.rb +139 -0
- data/test/test_filelist.rb +618 -0
- data/test/test_fileutils.rb +250 -0
- data/test/test_ftp.rb +59 -0
- data/test/test_invocation_chain.rb +75 -0
- data/test/test_makefile_loader.rb +25 -0
- data/test/test_namespace.rb +36 -0
- data/test/test_package_task.rb +116 -0
- data/test/test_parallel.rb +47 -0
- data/test/test_pathmap.rb +209 -0
- data/test/test_rake.rb +41 -0
- data/test/test_require.rb +33 -0
- data/test/test_rules.rb +348 -0
- data/test/test_task_arguments.rb +89 -0
- data/test/test_task_manager.rb +172 -0
- data/test/test_tasklib.rb +12 -0
- data/test/test_tasks.rb +373 -0
- data/test/test_test_task.rb +75 -0
- data/test/test_top_level_functions.rb +84 -0
- metadata +190 -0
@@ -0,0 +1,57 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
|
4
|
+
######################################################
|
5
|
+
#
|
6
|
+
# **** DO NOT EDIT ****
|
7
|
+
#
|
8
|
+
# **** THIS IS A GENERATED FILE *****
|
9
|
+
#
|
10
|
+
######################################################
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
######################################################
|
17
|
+
#
|
18
|
+
# **** DO NOT EDIT ****
|
19
|
+
#
|
20
|
+
# **** THIS IS A GENERATED FILE *****
|
21
|
+
#
|
22
|
+
######################################################
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
unless respond_to? :tap
|
27
|
+
module Kernel
|
28
|
+
def tap
|
29
|
+
yield self
|
30
|
+
self
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
######################################################
|
38
|
+
#
|
39
|
+
# **** DO NOT EDIT ****
|
40
|
+
#
|
41
|
+
# **** THIS IS A GENERATED FILE *****
|
42
|
+
#
|
43
|
+
######################################################
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
######################################################
|
50
|
+
#
|
51
|
+
# **** DO NOT EDIT ****
|
52
|
+
#
|
53
|
+
# **** THIS IS A GENERATED FILE *****
|
54
|
+
#
|
55
|
+
######################################################
|
56
|
+
|
57
|
+
|
@@ -0,0 +1,92 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
|
4
|
+
######################################################
|
5
|
+
#
|
6
|
+
# **** DO NOT EDIT ****
|
7
|
+
#
|
8
|
+
# **** THIS IS A GENERATED FILE *****
|
9
|
+
#
|
10
|
+
######################################################
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
######################################################
|
17
|
+
#
|
18
|
+
# **** DO NOT EDIT ****
|
19
|
+
#
|
20
|
+
# **** THIS IS A GENERATED FILE *****
|
21
|
+
#
|
22
|
+
######################################################
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
require 'rake/comp_tree/quix/builtin/kernel/tap'
|
27
|
+
|
28
|
+
module Rake::CompTree::Quix
|
29
|
+
module Diagnostic
|
30
|
+
def show(desc = nil, stream = STDOUT, &block)
|
31
|
+
if desc
|
32
|
+
stream.puts(desc)
|
33
|
+
end
|
34
|
+
if block
|
35
|
+
expression = block.call
|
36
|
+
eval(expression, block.binding).tap { |result|
|
37
|
+
stream.printf("%-16s => %s\n", expression, result.inspect)
|
38
|
+
}
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
if $DEBUG
|
43
|
+
def debug
|
44
|
+
yield
|
45
|
+
end
|
46
|
+
|
47
|
+
def debugging?
|
48
|
+
true
|
49
|
+
end
|
50
|
+
|
51
|
+
def trace(desc = nil, &block)
|
52
|
+
if desc
|
53
|
+
show("#{desc}.".sub(%r!\.\.+\Z!, ""), STDERR, &block)
|
54
|
+
else
|
55
|
+
show(nil, STDERR, &block)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
else
|
59
|
+
# non-$DEBUG
|
60
|
+
def debug ; end
|
61
|
+
def debugging? ; end
|
62
|
+
def trace(*args) ; end
|
63
|
+
end
|
64
|
+
|
65
|
+
extend self
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
######################################################
|
73
|
+
#
|
74
|
+
# **** DO NOT EDIT ****
|
75
|
+
#
|
76
|
+
# **** THIS IS A GENERATED FILE *****
|
77
|
+
#
|
78
|
+
######################################################
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
######################################################
|
85
|
+
#
|
86
|
+
# **** DO NOT EDIT ****
|
87
|
+
#
|
88
|
+
# **** THIS IS A GENERATED FILE *****
|
89
|
+
#
|
90
|
+
######################################################
|
91
|
+
|
92
|
+
|
@@ -0,0 +1,109 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
|
4
|
+
######################################################
|
5
|
+
#
|
6
|
+
# **** DO NOT EDIT ****
|
7
|
+
#
|
8
|
+
# **** THIS IS A GENERATED FILE *****
|
9
|
+
#
|
10
|
+
######################################################
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
######################################################
|
17
|
+
#
|
18
|
+
# **** DO NOT EDIT ****
|
19
|
+
#
|
20
|
+
# **** THIS IS A GENERATED FILE *****
|
21
|
+
#
|
22
|
+
######################################################
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
require 'thread'
|
27
|
+
|
28
|
+
module Rake::CompTree::Quix
|
29
|
+
module Kernel
|
30
|
+
def let
|
31
|
+
yield self
|
32
|
+
end
|
33
|
+
|
34
|
+
def singleton_class
|
35
|
+
class << self
|
36
|
+
self
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
module Gensym
|
41
|
+
@mutex = Mutex.new
|
42
|
+
@count = 0
|
43
|
+
|
44
|
+
def gensym(prefix = nil)
|
45
|
+
count = Gensym.module_eval {
|
46
|
+
@mutex.synchronize {
|
47
|
+
@count += 1
|
48
|
+
}
|
49
|
+
}
|
50
|
+
"#{prefix || :G}_#{count}_#{rand}".to_sym
|
51
|
+
end
|
52
|
+
end
|
53
|
+
include Gensym
|
54
|
+
|
55
|
+
def call_private(method, *args, &block)
|
56
|
+
instance_eval { send(method, *args, &block) }
|
57
|
+
end
|
58
|
+
|
59
|
+
def with_warnings(value = true)
|
60
|
+
previous = $VERBOSE
|
61
|
+
$VERBOSE = value
|
62
|
+
begin
|
63
|
+
yield
|
64
|
+
ensure
|
65
|
+
$VERBOSE = previous
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
def no_warnings(&block)
|
70
|
+
with_warnings(false, &block)
|
71
|
+
end
|
72
|
+
|
73
|
+
def abort_on_exception(value = true)
|
74
|
+
previous = Thread.abort_on_exception
|
75
|
+
Thread.abort_on_exception = value
|
76
|
+
begin
|
77
|
+
yield
|
78
|
+
ensure
|
79
|
+
Thread.abort_on_exception = previous
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
extend self
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
######################################################
|
90
|
+
#
|
91
|
+
# **** DO NOT EDIT ****
|
92
|
+
#
|
93
|
+
# **** THIS IS A GENERATED FILE *****
|
94
|
+
#
|
95
|
+
######################################################
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
######################################################
|
102
|
+
#
|
103
|
+
# **** DO NOT EDIT ****
|
104
|
+
#
|
105
|
+
# **** THIS IS A GENERATED FILE *****
|
106
|
+
#
|
107
|
+
######################################################
|
108
|
+
|
109
|
+
|
@@ -0,0 +1,66 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
|
4
|
+
######################################################
|
5
|
+
#
|
6
|
+
# **** DO NOT EDIT ****
|
7
|
+
#
|
8
|
+
# **** THIS IS A GENERATED FILE *****
|
9
|
+
#
|
10
|
+
######################################################
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
module Rake::CompTree
|
15
|
+
module RetriableFork
|
16
|
+
HAVE_FORK = lambda {
|
17
|
+
begin
|
18
|
+
process_id = fork { }
|
19
|
+
Process.wait(process_id)
|
20
|
+
rescue NotImplementedError
|
21
|
+
return false
|
22
|
+
end
|
23
|
+
true
|
24
|
+
}.call
|
25
|
+
|
26
|
+
def fork(retry_wait = 10, retry_max = 10, &block)
|
27
|
+
num_retries = 0
|
28
|
+
begin
|
29
|
+
Process.fork(&block)
|
30
|
+
rescue Errno::EAGAIN
|
31
|
+
num_retries += 1
|
32
|
+
if num_retries == retry_max
|
33
|
+
message = %Q{
|
34
|
+
****************************************************************
|
35
|
+
Maximum number of EAGAIN signals reached (#{retry_max})
|
36
|
+
****************************************************************
|
37
|
+
|
38
|
+
Either increase your process limit permission (consult your
|
39
|
+
OS manual) or run this script as superuser.
|
40
|
+
|
41
|
+
****************************************************************
|
42
|
+
}
|
43
|
+
STDERR.puts(message.gsub(%r!^[ \t]+!, ""))
|
44
|
+
raise
|
45
|
+
end
|
46
|
+
STDERR.puts "Caught EGAIN. Retrying in #{retry_wait} seconds."
|
47
|
+
sleep(retry_wait)
|
48
|
+
retry
|
49
|
+
end
|
50
|
+
end
|
51
|
+
module_function :fork
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
######################################################
|
59
|
+
#
|
60
|
+
# **** DO NOT EDIT ****
|
61
|
+
#
|
62
|
+
# **** THIS IS A GENERATED FILE *****
|
63
|
+
#
|
64
|
+
######################################################
|
65
|
+
|
66
|
+
|
@@ -0,0 +1,46 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
|
4
|
+
######################################################
|
5
|
+
#
|
6
|
+
# **** DO NOT EDIT ****
|
7
|
+
#
|
8
|
+
# **** THIS IS A GENERATED FILE *****
|
9
|
+
#
|
10
|
+
######################################################
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
module Rake::CompTree
|
15
|
+
#
|
16
|
+
# TaskNode is a Node which discards its results
|
17
|
+
#
|
18
|
+
class TaskNode < Node
|
19
|
+
def compute #:nodoc:
|
20
|
+
@function.call
|
21
|
+
true
|
22
|
+
end
|
23
|
+
|
24
|
+
class << self
|
25
|
+
#
|
26
|
+
# TaskNode always returns true.
|
27
|
+
#
|
28
|
+
def discard_result?
|
29
|
+
true
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
######################################################
|
39
|
+
#
|
40
|
+
# **** DO NOT EDIT ****
|
41
|
+
#
|
42
|
+
# **** THIS IS A GENERATED FILE *****
|
43
|
+
#
|
44
|
+
######################################################
|
45
|
+
|
46
|
+
|
@@ -0,0 +1,24 @@
|
|
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
|
+
|
@@ -0,0 +1,153 @@
|
|
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 'net/ftp'
|
10
|
+
|
11
|
+
module Rake # :nodoc:
|
12
|
+
|
13
|
+
####################################################################
|
14
|
+
# <b>Note:</b> <em> Not released for general use.</em>
|
15
|
+
class FtpFile
|
16
|
+
attr_reader :name, :size, :owner, :group, :time
|
17
|
+
|
18
|
+
def self.date
|
19
|
+
@date_class ||= Date
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.time
|
23
|
+
@time_class ||= Time
|
24
|
+
end
|
25
|
+
|
26
|
+
def initialize(path, entry)
|
27
|
+
@path = path
|
28
|
+
@mode, line, @owner, @group, size, d1, d2, d3, @name = entry.split(' ')
|
29
|
+
@size = size.to_i
|
30
|
+
@time = determine_time(d1, d2, d3)
|
31
|
+
end
|
32
|
+
|
33
|
+
def path
|
34
|
+
File.join(@path, @name)
|
35
|
+
end
|
36
|
+
|
37
|
+
def directory?
|
38
|
+
@mode[0] == ?d
|
39
|
+
end
|
40
|
+
|
41
|
+
def mode
|
42
|
+
parse_mode(@mode)
|
43
|
+
end
|
44
|
+
|
45
|
+
def symlink?
|
46
|
+
@mode[0] == ?l
|
47
|
+
end
|
48
|
+
|
49
|
+
private # --------------------------------------------------------
|
50
|
+
|
51
|
+
def parse_mode(m)
|
52
|
+
result = 0
|
53
|
+
(1..9).each do |i|
|
54
|
+
result = 2*result + ((m[i]==?-) ? 0 : 1)
|
55
|
+
end
|
56
|
+
result
|
57
|
+
end
|
58
|
+
|
59
|
+
def determine_time(d1, d2, d3)
|
60
|
+
now = self.class.time.now
|
61
|
+
if /:/ =~ d3
|
62
|
+
h, m = d3.split(':')
|
63
|
+
result = Time.parse("#{d1} #{d2} #{now.year} #{d3}")
|
64
|
+
if result > now
|
65
|
+
result = Time.parse("#{d1} #{d2} #{now.year-1} #{d3}")
|
66
|
+
end
|
67
|
+
else
|
68
|
+
result = Time.parse("#{d1} #{d2} #{d3}")
|
69
|
+
end
|
70
|
+
result
|
71
|
+
# elements = ParseDate.parsedate("#{d1} #{d2} #{d3}")
|
72
|
+
# if elements[0].nil?
|
73
|
+
# today = self.class.date.today
|
74
|
+
# if elements[1] > today.month
|
75
|
+
# elements[0] = today.year - 1
|
76
|
+
# else
|
77
|
+
# elements[0] = today.year
|
78
|
+
# end
|
79
|
+
# end
|
80
|
+
# elements = elements.collect { |el| el.nil? ? 0 : el }
|
81
|
+
# Time.mktime(*elements[0,7])
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
####################################################################
|
86
|
+
# Manage the uploading of files to an FTP account.
|
87
|
+
class FtpUploader
|
88
|
+
|
89
|
+
# Log uploads to standard output when true.
|
90
|
+
attr_accessor :verbose
|
91
|
+
|
92
|
+
class << FtpUploader
|
93
|
+
# Create an uploader and pass it to the given block as +up+.
|
94
|
+
# When the block is complete, close the uploader.
|
95
|
+
def connect(path, host, account, password)
|
96
|
+
up = self.new(path, host, account, password)
|
97
|
+
begin
|
98
|
+
yield(up)
|
99
|
+
ensure
|
100
|
+
up.close
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
# Create an FTP uploader targetting the directory +path+ on +host+
|
106
|
+
# using the given account and password. +path+ will be the root
|
107
|
+
# path of the uploader.
|
108
|
+
def initialize(path, host, account, password)
|
109
|
+
@created = Hash.new
|
110
|
+
@path = path
|
111
|
+
@ftp = Net::FTP.new(host, account, password)
|
112
|
+
makedirs(@path)
|
113
|
+
@ftp.chdir(@path)
|
114
|
+
end
|
115
|
+
|
116
|
+
# Create the directory +path+ in the uploader root path.
|
117
|
+
def makedirs(path)
|
118
|
+
route = []
|
119
|
+
File.split(path).each do |dir|
|
120
|
+
route << dir
|
121
|
+
current_dir = File.join(route)
|
122
|
+
if @created[current_dir].nil?
|
123
|
+
@created[current_dir] = true
|
124
|
+
puts "Creating Directory #{current_dir}" if @verbose
|
125
|
+
@ftp.mkdir(current_dir) rescue nil
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
# Upload all files matching +wildcard+ to the uploader's root
|
131
|
+
# path.
|
132
|
+
def upload_files(wildcard)
|
133
|
+
Dir[wildcard].each do |fn|
|
134
|
+
upload(fn)
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
# Close the uploader.
|
139
|
+
def close
|
140
|
+
@ftp.close
|
141
|
+
end
|
142
|
+
|
143
|
+
private # --------------------------------------------------------
|
144
|
+
|
145
|
+
# Upload a single file to the uploader's root path.
|
146
|
+
def upload(file)
|
147
|
+
puts "Uploading #{file}" if @verbose
|
148
|
+
dir = File.dirname(file)
|
149
|
+
makedirs(dir)
|
150
|
+
@ftp.putbinaryfile(file, file) unless File.directory?(file)
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|