├── plugins └── .gitkeep ├── scripts └── .gitkeep ├── tmp ├── tests │ └── .gitkeep ├── sessions │ └── .gitkeep ├── cache │ ├── models │ │ └── .gitkeep │ ├── views │ │ └── .gitkeep │ └── persistent │ │ └── .gitkeep └── .gitignore ├── tests ├── Fixture │ └── .gitkeep ├── Sample │ └── .gitkeep ├── TestCase │ ├── Model │ │ ├── Behavior │ │ │ └── .gitkeep │ │ └── Table │ │ │ └── TableTest.php │ ├── View │ │ ├── Helper │ │ │ └── .gitkeep │ │ └── AppViewTest.php │ ├── Controller │ │ ├── Component │ │ │ └── .gitkeep │ │ ├── PagesControllerTest.php │ │ └── AppControllerTest.php │ └── Lib │ │ └── ConfigClosuresTest.php └── bootstrap.php ├── src ├── Model │ ├── Behavior │ │ └── .gitkeep │ ├── Entity │ │ └── .gitkeep │ └── Table │ │ ├── .gitkeep │ │ └── Table.php ├── View │ ├── Helper │ │ └── .gitkeep │ └── AppView.php ├── Controller │ ├── Component │ │ └── .gitkeep │ ├── AppController.php │ └── PagesController.php ├── Template │ ├── Pages │ │ ├── faq.ctp │ │ ├── about.ctp │ │ └── home.ctp │ ├── Element │ │ ├── Flash │ │ │ ├── default.ctp │ │ │ ├── error.ctp │ │ │ └── success.ctp │ │ └── Layout │ │ │ ├── pagination.ctp │ │ │ ├── footer.ctp │ │ │ ├── breadcrumbs.ctp │ │ │ └── navigation.ctp │ ├── Layout │ │ ├── rss │ │ │ └── default.ctp │ │ ├── ajax.ctp │ │ ├── Email │ │ │ ├── text │ │ │ │ └── default.ctp │ │ │ └── html │ │ │ │ └── default.ctp │ │ ├── default.ctp │ │ └── error.ctp │ ├── Email │ │ ├── text │ │ │ └── default.ctp │ │ └── html │ │ │ └── default.ctp │ └── Error │ │ ├── error500.ctp │ │ └── error400.ctp ├── Shell │ └── ConsoleShell.php └── Lib │ └── ConfigClosures.php ├── skel ├── tests │ ├── Sample │ │ └── FileParser │ │ │ ├── subdir │ │ │ ├── empty-file │ │ │ └── config.yaml.template │ │ │ ├── not-a-template.php │ │ │ ├── README.md │ │ │ ├── skel │ │ │ └── should-be-skipped.md.template │ │ │ └── README.md.template │ ├── bootstrap.php │ ├── phpunit.xml.dist │ └── TestCase │ │ ├── LoadsysInstallerTest.php │ │ └── InstallerConfigurerTest.php ├── test-project.sh └── src │ ├── InstallerConfigurer.php │ ├── LoadsysInstaller.php │ └── FileParser.php ├── webroot ├── js │ ├── app.js │ ├── foundation │ │ ├── foundation.alert.js │ │ ├── foundation.accordion.js │ │ ├── foundation.equalizer.js │ │ ├── foundation.offcanvas.js │ │ └── foundation.magellan.js │ └── vendor │ │ ├── jquery.cookie.js │ │ ├── placeholder.js │ │ └── fastclick.js ├── robots.txt ├── favicon.ico ├── img │ ├── cake.icon.png │ └── cake.power.gif ├── .htaccess ├── _pi.php ├── css │ ├── app.css │ ├── cake.css │ └── normalize.css └── index.php ├── config ├── app-local.sample.php ├── seed_staging.php ├── schema │ ├── sessions.sql │ └── i18n.sql ├── seed.php ├── seed_vagrant.php ├── bootstrap_cli.php ├── provision.yaml.template ├── paths.php ├── app-travis.php ├── routes.php ├── app-vagrant.php ├── app-staging.php └── bootstrap.php ├── logs └── .gitignore ├── provision ├── dot-files │ ├── .gitconfig │ └── .bash_aliases ├── staging.sql ├── vagrant.sql ├── 010-cake.conf ├── mailcatcher.sh ├── mysql_server.sh ├── vagrant.sh ├── baremetal.sh ├── production.sh ├── staging.sh └── main.sh ├── .gitignore ├── bin ├── .gitignore ├── cake.php └── cake ├── .editorconfig ├── .htaccess ├── index.php ├── .gitattributes ├── composer.json ├── phpdoc.dist.xml.template ├── composer.json.template ├── .travis.yml.template ├── phpunit.xml.dist ├── bootstrap.sh └── Vagrantfile /plugins/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripts/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tmp/tests/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/Fixture/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/Sample/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tmp/sessions/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Model/Behavior/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Model/Entity/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Model/Table/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/View/Helper/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tmp/cache/models/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tmp/cache/views/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Controller/Component/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tmp/cache/persistent/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/TestCase/Model/Behavior/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/TestCase/View/Helper/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /skel/tests/Sample/FileParser/subdir/empty-file: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/TestCase/Controller/Component/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /webroot/js/app.js: -------------------------------------------------------------------------------- 1 | $(document).foundation(); 2 | -------------------------------------------------------------------------------- /webroot/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: /admin/ 3 | -------------------------------------------------------------------------------- /config/app-local.sample.php: -------------------------------------------------------------------------------- 1 | 2 | RewriteEngine On 3 | RewriteCond %{REQUEST_FILENAME} !-f 4 | RewriteRule ^ index.php [L] 5 | 6 | -------------------------------------------------------------------------------- /src/Template/Pages/faq.ctp: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Frequently Asked Questions

