Class: Muwu::Publish
- Inherits:
-
Object
- Object
- Muwu::Publish
- Includes:
- Muwu
- Defined in:
- lib/muwu/publish/publish.rb
Constant Summary
Constants included from Muwu
GEM_HOME_LIB, GEM_HOME_LIB_MUWU, VERSION
Instance Method Summary collapse
-
#initialize(project, args: []) ⇒ Publish
constructor
A new instance of Publish.
- #up ⇒ Object
Methods included from Muwu
Constructor Details
#initialize(project, args: []) ⇒ Publish
Returns a new instance of Publish.
8 9 10 11 12 13 |
# File 'lib/muwu/publish/publish.rb', line 8 def initialize(project, args: []) @path_local = project.path_compiled + File::SEPARATOR @path_remote = project..remote_publish @project = project @switches = args.push(project..).flatten.sort.join(' ') end |
Instance Method Details
#up ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/muwu/publish/publish.rb', line 16 def up if @project.exceptions_include?(ProjectException::OptionRemotePublishValueNil) raise ProjectExceptionHandler::Fatal.new(ProjectException::OptionRemotePublishValueNil.new) else exec_rsync(source: @path_local, target: @path_remote) end end |