Class: Vagrant::Hmurca::Generator
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Vagrant::Hmurca::Generator
- 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
- #copy_dot_gitignore ⇒ Object
- #copy_readme ⇒ Object
- #copy_vagrantfile ⇒ Object
- #create_hmurca_conf_sample ⇒ Object
- #create_project_root ⇒ Object
Class Method Details
.source_root ⇒ Object
12 13 14 |
# File 'lib/vagrant/hmurca/command.rb', line 12 def self.source_root File.("../templates", __FILE__) end |
Instance Method Details
#copy_dot_gitignore ⇒ Object
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_readme ⇒ Object
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_vagrantfile ⇒ Object
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_sample ⇒ Object
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_root ⇒ Object
16 17 18 |
# File 'lib/vagrant/hmurca/command.rb', line 16 def create_project_root empty_directory(project_root) end |