4 |

Lorum ipsum.

5 |
6 |
7 | -------------------------------------------------------------------------------- /skel/tests/Sample/FileParser/subdir/config.yaml.template: -------------------------------------------------------------------------------- 1 | --- 2 | readme: "A sample YAML file with tokens" 3 | top: 4 | key: "{{TOKEN:overlaps with token from ../README.md}}" 5 | second: blah 6 | -------------------------------------------------------------------------------- /skel/tests/Sample/FileParser/skel/should-be-skipped.md.template: -------------------------------------------------------------------------------- 1 | # Skip Test 2 | 3 | This file has a {{TOKEN:token}} and has the correct extension, but the FileParser should skip anything inside a `skel/` folder. 4 | -------------------------------------------------------------------------------- /src/Template/Pages/about.ctp: -------------------------------------------------------------------------------- 1 |
2 |
3 |

About

4 |

Lorum ipsum.

5 |
6 |
7 | -------------------------------------------------------------------------------- /provision/dot-files/.gitconfig: -------------------------------------------------------------------------------- 1 | [alias] 2 | lg = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold white)— %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative 3 | -------------------------------------------------------------------------------- /webroot/_pi.php: -------------------------------------------------------------------------------- 1 | 7 | 8 |
9 | 10 | × 11 |
12 | -------------------------------------------------------------------------------- /src/Template/Element/Flash/error.ctp: -------------------------------------------------------------------------------- 1 | 7 | 8 |
9 | 10 | × 11 |
12 | -------------------------------------------------------------------------------- /src/Template/Element/Flash/success.ctp: -------------------------------------------------------------------------------- 1 | 7 | 8 |
9 | 10 | × 11 |
12 | -------------------------------------------------------------------------------- /src/Template/Element/Layout/pagination.ctp: -------------------------------------------------------------------------------- 1 |
2 | 7 |

Paginator->counter() ?>

