Browse Source

Merge pull request #318 from jonathangreen/travis

Some codesniffer modifications.
pull/319/merge
Adam 12 years ago
parent
commit
2ab120651a
  1. 2
      .travis.yml
  2. 2
      includes/ingest.form.inc
  3. 5
      includes/utilities.inc
  4. 2
      tests/scripts/travis_setup.sh

2
.travis.yml

@ -14,6 +14,6 @@ before_install:
script: script:
- ant -buildfile sites/all/modules/islandora/build.xml lint - ant -buildfile sites/all/modules/islandora/build.xml lint
- $ISLANDORA_DIR/tests/scripts/line_endings.sh sites/all/modules/islandora - $ISLANDORA_DIR/tests/scripts/line_endings.sh sites/all/modules/islandora
- drush dcs sites/all/modules/islandora - drush coder-review --reviews=production,security,style,i18n,potx,sniffer islandora
- phpcpd --names *.module,*.inc,*.test sites/all/modules/islandora - phpcpd --names *.module,*.inc,*.test sites/all/modules/islandora
- drush test-run --uri=http://localhost:8081 Islandora - drush test-run --uri=http://localhost:8081 Islandora

2
includes/ingest.form.inc

@ -631,7 +631,7 @@ function islandora_ingest_form_submit(array $form, array &$form_state) {
catch (Exception $e) { catch (Exception $e) {
// If post hooks throws it may already exist at this point but may be // If post hooks throws it may already exist at this point but may be
// invalid, so don't say failed. // invalid, so don't say failed.
watchdog('islandora', $e->getMessage(), NULL, WATCHDOG_ERROR); watchdog('islandora', 'Exception Message: @exception.', array('@exception' => $e->getMessage()), WATCHDOG_ERROR);
drupal_set_message(t('A problem occured while ingesting "@label" (ID: @pid), please notifiy the administrator.', array('@label' => $object->label, '@pid' => $object->id)), 'error'); drupal_set_message(t('A problem occured while ingesting "@label" (ID: @pid), please notifiy the administrator.', array('@label' => $object->label, '@pid' => $object->id)), 'error');
} }
} }

5
includes/utilities.inc

@ -484,9 +484,8 @@ function islandora_prepare_new_object($namespace = NULL, $label = NULL, $datastr
// set datastream_file by url for the given scheme. Https (SSL) can // set datastream_file by url for the given scheme. Https (SSL) can
// cause this to fail, and trigger an output log in watchdog. // cause this to fail, and trigger an output log in watchdog.
$datastream_file = url($ds['datastream_file'], array('absolute' => TRUE)); $datastream_file = url($ds['datastream_file'], array('absolute' => TRUE));
watchdog('islandora', 'Attempting to ingest %file in islandora_prepare_new_object(), ' . watchdog('islandora',
' but it does not appear to be readable. We will pass the path through' . 'Attempting to ingest %file in islandora_prepare_new_object(), but it does not appear to be readable. We will pass the path through url(), and pass along as such.',
' url(), and pass along as such.',
array('%file' => $datastream_file), array('%file' => $datastream_file),
WATCHDOG_WARNING); WATCHDOG_WARNING);
} }

2
tests/scripts/travis_setup.sh

@ -27,8 +27,10 @@ mv sites/all/modules/islandora/tests/travis.test_config.ini sites/all/modules/is
mkdir sites/all/libraries mkdir sites/all/libraries
ln -s $HOME/tuque sites/all/libraries/tuque ln -s $HOME/tuque sites/all/libraries/tuque
drush dl --yes coder drush dl --yes coder
drush dl --yes potx
drush en --yes coder_review drush en --yes coder_review
drush en --yes simpletest drush en --yes simpletest
drush en --yes potx
drush en --user=1 --yes islandora drush en --user=1 --yes islandora
drush cc all drush cc all
sleep 4 sleep 4

Loading…
Cancel
Save