Skip to content

Commit

Permalink
FIX Update editorconfig to apply to composer.json, update spacing in …
Browse files Browse the repository at this point in the history
…composer.json, make comment for initRequest() clearer
  • Loading branch information
raissanorth committed Jan 16, 2018
1 parent 2ec3cbd commit dcdab22
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 19 deletions.
9 changes: 8 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,15 @@ indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[{*.yml,package.json}]
[*.md]
trim_trailing_whitespace = false

[*.{yml,js,json,css,scss,feature}]
indent_size = 2
indent_style = space

[composer.json]
indent_size = 4

# The indent size used in the package.json file cannot be changed:
# https://github.com/npm/npm/pull/3180#issuecomment-16336516
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ when more than 1000 records need to be exported. The module should be able to ex

**Note:** For SilverStripe 3.x, please use the [1.x release line](https://github.com/silverstripe/silverstripe-gridfieldqueuedexport/tree/1.0).

## Installation via Composer
## Installation

To install run `composer require silverstripe/gridfieldqueuedexport`.

Expand Down
39 changes: 25 additions & 14 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
{
"name": "silverstripe/gridfieldqueuedexport",
"description": "Export large data sets from your GridField in the SilverStripe CMS interface through async jobs",
"type": "silverstripe-vendormodule",
"keywords": ["silverstripe", "queuedjobs", "export", "csv", "gridfield", "cwp"],
"license": "BSD-3-Clause",
"minimum-stability": "dev",
"require": {
"silverstripe/framework": "^4",
"name": "silverstripe/gridfieldqueuedexport",
"description": "Export large data sets from your GridField in the SilverStripe CMS interface through async jobs",
"type": "silverstripe-vendormodule",
"keywords": [
"silverstripe",
"queuedjobs",
"export",
"csv",
"gridfield",
"cwp"
],
"license": "BSD-3-Clause",
"minimum-stability": "dev",
"require": {
"silverstripe/framework": "^4",
"symbiote/silverstripe-queuedjobs": "^4"
},
"extra": {
},
"require-dev": {
"phpunit/phpunit": "^5.7",
"squizlabs/php_codesniffer": "^3.0"
},
"extra": {
"expose": [
"client"
],
"branch-alias": {
"dev-master": "2.x-dev"
}
}
"branch-alias": {
"dev-master": "2.x-dev"
}
}
}

2 changes: 1 addition & 1 deletion src/Forms/GridFieldQueuedExportButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public function checkExport($gridField, $request = null)
}
} elseif ($job->JobStatus == QueuedJob::STATUS_BROKEN) {
$data->ErrorMessage = _t(
'SilverStripe\\GridfieldQueuedExport\\GridFieldQueuedExportButton.ERROR_GENERAL',
__CLASS__.'.ERROR_GENERAL',
'Sorry, but there was an error exporting the CSV'
);
} elseif ($job->JobStatus == QueuedJob::STATUS_CANCELLED) {
Expand Down
5 changes: 3 additions & 2 deletions src/Jobs/GenerateCSVJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,9 @@ public function setup()
}

/**
* Normally Director::handleRequest will register an HTTPRequest service. If that hasn't happened yet, we will
* register one instead. Also register a new controller if one hasn't been pushed yet.
* Normally Director::handleRequest will register an HTTPRequest service (when routing via frontend controllers).
* If that hasn't happened yet, we will register one instead (e.g. for unit testing, or when running from the command
* line). Also register a new controller if one hasn't been pushed yet.
*/
protected function initRequest()
{
Expand Down

0 comments on commit dcdab22

Please sign in to comment.