rake 0.4.11 → 13.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. checksums.yaml +7 -0
  2. data/History.rdoc +2454 -0
  3. data/MIT-LICENSE +1 -1
  4. data/README.rdoc +155 -0
  5. data/doc/command_line_usage.rdoc +171 -0
  6. data/doc/glossary.rdoc +40 -49
  7. data/doc/jamis.rb +135 -107
  8. data/doc/proto_rake.rdoc +22 -22
  9. data/doc/rake.1 +156 -0
  10. data/doc/rakefile.rdoc +428 -27
  11. data/doc/rational.rdoc +6 -6
  12. data/exe/rake +27 -0
  13. data/lib/rake/application.rb +847 -0
  14. data/lib/rake/backtrace.rb +25 -0
  15. data/lib/rake/clean.rb +57 -10
  16. data/lib/rake/cloneable.rb +17 -0
  17. data/lib/rake/cpu_counter.rb +122 -0
  18. data/lib/rake/default_loader.rb +15 -0
  19. data/lib/rake/dsl_definition.rb +196 -0
  20. data/lib/rake/early_time.rb +22 -0
  21. data/lib/rake/ext/core.rb +26 -0
  22. data/lib/rake/ext/string.rb +176 -0
  23. data/lib/rake/file_creation_task.rb +25 -0
  24. data/lib/rake/file_list.rb +435 -0
  25. data/lib/rake/file_task.rb +58 -0
  26. data/lib/rake/file_utils.rb +137 -0
  27. data/lib/rake/file_utils_ext.rb +135 -0
  28. data/lib/rake/invocation_chain.rb +57 -0
  29. data/lib/rake/invocation_exception_mixin.rb +17 -0
  30. data/lib/rake/late_time.rb +18 -0
  31. data/lib/rake/linked_list.rb +112 -0
  32. data/lib/rake/loaders/makefile.rb +54 -0
  33. data/lib/rake/multi_task.rb +14 -0
  34. data/lib/rake/name_space.rb +38 -0
  35. data/lib/rake/options.rb +31 -0
  36. data/lib/rake/packagetask.rb +124 -54
  37. data/lib/rake/phony.rb +16 -0
  38. data/lib/rake/private_reader.rb +21 -0
  39. data/lib/rake/promise.rb +100 -0
  40. data/lib/rake/pseudo_status.rb +30 -0
  41. data/lib/rake/rake_module.rb +67 -0
  42. data/lib/rake/rake_test_loader.rb +27 -0
  43. data/lib/rake/rule_recursion_overflow_error.rb +20 -0
  44. data/lib/rake/scope.rb +43 -0
  45. data/lib/rake/task.rb +434 -0
  46. data/lib/rake/task_argument_error.rb +8 -0
  47. data/lib/rake/task_arguments.rb +113 -0
  48. data/lib/rake/task_manager.rb +333 -0
  49. data/lib/rake/tasklib.rb +4 -16
  50. data/lib/rake/testtask.rb +110 -36
  51. data/lib/rake/thread_history_display.rb +49 -0
  52. data/lib/rake/thread_pool.rb +157 -0
  53. data/lib/rake/trace_output.rb +23 -0
  54. data/lib/rake/version.rb +10 -0
  55. data/lib/rake/win32.rb +17 -0
  56. data/lib/rake.rb +64 -992
  57. data/rake.gemspec +102 -0
  58. metadata +117 -89
  59. data/CHANGES +0 -153
  60. data/README +0 -209
  61. data/Rakefile +0 -215
  62. data/TODO +0 -19
  63. data/bin/rake +0 -8
  64. data/install.rb +0 -88
  65. data/lib/rake/contrib/compositepublisher.rb +0 -24
  66. data/lib/rake/contrib/ftptools.rb +0 -139
  67. data/lib/rake/contrib/publisher.rb +0 -75
  68. data/lib/rake/contrib/rubyforgepublisher.rb +0 -18
  69. data/lib/rake/contrib/sshpublisher.rb +0 -47
  70. data/lib/rake/contrib/sys.rb +0 -207
  71. data/lib/rake/gempackagetask.rb +0 -98
  72. data/lib/rake/rdoctask.rb +0 -128
  73. data/lib/rake/runtest.rb +0 -23
  74. data/test/contrib/testsys.rb +0 -47
  75. data/test/data/rbext/rakefile.rb +0 -3
  76. data/test/filecreation.rb +0 -26
  77. data/test/functional.rb +0 -82
  78. data/test/shellcommand.rb +0 -3
  79. data/test/testclean.rb +0 -13
  80. data/test/testfilelist.rb +0 -255
  81. data/test/testfileutils.rb +0 -83
  82. data/test/testftp.rb +0 -55
  83. data/test/testpackagetask.rb +0 -81
  84. data/test/testtasks.rb +0 -371
  85. data/test/testtesttask.rb +0 -71
