From 0d586069e7fd71c5e07ee5df49a7df690be7290e Mon Sep 17 00:00:00 2001 From: Ihor Omelchenko Date: Sun, 14 May 2017 21:25:36 +0300 Subject: [PATCH] Vagrant file fix for ubuntu/trusty64 (#769) * Fix screenshot link in readme * Vagrant file fix for ubuntu/trusty64 --- README.md | 2 +- Vagrantfile | 33 ++++++++++++++------------------- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 20bb2d3..b685fc6 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@

Slate helps you create beautiful, intelligent, responsive API documentation.

-

Screenshot of Example Documentation created with Slate

+

Screenshot of Example Documentation created with Slate

The example above was created with Slate. Check it out at lord.github.io/slate.

diff --git a/Vagrantfile b/Vagrantfile index c108e72..f3b2ff7 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,28 +1,23 @@ Vagrant.configure(2) do |config| - config.vm.box = "debian/jessie64" + config.vm.box = "ubuntu/trusty64" config.vm.network :forwarded_port, guest: 4567, host: 4567 - config.vm.synced_folder ".", "/vagrant", type: "rsync" - # Download and install ruby from sources and other tools - config.vm.provision "shell", + config.vm.provision "bootstrap", + type: "shell", inline: <<-SHELL - apt-get -yq install zlib1g-dev libssl-dev libreadline-dev libgdbm-dev openssl git libxml2-dev libxslt-dev build-essential nodejs - wget https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0.tar.gz - tar xvfz ruby-2.4.0.tar.gz - cd ruby-2.4.0 - ./configure - make - make install - gem install --no-ri --no-rdoc bundler - rm -rf ruby-2.4.0.tar.gz ruby-2.4.0 - apt-get autoremove -yq + sudo apt-add-repository ppa:brightbox/ruby-ng + sudo apt-get update + sudo apt-get install -yq ruby2.2 ruby2.2-dev + sudo apt-get install -yq pkg-config build-essential nodejs git libxml2-dev libxslt-dev + sudo apt-get autoremove -yq + gem2.2 install --no-ri --no-rdoc bundler SHELL # add the local user git config to the vm config.vm.provision "file", source: "~/.gitconfig", destination: ".gitconfig" - # Install project dependencies (gems) - config.vm.provision "shell", + config.vm.provision "install", + type: "shell", privileged: false, inline: <<-SHELL echo "==============================================" @@ -32,8 +27,8 @@ Vagrant.configure(2) do |config| bundle install SHELL - # Exec server - config.vm.provision "shell", + config.vm.provision "run", + type: "shell", privileged: false, run: "always", inline: <<-SHELL @@ -43,4 +38,4 @@ Vagrant.configure(2) do |config| cd /vagrant bundle exec middleman server --watcher-force-polling --watcher-latency=1 &> ~/middleman.log & SHELL -end +end \ No newline at end of file