From 38747f1cfdde96101eed3ab166176b0656223589 Mon Sep 17 00:00:00 2001 From: Jared Whiklo Date: Mon, 28 Nov 2016 20:39:19 -0600 Subject: [PATCH 1/8] Add travis config and clean up to coding standards (#12) * Clean up to Drupal coding standards Add travis config * Remove codesniffer from travis-setup.sh * Not needed right now and breaks php on hhvm * Deleted too much * Revert type hinting. --- .travis.yml | 39 ++++ composer.json | 34 ++++ fedora_resource.page.inc | 26 +-- islandora.module | 8 +- .../FedoraResourceAddController.php | 166 ++++++++++-------- src/Entity/FedoraResource.php | 145 ++++++++------- src/FedoraResourceHtmlRouteProvider.php | 4 +- src/FedoraResourceInterface.php | 10 +- src/FedoraResourceViewBuilder.php | 12 +- src/Form/FedoraResourceEntityInlineForm.php | 19 +- src/Form/IslandoraSettingsForm.php | 6 +- src/ParamConverter/UuidEntityConverter.php | 22 +-- src/Plugin/Search/FedoraEntitySearch.php | 11 +- tests/scripts/line_endings.sh | 14 ++ tests/scripts/travis_setup.sh | 81 +++++++++ 15 files changed, 384 insertions(+), 213 deletions(-) create mode 100644 .travis.yml create mode 100644 composer.json create mode 100755 tests/scripts/line_endings.sh create mode 100755 tests/scripts/travis_setup.sh diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..e043b79d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,39 @@ +sudo: true +language: php +php: + - 5.5 + - 5.6 + - 7.0 + - hhvm + +matrix: + allow_failures: + - php: hhvm + fast_finish: true + +branches: + only: + - /^8.x/ + + +before_install: + - export ISLANDORA_DIR=$TRAVIS_BUILD_DIR + +install: +# - $TRAVIS_BUILD_DIR/tests/scripts/travis_setup.sh + - composer install + - php vendor/bin/phpcs --config-set installed_paths vendor/drupal/coder/coder_sniffer + + +script: + - $ISLANDORA_DIR/tests/scripts/line_endings.sh . + - php vendor/bin/phpcs --standard=Drupal *.module src + - php vendor/bin/phpcpd --names *.module,*.inc,*.test,*.php --exclude=vendor . + +notifications: + irc: + channels: + - "irc.freenode.org#islandora" + on_success: change + on_failure: always + skip_join: true diff --git a/composer.json b/composer.json new file mode 100644 index 00000000..4feebf4a --- /dev/null +++ b/composer.json @@ -0,0 +1,34 @@ +{ + "name": "drupal/islandora", + "description": "A client for interacting with a Fedora 4 server using CLAW microservices.", + "type": "drupal-module", + "homepage": "https://github.com/islandora-claw/islandora", + "support": { + "issues": "https://github.com/islandora-claw/CLAW/issues", + "irc": "irc://irc.freenode.net/islandora" + }, + "require-dev": { + "phpunit/phpunit": "^4.8", + "drupal/coder": "*", + "sebastian/phpcpd": "*" + }, + "license": "GPL-2.0+", + "authors": [ + { + "name": "Islandora Foundation", + "email": "community@islandora.ca", + "role": "Owner" + + }, + { + "name": "Daniel Lamb", + "email": "dlamb@islandora.ca", + "role": "Maintainer" + }, + { + "name": "Diego Pino", + "email": "dpino@krayon.cl", + "role": "Maintainer" + } + ] +} \ No newline at end of file diff --git a/fedora_resource.page.inc b/fedora_resource.page.inc index 5b8171e6..92d5855c 100644 --- a/fedora_resource.page.inc +++ b/fedora_resource.page.inc @@ -14,8 +14,8 @@ * file that was distributed with this source code. * * @author Diego Pino Navarro https://github.com/diegopino - * */ + use Drupal\Core\Render\Element; use Drupal\Core\Link; use Drupal\Core\Url; @@ -41,16 +41,16 @@ function template_preprocess_fedora_resource(array &$variables) { } /** -* Prepares variables for a custom entity type creation list templates. -* -* Default template: fedora_resource-content-add-list.html.twig. -* -* @param array $variables -* An associative array containing: -* - content: An array of fedora_resource-types. -* -* @see block_content_add_page() -*/ + * Prepares variables for a custom entity type creation list templates. + * + * Default template: fedora_resource-content-add-list.html.twig. + * + * @param array $variables + * An associative array containing: + * - content: An array of fedora_resource-types. + * + * @see block_content_add_page() + */ function template_preprocess_fedora_resource_content_add_list(&$variables) { $variables['types'] = array(); $query = \Drupal::request()->query->all(); @@ -60,11 +60,11 @@ function template_preprocess_fedora_resource_content_add_list(&$variables) { 'fedora_resource_type' => $type->id(), ), array('query' => $query))), 'description' => array( - '#markup' => $type->label(), + '#markup' => $type->label(), ), 'title' => $type->label(), 'localized_options' => array( - 'query' => $query, + 'query' => $query, ), ); } diff --git a/islandora.module b/islandora.module index 39f3ff18..ac28cddc 100644 --- a/islandora.module +++ b/islandora.module @@ -25,7 +25,7 @@ function islandora_help($route_name, RouteMatchInterface $route_match) { case 'help.page.islandora': $output = ''; $output .= '

' . t('About') . '

'; - $output .= '

' . t('') . '

'; + $output .= '

' . t('This is a placeholder for future help text about Islandora.') . '

'; return $output; default: @@ -51,8 +51,8 @@ function islandora_theme() { } /** -* Implements hook_theme_suggestions_HOOK(). -*/ + * Implements hook_theme_suggestions_HOOK(). + */ function islandora_theme_suggestions_fedora_resource(array $variables) { $suggestions = array(); $entity = $variables['elements']['#fedora_resource']; @@ -81,4 +81,4 @@ function islandora_rdf_namespaces() { 'ore' => 'http://www.openarchives.org/ore/terms/', 'rdf' => 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', ); -} \ No newline at end of file +} diff --git a/src/Controller/FedoraResourceAddController.php b/src/Controller/FedoraResourceAddController.php index 700f3aba..738424ff 100644 --- a/src/Controller/FedoraResourceAddController.php +++ b/src/Controller/FedoraResourceAddController.php @@ -4,13 +4,11 @@ namespace Drupal\islandora\Controller; use Drupal\Core\Controller\ControllerBase; use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Url; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Request; - /** * Class FedoraResourceAddController. * @@ -18,80 +16,104 @@ use Symfony\Component\HttpFoundation\Request; */ class FedoraResourceAddController extends ControllerBase { - public function __construct(EntityStorageInterface $storage, EntityStorageInterface $type_storage) { - $this->storage = $storage; - $this->typeStorage = $type_storage; - } + /** + * The Entity storage. + * + * @var \Drupal\Core\Entity\EntityStorageInterface + */ + protected $storage; - /** - * {@inheritdoc} - */ - public static function create(ContainerInterface $container) { - /** @var EntityTypeManagerInterface $entity_type_manager */ - $entity_type_manager = $container->get('entity_type.manager'); - return new static( - $entity_type_manager->getStorage('fedora_resource'), - $entity_type_manager->getStorage('fedora_resource_type') - ); - } - /** - * Displays add links for available bundles/types for entity fedora_resource . - * - * @param \Symfony\Component\HttpFoundation\Request $request - * The current request object. - * - * @return array - * A render array for a list of the fedora_resource bundles/types that can be added or - * if there is only one type/bunlde defined for the site, the function returns the add page for that bundle/type. - */ - public function add(Request $request) { - $types = $this->typeStorage->loadMultiple(); - if ($types && count($types) == 1) { - $type = reset($types); - return $this->addForm($type, $request); - } - if (count($types) === 0) { - return array( - '#markup' => $this->t('You have not created any %bundle types yet. @link to add a new type.', [ - '%bundle' => 'Fedora resource', - '@link' => $this->l($this->t('Go to the type creation page'), Url::fromRoute('entity.fedora_resource_type.add_form')), - ]), - ); - } - return array('#theme' => 'fedora_resource_content_add_list', '#content' => $types); - } + /** + * The Entity storage type. + * + * @var \Drupal\Core\Entity\EntityStorageInterface + */ + protected $typeStorage; - /** - * Presents the creation form for fedora_resource entities of given bundle/type. - * - * @param EntityInterface $fedora_resource_type - * The custom bundle to add. - * @param \Symfony\Component\HttpFoundation\Request $request - * The current request object. - * - * @return array - * A form array as expected by drupal_render(). - */ - public function addForm(EntityInterface $fedora_resource_type, Request $request) { - $entity = $this->storage->create(array( - 'type' => $fedora_resource_type->id() - )); - return $this->entityFormBuilder()->getForm($entity); - } + /** + * FedoraResourceAddController constructor. + * + * @param \Drupal\Core\Entity\EntityStorageInterface $storage + * The Entity storage. + * @param \Drupal\Core\Entity\EntityStorageInterface $type_storage + * The Entity storage type. + */ + public function __construct(EntityStorageInterface $storage, EntityStorageInterface $type_storage) { + $this->storage = $storage; + $this->typeStorage = $type_storage; + } + + /** + * {@inheritdoc} + */ + public static function create(ContainerInterface $container) { + /** @var EntityTypeManagerInterface $entity_type_manager */ + $entity_type_manager = $container->get('entity_type.manager'); + return new static( + $entity_type_manager->getStorage('fedora_resource'), + $entity_type_manager->getStorage('fedora_resource_type') + ); + } - /** - * Provides the page title for this controller. - * - * @param EntityInterface $fedora_resource_type - * The custom bundle/type being added. - * - * @return string - * The page title. - */ - public function getAddFormTitle(EntityInterface $fedora_resource_type) { - return t('Create of bundle @label', - array('@label' => $fedora_resource_type->label()) + /** + * Displays add links for available bundles/types for entity fedora_resource. + * + * @param \Symfony\Component\HttpFoundation\Request $request + * The current request object. + * + * @return array + * A render array for a list of the fedora_resource bundles/types that can + * be added or if there is only one type/bunlde defined for the site, the + * function returns the add page for that bundle/type. + */ + public function add(Request $request) { + $types = $this->typeStorage->loadMultiple(); + if ($types && count($types) == 1) { + $type = reset($types); + return $this->addForm($type, $request); + } + if (count($types) === 0) { + return array( + '#markup' => $this->t('You have not created any %bundle types yet. @link to add a new type.', [ + '%bundle' => 'Fedora resource', + '@link' => $this->l($this->t('Go to the type creation page'), Url::fromRoute('entity.fedora_resource_type.add_form')), + ]), ); } + return array('#theme' => 'fedora_resource_content_add_list', '#content' => $types); + } + + /** + * Presents the creation form for fedora_resource entities of given type. + * + * @param EntityInterface $fedora_resource_type + * The custom bundle to add. + * @param \Symfony\Component\HttpFoundation\Request $request + * The current request object. + * + * @return array + * A form array as expected by drupal_render(). + */ + public function addForm(EntityInterface $fedora_resource_type, Request $request) { + $entity = $this->storage->create(array( + 'type' => $fedora_resource_type->id(), + )); + return $this->entityFormBuilder()->getForm($entity); + } + + /** + * Provides the page title for this controller. + * + * @param EntityInterface $fedora_resource_type + * The custom bundle/type being added. + * + * @return string + * The page title. + */ + public function getAddFormTitle(EntityInterface $fedora_resource_type) { + return t('Create of bundle @label', + array('@label' => $fedora_resource_type->label()) + ); + } } diff --git a/src/Entity/FedoraResource.php b/src/Entity/FedoraResource.php index 0b2d93f8..7ae84542 100644 --- a/src/Entity/FedoraResource.php +++ b/src/Entity/FedoraResource.php @@ -65,18 +65,28 @@ use Drupal\user\UserInterface; * field_ui_base_route = "entity.fedora_resource_type.edit_form" * ) */ -class FedoraResource extends ContentEntityBase implements FedoraResourceInterface{ +class FedoraResource extends ContentEntityBase implements FedoraResourceInterface { use EntityChangedTrait; /** + * Override this to have a rel ='uuid' for islandora entities. + * + * Stolen (but not inherited from EntityInterface) + * * @param string $rel + * The link relationship type, for example: canonical or edit-form. * @param array $options - * @return $this|\Drupal\Core\Url + * See \Drupal\Core\Routing\UrlGeneratorInterface::generateFromRoute() for + * the available options. + * + * @return \Drupal\Core\Url + * The URL object. */ public function toUrl($rel = 'canonical', array $options = []) { // TODO: I Will override this to have a rel ='uuid' for islandora entities - return parent::toUrl($rel, $options); // TODO: Change the autogenerated stub + // TODO: Change the autogenerated stub. + return parent::toUrl($rel, $options); } /** @@ -92,7 +102,8 @@ class FedoraResource extends ContentEntityBase implements FedoraResourceInterfac * An array of URI placeholders. */ protected function urlRouteParameters($rel) { - $uri_route_parameters = parent::urlRouteParameters($rel); // TODO: Change the autogenerated stub + // TODO: Change the autogenerated stub. + $uri_route_parameters = parent::urlRouteParameters($rel); if ($rel === 'uuid') { $uri_route_parameters[$this->getEntityTypeId()] = $this->uuid(); } @@ -100,7 +111,6 @@ class FedoraResource extends ContentEntityBase implements FedoraResourceInterfac } - /** * {@inheritdoc} */ @@ -118,8 +128,8 @@ class FedoraResource extends ContentEntityBase implements FedoraResourceInterfac parent::postSave($storage, $update); // Reindex the entity when it is updated. The entity is automatically - // indexed when it is added, simply by being added to the {fedora_resource} table. - // Only required if using the core search index. + // indexed when it is added, simply by being added to the {fedora_resource} + // table. Only required if using the core search index. if ($update) { if (\Drupal::moduleHandler()->moduleExists('search')) { search_mark_for_reindex('fedora_resource_search', $this->id()); @@ -208,32 +218,32 @@ class FedoraResource extends ContentEntityBase implements FedoraResourceInterfac $this->set('status', $published ? NODE_PUBLISHED : NODE_NOT_PUBLISHED); return $this; } + /** * {@inheritdoc} */ - public function hasParent() - { - return ($this->get('fedora_has_parent') !== null); + public function hasParent() { + return ($this->get('fedora_has_parent') !== NULL); } + /** * {@inheritdoc} */ - public function getParent() - { + public function getParent() { return $this->get('fedora_has_parent')->getEntity(); } + /** * {@inheritdoc} */ - public function getParentId() - { + public function getParentId() { return $this->get('fedora_has_parent')->getEntity()->id(); } + /** * {@inheritdoc} */ - public function setParent(EntityTypeInterface $entity) - { + public function setParent(EntityTypeInterface $entity) { $this->set('fedora_has_parent', $entity); return $this; } @@ -247,11 +257,10 @@ class FedoraResource extends ContentEntityBase implements FedoraResourceInterfac * An array of default values. */ public static function getFedoraRoot() { - // Just stub code, we need to figure out what "root is" in this context + // Just stub code, we need to figure out what "root is" in this context. return array('root'); } - /** * {@inheritdoc} */ @@ -301,56 +310,56 @@ class FedoraResource extends ContentEntityBase implements FedoraResourceInterfac ->setDisplayConfigurable('form', TRUE) ->setDisplayConfigurable('view', TRUE); - $fields['fedora_has_parent'] = BaseFieldDefinition::create('entity_reference') - ->setLabel(t('Fedora has Parent')) - ->setDescription(t('Parent Fedora Resource.')) - ->setRevisionable(TRUE) - ->setSetting('target_type', 'fedora_resource') - ->setSetting('handler', 'default') - ->setDefaultValueCallback('Drupal\islandora\Entity\FedoraResource::getFedoraRoot') - ->setTranslatable(TRUE) - ->setDisplayOptions('view', array( - 'label' => 'hidden', - 'type' => 'author', - 'weight' => 0, - )) - ->setDisplayOptions('form', array( - 'type' => 'entity_reference_autocomplete', - 'weight' => 5, - 'settings' => array( - 'match_operator' => 'CONTAINS', - 'size' => '60', - 'autocomplete_type' => 'tags', - 'placeholder' => '', - ), - )) - ->setDisplayConfigurable('form', TRUE) - ->setDisplayConfigurable('view', TRUE); - - $fields['ldp_contains'] = BaseFieldDefinition::create('entity_reference') - ->setLabel(t('LDP Contains')) - ->setDescription(t('Contains Fedora Resource.')) - ->setRevisionable(TRUE) - ->setSetting('target_type', 'fedora_resource_type') - ->setSetting('handler', 'default') - ->setTranslatable(TRUE) - ->setDisplayOptions('view', array( - 'label' => 'hidden', - 'type' => 'author', - 'weight' => 0, - )) - ->setDisplayOptions('form', array( - 'type' => 'entity_reference_autocomplete', - 'weight' => 5, - 'settings' => array( - 'match_operator' => 'CONTAINS', - 'size' => '60', - 'autocomplete_type' => 'tags', - 'placeholder' => '', - ), - )) - ->setDisplayConfigurable('form', TRUE) - ->setDisplayConfigurable('view', TRUE); + $fields['fedora_has_parent'] = BaseFieldDefinition::create('entity_reference') + ->setLabel(t('Fedora has Parent')) + ->setDescription(t('Parent Fedora Resource.')) + ->setRevisionable(TRUE) + ->setSetting('target_type', 'fedora_resource') + ->setSetting('handler', 'default') + ->setDefaultValueCallback('Drupal\islandora\Entity\FedoraResource::getFedoraRoot') + ->setTranslatable(TRUE) + ->setDisplayOptions('view', array( + 'label' => 'hidden', + 'type' => 'author', + 'weight' => 0, + )) + ->setDisplayOptions('form', array( + 'type' => 'entity_reference_autocomplete', + 'weight' => 5, + 'settings' => array( + 'match_operator' => 'CONTAINS', + 'size' => '60', + 'autocomplete_type' => 'tags', + 'placeholder' => '', + ), + )) + ->setDisplayConfigurable('form', TRUE) + ->setDisplayConfigurable('view', TRUE); + + $fields['ldp_contains'] = BaseFieldDefinition::create('entity_reference') + ->setLabel(t('LDP Contains')) + ->setDescription(t('Contains Fedora Resource.')) + ->setRevisionable(TRUE) + ->setSetting('target_type', 'fedora_resource_type') + ->setSetting('handler', 'default') + ->setTranslatable(TRUE) + ->setDisplayOptions('view', array( + 'label' => 'hidden', + 'type' => 'author', + 'weight' => 0, + )) + ->setDisplayOptions('form', array( + 'type' => 'entity_reference_autocomplete', + 'weight' => 5, + 'settings' => array( + 'match_operator' => 'CONTAINS', + 'size' => '60', + 'autocomplete_type' => 'tags', + 'placeholder' => '', + ), + )) + ->setDisplayConfigurable('form', TRUE) + ->setDisplayConfigurable('view', TRUE); $fields['name'] = BaseFieldDefinition::create('string') ->setLabel(t('Name')) diff --git a/src/FedoraResourceHtmlRouteProvider.php b/src/FedoraResourceHtmlRouteProvider.php index 7700bffe..30e689f1 100644 --- a/src/FedoraResourceHtmlRouteProvider.php +++ b/src/FedoraResourceHtmlRouteProvider.php @@ -44,11 +44,11 @@ class FedoraResourceHtmlRouteProvider extends AdminHtmlRouteProvider implements $collection->add("entity.{$entity_type_id}.uuid", $uuid_route); } - return $collection; } - /** Gets the UUID route. + /** + * Gets the UUID route. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type. diff --git a/src/FedoraResourceInterface.php b/src/FedoraResourceInterface.php index 0270d825..baefb5a8 100644 --- a/src/FedoraResourceInterface.php +++ b/src/FedoraResourceInterface.php @@ -14,8 +14,6 @@ use Drupal\user\EntityOwnerInterface; */ interface FedoraResourceInterface extends ContentEntityInterface, EntityChangedInterface, EntityOwnerInterface { - // Add get/set methods for your configuration properties here. - /** * Gets the Fedora resource type. * @@ -76,7 +74,8 @@ interface FedoraResourceInterface extends ContentEntityInterface, EntityChangedI * Sets the published status of a Fedora resource. * * @param bool $published - * TRUE to set this Fedora resource to published, FALSE to set it to unpublished. + * TRUE to set this Fedora resource to published, FALSE to set it to + * unpublished. * * @return \Drupal\islandora\FedoraResourceInterface * The called Fedora resource entity. @@ -110,11 +109,12 @@ interface FedoraResourceInterface extends ContentEntityInterface, EntityChangedI /** * Get the parent entity. * - * @param \Drupal\islandora\FedoraResourceInterface $parent - * The parent entity + * @param \Drupal\Core\Entity\EntityTypeInterface $entity + * The parent entity. * * @return \Drupal\islandora\FedoraResourceInterface * The called Fedora resource entity. */ public function setParent(EntityTypeInterface $entity); + } diff --git a/src/FedoraResourceViewBuilder.php b/src/FedoraResourceViewBuilder.php index 99c50a50..fd540bdd 100644 --- a/src/FedoraResourceViewBuilder.php +++ b/src/FedoraResourceViewBuilder.php @@ -1,19 +1,11 @@ validateFormValues($entity, $entity_form, $form_state); $entity->setValidationRequired(FALSE); - foreach($form_state->getErrors() as $name => $message) { + foreach ($form_state->getErrors() as $name => $message) { // $name may be unknown in $form_state and - // $form_state->setErrorByName($name, $message) may suppress the error message. + // $form_state->setErrorByName($name, $message) + // may suppress the error message. $form_state->setError($triggering_element, $message); } } @@ -221,7 +222,12 @@ class FedoraResourceEntityInlineForm extends EntityInlineForm implements InlineF // Invoke all specified builders for copying form values to entity fields. if (isset($entity_form['#entity_builders'])) { foreach ($entity_form['#entity_builders'] as $function) { - call_user_func_array($function, [$entity->getEntityTypeId(), $entity, &$entity_form, &$form_state]); + call_user_func_array($function, [ + $entity->getEntityTypeId(), + $entity, + &$entity_form, + &$form_state, + ]); } } } @@ -232,11 +238,12 @@ class FedoraResourceEntityInlineForm extends EntityInlineForm implements InlineF * After field_attach_submit() has run and the form has been closed, the form * state still contains field data in $form_state->get('field'). Unless that * data is removed, the next form with the same #parents (reopened add form, - * for example) will contain data (i.e. uploaded files) from the previous form. + * for example) will contain data (i.e. uploaded files) from the previous + * form. * - * @param $entity_form + * @param array $entity_form * The entity form. - * @param $form_state + * @param \Drupal\Core\Form\FormStateInterface $form_state * The form state of the parent form. */ public static function submitCleanFormState(&$entity_form, FormStateInterface $form_state) { diff --git a/src/Form/IslandoraSettingsForm.php b/src/Form/IslandoraSettingsForm.php index 2c254eff..c01850d8 100644 --- a/src/Form/IslandoraSettingsForm.php +++ b/src/Form/IslandoraSettingsForm.php @@ -1,9 +1,5 @@ https://github.com/diegopino - */ namespace Drupal\islandora\ParamConverter; - use Drupal\Core\ParamConverter\EntityConverter; -use Drupal\Core\ParamConverter\ParamConverterInterface; -use Drupal\Component\Uuid\Uuid; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\Routing\Route; /** @@ -30,18 +13,17 @@ use Symfony\Component\Routing\Route; class UuidEntityConverter extends EntityConverter { /** - * @inheritDoc + * {@inheritdoc} */ public function convert($value, $definition, $name, array $defaults) { return $this->entityManager->loadEntityByUuid($name, $value); } /** - * @inheritDoc + * {@inheritdoc} */ public function applies($definition, $name, Route $route) { return (!empty($definition['type']) && $definition['type'] == 'uuid'); } - } diff --git a/src/Plugin/Search/FedoraEntitySearch.php b/src/Plugin/Search/FedoraEntitySearch.php index 42084256..4fd13e50 100644 --- a/src/Plugin/Search/FedoraEntitySearch.php +++ b/src/Plugin/Search/FedoraEntitySearch.php @@ -1,8 +1,4 @@ -getValue('or') != '') { if (preg_match_all('/ ("[^"]+"|[^" ]+)/i', ' ' . $form_state->getValue('or'), $matches)) { @@ -839,4 +834,4 @@ class FedoraResourceSearch extends ConfigurableSearchPluginBase implements Acces } } -} \ No newline at end of file +} diff --git a/tests/scripts/line_endings.sh b/tests/scripts/line_endings.sh new file mode 100755 index 00000000..d16bf328 --- /dev/null +++ b/tests/scripts/line_endings.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +RETURN=0 +FILES=`find -L $1 -name "*.info" -o -name "*.txt" -o -name "*.md"` +echo "Testing for files with DOS line endings..." +for FILE in $FILES +do + file $FILE | grep CRLF + if [ $? == 0 ] + then + RETURN=1 + fi +done +exit $RETURN \ No newline at end of file diff --git a/tests/scripts/travis_setup.sh b/tests/scripts/travis_setup.sh new file mode 100755 index 00000000..3123d11f --- /dev/null +++ b/tests/scripts/travis_setup.sh @@ -0,0 +1,81 @@ +#!/bin/bash +mysql -u root -e 'create database drupal;' +mysql -u root -e "GRANT ALL PRIVILEGES ON drupal.* To 'drupal'@'localhost' IDENTIFIED BY 'drupal';" + +# Java (Oracle) +sudo apt-get install -y software-properties-common +sudo apt-get install -y python-software-properties +sudo add-apt-repository -y ppa:webupd8team/java +sudo apt-get update +echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections +echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections +sudo apt-get install -y oracle-java8-installer +sudo update-java-alternatives -s java-8-oracle +sudo apt-get install -y oracle-java8-set-default +export JAVA_HOME=/usr/lib/jvm/java-8-oracle + +# phpcpd +#sudo apt-get install -y phpcpd + +cd $HOME +pear channel-discover pear.drush.org +pear upgrade --force Console_GetoptPlus +pear upgrade --force pear +pear channel-discover pear.drush.org + +# Drush +cd /tmp +php -r "readfile('https://s3.amazonaws.com/files.drush.org/drush.phar');" > drush +php drush core-status +chmod +x drush +sudo mv drush /opt +sudo ln -s /opt/drush /usr/bin/drush + +phpenv rehash + +cd $HOME +drush dl drupal-8.2.2 --drupal-project-rename=drupal +cd $HOME/drupal +drush si minimal --db-url=mysql://drupal:drupal@localhost/drupal --yes +drush runserver --php-cgi=$HOME/.phpenv/shims/php-cgi localhost:8081 &>/tmp/drush_webserver.log & + +ln -s $ISLANDORA_DIR modules/islandora +drush en -y rdf +drush en -y responsive_image +drush en -y syslog +drush en -y serialization +drush en -y basic_auth +drush en -y rest + +drush dl rdfui --dev +drush en -y rdfui +drush en -y rdf_builder + +drush dl restui +drush en -y restui + +drush dl inline_entity_form +drush en -y inline_entity_form + +drush dl media_entity +drush en -y media_entity + +drush dl media_entity_image +drush en -y media_entity_image + +drush dl search_api +drush -y pm-uninstall search +drush en -y search_api + +cd $HOME/drupal/modules +git clone https://github.com/DiegoPino/claw-jsonld.git +drush en -y jsonld + +drush -y dl bootstrap +drush -y en bootstrap +drush -y config-set system.theme default bootstrap + +drush cr +# The shebang in this file is a bogeyman that is haunting the web test cases. +rm /home/travis/.phpenv/rbenv.d/exec/hhvm-switcher.bash +sleep 20 From ee208980cf2bfd9673c17d554dcf58e9432b692d Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Tue, 29 Nov 2016 02:56:11 +0000 Subject: [PATCH 2/8] Nesting islandora in its own folder --- README.md | 4 ++-- composer.json => islandora/composer.json | 0 .../install/islandora.fedora_resource_type.non_rdf_source.yml | 0 .../install/islandora.fedora_resource_type.rdf_source.yml | 0 {config => islandora/config}/install/islandora.settings.yml | 0 .../install/rdf.mapping.fedora_resource_type.rdf_source.yml | 0 .../config}/schema/fedora_resource_type.schema.yml | 0 .../fedora_resource.page.inc | 0 islandora.info.yml => islandora/islandora.info.yml | 0 .../islandora.links.action.yml | 0 .../islandora.links.menu.yml | 0 .../islandora.links.task.yml | 0 islandora.module => islandora/islandora.module | 0 .../islandora.permissions.yml | 0 islandora.routing.yml => islandora/islandora.routing.yml | 0 islandora.services.yml => islandora/islandora.services.yml | 0 .../src}/Controller/FedoraResourceAddController.php | 0 {src => islandora/src}/Entity/FedoraResource.php | 0 {src => islandora/src}/Entity/FedoraResourceType.php | 0 {src => islandora/src}/Entity/FedoraResourceViewsData.php | 0 {src => islandora/src}/FedoraResourceAccessControlHandler.php | 0 {src => islandora/src}/FedoraResourceHtmlRouteProvider.php | 0 {src => islandora/src}/FedoraResourceInterface.php | 0 {src => islandora/src}/FedoraResourceListBuilder.php | 0 .../src}/FedoraResourceTypeHtmlRouteProvider.php | 0 {src => islandora/src}/FedoraResourceTypeInterface.php | 0 {src => islandora/src}/FedoraResourceTypeListBuilder.php | 0 {src => islandora/src}/FedoraResourceViewBuilder.php | 0 {src => islandora/src}/Form/FedoraResourceDeleteForm.php | 0 .../src}/Form/FedoraResourceEntityInlineForm.php | 0 {src => islandora/src}/Form/FedoraResourceForm.php | 0 {src => islandora/src}/Form/FedoraResourceSettingsForm.php | 0 {src => islandora/src}/Form/FedoraResourceTypeDeleteForm.php | 0 {src => islandora/src}/Form/FedoraResourceTypeForm.php | 0 {src => islandora/src}/Form/IslandoraSettingsForm.php | 0 {src => islandora/src}/ParamConverter/UuidEntityConverter.php | 0 {src => islandora/src}/Plugin/Search/FedoraEntitySearch.php | 0 .../templates}/fedora-resource-content-add-list.html.twig | 0 {templates => islandora/templates}/fedora_resource.html.twig | 0 {tests => islandora/tests}/scripts/line_endings.sh | 0 {tests => islandora/tests}/scripts/travis_setup.sh | 0 41 files changed, 2 insertions(+), 2 deletions(-) rename composer.json => islandora/composer.json (100%) rename {config => islandora/config}/install/islandora.fedora_resource_type.non_rdf_source.yml (100%) rename {config => islandora/config}/install/islandora.fedora_resource_type.rdf_source.yml (100%) rename {config => islandora/config}/install/islandora.settings.yml (100%) rename {config => islandora/config}/install/rdf.mapping.fedora_resource_type.rdf_source.yml (100%) rename {config => islandora/config}/schema/fedora_resource_type.schema.yml (100%) rename fedora_resource.page.inc => islandora/fedora_resource.page.inc (100%) rename islandora.info.yml => islandora/islandora.info.yml (100%) rename islandora.links.action.yml => islandora/islandora.links.action.yml (100%) rename islandora.links.menu.yml => islandora/islandora.links.menu.yml (100%) rename islandora.links.task.yml => islandora/islandora.links.task.yml (100%) rename islandora.module => islandora/islandora.module (100%) rename islandora.permissions.yml => islandora/islandora.permissions.yml (100%) rename islandora.routing.yml => islandora/islandora.routing.yml (100%) rename islandora.services.yml => islandora/islandora.services.yml (100%) rename {src => islandora/src}/Controller/FedoraResourceAddController.php (100%) rename {src => islandora/src}/Entity/FedoraResource.php (100%) rename {src => islandora/src}/Entity/FedoraResourceType.php (100%) rename {src => islandora/src}/Entity/FedoraResourceViewsData.php (100%) rename {src => islandora/src}/FedoraResourceAccessControlHandler.php (100%) rename {src => islandora/src}/FedoraResourceHtmlRouteProvider.php (100%) rename {src => islandora/src}/FedoraResourceInterface.php (100%) rename {src => islandora/src}/FedoraResourceListBuilder.php (100%) rename {src => islandora/src}/FedoraResourceTypeHtmlRouteProvider.php (100%) rename {src => islandora/src}/FedoraResourceTypeInterface.php (100%) rename {src => islandora/src}/FedoraResourceTypeListBuilder.php (100%) rename {src => islandora/src}/FedoraResourceViewBuilder.php (100%) rename {src => islandora/src}/Form/FedoraResourceDeleteForm.php (100%) rename {src => islandora/src}/Form/FedoraResourceEntityInlineForm.php (100%) rename {src => islandora/src}/Form/FedoraResourceForm.php (100%) rename {src => islandora/src}/Form/FedoraResourceSettingsForm.php (100%) rename {src => islandora/src}/Form/FedoraResourceTypeDeleteForm.php (100%) rename {src => islandora/src}/Form/FedoraResourceTypeForm.php (100%) rename {src => islandora/src}/Form/IslandoraSettingsForm.php (100%) rename {src => islandora/src}/ParamConverter/UuidEntityConverter.php (100%) rename {src => islandora/src}/Plugin/Search/FedoraEntitySearch.php (100%) rename {templates => islandora/templates}/fedora-resource-content-add-list.html.twig (100%) rename {templates => islandora/templates}/fedora_resource.html.twig (100%) rename {tests => islandora/tests}/scripts/line_endings.sh (100%) rename {tests => islandora/tests}/scripts/travis_setup.sh (100%) diff --git a/README.md b/README.md index 005eb12c..49a92eb7 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ ## Introduction -Islandora Fedora 4 Repository Module for Drupal 8.1.x +Islandora modules for Drupal 8.2.x ## Maintainers @@ -22,4 +22,4 @@ If you would like to contribute code to the project, you need to be covered by a ## License -[GPLv2](http://www.gnu.org/licenses/gpl-2.0.txt) \ No newline at end of file +[GPLv2](http://www.gnu.org/licenses/gpl-2.0.txt) diff --git a/composer.json b/islandora/composer.json similarity index 100% rename from composer.json rename to islandora/composer.json diff --git a/config/install/islandora.fedora_resource_type.non_rdf_source.yml b/islandora/config/install/islandora.fedora_resource_type.non_rdf_source.yml similarity index 100% rename from config/install/islandora.fedora_resource_type.non_rdf_source.yml rename to islandora/config/install/islandora.fedora_resource_type.non_rdf_source.yml diff --git a/config/install/islandora.fedora_resource_type.rdf_source.yml b/islandora/config/install/islandora.fedora_resource_type.rdf_source.yml similarity index 100% rename from config/install/islandora.fedora_resource_type.rdf_source.yml rename to islandora/config/install/islandora.fedora_resource_type.rdf_source.yml diff --git a/config/install/islandora.settings.yml b/islandora/config/install/islandora.settings.yml similarity index 100% rename from config/install/islandora.settings.yml rename to islandora/config/install/islandora.settings.yml diff --git a/config/install/rdf.mapping.fedora_resource_type.rdf_source.yml b/islandora/config/install/rdf.mapping.fedora_resource_type.rdf_source.yml similarity index 100% rename from config/install/rdf.mapping.fedora_resource_type.rdf_source.yml rename to islandora/config/install/rdf.mapping.fedora_resource_type.rdf_source.yml diff --git a/config/schema/fedora_resource_type.schema.yml b/islandora/config/schema/fedora_resource_type.schema.yml similarity index 100% rename from config/schema/fedora_resource_type.schema.yml rename to islandora/config/schema/fedora_resource_type.schema.yml diff --git a/fedora_resource.page.inc b/islandora/fedora_resource.page.inc similarity index 100% rename from fedora_resource.page.inc rename to islandora/fedora_resource.page.inc diff --git a/islandora.info.yml b/islandora/islandora.info.yml similarity index 100% rename from islandora.info.yml rename to islandora/islandora.info.yml diff --git a/islandora.links.action.yml b/islandora/islandora.links.action.yml similarity index 100% rename from islandora.links.action.yml rename to islandora/islandora.links.action.yml diff --git a/islandora.links.menu.yml b/islandora/islandora.links.menu.yml similarity index 100% rename from islandora.links.menu.yml rename to islandora/islandora.links.menu.yml diff --git a/islandora.links.task.yml b/islandora/islandora.links.task.yml similarity index 100% rename from islandora.links.task.yml rename to islandora/islandora.links.task.yml diff --git a/islandora.module b/islandora/islandora.module similarity index 100% rename from islandora.module rename to islandora/islandora.module diff --git a/islandora.permissions.yml b/islandora/islandora.permissions.yml similarity index 100% rename from islandora.permissions.yml rename to islandora/islandora.permissions.yml diff --git a/islandora.routing.yml b/islandora/islandora.routing.yml similarity index 100% rename from islandora.routing.yml rename to islandora/islandora.routing.yml diff --git a/islandora.services.yml b/islandora/islandora.services.yml similarity index 100% rename from islandora.services.yml rename to islandora/islandora.services.yml diff --git a/src/Controller/FedoraResourceAddController.php b/islandora/src/Controller/FedoraResourceAddController.php similarity index 100% rename from src/Controller/FedoraResourceAddController.php rename to islandora/src/Controller/FedoraResourceAddController.php diff --git a/src/Entity/FedoraResource.php b/islandora/src/Entity/FedoraResource.php similarity index 100% rename from src/Entity/FedoraResource.php rename to islandora/src/Entity/FedoraResource.php diff --git a/src/Entity/FedoraResourceType.php b/islandora/src/Entity/FedoraResourceType.php similarity index 100% rename from src/Entity/FedoraResourceType.php rename to islandora/src/Entity/FedoraResourceType.php diff --git a/src/Entity/FedoraResourceViewsData.php b/islandora/src/Entity/FedoraResourceViewsData.php similarity index 100% rename from src/Entity/FedoraResourceViewsData.php rename to islandora/src/Entity/FedoraResourceViewsData.php diff --git a/src/FedoraResourceAccessControlHandler.php b/islandora/src/FedoraResourceAccessControlHandler.php similarity index 100% rename from src/FedoraResourceAccessControlHandler.php rename to islandora/src/FedoraResourceAccessControlHandler.php diff --git a/src/FedoraResourceHtmlRouteProvider.php b/islandora/src/FedoraResourceHtmlRouteProvider.php similarity index 100% rename from src/FedoraResourceHtmlRouteProvider.php rename to islandora/src/FedoraResourceHtmlRouteProvider.php diff --git a/src/FedoraResourceInterface.php b/islandora/src/FedoraResourceInterface.php similarity index 100% rename from src/FedoraResourceInterface.php rename to islandora/src/FedoraResourceInterface.php diff --git a/src/FedoraResourceListBuilder.php b/islandora/src/FedoraResourceListBuilder.php similarity index 100% rename from src/FedoraResourceListBuilder.php rename to islandora/src/FedoraResourceListBuilder.php diff --git a/src/FedoraResourceTypeHtmlRouteProvider.php b/islandora/src/FedoraResourceTypeHtmlRouteProvider.php similarity index 100% rename from src/FedoraResourceTypeHtmlRouteProvider.php rename to islandora/src/FedoraResourceTypeHtmlRouteProvider.php diff --git a/src/FedoraResourceTypeInterface.php b/islandora/src/FedoraResourceTypeInterface.php similarity index 100% rename from src/FedoraResourceTypeInterface.php rename to islandora/src/FedoraResourceTypeInterface.php diff --git a/src/FedoraResourceTypeListBuilder.php b/islandora/src/FedoraResourceTypeListBuilder.php similarity index 100% rename from src/FedoraResourceTypeListBuilder.php rename to islandora/src/FedoraResourceTypeListBuilder.php diff --git a/src/FedoraResourceViewBuilder.php b/islandora/src/FedoraResourceViewBuilder.php similarity index 100% rename from src/FedoraResourceViewBuilder.php rename to islandora/src/FedoraResourceViewBuilder.php diff --git a/src/Form/FedoraResourceDeleteForm.php b/islandora/src/Form/FedoraResourceDeleteForm.php similarity index 100% rename from src/Form/FedoraResourceDeleteForm.php rename to islandora/src/Form/FedoraResourceDeleteForm.php diff --git a/src/Form/FedoraResourceEntityInlineForm.php b/islandora/src/Form/FedoraResourceEntityInlineForm.php similarity index 100% rename from src/Form/FedoraResourceEntityInlineForm.php rename to islandora/src/Form/FedoraResourceEntityInlineForm.php diff --git a/src/Form/FedoraResourceForm.php b/islandora/src/Form/FedoraResourceForm.php similarity index 100% rename from src/Form/FedoraResourceForm.php rename to islandora/src/Form/FedoraResourceForm.php diff --git a/src/Form/FedoraResourceSettingsForm.php b/islandora/src/Form/FedoraResourceSettingsForm.php similarity index 100% rename from src/Form/FedoraResourceSettingsForm.php rename to islandora/src/Form/FedoraResourceSettingsForm.php diff --git a/src/Form/FedoraResourceTypeDeleteForm.php b/islandora/src/Form/FedoraResourceTypeDeleteForm.php similarity index 100% rename from src/Form/FedoraResourceTypeDeleteForm.php rename to islandora/src/Form/FedoraResourceTypeDeleteForm.php diff --git a/src/Form/FedoraResourceTypeForm.php b/islandora/src/Form/FedoraResourceTypeForm.php similarity index 100% rename from src/Form/FedoraResourceTypeForm.php rename to islandora/src/Form/FedoraResourceTypeForm.php diff --git a/src/Form/IslandoraSettingsForm.php b/islandora/src/Form/IslandoraSettingsForm.php similarity index 100% rename from src/Form/IslandoraSettingsForm.php rename to islandora/src/Form/IslandoraSettingsForm.php diff --git a/src/ParamConverter/UuidEntityConverter.php b/islandora/src/ParamConverter/UuidEntityConverter.php similarity index 100% rename from src/ParamConverter/UuidEntityConverter.php rename to islandora/src/ParamConverter/UuidEntityConverter.php diff --git a/src/Plugin/Search/FedoraEntitySearch.php b/islandora/src/Plugin/Search/FedoraEntitySearch.php similarity index 100% rename from src/Plugin/Search/FedoraEntitySearch.php rename to islandora/src/Plugin/Search/FedoraEntitySearch.php diff --git a/templates/fedora-resource-content-add-list.html.twig b/islandora/templates/fedora-resource-content-add-list.html.twig similarity index 100% rename from templates/fedora-resource-content-add-list.html.twig rename to islandora/templates/fedora-resource-content-add-list.html.twig diff --git a/templates/fedora_resource.html.twig b/islandora/templates/fedora_resource.html.twig similarity index 100% rename from templates/fedora_resource.html.twig rename to islandora/templates/fedora_resource.html.twig diff --git a/tests/scripts/line_endings.sh b/islandora/tests/scripts/line_endings.sh similarity index 100% rename from tests/scripts/line_endings.sh rename to islandora/tests/scripts/line_endings.sh diff --git a/tests/scripts/travis_setup.sh b/islandora/tests/scripts/travis_setup.sh similarity index 100% rename from tests/scripts/travis_setup.sh rename to islandora/tests/scripts/travis_setup.sh From b2899ba893162f32ea613f2d42d3afb646428d5d Mon Sep 17 00:00:00 2001 From: Danny Lamb Date: Tue, 29 Nov 2016 03:04:55 +0000 Subject: [PATCH 3/8] Pulling out composer.json so tests can run. --- islandora/composer.json => composer.json | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename islandora/composer.json => composer.json (100%) diff --git a/islandora/composer.json b/composer.json similarity index 100% rename from islandora/composer.json rename to composer.json From 9cd086f619f3bc60cb5ee77beb6f05d94a2bab22 Mon Sep 17 00:00:00 2001 From: Danny Lamb Date: Tue, 29 Nov 2016 03:11:47 +0000 Subject: [PATCH 4/8] Does this even work? --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e043b79d..615213d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ install: script: - $ISLANDORA_DIR/tests/scripts/line_endings.sh . - - php vendor/bin/phpcs --standard=Drupal *.module src + - php vendor/bin/phpcs --standard=Drupal */*.module */src - php vendor/bin/phpcpd --names *.module,*.inc,*.test,*.php --exclude=vendor . notifications: From 5580ffac318cc34f00f409be439387174decb76c Mon Sep 17 00:00:00 2001 From: Danny Lamb Date: Tue, 29 Nov 2016 03:19:53 +0000 Subject: [PATCH 5/8] Pulling out tests folder too, since it's just travis stuff. --- .travis.yml | 2 +- {islandora/tests => tests}/scripts/line_endings.sh | 0 {islandora/tests => tests}/scripts/travis_setup.sh | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename {islandora/tests => tests}/scripts/line_endings.sh (100%) rename {islandora/tests => tests}/scripts/travis_setup.sh (100%) diff --git a/.travis.yml b/.travis.yml index 615213d3..86835b64 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ install: script: - $ISLANDORA_DIR/tests/scripts/line_endings.sh . - - php vendor/bin/phpcs --standard=Drupal */*.module */src + - php vendor/bin/phpcs --standard=Drupal *.module *.php --exclude=vendor . - php vendor/bin/phpcpd --names *.module,*.inc,*.test,*.php --exclude=vendor . notifications: diff --git a/islandora/tests/scripts/line_endings.sh b/tests/scripts/line_endings.sh similarity index 100% rename from islandora/tests/scripts/line_endings.sh rename to tests/scripts/line_endings.sh diff --git a/islandora/tests/scripts/travis_setup.sh b/tests/scripts/travis_setup.sh similarity index 100% rename from islandora/tests/scripts/travis_setup.sh rename to tests/scripts/travis_setup.sh From c6b2621160f7a81d991cf994bb6e4b0146f649a6 Mon Sep 17 00:00:00 2001 From: Danny Lamb Date: Tue, 29 Nov 2016 03:33:35 +0000 Subject: [PATCH 6/8] Playing with phpcs options --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 86835b64..320a92b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ install: script: - $ISLANDORA_DIR/tests/scripts/line_endings.sh . - - php vendor/bin/phpcs --standard=Drupal *.module *.php --exclude=vendor . + - php vendor/bin/phpcs --standard=Drupal --file-list=*.module,*.php --ignore=tests,vendor . - php vendor/bin/phpcpd --names *.module,*.inc,*.test,*.php --exclude=vendor . notifications: From a9240b4c67f6c81b1e770472a970c9182cb531dc Mon Sep 17 00:00:00 2001 From: Danny Lamb Date: Tue, 29 Nov 2016 03:36:03 +0000 Subject: [PATCH 7/8] Recursively looking for php and module files --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 320a92b9..84b2d592 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ install: script: - $ISLANDORA_DIR/tests/scripts/line_endings.sh . - - php vendor/bin/phpcs --standard=Drupal --file-list=*.module,*.php --ignore=tests,vendor . + - php vendor/bin/phpcs --standard=Drupal **/*.module **/*.php --ignore=tests,vendor . - php vendor/bin/phpcpd --names *.module,*.inc,*.test,*.php --exclude=vendor . notifications: From b7d628dbb1546392d8453031e5040e3e7ee4608a Mon Sep 17 00:00:00 2001 From: Danny Lamb Date: Tue, 29 Nov 2016 14:10:46 +0000 Subject: [PATCH 8/8] Moved travis scripts to hidden folder --- {tests/scripts => .scripts}/line_endings.sh | 0 {tests/scripts => .scripts}/travis_setup.sh | 0 .travis.yml | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename {tests/scripts => .scripts}/line_endings.sh (100%) rename {tests/scripts => .scripts}/travis_setup.sh (100%) diff --git a/tests/scripts/line_endings.sh b/.scripts/line_endings.sh similarity index 100% rename from tests/scripts/line_endings.sh rename to .scripts/line_endings.sh diff --git a/tests/scripts/travis_setup.sh b/.scripts/travis_setup.sh similarity index 100% rename from tests/scripts/travis_setup.sh rename to .scripts/travis_setup.sh diff --git a/.travis.yml b/.travis.yml index 84b2d592..b3d2ddec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ install: script: - - $ISLANDORA_DIR/tests/scripts/line_endings.sh . + - $ISLANDORA_DIR/.scripts/line_endings.sh . - php vendor/bin/phpcs --standard=Drupal **/*.module **/*.php --ignore=tests,vendor . - php vendor/bin/phpcpd --names *.module,*.inc,*.test,*.php --exclude=vendor .