Class: ThemeJuice::Tasks::DNS
- Inherits:
-
Entry
- Object
- ThemeJuice::Task
- Entry
- ThemeJuice::Tasks::DNS
- Defined in:
- lib/theme-juice/tasks/dns.rb
Instance Attribute Summary
Attributes inherited from Entry
Attributes inherited from ThemeJuice::Task
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(opts = {}) ⇒ DNS
constructor
A new instance of DNS.
- #unexecute ⇒ Object
Methods inherited from ThemeJuice::Task
Constructor Details
#initialize(opts = {}) ⇒ DNS
Returns a new instance of DNS.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/theme-juice/tasks/dns.rb', line 7 def initialize(opts = {}) super @entry = { :project => @project.name, :file => "#{@env.vm_path}/Customfile", :name => "DNS", :id => "DNS" } end |
Instance Method Details
#execute ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/theme-juice/tasks/dns.rb', line 18 def execute create_entry_file create_entry do %Q{case when Vagrant.has_plugin?("landrush") config.landrush.host '#{@project.url}', '#{@env.vm_ip}' when Vagrant.has_plugin?("vagrant-hostsupdater") config.hostsupdater.aliases << '#{@project.url}' end} end end |
#unexecute ⇒ Object
30 31 32 33 |
# File 'lib/theme-juice/tasks/dns.rb', line 30 def unexecute remove_landrush_entry remove_entry end |