8 |
9 | -------------------------------------------------------------------------------- /config/seed_staging.php: -------------------------------------------------------------------------------- 1 | absolutePath('seed_vagrant.php'); 10 | if (file_exists($seed)) { 11 | $this->includeFile($seed); 12 | } 13 | -------------------------------------------------------------------------------- /src/Template/Layout/rss/default.ctp: -------------------------------------------------------------------------------- 1 | fetch('title'); 7 | endif; 8 | 9 | echo $this->Rss->document( 10 | $this->Rss->channel( 11 | array(), $channel, $this->fetch('content') 12 | ) 13 | ); 14 | ?> 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Project-Specific Ignores 2 | 3 | 4 | # General Loadsys 5 | /config/app-local.php 6 | /backups/ 7 | /.vagrant/ 8 | /phpunit.xml 9 | 10 | # Composer Dependencies 11 | /vendor/* 12 | /node_modules 13 | 14 | # OS X 15 | .DS_Store 16 | .AppleDouble 17 | .LSOverride 18 | Icon? 19 | ._* 20 | .Spotlight-V100 21 | .Trashes 22 | .AppleDB 23 | .AppleDesktop 24 | Network Trash Folder 25 | Temporary Items 26 | .apdisk 27 | -------------------------------------------------------------------------------- /provision/staging.sql: -------------------------------------------------------------------------------- 1 | -- Create the default database we expect. 2 | CREATE DATABASE IF NOT EXISTS `staging` DEFAULT CHARACTER SET 'utf8'; 3 | GRANT ALL ON `staging`.* TO "staging"@"%" IDENTIFIED BY "staging"; 4 | 5 | -- Create the testing database we expect. 6 | CREATE DATABASE IF NOT EXISTS `staging_test` DEFAULT CHARACTER SET 'utf8'; 7 | GRANT ALL ON `staging_test`.* TO "staging"@"%" IDENTIFIED BY "staging"; 8 | 9 | -- Flush all the things. 10 | FLUSH TABLES; 11 | FLUSH PRIVILEGES; 12 | -------------------------------------------------------------------------------- /provision/vagrant.sql: -------------------------------------------------------------------------------- 1 | -- Create the default database we expect. 2 | CREATE DATABASE IF NOT EXISTS `vagrant` DEFAULT CHARACTER SET 'utf8'; 3 | GRANT ALL ON `vagrant`.* TO "vagrant"@"%" IDENTIFIED BY "vagrant"; 4 | 5 | -- Create the testing database we expect. 6 | CREATE DATABASE IF NOT EXISTS `vagrant_test` DEFAULT CHARACTER SET 'utf8'; 7 | GRANT ALL ON `vagrant_test`.* TO "vagrant"@"%" IDENTIFIED BY "vagrant"; 8 | 9 | -- Flush all the things. 10 | FLUSH TABLES; 11 | FLUSH PRIVILEGES; 12 | -------------------------------------------------------------------------------- /webroot/css/app.css: -------------------------------------------------------------------------------- 1 | div#container { 2 | margin-top: 5px; 3 | } 4 | 5 | div.contain-to-grid { 6 | background: transparent; 7 | } 8 | 9 | div#content table { 10 | width: 100%; 11 | } 12 | 13 | .unavailable { 14 | color: #999999; 15 | cursor: not-allowed; 16 | } 17 | 18 | footer div.row { 19 | background-color: #dddddd; 20 | } 21 | 22 | footer ul.inline-list { 23 | margin-bottom: 0; 24 | } 25 | 26 | footer, 27 | footer ul.inline-list li { 28 | font-size: 0.75em; 29 | } 30 | 31 | -------------------------------------------------------------------------------- /bin/.gitignore: -------------------------------------------------------------------------------- 1 | # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2 | # !!! Do not place project-specific scripts in this folder! !!! 3 | # !!! Use the `/scripts` folder instead. !!! 4 | # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 5 | 6 | # Ignore everything else in the /bin folder 7 | /* 8 | 9 | # Remember Cake Shells 10 | !.gitignore 11 | !.gitkeep 12 | !cake 13 | !cake.bat 14 | !cake.php 15 | 16 | -------------------------------------------------------------------------------- /provision/010-cake.conf: -------------------------------------------------------------------------------- 1 | 2 | ServerName loadsys-cake3-skel.local 3 | ServerAdmin webmaster@localhost 4 | ErrorLog ${APACHE_LOG_DIR}/cake3_error.log 5 | CustomLog ${APACHE_LOG_DIR}/cake3.log combined 6 | 7 | # Imported into Apache scope in /etc/apache2/envvars (from /etc/app_env). 8 | SetEnv APP_ENV ${APP_ENV} 9 | 10 | DocumentRoot /var/www/webroot 11 | 12 | Options -Indexes 13 | AllowOverride All 14 | Require all granted 15 | 16 | 17 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | ; This file is for unifying the coding style for different editors and IDEs. 2 | ; More information at http://editorconfig.org 3 | 4 | ; This file is to be considered the "top most" for this project. 5 | root = true 6 | 7 | ; Unix style newlines and a final newline for all files. 8 | [*] 9 | indent_style = tab 10 | end_of_line = lf 11 | insert_final_newline = true 12 | trim_trailing_whitespace = true 13 | 14 | ; Matches the exact files package.json and .travis.yml 15 | [{package.json,.travis.yml,composer.json,*.yaml,*.yml}] 16 | indent_style = space 17 | indent_size = 2 18 | -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | 2 | RewriteEngine on 3 | RewriteRule ^$ webroot/ [L] 4 | RewriteRule (.*) webroot/$1 [L] 5 | 6 | 7 | # Enforce connection security. 8 | # Note that `includeSubdomains` will force the staging.your-domain.com 9 | # site to require SSL as well. Also make sure vagrant's Apache doesn't 10 | # enable mod_headers. 11 | # 12 | # Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains;" 13 | # Header always set X-Frame-Options DENY 14 | # Header always set X-Content-Type-Options nosniff 15 | # 16 | -------------------------------------------------------------------------------- /config/schema/sessions.sql: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | # 3 | # Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) 4 | # 1785 E. Sahara Avenue, Suite 490-204 5 | # Las Vegas, Nevada 89104 6 | # 7 | # Licensed under The MIT License 8 | # For full copyright and license information, please see the LICENSE.txt 9 | # Redistributions of files must retain the above copyright notice. 10 | # MIT License (http://www.opensource.org/licenses/mit-license.php) 11 | 12 | CREATE TABLE sessions ( 13 | id varchar(40) NOT NULL default '', 14 | data text, 15 | expires INT(11) NOT NULL, 16 | PRIMARY KEY (id) 17 | ); 18 | -------------------------------------------------------------------------------- /skel/tests/Sample/FileParser/README.md.template: -------------------------------------------------------------------------------- 1 | # README 2 | 3 | ## Don't change this line, we scan for it in tests. 4 | 5 | This is a templated Markdown file with a few {{TOKEN:overlaps with token from subdir/config.yaml.template}} in it. 6 | 7 | * {{NO_DEFAULT}} 8 | * {{SECOND_ITEM:The second thing in the list.}} 9 | * {{MATCHING}} 10 | * {{SHOULD_BE_REMOVED:default does not matter}} 11 | 12 | Other uses of the `{{` and `}}` characters should be correctly ignored. 13 | 14 | This token isn't in our test cases, so it should be left alone: {{NOT_IN_TESTS:blah}} 15 | 16 | When the tokens in this file are replaced, it should overwrite the existing README.md file. 17 | 18 | -------------------------------------------------------------------------------- /src/Template/Element/Layout/footer.ctp: -------------------------------------------------------------------------------- 1 | 7 | 29 | -------------------------------------------------------------------------------- /config/seed.php: -------------------------------------------------------------------------------- 1 | importTables($data); 15 | 16 | 17 | // Load additional data based on APP_ENV value. 18 | $env = getenv('APP_ENV'); 19 | $this->hr(); 20 | $this->out("Loading environment-specific data for APP_ENV={$env}..."); 21 | $seed = $this->absolutePath("seed_{$env}.php"); 22 | if (file_exists($seed)) { 23 | $this->includeFile($seed); 24 | } 25 | -------------------------------------------------------------------------------- /src/Template/Email/text/default.ctp: -------------------------------------------------------------------------------- 1 | 16 | 17 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 16 | fetch('content') ?> 17 | -------------------------------------------------------------------------------- /src/Template/Layout/Email/text/default.ctp: -------------------------------------------------------------------------------- 1 | 16 | fetch('content') ?> 17 | -------------------------------------------------------------------------------- /provision/mailcatcher.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Convenience script to install and start Mailcatcher, since it is used 4 | # in multiple environments. 5 | 6 | # Install Mailcatcher. 7 | echo "## Installing Mailcatcher." 8 | 9 | sudo apt-add-repository ppa:brightbox/ruby-ng -y 10 | 11 | sudo apt-get update -y 12 | 13 | sudo apt-get install -y libsqlite3-dev ruby1.9.3 14 | 15 | sudo gem install mailcatcher --no-ri --no-rdoc 16 | 17 | sudo tee "/etc/init/mailcatcher.conf" <<-'EOINIT' > /dev/null 18 | description "Mailcatcher" 19 | start on runlevel [2345] 20 | stop on runlevel [!2345] 21 | respawn 22 | exec /usr/bin/env $(which mailcatcher) --foreground --http-ip=0.0.0.0 23 | 24 | EOINIT 25 | 26 | sudo service mailcatcher start 27 | 28 | -------------------------------------------------------------------------------- /src/View/AppView.php: -------------------------------------------------------------------------------- 1 | loadHelper('Html');` 18 | * 19 | * @return void 20 | */ 21 | public function initialize() { 22 | $this->loadHelper('Html', [ 23 | ]); 24 | $this->loadHelper('Form', [ 25 | 'errorClass' => 'error', 26 | 'templates' => [ 27 | 'error' => '{{content}}', 28 | ], 29 | ]); 30 | $this->loadHelper('Flash'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Template/Email/html/default.ctp: -------------------------------------------------------------------------------- 1 | 16 | ' . $line . "

