Skip to content
This repository was archived by the owner on Jan 25, 2022. It is now read-only.

Commit 16e08bf

Browse files
committed
Simplifid IO.readlines('IP')[0].strip to IO.read('IP').strip
1 parent 22f0a0e commit 16e08bf

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Vagrantfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@
5454
#
5555
# REFERENCE:
5656
#
57-
# system('scripts/pre-vagrant.sh')
57+
# system('scripts/before-vagrant.sh')
5858
#
59-
# This line calls a `pre-vagrant.sh` script to be run before
60-
# any other part of Vagrantfile is run.
59+
# This line calls a `before-vagrant.sh` script to be run
60+
# before any other part of `Vagrantfile` is run.
6161
#
6262
# Currently this script generates a random non-routable IP
6363
# address starting with 10 and randomly selects from 0..254
@@ -111,11 +111,11 @@
111111
# WordPress but if you have the Vagrant hosts-updater plugin
112112
# then it will handle updating the hosts file for you.
113113
#
114-
# config.vm.network 'private_network', ip: IO.readlines('IP')[0].strip
114+
# config.vm.network 'private_network', ip: IO.read('IP').strip
115115
#
116116
# This line tells Vagrant what IP address to use for the VM.
117117
# It loads the IP address from the file named "IP" that
118-
# previously created by File.write().
118+
# previously created by the script `/scripts/before-vagrant.sh`
119119
#
120120
# The IP file can be found in in the project root after the
121121
# first "vagrant up"; the project root is the same directory
@@ -255,12 +255,12 @@
255255

256256
Vagrant.configure(2) do |config|
257257

258-
system('scripts/pre-vagrant.sh')
258+
system('scripts/before-vagrant.sh')
259259

260260
config.vm.box = "wplib/wplib"
261261
config.vm.hostname = "wplib.box"
262262

263-
config.vm.network 'private_network', ip: IO.readlines('IP')[0].strip
263+
config.vm.network 'private_network', ip: IO.read('IP').strip
264264

265265
config.vm.synced_folder "www", "/var/www"
266266

0 commit comments

Comments
 (0)