Skip to content

Instantly share code, notes, and snippets.

View chillu's full-sized avatar
👋

Ingo Schommer chillu

👋
View GitHub Profile
@chillu
chillu / gist:93eb5e8191b257bb24b6
Created June 8, 2015 06:06
RFC: Retiring and replacing the web test runner

The core team recently voted in favour of retiring the current web test runner (TestRunner) (accessible via dev/tests).

The current web test runner functions differently to the sake/phpunit test runners, is susceptible to superglobal leakage, and is basically a bit of a pain to maintain because of the difference in running environments. Also, it's extra code weight and attack surface for live environments when it should really be a dev dependency.

This RFC suggests it is replaced with a module that:

  • functions as a web wrapper to call the test runner via the phpunit binary
  • with a listener feeding back to the UI via WebSocket.
  • would run only in dev mode
  • strongly discourage being loaded as anything but a dev dependency
@chillu
chillu / test
Last active October 19, 2015 22:23
https://docs.google.com/a/silverstripe.com/spreadsheets/d/1wCVYnP95QDT7PLAb7iV2xiSuB9QUGMsYkfhQ6Lamdq0/pubhtml?gid=571311456&single=true
@chillu
chillu / bench.sh
Last active December 14, 2015 21:28
#/bin/bash
# Compares response times on a specific URL on different SilverStripe versions.
#
# USAGE: bench.sh <base-path> <base-url>
basepath=$1
baseurl=$2
urls="/?flush=all /"
abparams="-n 10"
@chillu
chillu / - howto-travis-silverstripe.md
Last active December 15, 2015 12:48
Howto: Continuous Integration for SilverStripe Modules with Travis and Composer
class NewsPage extends Page {
static $db = array(
'SidebarTextAboveImage' => 'Text',
'SidebarTextBelowImage' => 'Text',
);
static $has_one = array(
'SidebarImage' => 'Image'
);
}
<?php
class WidgetArea extends DataObject {
static $belongs_many_many = array(
'Pages' => 'Page'
);
static $many_many_extraFields = array(
'Pages' => array(
'SectionName' => 'Varchar'
)
);
commit 62d1b23eabb185616015d786990a7f82f042777f
Author: a2nt <tony@thewebdevelopmentagency.com>
Date: Sat May 4 04:45:53 2013 +0700
IMPROVEMENT Media Dialog extra data
HtmlEditorField_Toolbar class allows you to extend media fields for an
instance this way:
[code]
class HtmlEditorField_ToolbarEx extends Extension {
commit d47b2026971d74cb9604a27edb6aa905499f132f
Author: Jeremy Shipman <jeremy@burnbright.net>
Date: Fri Apr 19 15:45:43 2013 +1200
Restored c4eac5310e1f (merge error)
FIX: Instead of CsvBulkLoader->findExistingRecord out right failing (i.e. no duplicate found) when the duplicate check field is empty, it will now continue on to check other duplicateCheck fields.
Added extra testing data to CSVBulkLoaderTest so that it fails.
diff --git a/dev/CsvBulkLoader.php b/dev/CsvBulkLoader.php
@chillu
chillu / Gruntfile.js
Last active December 19, 2015 09:09
Grunticon support in SS.
/*jshint node:true*/
module.exports = function(grunt) {
"use strict";
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
grunticon: {
mobileIcons: {
options: {
@chillu
chillu / search.feature
Created November 15, 2013 13:48
Blog example: Search feature
Scenario: I can search for a page by its newest last edited date
Given a "page" "Recent Page"
And a "page" "Old Page" was last edited "7 days ago"
When I fill in "To" with "the date of 5 days ago"
And I press the "Apply Filter" button
Then I should not see "Recent Page" in the tree
But I should see "Old Page" in the tree