Skip to content

Commit

Permalink
Update homestead to latest and add "watson/active" to composer.json
Browse files Browse the repository at this point in the history
Summary:
Vagrant keeps complaining about a newer version of homestead is available and
it's good to keep up, so update it.

Also, somehow "watson/active" never got added to `composer.json`, though it did end up
in the lockfile so things worked. We do depend on it, so it should be listed in
our dependencies.

Test Plan:
- `vagrant box update && vagrant destroy --force && vagrant up`
- Setup the Madison db (`make db-reset` is easiest)
- Ensure your setup still works, run the tests, etc.

Reviewers: sethetter

Reviewed By: sethetter

Differential Revision: https://phabricator.opengovfoundation.org/D182
  • Loading branch information
doshitan committed May 9, 2017
1 parent dfd1ed1 commit 4b3d5c7
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 104 deletions.
13 changes: 9 additions & 4 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,29 @@ require 'yaml'
VAGRANTFILE_API_VERSION ||= "2"
confDir = $confDir ||= File.expand_path("vendor/laravel/homestead", File.dirname(__FILE__))

homesteadYamlPath = "Homestead.yaml"
homesteadJsonPath = "Homestead.json"
homesteadYamlPath = File.expand_path("Homestead.yaml", File.dirname(__FILE__))
homesteadJsonPath = File.expand_path("Homestead.json", File.dirname(__FILE__))
afterScriptPath = "after.sh"
aliasesPath = "aliases"

require File.expand_path(confDir + '/scripts/homestead.rb')

Vagrant.require_version '>= 1.8.4'
Vagrant.require_version '>= 1.9.0'

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
if File.exist? aliasesPath then
config.vm.provision "file", source: aliasesPath, destination: "~/.bash_aliases"
config.vm.provision "file", source: aliasesPath, destination: "/tmp/bash_aliases"
config.vm.provision "shell" do |s|
s.inline = "awk '{ sub(\"\r$\", \"\"); print }' /tmp/bash_aliases > /home/vagrant/.bash_aliases"
end
end

if File.exist? homesteadYamlPath then
settings = YAML::load(File.read(homesteadYamlPath))
elsif File.exist? homesteadJsonPath then
settings = JSON.parse(File.read(homesteadJsonPath))
else
abort "Homestead settings file not found in #{confDir}"
end

Homestead.configure(config, settings)
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@
"predis/predis": "^1.1",
"roumen/feed": "~2.10",
"roumen/sitemap": "2.4.*",
"watson/active": "^2.0",
"zizaco/entrust": "dev-master"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~5.0",
"laravel/homestead": "4.0.x-dev"
"laravel/homestead": "^5"
},
"autoload": {
"classmap": [
Expand Down
Loading

0 comments on commit 4b3d5c7

Please sign in to comment.