Skip to content

Commit 0d9c237

Browse files
committedSep 28, 2014
Added a check to see if the vagrant.yml is present before starting Vagrant.
1 parent 2047781 commit 0d9c237

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed
 

‎Vagrantfile

+10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
# vi: set ft=ruby :
33

44
# Load in custom vagrant settings
5+
raise <<-EOF unless File.exists?("vagrant.yml")
6+
7+
Hi! Before getting started with Vagrant and Coderwall
8+
you'll need to setup the `vagrant.yml`. There should
9+
be a file `vagrant.yml.example` that you can use as
10+
a base reference. Copy the `vagrant.yml.example` to
11+
`vagrant.yml` to get started.
12+
13+
EOF
14+
515
require 'yaml'
616
custom_settings = File.file?('vagrant.yml') ? YAML.load_file('vagrant.yml') : {}
717

‎vagrant.yml.example

+3-8
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,10 @@
44
# In order to use, create a copy named vagrant.yml
55
#
66

7-
sync:
8-
use_nfs: false
7+
use_nfs: false
98
virtualbox:
10-
cpus: 4
11-
memory: 4096
9+
cpus: 2
10+
memory: 2048
1211
network:
1312
port_mappings:
1413
rails: 3000
15-
postgres: 2200
16-
redis: 2201
17-
elasticsearch: 9200
18-
mongodb: 27017

0 commit comments

Comments
 (0)