\n"; 21 | endforeach; 22 | ?> 23 | -------------------------------------------------------------------------------- /bin/cake.php: -------------------------------------------------------------------------------- 1 | #!/usr/bin/php -q 2 | url] pairs. The URLs can be Cake routing arrays. Will be displayed **in order**. 5 | */ 6 | 7 | if (!isset($breadcrumbs) || !is_array($breadcrumbs) || count($breadcrumbs) === 0) { 8 | return ''; 9 | } 10 | 11 | // Auto prepend "Home" if it doesn't look like one was included. 12 | if (!isset($breadcrumbs['Home'])) { 13 | $this->Html->addCrumb(__('Home', true), '/'); 14 | } 15 | 16 | foreach($breadcrumbs as $breadcrumbTitle => $breadcrumbUrl) { 17 | $this->Html->addCrumb(__($breadcrumbTitle, true), $breadcrumbUrl); 18 | } 19 | 20 | ?> 21 | 22 |
23 | Html->getCrumbList( 24 | [ 25 | 'firstClass' => false, 26 | 'lastClass' => 'current', 27 | 'class' => 'breadcrumbs', 28 | 'role' => 'menubar' 29 | ] 30 | ); 31 | ?> 32 |
33 | -------------------------------------------------------------------------------- /src/Template/Layout/Email/html/default.ctp: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | <?= $this->fetch('title') ?> 20 | 21 | 22 | fetch('content') ?> 23 | 24 | 25 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Define the line ending behavior of the different file extensions 2 | # Set default behaviour, in case users don't have core.autocrlf set. 3 | * text=auto 4 | * text eol=lf 5 | 6 | # Explicitly declare text files we want to always be normalized and converted 7 | # to native line endings on checkout. 8 | *.php text 9 | *.default text 10 | *.ctp text 11 | *.sql text 12 | *.md text 13 | *.po text 14 | *.js text 15 | *.css text 16 | *.ini text 17 | *.properties text 18 | *.txt text 19 | *.xml text 20 | *.yml text 21 | .htaccess text 22 | 23 | # Declare files that will always have CRLF line endings on checkout. 24 | *.bat eol=crlf 25 | 26 | # Declare files that will always have LF line endings on checkout. 27 | *.pem eol=lf 28 | 29 | # Denote all files that are truly binary and should not be modified. 30 | *.png binary 31 | *.jpg binary 32 | *.gif binary 33 | *.ico binary 34 | *.mo binary 35 | *.pdf binary 36 | *.phar binary 37 | -------------------------------------------------------------------------------- /skel/tests/phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | ./TestCase 17 | 18 | 19 | 20 | 21 | 22 | ../src 23 | 24 | 25 | 26 | 27 | 35 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /config/schema/i18n.sql: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | # 3 | # Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) 4 | # 5 | # Licensed under The MIT License 6 | # For full copyright and license information, please see the LICENSE.txt 7 | # Redistributions of files must retain the above copyright notice. 8 | # MIT License (http://www.opensource.org/licenses/mit-license.php) 9 | 10 | CREATE TABLE i18n ( 11 | id int(10) NOT NULL auto_increment, 12 | locale varchar(6) NOT NULL, 13 | model varchar(255) NOT NULL, 14 | foreign_key int(10) NOT NULL, 15 | field varchar(255) NOT NULL, 16 | content mediumtext, 17 | PRIMARY KEY (id), 18 | # UNIQUE INDEX I18N_LOCALE_FIELD(locale, model, foreign_key, field), 19 | # INDEX I18N_LOCALE_ROW(locale, model, foreign_key), 20 | # INDEX I18N_LOCALE_MODEL(locale, model), 21 | # INDEX I18N_FIELD(model, foreign_key, field), 22 | # INDEX I18N_ROW(model, foreign_key), 23 | INDEX locale (locale), 24 | INDEX model (model), 25 | INDEX row_id (foreign_key), 26 | INDEX field (field) 27 | ); -------------------------------------------------------------------------------- /src/Template/Error/error500.ctp: -------------------------------------------------------------------------------- 1 | layout = 'dev_error'; 7 | 8 | $this->assign('title', $message); 9 | $this->assign('templateName', 'error500.ctp'); 10 | 11 | $this->start('file'); 12 | ?> 13 | queryString)) : ?> 14 |

