Skip to content

Commit

Permalink
Merge pull request #23 from creative-commoners/pulls/2.0/upgrade-to-ss4
Browse files Browse the repository at this point in the history
Update module for SS4 compatibility
  • Loading branch information
robbieaverill authored Jan 17, 2018
2 parents 3cca5d6 + fbd89b3 commit b02bf55
Show file tree
Hide file tree
Showing 27 changed files with 717 additions and 441 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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
/.gitignore export-ignore
/.travis.yml export-ignore
/.scrutinizer.yml export-ignore
/codecov.yml export-ignore
38 changes: 23 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,32 @@
# See https://github.com/silverstripe-labs/silverstripe-travis-support for setup details

sudo: false

language: php

env:
global:
- COMPOSER_ROOT_VERSION="2.0.x-dev"

matrix:
include:
- php: 5.4
env: DB=SQLITE3 CORE_RELEASE=3
- php: 5.5
env: DB=PGSQL CORE_RELEASE=3
- php: 5.6
env: DB=MYSQL CORE_RELEASE=3
env: DB=MYSQL PHPCS_TEST=1 PHPUNIT_TEST=1
- php: 7.0
env: DB=PGSQL PHPUNIT_TEST=1
- php: 7.1
env: DB=MYSQL PHPUNIT_COVERAGE_TEST=1
- php: 7.2
env: DB=MYSQL PHPUNIT_TEST=1

before_script:
- composer self-update || true
- git clone git://github.com/silverstripe-labs/silverstripe-travis-support.git ~/travis-support
- php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss
- cd ~/builds/ss
- composer install
- phpenv rehash
- phpenv config-rm xdebug.ini

- composer validate
- if [[ $DB == "PGSQL" ]]; then composer require --no-update silverstripe/postgresql 2.0.x-dev; fi
- composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile

script:
- vendor/bin/phpunit gridfieldqueuedexport/tests
- if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit; fi
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml; fi
- if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs src tests; fi

after_success:
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi
6 changes: 6 additions & 0 deletions .tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ file_filter = lang/<lang>.yml
source_file = lang/en.yml
source_lang = en
type = YML

[silverstripe-gridfieldqueuedexport.master-js]
file_filter = client/lang/src/<lang>.json
source_file = client/lang/src/en.json
source_lang = en
type = KEYVALUEJSON
8 changes: 8 additions & 0 deletions .upgrade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
mappings:
UserFormUseQueuedExportExtension: SilverStripe\GridfieldQueuedExport\Extensions\UserFormUseQueuedExportExtension
GenerateCSVJob: SilverStripe\GridfieldQueuedExport\Jobs\GenerateCSVJob
GridFieldQueuedExportButton: SilverStripe\GridfieldQueuedExport\Forms\GridFieldQueuedExportButton
GridFieldQueuedExportButton_Response: SilverStripe\GridfieldQueuedExport\Forms\GridFieldQueuedExportButtonResponse
GenerateCSVJobTest: SilverStripe\GridFieldQueuedExport\Tests\GenerateCSVJobTest
GenerateCSVJobTest_Record: SilverStripe\GridFieldQueuedExport\Tests\GenerateCSVJobTestRecord
GenerateCSVJobTest_Controller: SilverStripe\GridFieldQueuedExport\Tests\GenerateCSVJobTestController
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 SilverStripe Ltd.
Copyright (c) 2018 SilverStripe Ltd.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# GridField Queued Export

[![Build Status](https://travis-ci.org/silverstripe/silverstripe-gridfieldqueuedexport.svg?branch=master)](https://travis-ci.org/silverstripe/silverstripe-gridfieldqueuedexport)
![helpfulrobot](https://helpfulrobot.io/silverstripe/gridfieldqueuedexport/badge)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/silverstripe/silverstripe-gridfieldqueuedexport/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/silverstripe/silverstripe-gridfieldqueuedexport/?branch=master)
[![Code Coverage](https://codecov.io/gh/silverstripe/silverstripe-gridfieldqueuedexport/branch/master/graph/badge.svg)](https://codecov.io/gh/silverstripe/silverstripe-gridfielqueuedexport)

## Introduction

Expand All @@ -16,13 +17,14 @@ when more than 1000 records need to be exported. The module should be able to ex

## Requirements

* SilverStripe 3.3+
* SilverStripe 4.0+
* The [queuedjobs](https://github.com/silverstripe-australia/silverstripe-queuedjobs) module

**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

cd path/to/my/silverstripe/site
composer require "silverstripe/gridfieldqueuedexport:*"
To install run `composer require silverstripe/gridfieldqueuedexport`.

## Configuration

Expand Down
9 changes: 0 additions & 9 deletions changelog.md

This file was deleted.

11 changes: 11 additions & 0 deletions client/lang/en.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// This file was generated by silverstripe/cow from client/lang/src/en.json.
// See https://github.com/tractorcow/cow for details
if (typeof(ss) === 'undefined' || typeof(ss.i18n) === 'undefined') {
if (typeof(console) !== 'undefined') { // eslint-disable-line no-console
console.error('Class ss.i18n not defined'); // eslint-disable-line no-console
}
} else {
ss.i18n.addDictionary('en', {
"GridFieldQueuedExportButton.DOWNLOADED": "Your export has been downloaded."
});
}
3 changes: 3 additions & 0 deletions client/lang/src/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"GridFieldQueuedExportButton.DOWNLOADED": "Your export has been downloaded."
}
Loading

0 comments on commit b02bf55

Please sign in to comment.