Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
* develop: (78 commits)
  Update installation instructions: require-dev with command too
  Remove Scrutinizer badge
  Update README for VersionEye reference
  Remove and ignore composer.lock
  Add prefer-stable to composer.json
  Fix PHP 7 ready badge
  Fix composer.lock
  Reformat code for PSR-2 coding standards
  Empty line after opening php tag
  4 spaces for indentation
  Tests failed because of bad refactor
  Remove static::escape and unreachable code
  Minimum-stability RC for composer.json
  And now 7.1 actually succeeds ...
  7.1 fails because of travis install failure
  Use assertRegExp where required
  Rename helper functions so the name makes sense
  Tests in actual test method for options
  Tests in actual test method for commands
  Initialization with ()
  ...

# Conflicts:
#	composer.json
  • Loading branch information
daften committed Dec 22, 2016
2 parents 86c4b14 + 302b542 commit 6432f8c
Show file tree
Hide file tree
Showing 10 changed files with 1,522 additions and 2 deletions.
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space

[**.php]
indent_style = space
indent_size = 4

[*.md]
trim_trailing_whitespace = false
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/vendor
/vendor
composer.lock
/coverage.clover
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: php
php:
- 7.1
- 7.0
- 5.6
- 5.5
install:
- composer self-update
- composer install
script:
- vendor/bin/robo test
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2016 Digipolis Gent

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
62 changes: 62 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Robo Drupal Console Extension

Extension to execute Drupal Console commands in [Robo](http://robo.li/).

[![Latest Stable Version](https://poser.pugx.org/digipolisgent/robo-drupal-console/v/stable)](https://packagist.org/packages/digipolisgent/robo-drupal-console)
[![Latest Unstable Version](https://poser.pugx.org/digipolisgent/robo-drupal-console/v/unstable)](https://packagist.org/packages/digipolisgent/robo-drupal-console)
[![Total Downloads](https://poser.pugx.org/digipolisgent/robo-drupal-console/downloads)](https://packagist.org/packages/digipolisgent/robo-drupal-console)
[![PHP 7 ready](http://php7ready.timesplinter.ch/digipolisgent/robo-drupal-console/develop/badge.svg)](https://travis-ci.org/digipolisgent/robo-drupal-console)
[![License](https://poser.pugx.org/digipolisgent/robo-drupal-console/license)](https://packagist.org/packages/digipolisgent/robo-drupal-console)

[![Build Status](https://travis-ci.org/digipolisgent/robo-drupal-console.svg?branch=develop)](https://travis-ci.org/digipolisgent/robo-drupal-console)
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/8940f64e-cebe-46de-b670-5a89fb0388a9/mini.png)](https://insight.sensiolabs.com/projects/8940f64e-cebe-46de-b670-5a89fb0388a9)
[![Dependency Status](https://www.versioneye.com/user/projects/585aaebacd6569002cd5bc23/badge.svg?style=flat-square)](https://www.versioneye.com/user/projects/585aaebacd6569002cd5bc23)

Created based on [Robo DrushStack](https://github.com/boedah/robo-drush). Runs Drupal Console commands in stack. You can define global options for all commands (like Drupal root and uri).

## Table of contents

- [Installation](#installation)
- [Usage](#usage)
- [Testing](#testing)
- [Examples](#examples)

## Installation

Add `"digipolisgent/robo-drupal-console": "~0.1"` to your composer.json:

```json
{
"require-dev": {
"digipolisgent/robo-drupal-console": "~0.1"
}
}
```
and execute `composer update`.

OR

Issue `composer require --dev digipolisgent/robo-drupal-console:~0.1`

## Usage

Use the trait (according to your used version) in your RoboFile:

```php
class RoboFile extends \Robo\Tasks
{
use DigipolisGent\Robo\Task\DrupalConsole\loadTasks;
}
```

## Testing

`composer test`

## Examples

### Site update

This executes pending database updates and reverts all features (from code to database):

### Site install
40 changes: 40 additions & 0 deletions RoboFile.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php

class RoboFile extends \Robo\Tasks
{

use DigipolisGent\Robo\Task\DrupalConsole\loadTasks;

/**
* Runs the unit tests.
*/
public function test()
{
$this->stopOnFail(true);
$this->taskPHPUnit()
->option('disallow-test-output')
->option('report-useless-tests')
->option('strict-coverage')
->option('-v')
->option('-d error_reporting=-1')
->arg('tests')
->run();
}

/**
* Provides test coverage for Scrutinizer
*/
public function testCoverageScrutinize()
{
$this->stopOnFail(true);
$this->taskPHPUnit()
->option('disallow-test-output')
->option('report-useless-tests')
->option('strict-coverage')
->option('-d error_reporting=-1')
->option('--coverage-clover=coverage.clover')
->arg('tests')
->run();
}

}
24 changes: 23 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"name": "digipolisgent/robo-drupal-console",
"description": "Drupal Console CommandStack for Robo Task Runner",
"type": "robo-tasks",
"minimum-stability": "RC",
"prefer-stable": true,
"require": {
"consolidation/robo": "~1.0",
"drupal/console": "~1.0",
Expand All @@ -10,12 +12,32 @@
"require-dev": {
"phpunit/phpunit": "~4.4"
},
"minimum-stability": "dev",
"autoload": {
"psr-4": {
"DigipolisGent\\Robo\\Task\\DrupalConsole\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"DigipolisGent\\Tests\\Robo\\Task\\DrupalConsole\\": "tests"
}
},
"scripts": {
"test": "robo --ansi test"
},
"license": "MIT",
"authors": [
{
"name": "Dieter Blomme",
"email": "dieterblomme@gmail.com"
},
{
"name": "Jelle Sebreghts",
"email": "sebreghts.jelle@gmail.com"
},
{
"name": "Peter Decuyper",
"email": "peter.decuyper@digipolis.gent"
}
]
}
Loading

0 comments on commit 6432f8c

Please sign in to comment.