A simple paste web application made with Laravel and Pygments https://pst.moe

Vagrantfile 900B

1234567891011121314151617181920212223242526272829
  1. require 'json'
  2. require 'yaml'
  3. VAGRANTFILE_API_VERSION ||= "2"
  4. confDir = $confDir ||= File.expand_path("vendor/laravel/homestead", File.dirname(__FILE__))
  5. homesteadYamlPath = "Homestead.yaml"
  6. homesteadJsonPath = "Homestead.json"
  7. afterScriptPath = "after.sh"
  8. aliasesPath = "aliases"
  9. require File.expand_path(confDir + '/scripts/homestead.rb')
  10. Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  11. if File.exists? aliasesPath then
  12. config.vm.provision "file", source: aliasesPath, destination: "~/.bash_aliases"
  13. end
  14. if File.exists? homesteadYamlPath then
  15. Homestead.configure(config, YAML::load(File.read(homesteadYamlPath)))
  16. elsif File.exists? homesteadJsonPath then
  17. Homestead.configure(config, JSON.parse(File.read(homesteadJsonPath)))
  18. end
  19. if File.exists? afterScriptPath then
  20. config.vm.provision "shell", path: afterScriptPath
  21. end
  22. end