Class: Reap::PublishTask
- Inherits:
-
Task
- Object
- Task
- Reap::PublishTask
show all
- Defined in:
- lib/reap/tasks/publish-task.rb
Constant Summary
Constants inherited
from Task
Task::DEFAULT_INCLUDE, Task::MUST_EXCLUDE, Task::RUBY
Instance Attribute Summary
Attributes inherited from Task
#config, #section
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Task
#[], inherited, #initialize, #package_name, registry, #ruby, #sh, tasks
Constructor Details
This class inherits a constructor from Reap::Task
Class Method Details
.desc ⇒ Object
8
|
# File 'lib/reap/tasks/publish-task.rb', line 8
def self.desc ; "Publish documents to the web." ; end
|
.task ⇒ Object
6
|
# File 'lib/reap/tasks/publish-task.rb', line 6
def self.task ; :publish ; end
|
Instance Method Details
#run ⇒ Object
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/reap/tasks/publish-task.rb', line 18
def run
cmd = %{scp -r #{@dir}/* #{@username}@rubyforge.org:/var/www/gforge-projects/#{@project}/}
puts "Reap is shelling out work to scp..."
puts cmd
sh(cmd) unless $PRETEND
end
|
#set(section) ⇒ Object
11
12
13
14
15
16
|
# File 'lib/reap/tasks/publish-task.rb', line 11
def set( section )
@dir = section["dir"]
@project = section["project"]
@username = section["username"]
end
|