PHP Classes

PHP Travis Encrypter: Generate encrypted environment variable for Travis

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 73 All time: 10,228 This week: 524Up
Version License PHP version Categories
php-travis-encrypter 1.0MIT/X Consortium ...5PHP 5, Tools, Cryptography, Web services
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
Picture of Chun-Sheng, Li
  Performance   Level  
Name: Chun-Sheng, Li <contact>
Classes: 37 packages by
Country: Taiwan Taiwan
Age: 31
All time rank: 21046 in Taiwan Taiwan
Week rank: 4 Up1 in Taiwan Taiwan Up
Innovation award
Innovation award
Nominee: 17x

Winner: 1x

Documentation

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 (13)  
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 (13)  /  src  
File Role Description
Files folder imageTravis (1 directory)

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

  Files folder image Files (13)  /  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 (13)  /  tests  
File Role Description
Files folder imageTravis (1 directory)

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

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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:73
This week:0
All time:10,228
This week:524Up