Class: ThemeJuice::Tasks::SyncedFolder

Inherits:
Entry show all
Defined in:
lib/theme-juice/tasks/synced_folder.rb

Instance Attribute Summary

Attributes inherited from Entry

#entry

Attributes inherited from ThemeJuice::Task

#tasks

Instance Method Summary collapse

Methods inherited from ThemeJuice::Task

#runner

Constructor Details

#initialize(opts = {}) ⇒ SyncedFolder

Returns a new instance of SyncedFolder.



7
8
9
10
11
12
13
14
15
16
# File 'lib/theme-juice/tasks/synced_folder.rb', line 7

def initialize(opts = {})
  super

  @entry = {
    :project => @project.name,
    :file    => "#{@env.vm_path}/Customfile",
    :name    => "synced folder",
    :id      => "SF"
  }
end

Instance Method Details

#executeObject



18
19
20
21
22
23
# File 'lib/theme-juice/tasks/synced_folder.rb', line 18

def execute
  create_entry_file
  create_entry do
    %Q{config.vm.synced_folder '#{@project.location}', '/srv/www/tj-#{@project.name}', :owner => 'vagrant', :group => 'www-data', :mount_options => ['dmode=777', 'fmode=777']}
  end
end

#unexecuteObject



25
26
27
# File 'lib/theme-juice/tasks/synced_folder.rb', line 25

def unexecute
  remove_entry
end