15 | SQL Query: 16 | queryString) ?> 17 |

18 | 19 | params)) : ?> 20 | SQL Query Params: 21 | params) ?> 22 | 23 | element('auto_table_warning'); 25 | 26 | if (extension_loaded('xdebug')): 27 | xdebug_print_function_stack(); 28 | endif; 29 | 30 | $this->end(); 31 | endif; 32 | ?> 33 |

34 |

35 | : 36 | 37 |

38 | -------------------------------------------------------------------------------- /config/seed_vagrant.php: -------------------------------------------------------------------------------- 1 | [ 15 | '_truncate' => true, 16 | '_entityOptions' => [ 17 | 'validate' => false, 18 | ], 19 | '_saveOptions' => [ 20 | 'checkRules' => false, 21 | ], 22 | '_defaults' => [ 23 | 'password' => '', // "@TODO: Manually encrypt a password to save here." 24 | 'is_active' => 1, 25 | 'creator_id' => null, 26 | 'modifier_id' => null, 27 | ], 28 | [ 29 | 'id' => '799763fd-32bc-11e4-9e39-080027506c76', 30 | 'email' => 'admin@localhost.com', 31 | 'role' => 'admin', 32 | ], 33 | ], 34 | */ 35 | 36 | ]; 37 | 38 | $this->importTables($data); 39 | -------------------------------------------------------------------------------- /src/Template/Error/error400.ctp: -------------------------------------------------------------------------------- 1 | layout = 'dev_error'; 6 | 7 | $this->assign('title', $message); 8 | $this->assign('templateName', 'error400.ctp'); 9 | 10 | $this->start('file'); 11 | ?> 12 | queryString)) : ?> 13 |

14 | SQL Query: 15 | queryString) ?> 16 |

17 | 18 | params)) : ?> 19 | SQL Query Params: 20 | params) ?> 21 | 22 | element('auto_table_warning') ?> 23 | end(); 29 | endif; 30 | ?> 31 |

