Browse Source

IonCube task cleanup.

1.0
Andrés Montañez 11 years ago
parent
commit
5cc9c02c3e
  1. 2
      Mage/Task/BuiltIn/Deployment/ReleaseTask.php
  2. 124
      Mage/Task/BuiltIn/Ioncube/EncryptTask.php
  3. 74
      docs/example-config/.mage/config/environment/ioncube.yml
  4. 1
      version

2
Mage/Task/BuiltIn/Deployment/ReleaseTask.php

@ -1,6 +1,6 @@
<?php <?php
/* /*
* This file is part of the Magallanes package. * This file is part of the Magallanes package.
* *
* (c) Andrés Montañez <andres@andresmontanez.com> * (c) Andrés Montañez <andres@andresmontanez.com>
* *

124
Mage/Task/BuiltIn/Ioncube/EncryptTask.php

@ -1,4 +1,18 @@
<?php <?php
/*
* This file is part of the Magallanes package.
*
* (c) Andrés Montañez <andres@andresmontanez.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Mage\Task\BuiltIn\Ioncube;
use Mage\Task\AbstractTask;
use Mage\Console;
use Mage\Task\ErrorWithMessageException;
/** /**
* This allows intergrating IonCube PHP * This allows intergrating IonCube PHP
@ -27,13 +41,8 @@
* Extends Magallanes (c) Andrés Montañez <andres@andresmontanez.com> * Extends Magallanes (c) Andrés Montañez <andres@andresmontanez.com>
* *
*/ */
namespace Mage\Task\BuiltIn\Ioncube; class EncryptTask extends AbstractTask
{
use Mage\Task\AbstractTask;
use Mage\Console;
use Mage\Task\ErrorWithMessageException;
class EncryptTask extends AbstractTask {
/** /**
* Name of the task * Name of the task
* *
@ -301,7 +310,6 @@ class EncryptTask extends AbstractTask {
} }
} }
/** /**
* Encrypt the project * Encrypt the project
* Steps are as follows : * Steps are as follows :
@ -421,7 +429,7 @@ class EncryptTask extends AbstractTask {
*/ */
private function checkFileCoding($filename) { private function checkFileCoding($filename) {
// check to see if this is an encrypted file // check to see if this is an encrypted file
$ioncube = ioncube_read_file ( $filename, $ioncubeType ); $ioncube = ioncube_read_file($filename, $ioncubeType);
if (is_int ( $ioncube )) { if (is_int ( $ioncube )) {
// we got an error from ioncube, so its encrypted // we got an error from ioncube, so its encrypted
return true; return true;
@ -745,12 +753,12 @@ class EncryptTask extends AbstractTask {
$p ['encode'] = array (); $p ['encode'] = array ();
$p ['copy'] = array (); $p ['copy'] = array ();
$p ['ignore'] = array ( $p ['ignore'] = array (
'.git', '.git',
'.svn', '.svn',
'.mage', '.mage',
'.gitignore', '.gitignore',
'.gitkeep', '.gitkeep',
'nohup.out' 'nohup.out'
); );
$p ['keep'] = array (); $p ['keep'] = array ();
$p ['obfuscate'] = ''; $p ['obfuscate'] = '';
@ -781,90 +789,8 @@ class EncryptTask extends AbstractTask {
$p ['min-loader-version'] = ''; $p ['min-loader-version'] = '';
return array ( return array (
's' => $s, 's' => $s,
'p' => $p 'p' => $p
); );
} }
} }
/**
*
* Example evirmonment YAML file :
*
*/
$example=<<<EOEXAMPLE
#master
deployment:
user: marl
from: ./
to: /var/www/test1
source:
type: git
repository: git@bitbucket.org:myuser/myproject.git
from: master
ioncube: test
releases:
enabled: true
symlink: current
directory: releases
hosts:
- localhost
tasks:
pre-deploy:
- ioncube/encrypt
on-deply:
post-deploy:
ioncube:
override: dyf
keeptemp:
encoder: ioncube_encoder54
checkencoding: true
checkignorepaths:
-/public/js/*
-/public/css/*
projfile: project.prj
project:
replace-target:
binary:
ignore-deprecated-warnings:
ignore-strict-warnings:
ignore:
- _*
- templates_c/*
- *~
- database.md
- specs/
- composer.json
- README.md
- .git/
- .project
- .settings/
- .buildpath
message-if-no-loader: "System error No Loader"
passphrase: "My really secure passphrase"
encrypt:
- templates/*
add-comment:
- 'Comment 1'
- 'Comment 2'
- "(c) ACTweb 2013"
- "Draft Version"
loader-event:
- corrupt-file=Corupted files
- expired-file=System needs updated
- no-permissions=Not allowed on this server
- clock-skew=Time incorect
- license-not-found=License not installed
- license-corrupt=Something wrong with your license
- license-expired=Out of time
- license-property-invalid=Invalid license data
- license-header-invalid=Files corupted
- license-server-invalid=Server problem
- unauth-including-file=Sorry these files can only be used within defined software
- unauth-included-file=Crtical Software Error
- unauth-append-prepend-file=System can not be used with PHP Prepend/Append set
EOEXAMPLE;

74
docs/example-config/.mage/config/environment/ioncube.yml

@ -0,0 +1,74 @@
#master
deployment:
user: marl
from: ./
to: /var/www/test1
source:
type: git
repository: git@bitbucket.org:myuser/myproject.git
from: master
ioncube: test
releases:
enabled: true
symlink: current
directory: releases
hosts:
- localhost
tasks:
pre-deploy:
- ioncube/encrypt
on-deply:
post-deploy:
ioncube:
override: dyf
keeptemp:
encoder: ioncube_encoder54
checkencoding: true
checkignorepaths:
-/public/js/*
-/public/css/*
projfile: project.prj
project:
replace-target:
binary:
ignore-deprecated-warnings:
ignore-strict-warnings:
ignore:
- _*
- templates_c/*
- *~
- database.md
- specs/
- composer.json
- README.md
- .git/
- .project
- .settings/
- .buildpath
message-if-no-loader: "System error No Loader"
passphrase: "My really secure passphrase"
encrypt:
- templates/*
add-comment:
- 'Comment 1'
- 'Comment 2'
- "(c) ACTweb 2013"
- "Draft Version"
loader-event:
- corrupt-file=Corupted files
- expired-file=System needs updated
- no-permissions=Not allowed on this server
- clock-skew=Time incorect
- license-not-found=License not installed
- license-corrupt=Something wrong with your license
- license-expired=Out of time
- license-property-invalid=Invalid license data
- license-header-invalid=Files corupted
- license-server-invalid=Server problem
- unauth-including-file=Sorry these files can only be used within defined software
- unauth-included-file=Crtical Software Error
- unauth-append-prepend-file=System can not be used with PHP Prepend/Append set

1
version

@ -1 +0,0 @@
0.0.1
Loading…
Cancel
Save