Skip to content

Commit

Permalink
Changing project.acquia_subname to project.machine_name.
Browse files Browse the repository at this point in the history
  • Loading branch information
grasmash committed May 5, 2016
1 parent fab2d8a commit 5deec94
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion build/phing/build.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
bolt:
new.dir: ${bolt.root}/../${project.acquia_subname}
new.dir: ${bolt.root}/../${project.machine_name}
6 changes: 3 additions & 3 deletions template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ Documentation by role:
## Resources

* JIRA - link me!
* [GitHub](http://www.github.com/acquia-pso/${project.acquia_subname})
* [GitHub](http://www.github.com/acquia-pso/${project.machine_name})
* Acquia Cloud subscription - link me!
* [TravisCI](https://travis-ci.com/acquia-pso/${project.acquia_subname})
* [TravisCI](https://travis-ci.com/acquia-pso/${project.machine_name})

----------------

[![Build Status](https://magnum.travis-ci.com/acquia-pso/${project.acquia_subname}.svg?token=eFBAT6vQ9cqDh1Sed5Mw&branch=${git.default_branch})](https://magnum.travis-ci.com/acquia-pso/${project.acquia_subname})
[![Build Status](https://magnum.travis-ci.com/acquia-pso/${project.machine_name}.svg?token=eFBAT6vQ9cqDh1Sed5Mw&branch=${git.default_branch})](https://magnum.travis-ci.com/acquia-pso/${project.machine_name})
2 changes: 1 addition & 1 deletion template/composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "acquia/${project.acquia_subname}",
"name": "acquia/${project.machine_name}",
"license": "proprietary",
"type": "project",
"repositories": [
Expand Down
4 changes: 2 additions & 2 deletions template/docroot/sites/default/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -733,8 +733,8 @@
* Keep this code block at the end of this file to take full effect.
*/
if ($is_local_env) {
if (isset($_SERVER['DEVDESKTOP_DRUPAL_SETTINGS_DIR']) && file_exists($_SERVER['DEVDESKTOP_DRUPAL_SETTINGS_DIR'] . '/loc_${project.acquia_subname}_dd.inc')) {
require $_SERVER['DEVDESKTOP_DRUPAL_SETTINGS_DIR'] . '/loc_${project.acquia_subname}_dd.inc';
if (isset($_SERVER['DEVDESKTOP_DRUPAL_SETTINGS_DIR']) && file_exists($_SERVER['DEVDESKTOP_DRUPAL_SETTINGS_DIR'] . '/loc_${project.machine_name}_dd.inc')) {
require $_SERVER['DEVDESKTOP_DRUPAL_SETTINGS_DIR'] . '/loc_${project.machine_name}_dd.inc';
}
elseif (file_exists(DRUPAL_ROOT . '/sites/default/settings/local.settings.php')) {
require DRUPAL_ROOT . '/sites/default/settings/local.settings.php';
Expand Down
6 changes: 3 additions & 3 deletions template/project.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project:
# The acquia_subname value is the machine name of your Github repository.
# This will determine the the directory name of the new repository.
acquia_subname: 'bolted8'
# Dev Desktop users: this should match your local site name
machine_name: 'bolted8'
# Used for enforcing correct git commit msg syntax.
prefix: 'BLT'
human_name: 'Bolted 8'
Expand All @@ -25,7 +25,7 @@ git:
drush:
aliases:
# The remote environment from which the database will be pulled.
remote: ${acquia_subname}.test
remote: ${machine_name}.test
# The local environment against which all local drush commands are run.
local: self

Expand Down
8 changes: 4 additions & 4 deletions template/readme/local-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,29 +30,29 @@ To use Drupal VM with a Drupal project that is generated with Bolt, first place
To make sure Drush commands work correctly with Drupal VM, inside the new project's `build/custom/phing/build.yml` file, override the `docroot` used for Drush commands with the value:

drush:
root: /var/www/[project_acquia_subname]/docroot
root: /var/www/[project_machine_name]/docroot

Then follow the Quick Start Guide in [Drupal VM's README](https://github.com/geerlingguy/drupal-vm#quick-start-guide), but before you run `vagrant up`, make the following changes to your VM
`config.yml` file:

# Update the hostname to the local development environment hostname.
vagrant_hostname: [project_local_domain]
vagrant_machine_name: [project_acquia_subname]
vagrant_machine_name: [project_machine_name]

# Provide the path to the project root to Vagrant.
vagrant_synced_folders:
# Set the local_path for the first synced folder to `../`.
- local_path: ../
# Set the destination to the Acquia Cloud subscription machine name.
destination: /var/www/[project_acquia_subname]
destination: /var/www/[project_machine_name]
type: nfs

# Set this to `7` for a Drupal 7 site, or `8` for a Drupal 8 site.
drupal_major_version: 8

# Set drupal_core_path to the `destination` in the synced folder
# configuration above, plus `/docroot`.
drupal_core_path: /var/www/[project_acquia_subname]/docroot
drupal_core_path: /var/www/[project_machine_name]/docroot

# Set drupal_domain to the same thing as the `vagrant_hostname` above.
drupal_domain: [project_local_domain]
Expand Down
4 changes: 2 additions & 2 deletions tests/phpunit/BoltTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function __construct() {

$this->projectDirectory = realpath(dirname(__FILE__) . '/../../');
$this->config = Yaml::parse(file_get_contents("{$this->projectDirectory}/project.yml"));
$this->new_project_dir = dirname($this->projectDirectory) . '/' . $this->config['project']['acquia_subname'];
$this->new_project_dir = dirname($this->projectDirectory) . '/' . $this->config['project']['machine_name'];
}

/**
Expand All @@ -37,7 +37,7 @@ public function testBoltCreate() {
);
$this->assertFileNotExists($this->new_project_dir . '/build/tasks/bolt.xml');
$this->assertNotContains(
'${project.acquia_subname}',
'${project.machine_name}',
file_get_contents($this->new_project_dir . '/docroot/sites/default/settings.php')
);
$this->assertNotContains(
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/DeployTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function __construct() {

$this->projectDirectory = realpath(dirname(__FILE__) . '/../../');
$this->config = Yaml::parse(file_get_contents("{$this->projectDirectory}/project.yml"));
$this->new_project_dir = dirname($this->projectDirectory) . '/' . $this->config['project']['acquia_subname'];
$this->new_project_dir = dirname($this->projectDirectory) . '/' . $this->config['project']['machine_name'];
$this->deploy_dir = $this->new_project_dir . '/deploy';
}

Expand Down

0 comments on commit 5deec94

Please sign in to comment.