From 6797c3a2bcbf3a7487e2386fda77f79fb6b4fa73 Mon Sep 17 00:00:00 2001 From: Panique Date: Fri, 6 Feb 2015 02:10:50 +0100 Subject: [PATCH 1/8] added .travis.yml to allow automated build tests (ignore if you dont know what this means :) ) --- .travis.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..c45a2cbbd --- /dev/null +++ b/.travis.yml @@ -0,0 +1,17 @@ +language: php + +php: + - 5.5 + - 5.6 + - hhvm + +matrix: + allow_failures: + - php: hhvm + +before_script: + - travis_retry composer self-update + - travis_retry composer --prefer-source --dev install + +script: + - phpunit --coverage-text tests \ No newline at end of file From ad6796ef984c75ee9e2cb40695e398fa80b86efd Mon Sep 17 00:00:00 2001 From: Panique Date: Fri, 6 Feb 2015 16:35:47 +0100 Subject: [PATCH 2/8] just a test to show how scrutinizer handles if / elseif --- application/model/AvatarModel.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/application/model/AvatarModel.php b/application/model/AvatarModel.php index 8d199334b..7c55dc63f 100644 --- a/application/model/AvatarModel.php +++ b/application/model/AvatarModel.php @@ -91,10 +91,14 @@ public static function validateImageFile() if (!is_dir(Config::get('PATH_AVATARS')) OR !is_writable(Config::get('PATH_AVATARS'))) { Session::add('feedback_negative', Text::get('FEEDBACK_AVATAR_FOLDER_DOES_NOT_EXIST_OR_NOT_WRITABLE')); return false; - } else if (!isset($_FILES['avatar_file']) OR empty ($_FILES['avatar_file']['tmp_name'])) { + } + + if (!isset($_FILES['avatar_file']) OR empty ($_FILES['avatar_file']['tmp_name'])) { Session::add('feedback_negative', Text::get('FEEDBACK_AVATAR_IMAGE_UPLOAD_FAILED')); return false; - } else if ($_FILES['avatar_file']['size'] > 5000000) { + } + + if ($_FILES['avatar_file']['size'] > 5000000) { // if input file too big (>5MB) Session::add('feedback_negative', Text::get('FEEDBACK_AVATAR_UPLOAD_TOO_BIG')); return false; @@ -107,7 +111,9 @@ public static function validateImageFile() if ($image_proportions[0] < Config::get('AVATAR_SIZE') OR $image_proportions[1] < Config::get('AVATAR_SIZE')) { Session::add('feedback_negative', Text::get('FEEDBACK_AVATAR_UPLOAD_TOO_SMALL')); return false; - } else if (!($image_proportions['mime'] == 'image/jpeg' || $image_proportions['mime'] == 'image/png')) { + } + + if (!($image_proportions['mime'] == 'image/jpeg' || $image_proportions['mime'] == 'image/png')) { Session::add('feedback_negative', Text::get('FEEDBACK_AVATAR_UPLOAD_WRONG_TYPE')); return false; } From 70f58d6dc59be38b9a3d1d9cb4901488f65d3559 Mon Sep 17 00:00:00 2001 From: Panique Date: Tue, 10 Feb 2015 21:12:08 +0100 Subject: [PATCH 3/8] config comments --- application/config/config.development.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/config/config.development.php b/application/config/config.development.php index ce67ee250..1ac7c5b19 100644 --- a/application/config/config.development.php +++ b/application/config/config.development.php @@ -7,8 +7,8 @@ /** * Configuration for: Error reporting - * Useful to show every little problem during development, but only show hard errors in production. - * It's a little bit dirty to put this here, but who cares. + * Useful to show every little problem during development, but only show hard / no errors in production. + * It's a little bit dirty to put this here, but who cares. For development purposes it's totally okay. */ error_reporting(E_ALL); ini_set("display_errors", 1); From 503b628f6e716a7250a745258ec836665af35b7a Mon Sep 17 00:00:00 2001 From: Panique Date: Tue, 10 Feb 2015 21:22:09 +0100 Subject: [PATCH 4/8] project history explaination --- README.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f7fb8f3ff..da88b42b4 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,19 @@ Just a simple user authentication solution inside a super-simple framework skele (and comes with an auto-installer), using the future-proof official bcrypt password hashing/salting implementation of PHP 5.5+, plus some nice features that will speed up the time from idea to first usable prototype application dramatically. Nothing more. This project has its focus on hardcore simplicity. Everything is as simple as possible, -made for smaller projects and typical agency work. If you want to build massive corporate applications with all the -features modern frameworks have, then have a look at [Laravel](http://laravel.com), [Symfony](http://symfony.com) or -[Yii](http://www.yiiframework.com), but if you just want to create quickly small to mid-size applications, then HUGE -might be interesting for you. +made for smaller projects, typical agency work and quick pitch drafts. If you want to build massive corporate +applications with all the features modern frameworks have, then have a look at [Laravel](http://laravel.com), +[Symfony](http://symfony.com) or [Yii](http://www.yiiframework.com), but if you just want to quickly create something +that just works, then HUGE might be interesting for you. + +HUGE's simple-as-possible architecture was inspired by several conference talks, slides and articles about huge +applications that - surprisingly and intentionally - go back to the basics of programming, using procedural programming, +static classes, extremely simple constructs, not-totally-DRY code etc. while keeping the code extremely readable +([StackOverflow](http://www.dev-metal.com/architecture-stackoverflow/), Wikipedia, SoundCloud). Plus, my experience +with several agencies and startups that built small applications for 100.000s of users with just a handful of files +within a few days, usually *without* a team of highly experienced senior developers. +Buzzwords: [KISS](http://en.wikipedia.org/wiki/KISS_principle), +[YASNI](http://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it). [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/panique/huge/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/panique/huge/?branch=master) [![Build Status](https://scrutinizer-ci.com/g/panique/huge/badges/build.png?b=master)](https://scrutinizer-ci.com/g/panique/huge/build-status/master) From babfc4ed7c427d075a916cfbddecb60fc5dda1fd Mon Sep 17 00:00:00 2001 From: Panique Date: Tue, 10 Feb 2015 21:26:46 +0100 Subject: [PATCH 5/8] project history explaination --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index da88b42b4..50cda64b5 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ dramatically. Nothing more. This project has its focus on hardcore simplicity. E made for smaller projects, typical agency work and quick pitch drafts. If you want to build massive corporate applications with all the features modern frameworks have, then have a look at [Laravel](http://laravel.com), [Symfony](http://symfony.com) or [Yii](http://www.yiiframework.com), but if you just want to quickly create something -that just works, then HUGE might be interesting for you. +that just works, then this script might be interesting for you. HUGE's simple-as-possible architecture was inspired by several conference talks, slides and articles about huge applications that - surprisingly and intentionally - go back to the basics of programming, using procedural programming, @@ -17,8 +17,8 @@ static classes, extremely simple constructs, not-totally-DRY code etc. while kee ([StackOverflow](http://www.dev-metal.com/architecture-stackoverflow/), Wikipedia, SoundCloud). Plus, my experience with several agencies and startups that built small applications for 100.000s of users with just a handful of files within a few days, usually *without* a team of highly experienced senior developers. -Buzzwords: [KISS](http://en.wikipedia.org/wiki/KISS_principle), -[YASNI](http://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it). + +Buzzwords: [KISS](http://en.wikipedia.org/wiki/KISS_principle), [YASNI](http://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it). [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/panique/huge/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/panique/huge/?branch=master) [![Build Status](https://scrutinizer-ci.com/g/panique/huge/badges/build.png?b=master)](https://scrutinizer-ci.com/g/panique/huge/build-status/master) From 38628723d6e9ffaff5c83e22faadf60876e82d63 Mon Sep 17 00:00:00 2001 From: Panique Date: Tue, 10 Feb 2015 22:42:52 +0100 Subject: [PATCH 6/8] removed travis.yml --- .travis.yml | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c45a2cbbd..000000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: php - -php: - - 5.5 - - 5.6 - - hhvm - -matrix: - allow_failures: - - php: hhvm - -before_script: - - travis_retry composer self-update - - travis_retry composer --prefer-source --dev install - -script: - - phpunit --coverage-text tests \ No newline at end of file From 1783ce409e80715318b2bd69d5a492513eda058e Mon Sep 17 00:00:00 2001 From: Panique Date: Tue, 10 Feb 2015 22:43:09 +0100 Subject: [PATCH 7/8] removed build button (doesn't make much sense currently) --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 50cda64b5..cfac95908 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,6 @@ within a few days, usually *without* a team of highly experienced senior develop Buzzwords: [KISS](http://en.wikipedia.org/wiki/KISS_principle), [YASNI](http://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it). [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/panique/huge/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/panique/huge/?branch=master) -[![Build Status](https://scrutinizer-ci.com/g/panique/huge/badges/build.png?b=master)](https://scrutinizer-ci.com/g/panique/huge/build-status/master) [![Code Climate](https://codeclimate.com/github/panique/huge/badges/gpa.svg)](https://codeclimate.com/github/panique/huge) [![Dependency Status](https://www.versioneye.com/user/projects/54ca11fbde7924f81a000010/badge.svg?style=flat)](https://www.versioneye.com/user/projects/54ca11fbde7924f81a000010) From dd064f198dcfb68d74c316e9b1a89005dec0b9bf Mon Sep 17 00:00:00 2001 From: Panique Date: Tue, 10 Feb 2015 22:43:55 +0100 Subject: [PATCH 8/8] shorter project explaination info block --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index cfac95908..f36e63824 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,7 @@ that just works, then this script might be interesting for you. HUGE's simple-as-possible architecture was inspired by several conference talks, slides and articles about huge applications that - surprisingly and intentionally - go back to the basics of programming, using procedural programming, static classes, extremely simple constructs, not-totally-DRY code etc. while keeping the code extremely readable -([StackOverflow](http://www.dev-metal.com/architecture-stackoverflow/), Wikipedia, SoundCloud). Plus, my experience -with several agencies and startups that built small applications for 100.000s of users with just a handful of files -within a few days, usually *without* a team of highly experienced senior developers. +([StackOverflow](http://www.dev-metal.com/architecture-stackoverflow/), Wikipedia, SoundCloud). Buzzwords: [KISS](http://en.wikipedia.org/wiki/KISS_principle), [YASNI](http://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it).