Skip to content

Commit

Permalink
Merge branch 'master' of github.com:BrightFlair/PHP.Gt
Browse files Browse the repository at this point in the history
Conflicts:
	src/Data/Csv.php
  • Loading branch information
g105b committed Feb 11, 2015
2 parents 33dbb07 + b388d98 commit 21179d1
Show file tree
Hide file tree
Showing 118 changed files with 334 additions and 268 deletions.
8 changes: 4 additions & 4 deletions License
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2011, 2014 Bright Flair Ltd. http://www.brightflair.com
Copyright 2011, 2015 Bright Flair Ltd. http://www.brightflair.com

The following license applies to all parts of this software except as
documented below:
Expand Down Expand Up @@ -26,7 +26,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

====

All files located in the vendor directory are externally maintained
libraries used by this software which have their own licenses; we
recommend you read them, as their terms may differ from the
All files located in the vendor directory are externally maintained
libraries used by this software which have their own licenses; we
recommend you read them, as their terms may differ from the
terms above.
4 changes: 2 additions & 2 deletions bin/create
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* Creates a new empty project using the blueprint-empty repository.
*
* PHP.Gt (http://php.gt)
* @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
* @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
* @copyright Copyright Ⓒ 2015 Bright Flair Ltd. (http://brightflair.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
use Symfony\Component\Console\Input\InputDefinition;
use Symfony\Component\Console\Input\InputArgument;
Expand Down
4 changes: 2 additions & 2 deletions bin/install
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* project. Downloads composer if it doesn't already exist.
*
* PHP.Gt (http://php.gt)
* @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
* @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
* @copyright Copyright Ⓒ 2015 Bright Flair Ltd. (http://brightflair.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
$HOME = $_SERVER["HOME"];
$gtDir = "$HOME/.gt";
Expand Down
4 changes: 2 additions & 2 deletions bin/serve
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* Usage: server [-a|--approot[="..."]] [-p|--port[="..."]]
*
* PHP.Gt (http://php.gt)
* @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
* @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
* @copyright Copyright Ⓒ 2015 Bright Flair Ltd. (http://brightflair.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
use Gt\Cli\Server;
use Symfony\Component\Console\Input\InputDefinition;
Expand Down
4 changes: 2 additions & 2 deletions bin/test
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
* Usage: test [-a|--approot[="..."]] [--type="unit|acceptance|all"]
*
* PHP.Gt (http://php.gt)
* @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
* @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
* @copyright Copyright Ⓒ 2015 Bright Flair Ltd. (http://brightflair.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
use Gt\Cli\TestRunner;
use Symfony\Component\Console\Input\InputDefinition;
Expand Down
4 changes: 2 additions & 2 deletions src/Api/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/**
*
* PHP.Gt (http://php.gt)
* @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
* @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
* @copyright Copyright Ⓒ 2015 Bright Flair Ltd. (http://brightflair.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
namespace Gt\Api;

Expand Down
4 changes: 2 additions & 2 deletions src/Api/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/**
*
* PHP.Gt (http://php.gt)
* @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
* @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
* @copyright Copyright Ⓒ 2015 Bright Flair Ltd. (http://brightflair.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
namespace Gt\Api;

Expand Down
4 changes: 2 additions & 2 deletions src/Api/Endpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* interact with the data source and also the API response as a Payload.
*
* PHP.Gt (http://php.gt)
* @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
* @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
* @copyright Copyright Ⓒ 2015 Bright Flair Ltd. (http://brightflair.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
namespace Gt\Api;

Expand Down
4 changes: 2 additions & 2 deletions src/Api/InvalidLogicTypeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
*
*
* PHP.Gt (http://php.gt)
* @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
* @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
* @copyright Copyright Ⓒ 2015 Bright Flair Ltd. (http://brightflair.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
namespace Gt\Api;

Expand Down
4 changes: 2 additions & 2 deletions src/Api/InvalidScriptTypeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
*
*
* PHP.Gt (http://php.gt)
* @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
* @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
* @copyright Copyright Ⓒ 2015 Bright Flair Ltd. (http://brightflair.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
namespace Gt\Api;

Expand Down
4 changes: 2 additions & 2 deletions src/Api/Logic.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* \Gt\Api\Logic rather than \Gt\Logic\ApiLogic
*
* PHP.Gt (http://php.gt)
* @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
* @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
* @copyright Copyright Ⓒ 2015 Bright Flair Ltd. (http://brightflair.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
namespace Gt\Api;

Expand Down
4 changes: 2 additions & 2 deletions src/Api/LogicNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
*
*
* PHP.Gt (http://php.gt)
* @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
* @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
* @copyright Copyright Ⓒ 2015 Bright Flair Ltd. (http://brightflair.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
namespace Gt\Api;

Expand Down
4 changes: 2 additions & 2 deletions src/Api/Payload.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* over HTTP in the response.
*
* PHP.Gt (http://php.gt)
* @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
* @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
* @copyright Copyright Ⓒ 2015 Bright Flair Ltd. (http://brightflair.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
namespace Gt\Api;

Expand Down
4 changes: 2 additions & 2 deletions src/Cli/Gatekeeper.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
* request / response within PHP.Gt.
*
* PHP.Gt (http://php.gt)
* @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
* @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
* @copyright Copyright Ⓒ 2015 Bright Flair Ltd. (http://brightflair.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
namespace Gt\Cli;

Expand Down
4 changes: 2 additions & 2 deletions src/Cli/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* bytes, or to begin the request / response within PHP.Gt.
*
* PHP.Gt (http://php.gt)
* @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
* @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
* @copyright Copyright Ⓒ 2015 Bright Flair Ltd. (http://brightflair.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
namespace Gt\Cli;

Expand Down
4 changes: 2 additions & 2 deletions src/Cli/InvalidContextException.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* PHP.Gt (http://php.gt)
* @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
* @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
* @copyright Copyright Ⓒ 2015 Bright Flair Ltd. (http://brightflair.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
namespace Gt\Cli;

Expand Down
4 changes: 2 additions & 2 deletions src/Cli/InvalidTestRunnerTypeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/**
*
* PHP.Gt (http://php.gt)
* @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
* @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
* @copyright Copyright Ⓒ 2015 Bright Flair Ltd. (http://brightflair.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
namespace Gt\Cli;

Expand Down
4 changes: 2 additions & 2 deletions src/Cli/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* and writes back to STDOUT.
*
* PHP.Gt (http://php.gt)
* @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
* @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
* @copyright Copyright Ⓒ 2015 Bright Flair Ltd. (http://brightflair.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
namespace Gt\Cli;

Expand Down
4 changes: 2 additions & 2 deletions src/Cli/ProcessFailedException.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* PHP.Gt (http://php.gt)
* @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
* @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
* @copyright Copyright Ⓒ 2015 Bright Flair Ltd. (http://brightflair.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
namespace Gt\Cli;

Expand Down
4 changes: 2 additions & 2 deletions src/Cli/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* Used from the PHP.Gt/bin/server shell script.
*
* PHP.Gt (http://php.gt)
* @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
* @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
* @copyright Copyright Ⓒ 2015 Bright Flair Ltd. (http://brightflair.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
namespace Gt\Cli;

Expand Down
4 changes: 2 additions & 2 deletions src/Cli/TestRunner.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* PHP.Gt (http://php.gt)
* @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
* @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
* @copyright Copyright Ⓒ 2015 Bright Flair Ltd. (http://brightflair.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
namespace Gt\Cli;
use \Gt\Core\Path;
Expand Down
26 changes: 3 additions & 23 deletions src/ClientSide/Compiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* pre-processed Style Sheets or JavaScript.
*
* PHP.Gt (http://php.gt)
* @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
* @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
* @copyright Copyright Ⓒ 2015 Bright Flair Ltd. (http://brightflair.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
namespace Gt\ClientSide;

Expand All @@ -25,7 +25,6 @@ class Compiler {
*/
public static function parse($inputFile) {
$ext = strtolower(pathinfo($inputFile, PATHINFO_EXTENSION));

$content = file_get_contents($inputFile);

switch ($ext) {
Expand All @@ -36,23 +35,6 @@ public static function parse($inputFile) {
];
$scss = new ScssParser();
$scss->setImportPaths($importPaths);
$scss->addImportPath(function($path, $scss) use($importPaths) {
// Get the path of the current file, attempt relative path import.
$parsedFiles = $scss->getParsedFiles();
$currentFileImporting = end($parsedFiles);
$currentFileImporting = rtrim($currentFileImporting, "/");
$currentPath = pathinfo($currentFileImporting, PATHINFO_DIRNAME);
$relativePath = "$currentPath/$path";

if(is_file($path)) {
return $path;
}
if(is_file($relativePath)) {
return $relativePath;
}

return null;
});

// Add magic variable $appRoot.
$content = "\$APPROOT: \"" . Path::get(Path::ROOT)
Expand All @@ -65,9 +47,7 @@ public static function parse($inputFile) {
}
catch(\Exception $e) {
$msg = $e->getMessage();
if(strpos($msg, "parse error") < 1) {
throw new CompilerParseException("SCSS $msg");
}
throw new CompilerParseException("SCSS $msg");
}
break;

Expand Down
4 changes: 2 additions & 2 deletions src/ClientSide/CompilerParseException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Thrown when the compiled content failes due to a parsing error.
*
* PHP.Gt (http://php.gt)
* @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
* @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
* @copyright Copyright Ⓒ 2015 Bright Flair Ltd. (http://brightflair.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
namespace Gt\ClientSide;

Expand Down
4 changes: 2 additions & 2 deletions src/ClientSide/FileOrganiser.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* are copied there.
*
* PHP.Gt (http://php.gt)
* @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
* @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
* @copyright Copyright Ⓒ 2015 Bright Flair Ltd. (http://brightflair.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
namespace Gt\ClientSide;

Expand Down
4 changes: 2 additions & 2 deletions src/ClientSide/Manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/**
*
* PHP.Gt (http://php.gt)
* @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
* @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
* @copyright Copyright Ⓒ 2015 Bright Flair Ltd. (http://brightflair.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
namespace Gt\ClientSide;

Expand Down
4 changes: 2 additions & 2 deletions src/ClientSide/Minifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/**
*
* PHP.Gt (http://php.gt)
* @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
* @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
* @copyright Copyright Ⓒ 2015 Bright Flair Ltd. (http://brightflair.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
namespace Gt\ClientSide;

Expand Down
4 changes: 2 additions & 2 deletions src/ClientSide/PageManifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/**
*
* PHP.Gt (http://php.gt)
* @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)
* @license Apache Version 2.0, January 2004. http://www.apache.org/licenses
* @copyright Copyright Ⓒ 2015 Bright Flair Ltd. (http://brightflair.com)
* @license http://www.opensource.org/licenses/mit-license.php MIT
*/
namespace Gt\ClientSide;

Expand Down
Loading

0 comments on commit 21179d1

Please sign in to comment.