Class: Vagrant::Hmurca::Generator

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/vagrant/hmurca/command.rb

Overview

Internal: Files generator for hmurca default command.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



12
13
14
# File 'lib/vagrant/hmurca/command.rb', line 12

def self.source_root
  File.expand_path("../templates", __FILE__)
end

Instance Method Details

#copy_dot_gitignoreObject



20
21
22
23
# File 'lib/vagrant/hmurca/command.rb', line 20

def copy_dot_gitignore
  target = File.join(project_root, ".gitignore")
  copy_file("dot_gitignore", target)
end

#copy_readmeObject



35
36
37
38
# File 'lib/vagrant/hmurca/command.rb', line 35

def copy_readme
  target = File.join(project_root, "README.md")
  copy_file("README.md", target)
end

#copy_vagrantfileObject



30
31
32
33
# File 'lib/vagrant/hmurca/command.rb', line 30

def copy_vagrantfile
  target = File.join(project_root, "Vagrantfile")
  copy_file("Vagrantfile", target)
end

#create_hmurca_conf_sampleObject



25
26
27
28
# File 'lib/vagrant/hmurca/command.rb', line 25

def create_hmurca_conf_sample
  target = File.join(project_root, "hmurca.conf.sample")
  template("hmurca.conf.sample.tt", target)
end

#create_project_rootObject



16
17
18
# File 'lib/vagrant/hmurca/command.rb', line 16

def create_project_root
  empty_directory(project_root)
end