From 024cf013fd79f1b712ba2a9160e20cc0596756e3 Mon Sep 17 00:00:00 2001 From: Jared Whiklo Date: Fri, 7 Mar 2014 16:14:39 -0600 Subject: [PATCH 01/12] Check for hostname You can enter the Djatoka URL as a relative path or full hostname. I did hostname and didn't get any errors. But this function assumes it is a path and sticks http(s):// in front which causes you to get a blank Jpeg when downloading the clip. --- islandora.module | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/islandora.module b/islandora.module index 9e7809eb..3c4ce68d 100644 --- a/islandora.module +++ b/islandora.module @@ -1540,9 +1540,12 @@ function islandora_entity_property_info() { */ function islandora_download_clip(AbstractObject $object) { if (isset($_GET['clip'])) { - $is_https = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on'; - $http_protocol = $is_https ? 'https' : 'http'; - $url = $http_protocol . '://' . $_SERVER['HTTP_HOST'] . $_GET['clip']; + $url = $_GET['clip']; + if (!preg_match('/^https?:\/\//',$url)) { + $is_https = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on'; + $http_protocol = $is_https ? 'https' : 'http'; + $url = $http_protocol . '://' . $_SERVER['HTTP_HOST'] . $url; + } $filename = $object->label; header("Content-Disposition: attachment; filename=\"{$filename}.jpg\""); header("Content-type: image/jpeg"); From ab437cceb20f156ffc424911a85a1c68e75ab05d Mon Sep 17 00:00:00 2001 From: Jared Whiklo Date: Mon, 10 Mar 2014 12:59:32 -0500 Subject: [PATCH 02/12] You wouldn't like Travis when he's angry. --- islandora.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/islandora.module b/islandora.module index 3c4ce68d..97e339d7 100644 --- a/islandora.module +++ b/islandora.module @@ -1541,7 +1541,7 @@ function islandora_entity_property_info() { function islandora_download_clip(AbstractObject $object) { if (isset($_GET['clip'])) { $url = $_GET['clip']; - if (!preg_match('/^https?:\/\//',$url)) { + if (!preg_match('/^https?:\/\//', $url)) { $is_https = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on'; $http_protocol = $is_https ? 'https' : 'http'; $url = $http_protocol . '://' . $_SERVER['HTTP_HOST'] . $url; From 6b69518988bd8803a1d0859acf79daa185df5fa7 Mon Sep 17 00:00:00 2001 From: willtp87 Date: Thu, 21 Aug 2014 13:27:39 -0300 Subject: [PATCH 03/12] defer derivatives api --- includes/derivatives.inc | 39 ++++++++++++++++++++++++ includes/regenerate_derivatives.form.inc | 2 ++ islandora.module | 8 +++++ 3 files changed, 49 insertions(+) diff --git a/includes/derivatives.inc b/includes/derivatives.inc index 72d61235..7248f03f 100644 --- a/includes/derivatives.inc +++ b/includes/derivatives.inc @@ -4,6 +4,9 @@ * Defines functions used when constructing derivatives. */ +// Relations. +define('ISLANDORA_DEFER_DERIVATIVES_FLAG', 'deferDerivatives'); + /** * Decides which derivative function to call and runs it. * @@ -245,3 +248,39 @@ function islandora_filter_derivatives($hooks, $options, AbstractObject $object) $hooks = array_filter($hooks, $filter_function); return $hooks; } + +/** + * Set the defer derivatives flag on an object. + */ +function islandora_set_defer_derivatives_flag(AbstractObject $object) { + $object->relationships->add( + ISLANDORA_RELS_EXT_URI, + ISLANDORA_DEFER_DERIVATIVES_FLAG, + 'true', + RELS_TYPE_PLAIN_LITERAL + ); +} + +/** + * Get the defer derivatives flag on an object. + */ +function islandora_get_defer_derivatives_flag(AbstractObject $object) { + return $object->relationships->get( + ISLANDORA_RELS_EXT_URI, + ISLANDORA_DEFER_DERIVATIVES_FLAG, + 'true', + RELS_TYPE_PLAIN_LITERAL + ); +} + +/** + * Remove the defer derivatives flag on an object. + */ +function islandora_remove_defer_derivatives_flag(AbstractObject $object) { + $object->relationships->remove( + ISLANDORA_RELS_EXT_URI, + ISLANDORA_DEFER_DERIVATIVES_FLAG, + 'true', + RELS_TYPE_PLAIN_LITERAL + ); +} diff --git a/includes/regenerate_derivatives.form.inc b/includes/regenerate_derivatives.form.inc index 9a7a097e..437288c9 100644 --- a/includes/regenerate_derivatives.form.inc +++ b/includes/regenerate_derivatives.form.inc @@ -95,6 +95,7 @@ function islandora_regenerate_object_derivatives_form_submit(array $form, array */ function islandora_regenerate_object_derivatives_batch(AbstractObject $object) { module_load_include('inc', 'islandora', 'includes/derivatives'); + islandora_remove_defer_derivatives_flag($object); return array( 'title' => t('Regenerating all derivatives for @label', array('@label' => $object->label)), 'operations' => islandora_do_batch_derivatives($object, array('force' => TRUE)), @@ -117,6 +118,7 @@ function islandora_regenerate_object_derivatives_batch(AbstractObject $object) { */ function islandora_regenerate_datastream_derivative_batch(AbstractDatastream $datastream) { module_load_include('inc', 'islandora', 'includes/derivatives'); + islandora_remove_defer_derivatives_flag($object); return array( 'title' => t('Regenerating derivatives for the @dsid datastream', array('@dsid' => $datastream->id)), 'operations' => islandora_do_batch_derivatives($datastream->parent, array( diff --git a/islandora.module b/islandora.module index f0bf796b..9c811611 100644 --- a/islandora.module +++ b/islandora.module @@ -1719,6 +1719,10 @@ function islandora_islandora_basic_collection_get_query_filters() { */ function islandora_islandora_object_ingested(AbstractObject $object) { module_load_include('inc', 'islandora', 'includes/derivatives'); + // Defer derivatives if necessary. + if (islandora_get_defer_derivatives_flag($object)) { + return; + } islandora_run_derivatives($object, NULL); } @@ -1730,6 +1734,10 @@ function islandora_islandora_object_ingested(AbstractObject $object) { */ function islandora_islandora_datastream_ingested(AbstractObject $object, AbstractDatastream $datastream) { module_load_include('inc', 'islandora', 'includes/derivatives'); + // Defer derivatives if necessary. + if (islandora_get_defer_derivatives_flag($object)) { + return; + } islandora_run_derivatives($object, $datastream->id); } From 3850720e65785e101934b054f0a6c4a0e8687474 Mon Sep 17 00:00:00 2001 From: willtp87 Date: Thu, 21 Aug 2014 15:30:42 -0300 Subject: [PATCH 04/12] global defer derivatives setting --- includes/admin.form.inc | 7 +++++++ islandora.install | 1 + islandora.module | 11 +++++++++++ 3 files changed, 19 insertions(+) diff --git a/includes/admin.form.inc b/includes/admin.form.inc index 69f09fd2..a1edde0b 100644 --- a/includes/admin.form.inc +++ b/includes/admin.form.inc @@ -61,6 +61,13 @@ function islandora_repository_admin(array $form, array &$form_state) { '#description' => t('HTTP caching can reduce network traffic, by allowing clients to used cached copies.'), '#default_value' => variable_get('islandora_use_datastream_cache_headers', TRUE), ), + 'islandora_defer_derivataves_on_ingest' => array( + '#type' => 'checkbox', + '#title' => t('Defer derivative generation during ingest'), + '#description' => t('Prevent derivatives from running during ingest, + useful if derivatives are to be created by an external service.'), + '#default_value' => variable_get('islandora_defer_derivataves_on_ingest', FALSE), + ), ), 'islandora_namespace' => array( '#type' => 'fieldset', diff --git a/islandora.install b/islandora.install index f37894e9..8f88dcdd 100644 --- a/islandora.install +++ b/islandora.install @@ -46,6 +46,7 @@ function islandora_uninstall() { // Add new variables to clean up. $variables = array( 'islandora_ds_replace_exclude_enforced', + 'islandora_defer_derivataves_on_ingest', ); array_walk($variables, 'variable_del'); } diff --git a/islandora.module b/islandora.module index 9c811611..4691028e 100644 --- a/islandora.module +++ b/islandora.module @@ -1962,3 +1962,14 @@ function islandora_menu_local_tasks_alter(&$data, $router_item, $root_path) { } } } + +/** + * Implements hook_islandora_object_alter(). + */ +function islandora_islandora_object_alter(AbstractObject $object, array &$context) { + // Prevent derivative creation during ingest if var is set. + if ($context['action'] == 'ingest' && variable_get('islandora_defer_derivataves_on_ingest', FALSE)) { + module_load_include('inc', 'islandora', 'includes/derivatives'); + islandora_set_defer_derivatives_flag($object); + } +} From 25b53ba01b8270072fc7cfaeb9d7879e5bf68932 Mon Sep 17 00:00:00 2001 From: willtp87 Date: Mon, 25 Aug 2014 10:13:24 -0300 Subject: [PATCH 05/12] copypasta omm nom --- includes/regenerate_derivatives.form.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/regenerate_derivatives.form.inc b/includes/regenerate_derivatives.form.inc index 437288c9..1312bec3 100644 --- a/includes/regenerate_derivatives.form.inc +++ b/includes/regenerate_derivatives.form.inc @@ -118,7 +118,7 @@ function islandora_regenerate_object_derivatives_batch(AbstractObject $object) { */ function islandora_regenerate_datastream_derivative_batch(AbstractDatastream $datastream) { module_load_include('inc', 'islandora', 'includes/derivatives'); - islandora_remove_defer_derivatives_flag($object); + islandora_remove_defer_derivatives_flag($datastream->parent); return array( 'title' => t('Regenerating derivatives for the @dsid datastream', array('@dsid' => $datastream->id)), 'operations' => islandora_do_batch_derivatives($datastream->parent, array( From 2b2c5c8601aa62b13d8d926e9d58d24c9d051c7b Mon Sep 17 00:00:00 2001 From: MorganDawe Date: Wed, 27 Aug 2014 16:43:53 -0300 Subject: [PATCH 06/12] Updating extestion and mime detection on download to use drupals file_g=default_mimetype_mapping() funcitons. --- includes/datastream.inc | 4 ++-- includes/utilities.inc | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/includes/datastream.inc b/includes/datastream.inc index edc8ceb1..e31ed254 100644 --- a/includes/datastream.inc +++ b/includes/datastream.inc @@ -30,6 +30,7 @@ function islandora_download_datastream(AbstractDatastream $datastream) { * The version of the datastream to display */ function islandora_view_datastream(AbstractDatastream $datastream, $download = FALSE, $version = NULL) { + module_load_include('inc', 'islandora', 'includes/utilities'); // XXX: Certain features of the Devel module rely on the use of "shutdown // handlers", such as query logging... The problem is that they might blindly // add additional output which will break things if what is actually being @@ -45,7 +46,6 @@ function islandora_view_datastream(AbstractDatastream $datastream, $download = F return drupal_not_found(); } } - header('Content-type: ' . $datastream->mimetype); if ($datastream->controlGroup == 'M' || $datastream->controlGroup == 'X') { header('Content-length: ' . $datastream->size); @@ -53,7 +53,7 @@ function islandora_view_datastream(AbstractDatastream $datastream, $download = F if ($download) { // Browsers will not append all extensions. $mime_detect = new MimeDetect(); - $extension = '.' . $mime_detect->getExtension($datastream->mimetype); + $extension = '.' . islandora_get_extension_for_mimetype($datastream->mimetype);//$mime_detect->getExtension($datastream->mimetype); // Prevent adding on a duplicate extension. $label = $datastream->label; $extension_length = strlen($extension); diff --git a/includes/utilities.inc b/includes/utilities.inc index 26633df5..4892a4eb 100644 --- a/includes/utilities.inc +++ b/includes/utilities.inc @@ -46,6 +46,15 @@ function islandora_convert_bytes_to_human_readable($bytes, $precision = 2) { } } +function islandora_get_extension_for_mimetype($mimetype) { + module_load_include('inc', 'file', 'file.mimetypes.inc'); + dsm($mimetype, "mimetype"); + $mimetype_mapping = file_default_mimetype_mapping(); + $extenstion_index = array_search($mimetype, $mimetype_mapping['mimetypes']); + $extenstion = array_search($extenstion_index, $mimetype_mapping['extensions']); + dsm($extenstion, "extenstion"); + return $extenstion; +} /** * Add a file as managed if is not already. * From 8efd0c23fc0a060e31cd608ef9eb13ff70260a78 Mon Sep 17 00:00:00 2001 From: MorganDawe Date: Thu, 28 Aug 2014 15:34:22 -0300 Subject: [PATCH 07/12] Updated file extension logic on ds download. --- includes/mime_detect.inc | 1 - includes/utilities.inc | 29 ++++++++++++++++++++++------- islandora.module | 1 + 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/includes/mime_detect.inc b/includes/mime_detect.inc index 29fcf1e5..da2c69f3 100644 --- a/includes/mime_detect.inc +++ b/includes/mime_detect.inc @@ -134,7 +134,6 @@ class MimeDetect { 'xhtml' => 'application/xhtml+xml', 'xsl' => 'text/xsl', 'xslt' => 'text/xsl', - 'xml' => 'application/xml', 'csv' => 'text/csv', 'tsv' => 'text/tab-separated-values', 'txt' => 'text/plain', diff --git a/includes/utilities.inc b/includes/utilities.inc index 4892a4eb..0612f895 100644 --- a/includes/utilities.inc +++ b/includes/utilities.inc @@ -46,15 +46,30 @@ function islandora_convert_bytes_to_human_readable($bytes, $precision = 2) { } } +/** + * Retrieve the correct file extension for a give mimetype. + * + * @param string $mimetype + * The mimetype whose extension is required. + * + * @return string + * The extension mapped to the given mimetype. + */ function islandora_get_extension_for_mimetype($mimetype) { - module_load_include('inc', 'file', 'file.mimetypes.inc'); - dsm($mimetype, "mimetype"); - $mimetype_mapping = file_default_mimetype_mapping(); - $extenstion_index = array_search($mimetype, $mimetype_mapping['mimetypes']); - $extenstion = array_search($extenstion_index, $mimetype_mapping['extensions']); - dsm($extenstion, "extenstion"); - return $extenstion; + require_once(DRUPAL_ROOT . '/includes/file.mimetypes.inc'); + + $mimetype_mapping = file_mimetype_mapping(); + $extension_index = array_search($mimetype, $mimetype_mapping['mimetypes']); + $mime_array_flipped = array_reverse($mimetype_mapping['extensions']); + $extension = array_search($extension_index, $mime_array_flipped); + + // We can only have one mapping in drupal for 'xml'. + if ($mimetype == "text/xml") { + return "xml"; + } + return $extension; } + /** * Add a file as managed if is not already. * diff --git a/islandora.module b/islandora.module index b2bb99b8..c930ba5f 100644 --- a/islandora.module +++ b/islandora.module @@ -1590,6 +1590,7 @@ function islandora_download_clip(AbstractObject $object) { function islandora_file_mimetype_mapping_alter(&$mapping) { $mime_detect = new MimeDetect(); $types = $mime_detect->getMimeTypes(); + $diff = array_diff_key($types, $mapping['extensions']); foreach ($diff as $ext => $mime) { $mapping['mimetypes'][] = $mime; From 4311be0f0dbde303e402a1e6b6165030734cf86e Mon Sep 17 00:00:00 2001 From: MorganDawe Date: Thu, 28 Aug 2014 15:36:49 -0300 Subject: [PATCH 08/12] removed unused code. --- includes/datastream.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/datastream.inc b/includes/datastream.inc index e31ed254..5f48211c 100644 --- a/includes/datastream.inc +++ b/includes/datastream.inc @@ -53,7 +53,7 @@ function islandora_view_datastream(AbstractDatastream $datastream, $download = F if ($download) { // Browsers will not append all extensions. $mime_detect = new MimeDetect(); - $extension = '.' . islandora_get_extension_for_mimetype($datastream->mimetype);//$mime_detect->getExtension($datastream->mimetype); + $extension = '.' . islandora_get_extension_for_mimetype($datastream->mimetype); // Prevent adding on a duplicate extension. $label = $datastream->label; $extension_length = strlen($extension); From 212276f6d01b87be1d9a799d835b64d8e0517c7f Mon Sep 17 00:00:00 2001 From: MorganDawe Date: Fri, 29 Aug 2014 08:55:21 -0300 Subject: [PATCH 09/12] Corrected small travis issue. --- includes/utilities.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/utilities.inc b/includes/utilities.inc index 0612f895..d3d2bbc3 100644 --- a/includes/utilities.inc +++ b/includes/utilities.inc @@ -56,7 +56,7 @@ function islandora_convert_bytes_to_human_readable($bytes, $precision = 2) { * The extension mapped to the given mimetype. */ function islandora_get_extension_for_mimetype($mimetype) { - require_once(DRUPAL_ROOT . '/includes/file.mimetypes.inc'); + require_once DRUPAL_ROOT . "/includes/file.mimetypes.inc"; $mimetype_mapping = file_mimetype_mapping(); $extension_index = array_search($mimetype, $mimetype_mapping['mimetypes']); From d2ecd81ba8ac8999d705184b26399fb992e77159 Mon Sep 17 00:00:00 2001 From: MorganDawe Date: Tue, 2 Sep 2014 16:19:42 -0300 Subject: [PATCH 10/12] Code review feedback. --- includes/datastream.inc | 2 +- includes/mimetype.utils.inc | 31 +++++++++++++++++++++++++++++++ includes/utilities.inc | 24 ------------------------ 3 files changed, 32 insertions(+), 25 deletions(-) create mode 100644 includes/mimetype.utils.inc diff --git a/includes/datastream.inc b/includes/datastream.inc index 5f48211c..592870b7 100644 --- a/includes/datastream.inc +++ b/includes/datastream.inc @@ -30,7 +30,7 @@ function islandora_download_datastream(AbstractDatastream $datastream) { * The version of the datastream to display */ function islandora_view_datastream(AbstractDatastream $datastream, $download = FALSE, $version = NULL) { - module_load_include('inc', 'islandora', 'includes/utilities'); + module_load_include('inc', 'islandora', 'includes/mimetype.utils'); // XXX: Certain features of the Devel module rely on the use of "shutdown // handlers", such as query logging... The problem is that they might blindly // add additional output which will break things if what is actually being diff --git a/includes/mimetype.utils.inc b/includes/mimetype.utils.inc new file mode 100644 index 00000000..989c55cd --- /dev/null +++ b/includes/mimetype.utils.inc @@ -0,0 +1,31 @@ + Date: Thu, 4 Sep 2014 10:29:09 -0300 Subject: [PATCH 11/12] typo fix --- includes/admin.form.inc | 4 ++-- islandora.install | 2 +- islandora.module | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/admin.form.inc b/includes/admin.form.inc index a1edde0b..42612ea0 100644 --- a/includes/admin.form.inc +++ b/includes/admin.form.inc @@ -61,12 +61,12 @@ function islandora_repository_admin(array $form, array &$form_state) { '#description' => t('HTTP caching can reduce network traffic, by allowing clients to used cached copies.'), '#default_value' => variable_get('islandora_use_datastream_cache_headers', TRUE), ), - 'islandora_defer_derivataves_on_ingest' => array( + 'islandora_defer_derivatives_on_ingest' => array( '#type' => 'checkbox', '#title' => t('Defer derivative generation during ingest'), '#description' => t('Prevent derivatives from running during ingest, useful if derivatives are to be created by an external service.'), - '#default_value' => variable_get('islandora_defer_derivataves_on_ingest', FALSE), + '#default_value' => variable_get('islandora_defer_derivatives_on_ingest', FALSE), ), ), 'islandora_namespace' => array( diff --git a/islandora.install b/islandora.install index 8f88dcdd..12c92009 100644 --- a/islandora.install +++ b/islandora.install @@ -46,7 +46,7 @@ function islandora_uninstall() { // Add new variables to clean up. $variables = array( 'islandora_ds_replace_exclude_enforced', - 'islandora_defer_derivataves_on_ingest', + 'islandora_defer_derivatives_on_ingest', ); array_walk($variables, 'variable_del'); } diff --git a/islandora.module b/islandora.module index 3b10d64b..27d0a894 100644 --- a/islandora.module +++ b/islandora.module @@ -1965,7 +1965,7 @@ function islandora_menu_local_tasks_alter(&$data, $router_item, $root_path) { */ function islandora_islandora_object_alter(AbstractObject $object, array &$context) { // Prevent derivative creation during ingest if var is set. - if ($context['action'] == 'ingest' && variable_get('islandora_defer_derivataves_on_ingest', FALSE)) { + if ($context['action'] == 'ingest' && variable_get('islandora_defer_derivatives_on_ingest', FALSE)) { module_load_include('inc', 'islandora', 'includes/derivatives'); islandora_set_defer_derivatives_flag($object); } From 087db8b3b05febb2388732cdea816906313998d1 Mon Sep 17 00:00:00 2001 From: lutaylor Date: Fri, 5 Sep 2014 15:06:35 -0300 Subject: [PATCH 12/12] adding reliable install source --- tests/scripts/travis_setup.sh | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/tests/scripts/travis_setup.sh b/tests/scripts/travis_setup.sh index 0b33d4b0..5a8c78ef 100755 --- a/tests/scripts/travis_setup.sh +++ b/tests/scripts/travis_setup.sh @@ -1,14 +1,13 @@ #!/bin/bash - mysql -u root -e 'create database drupal;' mysql -u root -e "create database fedora;" mysql -u root -e "GRANT ALL PRIVILEGES ON fedora.* To 'fedora'@'localhost' IDENTIFIED BY 'fedora';" mysql -u root -e "GRANT ALL PRIVILEGES ON drupal.* To 'drupal'@'localhost' IDENTIFIED BY 'drupal';" cd $HOME git clone git://github.com/Islandora/tuque.git -git clone -b $FEDORA_VERSION git://github.com/Islandora/islandora_tomcat.git +wget http://alpha.library.yorku.ca/islandora_tomcat.$FEDORA_VERSION.tar.gz +tar xf islandora_tomcat.$FEDORA_VERSION.tar.gz cd islandora_tomcat -git fsck export CATALINA_HOME='.' export JAVA_OPTS="-Xms1024m -Xmx1024m -XX:MaxPermSize=512m -XX:+CMSClassUnloadingEnabled -Djavax.net.ssl.trustStore=$CATALINA_HOME/fedora/server/truststore -Djavax.net.ssl.trustStorePassword=tomcat" ./bin/startup.sh @@ -18,20 +17,22 @@ pear upgrade --force Console_Getopt pear upgrade --force pear pear channel-discover pear.drush.org -# "prefer-source" required due to SSL shenanigans on the Travis boxes... -composer global require --prefer-source 'squizlabs/php_codesniffer=*' 'sebastian/phpcpd=*' 'drush/drush:6.3.0' -# Because we can't add to the PATH here and this file is used in many repos, -# let's just throw symlinks in. -find $HOME/.composer/vendor/bin -executable \! -type d -exec sudo ln -s {} /usr/local/sbin/ \; +wget http://alpha.library.yorku.ca/drush-6.3.tar.gz +tar xf drush-6.3.tar.gz +sudo mv drush-6.3 /opt/ +sudo ln -s /opt/drush-6.3/drush /usr/bin/drush + +wget http://alpha.library.yorku.ca/PHP_CodeSniffer-1.5.4.tgz +pear install PHP_CodeSniffer-1.5.4.tgz + +wget http://alpha.library.yorku.ca/phpcpd.phar +sudo mv phpcpd.phar /usr/local/bin/phpcpd +sudo chmod +x /usr/local/bin/phpcpd phpenv rehash drush dl --yes drupal cd drupal-* drush si minimal --db-url=mysql://drupal:drupal@localhost/drupal --yes -# Needs to make things from Composer be available (PHP CS, primarily) -sudo chmod a+w sites/default/settings.php -echo "include_once '$HOME/.composer/vendor/autoload.php';" >> sites/default/settings.php -sudo chmod a-w sites/default/settings.php drush runserver --php-cgi=$HOME/.phpenv/shims/php-cgi localhost:8081 &>/tmp/drush_webserver.log & ln -s $ISLANDORA_DIR sites/all/modules/islandora mv sites/all/modules/islandora/tests/travis.test_config.ini sites/all/modules/islandora/tests/test_config.ini