diff options
author | elijah <elijah@riseup.net> | 2013-01-28 02:23:50 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2013-01-28 02:23:50 -0800 |
commit | d30e9067a94e0d236df65d37b81809ddd6a4f153 (patch) | |
tree | 19f6774219df26cfd0e9b4c10caa3299ca201c91 /lib | |
parent | 1591a04c8a053b8d1e37c589d6e967b86c68c983 (diff) | |
download | leap_cli-d30e9067a94e0d236df65d37b81809ddd6a4f153.tar.gz leap_cli-d30e9067a94e0d236df65d37b81809ddd6a4f153.tar.bz2 |
added custom_vagrant_vm_line to Leapfile
Diffstat (limited to 'lib')
-rw-r--r-- | lib/leap_cli/commands/project.rb | 9 | ||||
-rw-r--r-- | lib/leap_cli/commands/vagrant.rb | 1 | ||||
-rw-r--r-- | lib/leap_cli/leapfile.rb | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/lib/leap_cli/commands/project.rb b/lib/leap_cli/commands/project.rb index 2f36bc5..12d159b 100644 --- a/lib/leap_cli/commands/project.rb +++ b/lib/leap_cli/commands/project.rb @@ -61,10 +61,13 @@ module LeapCli; module Commands end def leapfile_content(options) - %[@platform_directory_path = "#{options[:platform]}" + %[## Required: +@platform_directory_path = "#{options[:platform]}" +@leap_version = "#{LeapCli::VERSION}" + +## Optional: +# @custom_vagrant_vm_line = "config.vm.boot_mode = :gui" ] - # leap_version = "#{LeapCli::VERSION}" - # platform_version = "" end GITIGNORE_CONTENT = <<EOS diff --git a/lib/leap_cli/commands/vagrant.rb b/lib/leap_cli/commands/vagrant.rb index dfa32f2..02f47a4 100644 --- a/lib/leap_cli/commands/vagrant.rb +++ b/lib/leap_cli/commands/vagrant.rb @@ -113,6 +113,7 @@ module LeapCli; module Commands lines << %[ config.vm.box_url = "http://cloud.github.com/downloads/leapcode/minimal-debian-vagrant/leap-wheezy.box"] lines << %[ config.vm.network :hostonly, "#{node.ip_address}", :netmask => "#{netmask}"] lines << %[ config.vm.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]] + lines << %[ #{leapfile.custom_vagrant_vm_line}] if leapfile.custom_vagrant_vm_line lines << %[ end] end end diff --git a/lib/leap_cli/leapfile.rb b/lib/leap_cli/leapfile.rb index 2559864..f369c9a 100644 --- a/lib/leap_cli/leapfile.rb +++ b/lib/leap_cli/leapfile.rb @@ -12,6 +12,8 @@ module LeapCli class Leapfile attr_accessor :platform_directory_path attr_accessor :provider_directory_path + attr_accessor :custom_vagrant_vm_line + attr_accessor :leap_version def load directory = File.expand_path(find_in_directory_tree('Leapfile')) |