Class: ThemeJuice::Tasks::SyncedFolder
- Inherits:
-
Entry
- Object
- ThemeJuice::Task
- Entry
- ThemeJuice::Tasks::SyncedFolder
- Defined in:
- lib/theme-juice/tasks/synced_folder.rb
Instance Attribute Summary
Attributes inherited from Entry
Attributes inherited from ThemeJuice::Task
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(opts = {}) ⇒ SyncedFolder
constructor
A new instance of SyncedFolder.
- #unexecute ⇒ Object
Methods inherited from ThemeJuice::Task
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
#execute ⇒ Object
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 |
#unexecute ⇒ Object
25 26 27 |
# File 'lib/theme-juice/tasks/synced_folder.rb', line 25 def unexecute remove_entry end |