32 |

33 | : 34 | '{$url}'" 37 | ) ?> 38 |

39 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "loadsys/skeleton", 3 | "description": "Loadsys CakePHP 3.x app skeleton", 4 | "homepage": "https://github.com/loadsys/CakePHP-Skeleton", 5 | "type": "project", 6 | "license": "MIT", 7 | "require": { 8 | "php": ">=5.6.0", 9 | "cakephp/cakephp": "~3.1", 10 | "cakephp/plugin-installer": "*" 11 | }, 12 | "require-dev": { 13 | "composer/composer": "*", 14 | "phpunit/phpunit": "4.8", 15 | "loadsys/loadsys_codesniffer": "~3.0" 16 | }, 17 | "autoload": { 18 | "psr-4": { 19 | "App\\": "src" 20 | } 21 | }, 22 | "autoload-dev": { 23 | "psr-4": { 24 | "App\\Test\\": "tests", 25 | "Cake\\Test\\": "./vendor/cakephp/cakephp/tests", 26 | "Composer\\": "./vendor/composer/composer/src/Composer", 27 | "Skel\\": "skel/src", 28 | "Skel\\Test\\": "skel/tests" 29 | } 30 | }, 31 | "scripts": { 32 | "post-create-project-cmd": [ 33 | "Skel\\LoadsysInstaller::postInstall" 34 | ], 35 | "post-autoload-dump": [ 36 | "Cake\\Composer\\Installer\\PluginInstaller::postAutoloadDump" 37 | ] 38 | }, 39 | "minimum-stability": "dev", 40 | "prefer-stable": true 41 | } 42 | -------------------------------------------------------------------------------- /config/bootstrap_cli.php: -------------------------------------------------------------------------------- 1 | 'App', 19 | 'encoding' => 'UTF-8', 20 | 'base' => false, 21 | 'baseUrl' => false, 22 | 'dir' => TEST_APP . 'TestApp' . DS, 23 | 'webroot' => 'webroot', 24 | 'wwwRoot' => WWW_ROOT, 25 | 'fullBaseUrl' => 'http://localhost', 26 | 'imageBaseUrl' => 'img/', 27 | 'jsBaseUrl' => 'js/', 28 | 'cssBaseUrl' => 'css/', 29 | 'paths' => [ 30 | 'plugins' => [TEST_APP . 'Plugin' . DS], 31 | 'templates' => [APP . 'Template' . DS], 32 | 'locales' => [APP . 'Locale' . DS], 33 | ] 34 | ]); 35 | 36 | 37 | // Wipe out any accumulated caches before running tests. 38 | foreach (\Cake\Cache\Cache::configured() as $key) { 39 | \Cake\Cache\Cache::clear(false, $key); 40 | echo "Cleared cache: $key\n"; 41 | } 42 | 43 | echo PHP_EOL; 44 | -------------------------------------------------------------------------------- /tests/TestCase/View/AppViewTest.php: -------------------------------------------------------------------------------- 1 | getMock( 47 | '\App\View\AppView', 48 | ['loadHelper'] 49 | ); 50 | 51 | $AppView->expects($this->at(0)) 52 | ->method('loadHelper') 53 | ->with('Html'); 54 | $AppView->expects($this->at(1)) 55 | ->method('loadHelper') 56 | ->with('Form'); 57 | $AppView->expects($this->at(2)) 58 | ->method('loadHelper') 59 | ->with('Flash'); 60 | 61 | $AppView->initialize(); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /provision/mysql_server.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Convenience script to install and start MySQL server, since it is used 4 | # in multiple environments. 5 | 6 | 7 | # Set up working vars. 8 | # PROVISION_DIR must be inherited from caller. 9 | # APP_ENV must be inherited from caller. 10 | MYSQL_DEFAULT_PASS="password" 11 | MYSQL_ROOT_PASS=${1:-$MYSQL_DEFAULT_PASS} 12 | SQL_IMPORT_FILE="${PROVISION_DIR}/${APP_ENV}.sql" 13 | 14 | 15 | # Install a local MySQL server. 16 | echo "## Installing local MySQL server." 17 | 18 | sudo debconf-set-selections <<< "mysql-server mysql-server/root_password password ${MYSQL_ROOT_PASS}" 19 | 20 | sudo debconf-set-selections <<< "mysql-server mysql-server/root_password_again password ${MYSQL_ROOT_PASS}" 21 | 22 | sudo apt-get install -y mysql-server 23 | 24 | # You should probably run this yourself as it can't be automated. 25 | #mysql_secure_installation 26 | 27 | 28 | # Configure MySQL databases. 29 | if [ -r "${SQL_IMPORT_FILE}" ]; then 30 | echo "## Executing environment-specific MySQL script: \`${SQL_IMPORT_FILE}\`" 31 | 32 | mysql --host=localhost --user=root --password="$MYSQL_ROOT_PASS" mysql < "${SQL_IMPORT_FILE}" 33 | else 34 | echo "## Environment-specific MySQL script not found. Skipping: \`${SQL_IMPORT_FILE}\`" 35 | fi 36 | -------------------------------------------------------------------------------- /phpdoc.dist.xml.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | <![CDATA[{{PROJECT_TITLE:@TODO}}]]> 4 | 5 | 6 | 7 | ./src 8 | ./config 9 | ./plugins 10 | ./webroot 11 | 12 | 13 | 14 | 15 | true 16 | true 17 | 18 | 19 | 20 | App 21 | 22 | utf-8 23 | ./tmp/docs-build 24 | 25 | TODO 26 | FIXME 27 | 28 | 29 | php 30 | 31 | 32 | 33 | 34 | 35 | ./tmp/docs 36 | 37 | 38 | 39 |