Skip to content

Commit

Permalink
Merge branch 'release/2013-10.03'
Browse files Browse the repository at this point in the history
  • Loading branch information
Schlaefer committed Nov 4, 2013
2 parents 1287fea + 640bf0c commit ec91ac1
Show file tree
Hide file tree
Showing 402 changed files with 14,750 additions and 5,290 deletions.
266 changes: 191 additions & 75 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,77 @@
module.exports = function(grunt) {
'use strict';

var requireJsOptions = {
baseUrl: "./app/webroot/js",
dir: "./app/webroot/release-tmp",
optimize: "uglify2",
skipDirOptimize: true,
findNestedDependencies: true,
// just to many comments in bootstrap
preserveLicenseComments: false,
shim: {
underscore: {
exports: '_'
},
backbone: {
deps: ['underscore' /*, 'jquery' */],
exports: 'Backbone'
},
backboneLocalStorage: {
deps: ['backbone'],
exports: 'Store'
},
marionette: {
deps: ['underscore', 'backbone' /*, 'jquery' */],
exports: 'Marionette'
}
},
// paths used by r.js
paths: {
backbone: '../dev/bower_components/backbone/js/backbone',
backboneLocalStorage: '../dev/bower_components/Backbone.localStorage/js/backbone.localStorage',
bootstrap: 'bootstrap/bootstrap',
cakeRest: 'lib/saito/backbone.cakeRest',
domReady: '../dev/bower_components/requirejs-domready/js/domReady',
fastclick: '../dev/bower_components/fastclick/js/fastclick',
humanize: '../dev/bower_components/humanize/js/humanize',
jquery: '../dev/bower_components/jquery/jquery',
jqueryAutosize: '../dev/bower_components/jquery-autosize/js/jquery.autosize',
jqueryUi: 'lib/jquery-ui/jquery-ui-1.9.2.custom.min',
marionette: '../dev/bower_components/marionette/backbone.marionette',
text: '../dev/bower_components/requirejs-text/js/text',
underscore: '../dev/bower_components/underscore/js/underscore',
// moment
moment: '../dev/bower_components/momentjs/js/moment',
'moment-de': '../dev/bower_components/momentjs/lang/de'
},
modules: [
{
name: "common",
include: [
'backbone',
'backboneLocalStorage',
'bootstrap',
'cakeRest',
'domReady',
'fastclick',
'marionette',
'humanize',
'jqueryAutosize',
'jqueryUi',
'text',
'underscore'
],
// jquery is loaded externally on html page
exclude: ['jquery']
},
{
name: "main",
exclude: ['common']
}
]
};

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
bower: {
Expand All @@ -18,73 +89,7 @@ module.exports = function(grunt) {
requirejs: {
// config used for r.js and in non-dev mode
release: {
options: {
baseUrl: "./app/webroot/js",
dir: "./app/webroot/release-tmp",
optimize: "uglify2",
skipDirOptimize: true,
// just to many comments in bootstrap
preserveLicenseComments: false,
shim: {
underscore: {
exports: '_'
},
backbone: {
deps: ['underscore' /*, 'jquery' */],
exports: 'Backbone'
},
backboneLocalStorage: {
deps: ['backbone'],
exports: 'Store'
},
marionette: {
deps: ['underscore', 'backbone' /*, 'jquery' */],
exports: 'Marionette'
}
},
// paths used by r.js
paths: {
backbone: '../dev/bower_components/backbone/js/backbone',
backboneLocalStorage: '../dev/bower_components/Backbone.localStorage/js/backbone.localStorage',
bootstrap: 'bootstrap/bootstrap',
cakeRest: 'lib/saito/backbone.cakeRest',
domReady: '../dev/bower_components/requirejs-domready/js/domReady',
fastclick: '../dev/bower_components/fastclick/js/fastclick',
humanize: '../dev/bower_components/humanize/js/humanize',
jquery: '../dev/bower_components/jquery/jquery',
jqueryAutosize: '../dev/bower_components/jquery-autosize/js/jquery.autosize',
jqueryUi: 'lib/jquery-ui/jquery-ui-1.9.2.custom.min',
marionette: '../dev/bower_components/marionette/backbone.marionette',
text: '../dev/bower_components/requirejs-text/js/text',
underscore: '../dev/bower_components/underscore/js/underscore'
},

modules: [
{
name: "common",
include: [
'backbone',
'backboneLocalStorage',
'bootstrap',
'cakeRest',
'domReady',
'fastclick',
'marionette',
'humanize',
'jqueryAutosize',
'jqueryUi',
'text',
'underscore'
],
// jquery is loaded externally on html page
exclude: ['jquery']
},
{
name: "main",
exclude: ['common']
}
]
}
options: requireJsOptions
}
},
uglify: {
Expand Down Expand Up @@ -135,28 +140,139 @@ module.exports = function(grunt) {
clean: {
release: ['./app/webroot/dist'],
releasePost: ['./app/webroot/release-tmp']
},
phpcs: {
controllers: {dir: './app/Controller'},
models: {dir: './app/Model'},
lib: {dir: './app/Lib'},
tests: {
dir: './app/Test',
options: {
ignore: 'Selenium'
}
},
view: {
dir: './app/View',
options: {
ignore: 'Themed'
}
},
plugins: {
dir: './app/Plugin',
options: {
ignore: 'Embedly,Geshi,FileUpload,Flattr,Install,Markitup,Search,SimpleCaptcha,webroot'
}
},
options: {
standard: 'app/Test/phpcs-ruleset.xml',
ignore: 'webroot',
// suppress warnings
warningSeverity: 8
}
},
jshint: {
all: ['Gruntfile.js', './app/webroot/js/**/*.js'],
options: {
ignores: [
'./app/webroot/js/bootstrap/*.js',
'./app/webroot/js/farbtastic/*.js',
'./app/webroot/js/lib/**/*.js'
]
}
},
shell: {
testCake: {
command: './lib/Cake/Console/cake test app all --stderr',
options: {
stdout: true,
stderr: true,
failOnError: true
}
}
},
jasmine: {
test: {
// src: './app/webroot/js/main.js',
options: {
specs: './app/webroot/js/tests/**/*Spec.js',
vendor: [
'./app/webroot/dev/bower_components/jquery/jquery.js',
'./app/webroot/js/bootstrap/bootstrap.js',
'./app/Plugin/JasmineJs/webroot/js/jasmine-jquery.js',
'./app/Plugin/JasmineJs/webroot/js/sinon-1.6.0.js'
],
helpers: [
'./app/webroot/js/lib/bootstrapHelper.js',
'./app/webroot/js/tests/jasmineBootstrapHelper.js'
],
keepRunner: false,
template: require('grunt-template-jasmine-requirejs'),
templateOptions: {
requireConfig: requireJsOptions
}
}
}
},
compass: {
watchCommon: {
options: {
basePath: './app/webroot/css/',
config: './app/webroot/css/config.rb',
watch: true
}
},
watchDefault: {
options: {
basePath: './app/View/Themed/Default/webroot/css/',
config: './app/View/Themed/Default/webroot/css/config.rb',
watch: true
}
},
compileExampleTheme: {
options: {
basePath: './app/View/Themed/Macnemo/webroot/css/',
config: './app/View/Themed/Macnemo/webroot/css/config.rb'
}
}
},
concurrent: {
compassWatch: ['compass:watchCommon', 'compass:watchDefault'],
options: {
logConcurrentOutput: true
}
}
}
)
;
);

grunt.loadNpmTasks('grunt-bower-task');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-phpcs');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-concurrent');
grunt.loadNpmTasks('grunt-contrib-compass');

grunt.registerTask('dev-setup', [ 'bower:devsetup', 'copy:nonmin' ]);

grunt.registerTask('test:js', ['jasmine', 'jshint']);
grunt.registerTask('test:cake', ['shell:testCake']);
grunt.registerTask('test:php', ['test:cake', 'phpcs']);
grunt.registerTask('test', ['test:js', 'test:php']);

grunt.registerTask('compass:watch', 'concurrent:compassWatch');
grunt.registerTask('compass:compile', ['compass:compileExampleTheme']);

grunt.registerTask('dev-setup', [
'bower:devsetup',
'copy:nonmin'
]);
grunt.registerTask('release', [
'clean:release',
'compass:compile',
'requirejs:release',
'uglify:release',
'copy:release',
'copy:nonmin',
'clean:releasePost'
]);
}
;
};
3 changes: 2 additions & 1 deletion app/Config/Schema/schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function after($event = array()) {
'category' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'),
'description' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'),
'accession' => array('type' => 'integer', 'null' => false, 'default' => '0', 'length' => 4),
'thread_count' => array('type' => 'integer', 'null' => false, 'default' => 0),
'thread_count' => array('type' => 'integer', 'null' => false, 'default' => '0'),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1)
),
Expand Down Expand Up @@ -70,6 +70,7 @@ public function after($event = array()) {
'flattr' => array('type' => 'boolean', 'null' => true, 'default' => null),
'nsfw' => array('type' => 'boolean', 'null' => true, 'default' => null),
'ip' => array('type' => 'string', 'null' => true, 'default' => null, 'length' => 39, 'collate' => 'utf8_unicode_ci', 'charset' => 'utf8'),
'solves' => array('type' => 'integer', 'null' => false, 'default' => '0'),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1),
'tid' => array('column' => 'tid', 'unique' => 0),
Expand Down
Loading

0 comments on commit ec91ac1

Please sign in to comment.