PHP Classes
elePHPant
Icontem

PHP Travis Encrypter: Generate encrypted environment variable for Travis

Recommend this page to a friend!
  Info   View files Documentation   View files View files (13)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2017-11-03 (8 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 68 All time: 9,164 This week: 552Up
Version License PHP version Categories
php-travis-encrypter 1.0MIT/X Consortium ...5PHP 5, Utilities and Tools, Cryptography, W...
Description Author

This package can generate encrypted environment variable for Travis.

There is a client class that retrieves an encryption key by sending a HTTP request to the Travis API.

Then the encryption class can encrypt an environment variable with a given name and value and returns the encrypted result as text using base64.

Innovation Award
PHP Programming Innovation award nominee
December 2017
Number 8
Travis is a popular continuous integration platform. It can automate tests and other tasks related with application building.

Often applications that are being tested need to be configured using custom values. This package can retrieve configuration values using the Travis API by retrieving and decrypting configuration data.

Manuel Lemos
  Performance   Level  
Name: Chun-Sheng, Li <contact>
Classes: 2 packages by
Country: Taiwan Taiwan
Age: 25
All time rank: 40669 in Taiwan Taiwan
Week rank: 809 Up3 in Taiwan Taiwan Up
Innovation award
Innovation award
Nominee: 1x

Details

php-travis-encrypter

StyleCI Coverage Status Build Status

Introduction

The PHP API wrapper is to encrypt the travis-ci environment variables.

Usage

  • Install the php-travis-encrypter via Composer.
composer require lee/php-travis-encrypter

  • The sample code is as follows.
use Travis\Encrypter\Client;
use Travis\Encrypter\Encrypter;

$client = new Client('peter279k/php-travis-encrypter');
$result = $client->get();
$key = $result->getKey();
$encrypter = new Encrypter($key, 'name', 'value');
echo $encrypter->encrypt();

Unit testing

  • The project uses the PHPUnit to test the whole source code.
  • Just clone this repo and run the following two commands:
composer install
phpunit

Contributing

I appreciate the contribution.Here is the tips for contributing project.

  • coding style: psr-2 (check coding style via StyleCI)
  • add the some featues should add the mapped unit testing.
  Files folder image Files  
File Role Description
Files folder imagesrc (1 directory)
Files folder imagetests (1 directory)
Accessible without login Plain text file .coveralls.yml Data Auxiliary data
Accessible without login Plain text file .editorconfig Data Auxiliary data
Accessible without login Plain text file .styleci.yml Data Auxiliary data
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
Files folder imageTravis (1 directory)

  Files folder image Files  /  src  /  Travis  
File Role Description
Files folder imageEncrypter (5 files)

  Files folder image Files  /  src  /  Travis  /  Encrypter  
File Role Description
  Plain text file Client.php Class Class source
  Plain text file Config.php Class Class source
  Plain text file Encrypter.php Class Class source
  Plain text file Request.php Class Class source
  Plain text file Response.php Class Class source

  Files folder image Files  /  tests  
File Role Description
Files folder imageTravis (1 directory)

  Files folder image Files  /  tests  /  Travis  
File Role Description
Files folder imageEncrypterTest (1 file)

  Files folder image Files  /  tests  /  Travis  /  EncrypterTest  
File Role Description
  Plain text file IntegrationTest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:68
This week:0
All time:9,164
This week:552Up