data/Rakefile DELETED
@@ -1,215 +0,0 @@
1
- # Rakefile for rake -*- ruby -*-
2
-
3
- # Copyright 2003, 2004 by Jim Weirich (jim@weirichhouse.org)
4
- # All rights reserved.
5
-
6
- # This file is may be distributed under an MIT style license. See
7
- # MIT-LICENSE for details.
8
-
9
- begin
10
- require 'rubygems'
11
- require 'rake/gempackagetask'
12
- rescue Exception
13
- nil
14
- end
15
- require 'rake/clean'
16
- require 'rake/testtask'
17
- require 'rake/rdoctask'
18
-
19
- CLEAN.include('**/*.o')
20
- CLOBBER.include('doc/example/main')
21
-
22
- # Determine the current version of the software
23
-
24
- if `ruby -Ilib ./bin/rake --version` =~ /\S+$/
25
- PKG_VERSION = $&
26
- else
27
- PKG_VERSION = "0.0.0"
28
- end
29
-
30
- SRC_RB = FileList['lib/**/*.rb']
31
-
32
- # The default task is run if rake is given no explicit arguments.
33
-
34
- desc "Default Task"
35
- task :default => :test
36
-
37
- # Test Tasks ---------------------------------------------------------
38
-
39
- Rake::TestTask.new do |t|
40
- t.test_files = FileList['test/test*.rb']
41
- t.verbose = true
42
- end
43
-
44
- Rake::TestTask.new(:testfun) do |t|
45
- t.pattern = 'test/fun*.rb'
46
- t.verbose = true
47
- end
48
-
49
- Rake::TestTask.new(:testcontrib) do |t|
50
- t.pattern = 'test/contrib/test*.rb'
51
- t.verbose = true
52
- end
53
-
54
- directory 'testdata'
55
- task :test => ['testdata']
56
-
57
- desc "Run all test targets"
58
- task :testall => [:test, :testcontrib, :testfun]
59
-
60
- # Abbreviations
61
-
62
- task :ta => [:testall]
63
- task :tf => [:testfun]
64
- task :tc => [:testcontrib]
65
-
66
- # CVS Tasks ----------------------------------------------------------
67
-
68
- desc "Tag all the CVS files with the latest release number (TAG=x)"
69
- task :tag do
70
- rel = "REL_" + PKG_VERSION.gsub(/\./, '_')
71
- rel << ENV['TAG'] if ENV['TAG']
72
- puts rel
73
- sh %{cvs commit -m 'pre-tag commit'}
74
- sh %{cvs tag #{rel}}
75
- end
76
-
77
- # Install rake using the standard install.rb script.
78
-
79
- desc "Install the application"
80
- task :install do
81
- ruby "install.rb"
82
- end
83
-
84
- # Create a task to build the RDOC documentation tree.
85
-
86
- rd = Rake::RDocTask.new("rdoc") { |rdoc|
87
- rdoc.rdoc_dir = 'html'
88
- # rdoc.template = 'kilmer'
89
- # rdoc.template = 'css2'
90
- rdoc.template = 'jamis'
91
- rdoc.title = "Rake -- Ruby Make"
92
- rdoc.options << '--line-numbers' << '--inline-source' << '--main' << 'README'
93
- rdoc.rdoc_files.include('README', 'MIT-LICENSE', 'TODO', 'CHANGES')
94
- rdoc.rdoc_files.include('lib/**/*.rb', 'doc/**/*.rdoc')
95
- rdoc.rdoc_files.exclude(/\bcontrib\b/)
96
- }
97
-
98
- # ====================================================================
99
- # Create a task that will package the Rake software into distributable
100
- # tar, zip and gem files.
101
-
102
- PKG_FILES = FileList[
103
- 'install.rb',
104
- '[A-Z]*',
105
- 'bin/**/*',
106
- 'lib/**/*.rb',
107
- 'test/**/*.rb',
108
- 'doc/**/*'
109
- ]
110
- PKG_FILES.exclude('doc/example/*.o')
111
- PKG_FILES.exclude(%r{doc/example/main$})
112
-
113
- if ! defined?(Gem)
114
- puts "Package Target requires RubyGEMs"
115
- else
116
- spec = Gem::Specification.new do |s|
117
-
118
- #### Basic information.
119
-
120
- s.name = 'rake'
121
- s.version = PKG_VERSION
122
- s.summary = "Ruby based make-like utility."
123
- s.description = <<-EOF
124
- Rake is a Make-like program implemented in Ruby. Tasks
125
- and dependencies are specified in standard Ruby syntax.
126
- EOF
127
-
128
- #### Dependencies and requirements.
129
-
130
- #s.add_dependency('log4r', '> 1.0.4')
131
- #s.requirements << ""
132
-
133
- #### Which files are to be included in this gem? Everything! (Except CVS directories.)
134
-
135
- s.files = PKG_FILES.to_a
136
-
137
- #### C code extensions.
138
-
139
- #s.extensions << "ext/rmagic/extconf.rb"
140
-
141
- #### Load-time details: library and application (you will need one or both).
142
-
143
- s.require_path = 'lib' # Use these for libraries.
144
-
145
- s.bindir = "bin" # Use these for applications.
146
- s.executables = ["rake"]
147
- s.default_executable = "rake"
148
-
149
- #### Documentation and testing.
150
-
151
- s.has_rdoc = true
152
- s.extra_rdoc_files = rd.rdoc_files.reject { |fn| fn =~ /\.rb$/ }.to_a
153
- s.rdoc_options <<
154
- '--title' << 'Rake -- Ruby Make' <<
155
- '--main' << 'README' <<
156
- '--line-numbers'
157
-
158
- #### Author and project details.
159
-
160
- s.author = "Jim Weirich"
161
- s.email = "jim@weirichhouse.org"
162
- s.homepage = "http://rake.rubyforge.org"
163
- s.rubyforge_project = "rake"
164
- end
165
-
166
- Rake::GemPackageTask.new(spec) do |pkg|
167
- pkg.need_zip = true
168
- pkg.need_tar = true
169
- end
170
- end
171
-
172
- # Misc tasks =========================================================
173
-
174
- def count_lines(filename)
175
- lines = 0
176
- codelines = 0
177
- open(filename) { |f|
178
- f.each do |line|
179
- lines += 1
180
- next if line =~ /^\s*$/
181
- next if line =~ /^\s*#/
182
- codelines += 1
183
- end
184
- }
185
- [lines, codelines]
186
- end
187
-
188
- def show_line(msg, lines, loc)
189
- printf "%6s %6s %s\n", lines.to_s, loc.to_s, msg
190
- end
191
-
192
- desc "Count lines in the main rake file"
193
- task :lines do
194
- total_lines = 0
195
- total_code = 0
196
- show_line("File Name", "LINES", "LOC")
197
- SRC_RB.each do |fn|
198
- lines, codelines = count_lines(fn)
199
- show_line(fn, lines, codelines)
200
- total_lines += lines
201
- total_code += codelines
202
- end
203
- show_line("TOTAL", total_lines, total_code)
204
- end
205
-
206
- ARCHIVEDIR = '/mnt/usb'
207
-
208
- task :archive => [:package] do
209
- cp FileList["pkg/*.tgz", "pkg/*.zip", "pkg/*.gem"], ARCHIVEDIR
210
- end
211
-
212
- # Define an optional publish target in an external file. If the
213
- # publish.rf file is not found, the publish targets won't be defined.
214
-
215
- load "publish.rf" if File.exist? "publish.rf"
data/TODO DELETED
@@ -1,19 +0,0 @@
1
- = Rake Project -- To Do List
2
-
3
- Send suggestions for this list to mailto:jim@weirichhouse.org or on
4
- the rake-devel@rubyforge.org mailing list.
5
-
6
- === To Do
7
- * Provide a way to disable -w warning mode.
8
- * Define a set of default rules that work in the absense of any Rakefile
9
- * What about cyclic dependencies?
10
- * Java support utilities
11
- * Installation support utilities
12
- * Check out installpkg.rb
13
- * Autogenerate Dependencies
14
- * Rules should apply to existing tasks if no actions are defined.
15
- * How to create multiple package tasks without task name collision?
16
- * Trap "ln -s" commands that fail and use "cp" instead (SMB mounted
17
- drives have problems with "ln -s".
18
-
19
- (moved DONE list to CHANGES file)
data/bin/rake DELETED
@@ -1,8 +0,0 @@
1
- begin
2
- require 'rake'
3
- rescue LoadError
4
- require 'rubygems'
5
- require_gem 'rake'
6
- end
7
- RakeApp.new.run
8
-
data/install.rb DELETED
@@ -1,88 +0,0 @@
1
- require 'rbconfig'
2
- require 'find'
3
- require 'ftools'
4
-
5
- include Config
6
-
7
- $ruby = CONFIG['ruby_install_name']
8
-
9
- ##
10
- # Install a binary file. We patch in on the way through to
11
- # insert a #! line. If this is a Unix install, we name
12
- # the command (for example) 'rake' and let the shebang line
13
- # handle running it. Under windows, we add a '.rb' extension
14
- # and let file associations to their stuff
15
- #
16
-
17
- def installBIN(from, opfile)
18
-
19
- tmp_dir = nil
20
- for t in [".", "/tmp", "c:/temp", $bindir]
21
- stat = File.stat(t) rescue next
22
- if stat.directory? and stat.writable?
23
- tmp_dir = t
24
- break
25
- end
26
- end
27
-
28
- fail "Cannot find a temporary directory" unless tmp_dir
29
- tmp_file = File.join(tmp_dir, "_tmp")
30
-
31
- File.open(from) do |ip|
32
- File.open(tmp_file, "w") do |op|
33
- ruby = File.join($realbindir, $ruby)
34
- op.puts "#!#{ruby} -w"
35
- op.write ip.read
36
- end
37
- end
38
-
39
- opfile += ".rb" if CONFIG["target_os"] =~ /mswin/i
40
- File::install(tmp_file, File.join($bindir, opfile), 0755, true)
41
- File::unlink(tmp_file)
42
- end
43
-
44
- $sitedir = CONFIG["sitelibdir"]
45
- unless $sitedir
46
- version = CONFIG["MAJOR"]+"."+CONFIG["MINOR"]
47
- $libdir = File.join(CONFIG["libdir"], "ruby", version)
48
- $sitedir = $:.find {|x| x =~ /site_ruby/}
49
- if !$sitedir
50
- $sitedir = File.join($libdir, "site_ruby")
51
- elsif $sitedir !~ Regexp.quote(version)
52
- $sitedir = File.join($sitedir, version)
53
- end
54
- end
55
-
56
- $bindir = CONFIG["bindir"]
57
-
58
- $realbindir = $bindir
59
-
60
- bindir = CONFIG["bindir"]
61
- if (destdir = ENV['DESTDIR'])
62
- $bindir = destdir + $bindir
63
- $sitedir = destdir + $sitedir
64
-
65
- File::makedirs($bindir)
66
- File::makedirs($sitedir)
67
- end
68
-
69
- rake_dest = File.join($sitedir, "rake")
70
- File::makedirs(rake_dest, true)
71
- File::chmod(0755, rake_dest)
72
-
73
- # The library files
74
-
75
- files = Dir.chdir('lib') { Dir['**/*.rb'] }
76
-
77
- for fn in files
78
- fn_dir = File.dirname(fn)
79
- target_dir = File.join($sitedir, fn_dir)
80
- if ! File.exist?(target_dir)
81
- File.makedirs(target_dir)
82
- end
83
- File::install(File.join('lib', fn), File.join($sitedir, fn), 0644, true)
84
- end
85
-
86
- # and the executable
87
-
88
- installBIN("bin/rake", "rake")
@@ -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
-
@@ -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
@@ -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
@@ -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
@@ -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