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

Commit

Permalink
Merge branch 'release/v1.4.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Rombauts committed Nov 11, 2015
2 parents 3a8634e + 4d63428 commit 24f122a
Show file tree
Hide file tree
Showing 20 changed files with 270 additions and 71 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ in 1.x versions.
To get the diff for a specific change, go to https://github.com/joomlatools/joomla-vagrant/commit/xxx where xxx is the change hash.
To view the diff between two versions, go to https://github.com/joomlatools/joomla-vagrant/compare/v1.0.0...v1.0.1

* 1.4.0 (2015-10-19)
* 1.4.1 (2015-11-11)
* Added - Install Z-Ray [Joomla](https://www.yireo.com/software/joomla-extensions/zray) and [Composer](https://github.com/zend-server-extensions/Z-Ray-Composer) plugins
* Improved - Automatically enable Xdebug if it's disabled when starting the profiler
* Fixed - Make sure dashboard can retrieve Joomla 3.5.0 version out of `JVersion` class
* Fixed - Automated installation of `vagrant-triggers` plugin failed on Windows hosts

* 1.4.0 (2015-11-05)
* Added - `box php:engine hhvm` command to switch to HHVM
* Added - `box xdebug:profiler start|stop` command to turn on Xdebug profiling
* Added - [Zend Z-Ray](http://www.zend.com/en/products/z-ray/z-ray-preview) preview
Expand All @@ -19,6 +25,7 @@ To view the diff between two versions, go to https://github.com/joomlatools/joom
* Fixed - Upgraded Webgrind to automatically find cachegrind files
* Fixed - Consolidate the PHP ini files into a single custom.ini file
* Improved - Automatically change directory to /var/www when logging in via `vagrant ssh` or web terminal
* Improved - Xdebug is now disabled by default
* Improved - Added /terminal, /mailcatcher and /filebrowser aliases
* Improved - Added bash autocompletion to the `box` command

Expand Down
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require "json"
# Check for required plugins and install if missing
required_plugins = %w( vagrant-triggers )
required_plugins.each do |plugin|
exec "vagrant plugin install #{plugin};vagrant #{ARGV.join(" ")}" unless Vagrant.has_plugin? plugin || ARGV[0] == 'plugin'
exec "vagrant plugin install #{plugin} && vagrant #{ARGV.join(" ")}" unless Vagrant.has_plugin? plugin || ARGV[0] == 'plugin'
end

# Initialize config
Expand Down
2 changes: 1 addition & 1 deletion Vagrantfile.pkg
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require "json"
# Check for required plugins and install if missing
required_plugins = %w( vagrant-triggers )
required_plugins.each do |plugin|
exec "vagrant plugin install #{plugin};vagrant #{ARGV.join(" ")}" unless Vagrant.has_plugin? plugin || ARGV[0] == 'plugin'
exec "vagrant plugin install #{plugin} && vagrant #{ARGV.join(" ")}" unless Vagrant.has_plugin? plugin || ARGV[0] == 'plugin'
end

# Initialize config
Expand Down
2 changes: 1 addition & 1 deletion packer.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"artifact_type": "vagrant.box",
"metadata": {
"provider": "virtualbox",
"version": "1.4.0"
"version": "1.4.1"
}
}]
]
Expand Down
90 changes: 45 additions & 45 deletions puppet/manifests/default.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
}

Class['::apt::update'] -> Package <|
title != 'python-software-properties'
and title != 'software-properties-common'
title != 'python-software-properties'
and title != 'software-properties-common'
|>

apt::key { '4F4EA0AAE5267A6C': }
Expand Down Expand Up @@ -38,12 +38,12 @@
}

package { [
'build-essential',
'vim',
'curl',
'git-core',
'unzip'
]:
'build-essential',
'vim',
'curl',
'git-core',
'unzip'
]:
ensure => 'installed'
}

Expand All @@ -67,7 +67,7 @@
class { 'apache::certificate':}

class { 'apache':
require => Class['apache::certificate'],
require => Class['apache::certificate'],
}

exec { 'apache-set-servername':
Expand Down Expand Up @@ -124,7 +124,7 @@

php::pear::config {
download_dir: value => "/tmp/pear/download",
require => Class['php::pear']
require => Class['php::pear']
}

php::pear::module { 'Console_CommandLine':
Expand Down Expand Up @@ -258,29 +258,29 @@
}

single_user_rvm::install { 'vagrant':
require => Gnupg_key['gpg-rvm-signature']
require => Gnupg_key['gpg-rvm-signature']
}
single_user_rvm::install_ruby { '2.2':
user => vagrant
user => vagrant
}

exec {'set-default-ruby-for-vagrant':
user => vagrant,
command => 'bash -c "source ~/.rvm/scripts/rvm; rvm --default use 2.2"',
environment => ['HOME=/home/vagrant'],
path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/vagrant/.rvm/bin/',
require => Single_user_rvm::Install_ruby['2.2']
user => vagrant,
command => 'bash -c "source ~/.rvm/scripts/rvm; rvm --default use 2.2"',
environment => ['HOME=/home/vagrant'],
path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/vagrant/.rvm/bin/',
require => Single_user_rvm::Install_ruby['2.2']
}

class {'mailcatcher':
require => Exec['set-default-ruby-for-vagrant']
require => Exec['set-default-ruby-for-vagrant']
}

class { 'less': }

class { 'uglifyjs': }

class { 'webgrind':
class { 'webgrind':
require => Package['unzip'],
}

Expand All @@ -306,18 +306,18 @@
}

exec { 'disable-default-vhost':
command => 'a2dissite 000-default',
require => Apache::Vhost['joomla.box']
command => 'a2dissite 000-default',
require => Apache::Vhost['joomla.box']
}

file { '/etc/apache2/conf-available/shared_paths.conf':
ensure => file,
require => Apache::Vhost['joomla.box']
ensure => file,
require => Apache::Vhost['joomla.box']
}

exec { 'enable-shared-paths-config':
command => 'a2enconf shared_paths',
require => File['/etc/apache2/conf-available/shared_paths.conf']
command => 'a2enconf shared_paths',
require => File['/etc/apache2/conf-available/shared_paths.conf']
}

exec { 'set-env-for-debugging':
Expand All @@ -332,31 +332,31 @@
class { 'phpmanager': }

exec {'install-capistrano-gem':
user => vagrant,
command => 'bash -c "source ~/.rvm/scripts/rvm; gem install capistrano"',
environment => ['HOME=/home/vagrant'],
timeout => 900,
require => Exec['set-default-ruby-for-vagrant']
user => vagrant,
command => 'bash -c "source ~/.rvm/scripts/rvm; gem install capistrano"',
environment => ['HOME=/home/vagrant'],
timeout => 900,
require => Exec['set-default-ruby-for-vagrant']
}

exec {'install-bundler-gem':
user => vagrant,
command => 'bash -c "source ~/.rvm/scripts/rvm; gem install bundler"',
environment => ['HOME=/home/vagrant'],
timeout => 900,
require => Exec['set-default-ruby-for-vagrant']
user => vagrant,
command => 'bash -c "source ~/.rvm/scripts/rvm; gem install bundler"',
environment => ['HOME=/home/vagrant'],
timeout => 900,
require => Exec['set-default-ruby-for-vagrant']
}

exec {'install-sass-gem':
user => vagrant,
command => 'bash -c "source ~/.rvm/scripts/rvm; gem install sass compass"',
environment => ['HOME=/home/vagrant'],
timeout => 900,
require => Exec['set-default-ruby-for-vagrant']
user => vagrant,
command => 'bash -c "source ~/.rvm/scripts/rvm; gem install sass compass"',
environment => ['HOME=/home/vagrant'],
timeout => 900,
require => Exec['set-default-ruby-for-vagrant']
}

class { 'box':
require => [Class['composer'], Class['phpmanager']]
require => [Class['composer'], Class['phpmanager']]
}

class {'wetty': }
Expand All @@ -369,19 +369,19 @@
}

file { ['/etc/update-motd.d/10-help-text', '/etc/update-motd.d/91-release-upgrade', '/etc/update-motd.d/50-landscape-sysinfo', '/etc/update-motd.d/51-cloudguest', '/etc/update-motd.d/90-updates-available', '/etc/update-motd.d/98-cloudguest']:
ensure => absent
ensure => absent
}

class { 'pimpmylog':
require => [Package['apache'], Package['mysql-server']]
require => [Package['apache'], Package['mysql-server']]
}

class { 'phpmetrics':
require => [Class['composer'], Class['scripts']]
require => [Class['composer'], Class['scripts']]
}

package { 'git-ftp':
require => Apt::Ppa['ppa:resmo/git-ftp']
require => Apt::Ppa['ppa:resmo/git-ftp']
}

package { 'httpie':
Expand Down
22 changes: 18 additions & 4 deletions puppet/modules/box/files/scripts/Command/Php/Engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,25 @@ class Engine extends Command
protected function configure()
{
$this->setName('php:engine')
->setDescription('Show current PHP engine or switch to another engine.')
->setDescription('Show current PHP engine or switch to another engine.')
->setHelp(<<<EOF
You can execute PHP code using either the Zend or HHVM engine. To show the current engine, run:
<info>box php:engine</info>
To switch to HHVM, run
<info>box php:engine hhvm</info>
To switch back to the default Zend engine:
<info>box php:engine zend</info>
EOF
)
->addArgument(
'engine',
InputArgument::OPTIONAL,
'Desired PHP engine to use for virtual hosts. Omit to get current engine. Supported values: zend|hhvm'
'engine',
InputArgument::OPTIONAL,
'Desired PHP engine to use for virtual hosts. Omit to get current engine. Supported values: zend|hhvm'
);
}

Expand Down
18 changes: 18 additions & 0 deletions puppet/modules/box/files/scripts/Command/Php/Ini.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,24 @@ protected function configure()
{
$this->setName('php:ini')
->setDescription('Get or set PHP config directive for the currently active PHP version')
->setHelp(<<<EOF
To retrieve a value from the currently installed PHP version, you can use the `box php:ini <directive>` command. For example, to get the current `mysql.default_socket` value:
<info>box php:ini mysql.default_socket</info>
To change this value into something else, append the new value:
<info>box php:ini mysql.default_socket /path/to/new/socket</info>
The script puts these directives into an additional config file that overrides the default values. To remove the directive again, pass in an empty value:
<info>box php:ini mysql.default_socket ""</info>
If you want to get the list of the scanned .ini files, run the command without arguments:
<info>box php:ini</info>
EOF
)
->addArgument(
'key',
InputArgument::OPTIONAL,
Expand Down
10 changes: 9 additions & 1 deletion puppet/modules/box/files/scripts/Command/Php/ListVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ class ListVersion extends Command
protected function configure()
{
$this->setName('php:list')
->setDescription('List all installed PHP versions');
->setDescription('List all installed PHP versions')
->setHelp(<<<EOF
To get a list of the PHP versions you have build and installed, run:
<info>box php:list</info>
Use the `<info>box php:use <VERSION></info>` command to switch to one of the available versions.
EOF
);
}

protected function execute(InputInterface $input, OutputInterface $output)
Expand Down
2 changes: 1 addition & 1 deletion puppet/modules/box/files/scripts/Command/Php/Remove.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Remove extends Command
protected function configure()
{
$this->setName('php:remove')
->setDescription('Uninstall a PHP version')
->setDescription('Uninstall a custom PHP version')
->addArgument(
'version',
InputArgument::REQUIRED,
Expand Down
16 changes: 16 additions & 0 deletions puppet/modules/box/files/scripts/Command/Php/UseVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@ protected function configure()
{
$this->setName('php:use')
->setDescription('Switch to another PHP version. Will attempt to compile from source if not installed.')
->setHelp(<<<EOF
You can build and install any PHP version from 5.2.0 and up automatically. This is ideal to try out your code on new PHP releases or to fix bugs that have been reported on older PHP versions.
To install one of the available versions, for example 7.0.0RC6, execute:
<info>box php:use 7.0.0RC6</info>
The script will check if this version has been installed and if not, will attempt to build it. Please note that building PHP might take a while.
You can get a list of buildable versions using the `<info>box php:versions</info>` command. To see what is already compiled and available, use the `<info>box php:list</info>` command.
To revert back to the default PHP installation, run `<info>box php:reset</info>`.
The truly adventurous can build the current master branch with this command: `<info>box php:use master</info>`.
Each time you build the master branch the script will pull in the latest changes from the PHP Git repository.
EOF
)
->addArgument(
'version',
InputArgument::REQUIRED,
Expand Down
10 changes: 9 additions & 1 deletion puppet/modules/box/files/scripts/Command/Php/Versions.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ class Versions extends Command
protected function configure()
{
$this->setName('php:versions')
->setDescription('List all available versions');
->setDescription('List all available versions')
->setHelp(<<<EOF
To get a list of the PHP versions you can build and install, run this command:
<info>box php:versions</info>
Use the `<info>box php:use <VERSION></info>` command to build and install one of the available versions.
EOF
);
}

protected function execute(InputInterface $input, OutputInterface $output)
Expand Down
9 changes: 8 additions & 1 deletion puppet/modules/box/files/scripts/Command/Xdebug/Disable.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Output\NullOutput;

class Disable extends Xdebug
{
Expand All @@ -18,6 +19,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
{
parent::execute($input, $output);

if (!extension_loaded('xdebug'))
{
$output->writeln('[<comment>notice</comment>] XDebug is already disabled');
exit();
}

$files = \Helper\Ini::findIniFiles($this->_ini_files);

foreach($files as $file) {
Expand All @@ -33,7 +40,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
\Helper\Ini::update($file, 'xdebug.profiler_enable', 0);
}

$this->getApplication()->find('server:restart')->run(new ArrayInput(array('command' => 'server:restart', 'service' => array('apache'))), $output);
$this->getApplication()->find('server:restart')->run(new ArrayInput(array('command' => 'server:restart', 'service' => array('apache'))), new NullOutput());

$output->writeln('Xdebug has been disabled');
}
Expand Down
Loading

0 comments on commit 24f122a

Please sign in to comment.