Compare commits

..

No commits in common. "kt-dev" and "1.0.0" have entirely different histories.

17 changed files with 2174 additions and 337 deletions

7
.gitattributes vendored
View file

@ -2,14 +2,7 @@
/cache export-ignore /cache export-ignore
/tests export-ignore /tests export-ignore
/changelog.md export-ignore /changelog.md export-ignore
/CONTRIBUTING.md export-ignore
/docker-compose.yml export-ignore /docker-compose.yml export-ignore
/.travis.yml export-ignore /.travis.yml export-ignore
/phpunit.xml export-ignore /phpunit.xml export-ignore
/.scrutinizer.yml export-ignore /.scrutinizer.yml export-ignore
/.scrutinizer.yml export-ignore
/wercker.yml export-ignore
/README.md export-ignore
/LICENSE.md export-ignore
/.gitignore export-ignore
/.gitattributes export-ignore

View file

@ -17,7 +17,9 @@ checks:
fix_identation_4spaces: true fix_identation_4spaces: true
fix_doc_comments: true fix_doc_comments: true
tools: tools:
external_code_coverage: false external_code_coverage:
timeout: 600
runs: 3
php_analyzer: true php_analyzer: true
php_code_coverage: false php_code_coverage: false
php_code_sniffer: php_code_sniffer:

19
.travis.yml Normal file
View file

@ -0,0 +1,19 @@
language: php
php:
- 5.6
- 5.5
- 5.4
- hhvm
env:
global:
secure: "jwmoa4BufY6bz3qR6UP5iQWVAnXpp7FrW75ehqheXJdQx3CWBJ8aX8gV9qXkPuPyRr3ubV8gyLx4iQ1/PSJbhPxA2BGYDpJcwOVN4e8G4kOcFYTaGW3CQsP/V8uwFX0jzsyqVExsjTdvsu88zxwaQFLyEV9T7gcHB9b+ECXaOB0="
before_script:
- composer self-update
- composer install
# Report test coverate to code climate
after_script:
- vendor/bin/test-reporter --stdout > codeclimate.json
- "curl -X POST -d @codeclimate.json -H 'Content-Type: application/json' -H 'User-Agent: Code Climate (PHP Test Reporter v0.1.1)' https://codeclimate.com/test_reports"

View file

@ -2,12 +2,11 @@
[![Latest Version](https://img.shields.io/github/release/raphiz/passwordcards.svg?style=flat-square)](https://github.com/raphiz/passwordcards/releases) [![Latest Version](https://img.shields.io/github/release/raphiz/passwordcards.svg?style=flat-square)](https://github.com/raphiz/passwordcards/releases)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
[![wercker status](https://app.wercker.com/status/6bb146084db30e23f4d09b20a32ac058/s "wercker status")](https://app.wercker.com/project/bykey/6bb146084db30e23f4d09b20a32ac058) [![Build Status](https://img.shields.io/travis/raphiz/passwordcards/master.svg?style=flat-square)](https://travis-ci.org/raphiz/passwordcards)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/raphiz/passwordcards/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/raphiz/passwordcards/?branch=master) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/raphiz/passwordcards/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/raphiz/passwordcards/?branch=master)
[![Code Climate](https://codeclimate.com/github/raphiz/passwordcards/badges/gpa.svg)](https://codeclimate.com/github/raphiz/passwordcards) [![Code Climate](https://codeclimate.com/github/raphiz/passwordcards/badges/gpa.svg)](https://codeclimate.com/github/raphiz/passwordcards)
[![Test Coverage](https://codeclimate.com/github/raphiz/passwordcards/badges/coverage.svg)](https://codeclimate.com/github/raphiz/passwordcards) [![Test Coverage](https://codeclimate.com/github/raphiz/passwordcards/badges/coverage.svg)](https://codeclimate.com/github/raphiz/passwordcards)
[![Dependency Status](https://www.versioneye.com/user/projects/5506fc2766e561bb9b00016e/badge.svg?style=flat)](https://www.versioneye.com/user/projects/5506fc2766e561bb9b00016e) [![Dependency Status](https://www.versioneye.com/user/projects/5506fc2766e561bb9b00016e/badge.svg?style=flat)](https://www.versioneye.com/user/projects/5506fc2766e561bb9b00016e)
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/6152eda9-0cd1-41a3-84fb-9601d0996a86/mini.png)](https://insight.sensiolabs.com/projects/6152eda9-0cd1-41a3-84fb-9601d0996a86)
This tool allows you to generate customized password cards in the spirit of Qwertycards.com. This tool allows you to generate customized password cards in the spirit of Qwertycards.com.
@ -25,3 +24,9 @@ If you discover any security related issues, please email mister.norbert ät gma
## License ## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information. The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
## To be done:
add
* Analysis via https://insight.sensiolabs.com/
* make .htaccess that only allows requests to /resources OR /index.php!

View file

@ -1,12 +1,2 @@
FROM raphiz/drone-php:5.5.20 FROM php:5.6-apache
COPY php.ini /usr/local/etc/php/
RUN apt-get -yqq update
RUN apt-get -yqq install libcurl4-gnutls-dev zlib1g-dev
RUN apt-get -yqq install lftp
RUN docker-php-ext-install curl zip
# Set Timezone
RUN echo 'date.timezone = "Europe/Zurich"' > /usr/local/etc/php/conf.d/timezone.ini
# Remove warning PHP Warning: Module 'curl' already loaded in Unknown on line 0
RUN rm /usr/local/etc/php/conf.d/ext-curl.ini

1938
apache/php.ini Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,12 +1,11 @@
{ {
"name": "raphiz/passwordcards", "name": "raphiz/passwordcards",
"description" : "Generate customized password cards in the spirit of Qwertycards.com",
"require": { "require": {
"tecnick.com/tcpdf": "6.2.11", "tecnick.com/tcpdf": "6.2.6",
"rain/raintpl": "3.1.0" "rain/raintpl": "3.1.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "4.8.3", "phpunit/phpunit": "4.5.0",
"codeclimate/php-test-reporter": "dev-master" "codeclimate/php-test-reporter": "dev-master"
}, },
"license": "MIT", "license": "MIT",

304
composer.lock generated
View file

@ -1,10 +1,10 @@
{ {
"_readme": [ "_readme": [
"This file locks the dependencies of your project to a known state", "This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"hash": "d958f9988773a5f99bfc63c6dfe2f92e", "hash": "5da1bac5935bc555ffbde601e27d7202",
"packages": [ "packages": [
{ {
"name": "rain/raintpl", "name": "rain/raintpl",
@ -49,16 +49,16 @@
}, },
{ {
"name": "tecnick.com/tcpdf", "name": "tecnick.com/tcpdf",
"version": "6.2.8", "version": "6.2.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/tecnickcom/TCPDF.git", "url": "https://github.com/tecnickcom/TCPDF.git",
"reference": "3dee9e7f3a414875fd1d9f4f1dfc2433493a86d2" "reference": "a2e8f5b505a7a14a4ed960313c4baf699fd1f4bb"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/3dee9e7f3a414875fd1d9f4f1dfc2433493a86d2", "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/a2e8f5b505a7a14a4ed960313c4baf699fd1f4bb",
"reference": "3dee9e7f3a414875fd1d9f4f1dfc2433493a86d2", "reference": "a2e8f5b505a7a14a4ed960313c4baf699fd1f4bb",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -108,7 +108,7 @@
"pdf417", "pdf417",
"qrcode" "qrcode"
], ],
"time": "2015-04-29 16:13:58" "time": "2015-01-28 18:51:40"
} }
], ],
"packages-dev": [ "packages-dev": [
@ -118,12 +118,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/codeclimate/php-test-reporter.git", "url": "https://github.com/codeclimate/php-test-reporter.git",
"reference": "418ae782307841ac50fe26daa4cfe04520b0de9c" "reference": "2a67d5d940e175fddba15f29c81a646ace26dc38"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/codeclimate/php-test-reporter/zipball/418ae782307841ac50fe26daa4cfe04520b0de9c", "url": "https://api.github.com/repos/codeclimate/php-test-reporter/zipball/2a67d5d940e175fddba15f29c81a646ace26dc38",
"reference": "418ae782307841ac50fe26daa4cfe04520b0de9c", "reference": "2a67d5d940e175fddba15f29c81a646ace26dc38",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -168,7 +168,7 @@
"codeclimate", "codeclimate",
"coverage" "coverage"
], ],
"time": "2015-04-18 14:43:54" "time": "2015-02-20 22:40:35"
}, },
{ {
"name": "doctrine/instantiator", "name": "doctrine/instantiator",
@ -226,16 +226,16 @@
}, },
{ {
"name": "guzzle/guzzle", "name": "guzzle/guzzle",
"version": "v3.9.3", "version": "v3.9.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/guzzle3.git", "url": "https://github.com/guzzle/guzzle3.git",
"reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9" "reference": "54991459675c1a2924122afbb0e5609ade581155"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle3/zipball/0645b70d953bc1c067bbc8d5bc53194706b628d9", "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/54991459675c1a2924122afbb0e5609ade581155",
"reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9", "reference": "54991459675c1a2924122afbb0e5609ade581155",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -276,9 +276,6 @@
"zendframework/zend-cache": "2.*,<2.3", "zendframework/zend-cache": "2.*,<2.3",
"zendframework/zend-log": "2.*,<2.3" "zendframework/zend-log": "2.*,<2.3"
}, },
"suggest": {
"guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated."
},
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
@ -306,7 +303,7 @@
"homepage": "https://github.com/guzzle/guzzle/contributors" "homepage": "https://github.com/guzzle/guzzle/contributors"
} }
], ],
"description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle", "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients",
"homepage": "http://guzzlephp.org/", "homepage": "http://guzzlephp.org/",
"keywords": [ "keywords": [
"client", "client",
@ -317,7 +314,7 @@
"rest", "rest",
"web service" "web service"
], ],
"time": "2015-03-18 18:23:50" "time": "2014-08-11 04:32:36"
}, },
{ {
"name": "phpdocumentor/reflection-docblock", "name": "phpdocumentor/reflection-docblock",
@ -370,22 +367,21 @@
}, },
{ {
"name": "phpspec/prophecy", "name": "phpspec/prophecy",
"version": "v1.4.1", "version": "v1.3.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpspec/prophecy.git", "url": "https://github.com/phpspec/prophecy.git",
"reference": "3132b1f44c7bf2ec4c7eb2d3cb78fdeca760d373" "reference": "9ca52329bcdd1500de24427542577ebf3fc2f1c9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/3132b1f44c7bf2ec4c7eb2d3cb78fdeca760d373", "url": "https://api.github.com/repos/phpspec/prophecy/zipball/9ca52329bcdd1500de24427542577ebf3fc2f1c9",
"reference": "3132b1f44c7bf2ec4c7eb2d3cb78fdeca760d373", "reference": "9ca52329bcdd1500de24427542577ebf3fc2f1c9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"doctrine/instantiator": "^1.0.2", "doctrine/instantiator": "~1.0,>=1.0.2",
"phpdocumentor/reflection-docblock": "~2.0", "phpdocumentor/reflection-docblock": "~2.0"
"sebastian/comparator": "~1.1"
}, },
"require-dev": { "require-dev": {
"phpspec/phpspec": "~2.0" "phpspec/phpspec": "~2.0"
@ -393,7 +389,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.4.x-dev" "dev-master": "1.2.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -417,7 +413,7 @@
} }
], ],
"description": "Highly opinionated mocking framework for PHP 5.3+", "description": "Highly opinionated mocking framework for PHP 5.3+",
"homepage": "https://github.com/phpspec/prophecy", "homepage": "http://phpspec.org",
"keywords": [ "keywords": [
"Double", "Double",
"Dummy", "Dummy",
@ -426,20 +422,20 @@
"spy", "spy",
"stub" "stub"
], ],
"time": "2015-04-27 22:15:08" "time": "2014-11-17 16:23:49"
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
"version": "2.0.17", "version": "2.0.15",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "c4e8e7725e351184a76544634855b8a9c405a6e3" "reference": "34cc484af1ca149188d0d9e91412191e398e0b67"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c4e8e7725e351184a76544634855b8a9c405a6e3", "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/34cc484af1ca149188d0d9e91412191e398e0b67",
"reference": "c4e8e7725e351184a76544634855b8a9c405a6e3", "reference": "34cc484af1ca149188d0d9e91412191e398e0b67",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -488,37 +484,35 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2015-05-25 05:11:59" "time": "2015-01-24 10:06:35"
}, },
{ {
"name": "phpunit/php-file-iterator", "name": "phpunit/php-file-iterator",
"version": "1.4.0", "version": "1.3.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
"reference": "a923bb15680d0089e2316f7a4af8f437046e96bb" "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a923bb15680d0089e2316f7a4af8f437046e96bb", "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb",
"reference": "a923bb15680d0089e2316f7a4af8f437046e96bb", "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3" "php": ">=5.3.3"
}, },
"type": "library", "type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4.x-dev"
}
},
"autoload": { "autoload": {
"classmap": [ "classmap": [
"src/" "File/"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"include-path": [
""
],
"license": [ "license": [
"BSD-3-Clause" "BSD-3-Clause"
], ],
@ -535,7 +529,7 @@
"filesystem", "filesystem",
"iterator" "iterator"
], ],
"time": "2015-04-02 05:19:05" "time": "2013-10-10 15:34:57"
}, },
{ {
"name": "phpunit/php-text-template", "name": "phpunit/php-text-template",
@ -627,16 +621,16 @@
}, },
{ {
"name": "phpunit/php-token-stream", "name": "phpunit/php-token-stream",
"version": "1.4.1", "version": "1.4.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git", "url": "https://github.com/sebastianbergmann/php-token-stream.git",
"reference": "eab81d02569310739373308137284e0158424330" "reference": "db32c18eba00b121c145575fcbcd4d4d24e6db74"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/eab81d02569310739373308137284e0158424330", "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/db32c18eba00b121c145575fcbcd4d4d24e6db74",
"reference": "eab81d02569310739373308137284e0158424330", "reference": "db32c18eba00b121c145575fcbcd4d4d24e6db74",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -672,20 +666,20 @@
"keywords": [ "keywords": [
"tokenizer" "tokenizer"
], ],
"time": "2015-04-08 04:46:07" "time": "2015-01-17 09:51:32"
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "4.6.7", "version": "4.5.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "57bf06dd4eebe2a5ced79a8de71509e7d5c18b25" "reference": "5b578d3865a9128b9c209b011fda6539ec06e7a5"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/57bf06dd4eebe2a5ced79a8de71509e7d5c18b25", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/5b578d3865a9128b9c209b011fda6539ec06e7a5",
"reference": "57bf06dd4eebe2a5ced79a8de71509e7d5c18b25", "reference": "5b578d3865a9128b9c209b011fda6539ec06e7a5",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -695,19 +689,19 @@
"ext-reflection": "*", "ext-reflection": "*",
"ext-spl": "*", "ext-spl": "*",
"php": ">=5.3.3", "php": ">=5.3.3",
"phpspec/prophecy": "~1.3,>=1.3.1", "phpspec/prophecy": "~1.3.1",
"phpunit/php-code-coverage": "~2.0,>=2.0.11", "phpunit/php-code-coverage": "~2.0",
"phpunit/php-file-iterator": "~1.4", "phpunit/php-file-iterator": "~1.3.2",
"phpunit/php-text-template": "~1.2", "phpunit/php-text-template": "~1.2",
"phpunit/php-timer": "~1.0", "phpunit/php-timer": "~1.0.2",
"phpunit/phpunit-mock-objects": "~2.3", "phpunit/phpunit-mock-objects": "~2.3",
"sebastian/comparator": "~1.1", "sebastian/comparator": "~1.1",
"sebastian/diff": "~1.2", "sebastian/diff": "~1.1",
"sebastian/environment": "~1.2", "sebastian/environment": "~1.2",
"sebastian/exporter": "~1.2", "sebastian/exporter": "~1.2",
"sebastian/global-state": "~1.0", "sebastian/global-state": "~1.0",
"sebastian/version": "~1.0", "sebastian/version": "~1.0",
"symfony/yaml": "~2.1|~3.0" "symfony/yaml": "~2.0"
}, },
"suggest": { "suggest": {
"phpunit/php-invoker": "~1.1" "phpunit/php-invoker": "~1.1"
@ -718,7 +712,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "4.6.x-dev" "dev-master": "4.5.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -744,29 +738,29 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2015-05-25 05:18:18" "time": "2015-02-05 15:51:19"
}, },
{ {
"name": "phpunit/phpunit-mock-objects", "name": "phpunit/phpunit-mock-objects",
"version": "2.3.1", "version": "2.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
"reference": "74ffb87f527f24616f72460e54b595f508dccb5c" "reference": "c63d2367247365f688544f0d500af90a11a44c65"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/74ffb87f527f24616f72460e54b595f508dccb5c", "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/c63d2367247365f688544f0d500af90a11a44c65",
"reference": "74ffb87f527f24616f72460e54b595f508dccb5c", "reference": "c63d2367247365f688544f0d500af90a11a44c65",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"doctrine/instantiator": "~1.0,>=1.0.2", "doctrine/instantiator": "~1.0,>=1.0.1",
"php": ">=5.3.3", "php": ">=5.3.3",
"phpunit/php-text-template": "~1.2" "phpunit/php-text-template": "~1.2"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "~4.4" "phpunit/phpunit": "~4.3"
}, },
"suggest": { "suggest": {
"ext-soap": "*" "ext-soap": "*"
@ -799,7 +793,7 @@
"mock", "mock",
"xunit" "xunit"
], ],
"time": "2015-04-02 05:36:41" "time": "2014-10-03 05:12:11"
}, },
{ {
"name": "psr/log", "name": "psr/log",
@ -973,16 +967,16 @@
}, },
{ {
"name": "sebastian/diff", "name": "sebastian/diff",
"version": "1.3.0", "version": "1.2.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/diff.git", "url": "https://github.com/sebastianbergmann/diff.git",
"reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" "reference": "5843509fed39dee4b356a306401e9dd1a931fec7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/5843509fed39dee4b356a306401e9dd1a931fec7",
"reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", "reference": "5843509fed39dee4b356a306401e9dd1a931fec7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -994,7 +988,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.3-dev" "dev-master": "1.2-dev"
} }
}, },
"autoload": { "autoload": {
@ -1021,32 +1015,32 @@
"keywords": [ "keywords": [
"diff" "diff"
], ],
"time": "2015-02-22 15:13:53" "time": "2014-08-15 10:29:00"
}, },
{ {
"name": "sebastian/environment", "name": "sebastian/environment",
"version": "1.2.2", "version": "1.2.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/environment.git", "url": "https://github.com/sebastianbergmann/environment.git",
"reference": "5a8c7d31914337b69923db26c4221b81ff5a196e" "reference": "6e6c71d918088c251b181ba8b3088af4ac336dd7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5a8c7d31914337b69923db26c4221b81ff5a196e", "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e6c71d918088c251b181ba8b3088af4ac336dd7",
"reference": "5a8c7d31914337b69923db26c4221b81ff5a196e", "reference": "6e6c71d918088c251b181ba8b3088af4ac336dd7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3" "php": ">=5.3.3"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "~4.4" "phpunit/phpunit": "~4.3"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.3.x-dev" "dev-master": "1.2.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -1071,7 +1065,7 @@
"environment", "environment",
"hhvm" "hhvm"
], ],
"time": "2015-01-01 10:01:08" "time": "2014-10-25 08:00:45"
}, },
{ {
"name": "sebastian/exporter", "name": "sebastian/exporter",
@ -1245,16 +1239,16 @@
}, },
{ {
"name": "sebastian/version", "name": "sebastian/version",
"version": "1.0.5", "version": "1.0.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/version.git", "url": "https://github.com/sebastianbergmann/version.git",
"reference": "ab931d46cd0d3204a91e1b9a40c4bc13032b58e4" "reference": "a77d9123f8e809db3fbdea15038c27a95da4058b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/version/zipball/ab931d46cd0d3204a91e1b9a40c4bc13032b58e4", "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/a77d9123f8e809db3fbdea15038c27a95da4058b",
"reference": "ab931d46cd0d3204a91e1b9a40c4bc13032b58e4", "reference": "a77d9123f8e809db3fbdea15038c27a95da4058b",
"shasum": "" "shasum": ""
}, },
"type": "library", "type": "library",
@ -1276,30 +1270,27 @@
], ],
"description": "Library that helps with managing the version number of Git-hosted PHP projects", "description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version", "homepage": "https://github.com/sebastianbergmann/version",
"time": "2015-02-24 06:35:25" "time": "2014-12-15 14:25:24"
}, },
{ {
"name": "symfony/config", "name": "symfony/config",
"version": "v2.6.7", "version": "v2.6.4",
"target-dir": "Symfony/Component/Config", "target-dir": "Symfony/Component/Config",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Config.git", "url": "https://github.com/symfony/Config.git",
"reference": "b6fddb4aa2daaa2b06f0040071ac131b4a1ecf25" "reference": "a9f781ba1221067d1f07c8cec0bc50f81b8d7408"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Config/zipball/b6fddb4aa2daaa2b06f0040071ac131b4a1ecf25", "url": "https://api.github.com/repos/symfony/Config/zipball/a9f781ba1221067d1f07c8cec0bc50f81b8d7408",
"reference": "b6fddb4aa2daaa2b06f0040071ac131b4a1ecf25", "reference": "a9f781ba1221067d1f07c8cec0bc50f81b8d7408",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3", "php": ">=5.3.3",
"symfony/filesystem": "~2.3" "symfony/filesystem": "~2.3"
}, },
"require-dev": {
"symfony/phpunit-bridge": "~2.7"
},
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
@ -1317,31 +1308,31 @@
], ],
"authors": [ "authors": [
{ {
"name": "Fabien Potencier", "name": "Symfony Community",
"email": "fabien@symfony.com" "homepage": "http://symfony.com/contributors"
}, },
{ {
"name": "Symfony Community", "name": "Fabien Potencier",
"homepage": "https://symfony.com/contributors" "email": "fabien@symfony.com"
} }
], ],
"description": "Symfony Config Component", "description": "Symfony Config Component",
"homepage": "https://symfony.com", "homepage": "http://symfony.com",
"time": "2015-05-02 15:18:45" "time": "2015-01-21 20:57:55"
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v2.6.7", "version": "v2.6.4",
"target-dir": "Symfony/Component/Console", "target-dir": "Symfony/Component/Console",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Console.git", "url": "https://github.com/symfony/Console.git",
"reference": "ebc5679854aa24ed7d65062e9e3ab0b18a917272" "reference": "e44154bfe3e41e8267d7a3794cd9da9a51cfac34"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Console/zipball/ebc5679854aa24ed7d65062e9e3ab0b18a917272", "url": "https://api.github.com/repos/symfony/Console/zipball/e44154bfe3e41e8267d7a3794cd9da9a51cfac34",
"reference": "ebc5679854aa24ed7d65062e9e3ab0b18a917272", "reference": "e44154bfe3e41e8267d7a3794cd9da9a51cfac34",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1350,7 +1341,6 @@
"require-dev": { "require-dev": {
"psr/log": "~1.0", "psr/log": "~1.0",
"symfony/event-dispatcher": "~2.1", "symfony/event-dispatcher": "~2.1",
"symfony/phpunit-bridge": "~2.7",
"symfony/process": "~2.1" "symfony/process": "~2.1"
}, },
"suggest": { "suggest": {
@ -1375,31 +1365,31 @@
], ],
"authors": [ "authors": [
{ {
"name": "Fabien Potencier", "name": "Symfony Community",
"email": "fabien@symfony.com" "homepage": "http://symfony.com/contributors"
}, },
{ {
"name": "Symfony Community", "name": "Fabien Potencier",
"homepage": "https://symfony.com/contributors" "email": "fabien@symfony.com"
} }
], ],
"description": "Symfony Console Component", "description": "Symfony Console Component",
"homepage": "https://symfony.com", "homepage": "http://symfony.com",
"time": "2015-05-02 15:18:45" "time": "2015-01-25 04:39:26"
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
"version": "v2.6.7", "version": "v2.6.4",
"target-dir": "Symfony/Component/EventDispatcher", "target-dir": "Symfony/Component/EventDispatcher",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/EventDispatcher.git", "url": "https://github.com/symfony/EventDispatcher.git",
"reference": "672593bc4b0043a0acf91903bb75a1c82d8f2e02" "reference": "f75989f3ab2743a82fe0b03ded2598a2b1546813"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/672593bc4b0043a0acf91903bb75a1c82d8f2e02", "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/f75989f3ab2743a82fe0b03ded2598a2b1546813",
"reference": "672593bc4b0043a0acf91903bb75a1c82d8f2e02", "reference": "f75989f3ab2743a82fe0b03ded2598a2b1546813",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1410,7 +1400,6 @@
"symfony/config": "~2.0,>=2.0.5", "symfony/config": "~2.0,>=2.0.5",
"symfony/dependency-injection": "~2.6", "symfony/dependency-injection": "~2.6",
"symfony/expression-language": "~2.6", "symfony/expression-language": "~2.6",
"symfony/phpunit-bridge": "~2.7",
"symfony/stopwatch": "~2.3" "symfony/stopwatch": "~2.3"
}, },
"suggest": { "suggest": {
@ -1434,39 +1423,36 @@
], ],
"authors": [ "authors": [
{ {
"name": "Fabien Potencier", "name": "Symfony Community",
"email": "fabien@symfony.com" "homepage": "http://symfony.com/contributors"
}, },
{ {
"name": "Symfony Community", "name": "Fabien Potencier",
"homepage": "https://symfony.com/contributors" "email": "fabien@symfony.com"
} }
], ],
"description": "Symfony EventDispatcher Component", "description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com", "homepage": "http://symfony.com",
"time": "2015-05-02 15:18:45" "time": "2015-02-01 16:10:57"
}, },
{ {
"name": "symfony/filesystem", "name": "symfony/filesystem",
"version": "v2.6.7", "version": "v2.6.4",
"target-dir": "Symfony/Component/Filesystem", "target-dir": "Symfony/Component/Filesystem",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Filesystem.git", "url": "https://github.com/symfony/Filesystem.git",
"reference": "f73904bd2dae525c42ea1f0340c7c98480ecacde" "reference": "a1f566d1f92e142fa1593f4555d6d89e3044a9b7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Filesystem/zipball/f73904bd2dae525c42ea1f0340c7c98480ecacde", "url": "https://api.github.com/repos/symfony/Filesystem/zipball/a1f566d1f92e142fa1593f4555d6d89e3044a9b7",
"reference": "f73904bd2dae525c42ea1f0340c7c98480ecacde", "reference": "a1f566d1f92e142fa1593f4555d6d89e3044a9b7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3" "php": ">=5.3.3"
}, },
"require-dev": {
"symfony/phpunit-bridge": "~2.7"
},
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
@ -1484,39 +1470,36 @@
], ],
"authors": [ "authors": [
{ {
"name": "Fabien Potencier", "name": "Symfony Community",
"email": "fabien@symfony.com" "homepage": "http://symfony.com/contributors"
}, },
{ {
"name": "Symfony Community", "name": "Fabien Potencier",
"homepage": "https://symfony.com/contributors" "email": "fabien@symfony.com"
} }
], ],
"description": "Symfony Filesystem Component", "description": "Symfony Filesystem Component",
"homepage": "https://symfony.com", "homepage": "http://symfony.com",
"time": "2015-05-08 00:09:07" "time": "2015-01-03 21:13:09"
}, },
{ {
"name": "symfony/stopwatch", "name": "symfony/stopwatch",
"version": "v2.6.7", "version": "v2.6.4",
"target-dir": "Symfony/Component/Stopwatch", "target-dir": "Symfony/Component/Stopwatch",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Stopwatch.git", "url": "https://github.com/symfony/Stopwatch.git",
"reference": "b470f87c69837cb71115f1fa720388bb19b63635" "reference": "e8da5286132ba75ce4b4275fbf0f4cd369bfd71c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Stopwatch/zipball/b470f87c69837cb71115f1fa720388bb19b63635", "url": "https://api.github.com/repos/symfony/Stopwatch/zipball/e8da5286132ba75ce4b4275fbf0f4cd369bfd71c",
"reference": "b470f87c69837cb71115f1fa720388bb19b63635", "reference": "e8da5286132ba75ce4b4275fbf0f4cd369bfd71c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3" "php": ">=5.3.3"
}, },
"require-dev": {
"symfony/phpunit-bridge": "~2.7"
},
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
@ -1534,39 +1517,36 @@
], ],
"authors": [ "authors": [
{ {
"name": "Fabien Potencier", "name": "Symfony Community",
"email": "fabien@symfony.com" "homepage": "http://symfony.com/contributors"
}, },
{ {
"name": "Symfony Community", "name": "Fabien Potencier",
"homepage": "https://symfony.com/contributors" "email": "fabien@symfony.com"
} }
], ],
"description": "Symfony Stopwatch Component", "description": "Symfony Stopwatch Component",
"homepage": "https://symfony.com", "homepage": "http://symfony.com",
"time": "2015-05-02 15:18:45" "time": "2015-01-03 08:01:59"
}, },
{ {
"name": "symfony/yaml", "name": "symfony/yaml",
"version": "v2.6.7", "version": "v2.6.4",
"target-dir": "Symfony/Component/Yaml", "target-dir": "Symfony/Component/Yaml",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Yaml.git", "url": "https://github.com/symfony/Yaml.git",
"reference": "f157ab074e453ecd4c0fa775f721f6e67a99d9e2" "reference": "60ed7751671113cf1ee7d7778e691642c2e9acd8"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Yaml/zipball/f157ab074e453ecd4c0fa775f721f6e67a99d9e2", "url": "https://api.github.com/repos/symfony/Yaml/zipball/60ed7751671113cf1ee7d7778e691642c2e9acd8",
"reference": "f157ab074e453ecd4c0fa775f721f6e67a99d9e2", "reference": "60ed7751671113cf1ee7d7778e691642c2e9acd8",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3" "php": ">=5.3.3"
}, },
"require-dev": {
"symfony/phpunit-bridge": "~2.7"
},
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
@ -1584,17 +1564,17 @@
], ],
"authors": [ "authors": [
{ {
"name": "Fabien Potencier", "name": "Symfony Community",
"email": "fabien@symfony.com" "homepage": "http://symfony.com/contributors"
}, },
{ {
"name": "Symfony Community", "name": "Fabien Potencier",
"homepage": "https://symfony.com/contributors" "email": "fabien@symfony.com"
} }
], ],
"description": "Symfony Yaml Component", "description": "Symfony Yaml Component",
"homepage": "https://symfony.com", "homepage": "http://symfony.com",
"time": "2015-05-02 15:18:45" "time": "2015-01-25 04:39:26"
} }
], ],
"aliases": [], "aliases": [],

View file

@ -1,71 +0,0 @@
#!/usr/bin/env bash
# Abort if a command fails!
set -e
TEMP_DIR=/tmp/
if [ ! -n "$HOST" ];then
echo "missing option \"HOST\", aborting"
exit 1
fi
if [ ! -n "$USER" ];then
echo "missing option \"HOST\", aborting"
exit 1
fi
if [ ! -n "$PASSWORD" ];then
echo "missing option \"HOST\", aborting"
exit 1
fi
if [ ! -n "$DIRECTORY" ];then
echo "missing option \"DIRECTORY\", aborting"
exit 1
fi
if [ ! -n "$IGNORE" ];then
IGNORE=''
fi
# Create temporary director
WORKING_DIR="$TEMP_DIR/workspace"
# TODO: fail if exists..
mkdir -p $WORKING_DIR
export COMPOSER_HOME="$WORKING_DIR"
# Clone the repo & checkout branch
echo "Creating archive..."
git archive master --format=tar --output=$TEMP_DIR/export.tar
tar -xf $TEMP_DIR/export.tar -C $WORKING_DIR
# Change directory into the working dir
cd "$WORKING_DIR"
# install the dependencies
echo "Install dependencies..."
composer install --no-dev --optimize-autoloader
# Prepare ignore parameters
IFS=';' read -a igor <<< "$IGNORE"
params=''
for element in "${igor[@]}"
do
params=$(echo "$params --exclude $element")
done
# TODO: allow SFTP
# TODO: allow verify cert
echo "Uploading..."
lftp -e "
open $HOST
set ssl:verify-certificate no
set ftp:ssl-allow off
set cmd:fail-exit true
user $USER $PASSWORD
cd $DIRECTORY
mirror --reverse $params --delete --ignore-time --verbose --parallel . .
bye
"
# Complete!
echo "Done!"
exit 0

View file

@ -19,42 +19,43 @@ if (!RequestUtils::isPost()) {
$tpl = new Tpl; $tpl = new Tpl;
$tpl->assign('seconds', $spamPrevention); $tpl->assign('seconds', $spamPrevention);
$tpl->draw('spam'); $tpl->draw('spam');
} else { exit;
// Parse request
$pattern = RequestUtils::parsePattern();
$keyboardLayout = RequestUtils::parseKeyboardLayout();
$seed = RequestUtils::parseSeed();
$text = RequestUtils::parseText();
$primary = RequestUtils::parsePrimaryColor();
$secondary = RequestUtils::parseSecondaryColor();
$spaceBarSize = RequestUtils::parseSpacebarSize();
// Setup configuration
$cfg = new Configuration($seed, $pattern, $keyboardLayout, $spaceBarSize, $text, $primary, $secondary);
$creator = new CardCreator($cfg);
// Load SVG templates
$front_template = $creator->getSvgTemplate('simple_back');
$back_template = $creator->getSvgTemplate('simple_front');
// Render SVG into tempfiles
$front = $creator->renderIntoTempfile($front_template);
$back = $creator->renderIntoTempfile($back_template);
// Render the PDF
$doc = PDFRenderer::render($front, $back);
// Prepare response PDF file header
RequestUtils::preparePdfHeader(strlen($doc));
// Ignore user abort to cleanup afterwards
ignore_user_abort(true);
// Strem the PDF
echo $doc;
// Cleanup temporary SVG images
unlink($back);
unlink($front);
} }
// Parse request
$pattern = RequestUtils::parsePattern();
$keyboardLayout = RequestUtils::parseKeyboardLayout();
$seed = RequestUtils::parseSeed();
$text = RequestUtils::parseText();
$primary = RequestUtils::parsePrimaryColor();
$secondary = RequestUtils::parseSecondaryColor();
$spaceBarSize = RequestUtils::parseSpacebarSize();
// Setup configuration
$cfg = new Configuration($seed, $pattern, $keyboardLayout, $spaceBarSize, $text, $primary, $secondary);
$creator = new CardCreator($cfg);
// Load SVG templates
$front_template = $creator->getSvgTemplate('simple_back');
$back_template = $creator->getSvgTemplate('simple_front');
// Render SVG into tempfiles
$front = $creator->renderIntoTempfile($front_template);
$back = $creator->renderIntoTempfile($back_template);
// Render the PDF
$doc = PDFRenderer::render($front, $back);
// Prepare response PDF file header
RequestUtils::preparePdfHeader(strlen($doc));
// Ignore user abort to cleanup afterwards
ignore_user_abort(true);
// Strem the PDF
echo $doc;
// Cleanup temporary SVG images
unlink($back);
unlink($front);
} }

View file

@ -49,7 +49,6 @@
<div class="row" style="margin-top: 30px;"> <div class="row" style="margin-top: 30px;">
<p>What's your Keyboard layout?</p> <p>What's your Keyboard layout?</p>
<select type="text" name="keyboardlayout"> <select type="text" name="keyboardlayout">
<option value="azerty">AZERTY</option>
<option value="qwerty">QWERTY</option> <option value="qwerty">QWERTY</option>
<option value="qwertz">QWERTZ</option> <option value="qwertz">QWERTZ</option>
</select> </select>
@ -57,7 +56,7 @@
<div class="row" style="margin-top: 30px;"> <div class="row" style="margin-top: 30px;">
<p>This text goes on the back of your card</p> <p>This text goes on the back of your card</p>
<input type="text" name="msg" placeholder="For Work" maxlength="30" autocomplete="off"> <input type="text" name="msg" placeholder="For Work" maxlength="20" autocomplete="off">
</div> </div>
<div class="row" style="margin-top: 30px;"> <div class="row" style="margin-top: 30px;">

View file

@ -11,12 +11,12 @@
$('#other-chars').parent().slideToggle(); $('#other-chars').parent().slideToggle();
}); });
$("#primary").tinycolorpicker(); $("#primary").tinycolorpicker();
var primaryPicker = $('#primary').data("plugin_tinycolorpicker"); var picker = $('#primary').data("plugin_tinycolorpicker");
primaryPicker.setColor("#1ABC9C"); picker.setColor("#1ABC9C");
$("#secondary").tinycolorpicker(); $("#secondary").tinycolorpicker();
var secondaryPicker = $('#secondary').data("plugin_tinycolorpicker"); var picker = $('#secondary').data("plugin_tinycolorpicker");
secondaryPicker.setColor("#ffffff"); picker.setColor("#ffffff");
})(jQuery); })(jQuery);

View file

@ -8,11 +8,11 @@ class CardCreator
public function __construct($configration) public function __construct($configration)
{ {
if ($configration === null) { if ($configration == null) {
throw new \Exception('The given $configuration is null!'); throw new \Exception('The given $configuration is null!');
} }
if ($configration instanceof Configuration === false) { if ($configration instanceof Configuration == false) {
throw new \Exception( throw new \Exception(
'The given $configuration is not a valid ' . 'The given $configuration is not a valid ' .
'Configuration object.' 'Configuration object.'
@ -42,8 +42,8 @@ class CardCreator
$seed = $this->configration->seed; $seed = $this->configration->seed;
mt_srand($seed); mt_srand($seed);
$number_of_keys = strlen($this->configration->keys); for ($i = 0; $i < strlen($this->configration->keys); $i++) {
for ($i = 0; $i < $number_of_keys; $i++) { $prefix = '$' . ($i+1);
$equivalent = $chars[mt_rand(0, $char_count-1)]; $equivalent = $chars[mt_rand(0, $char_count-1)];
$equivalent = $this->escape($equivalent); $equivalent = $this->escape($equivalent);

View file

@ -57,7 +57,7 @@ class Configuration
*/ */
public static function evalSeed($seed) public static function evalSeed($seed)
{ {
if ($seed === null || !is_numeric($seed)) { if ($seed == null || !is_numeric($seed)) {
list($usec, $sec) = explode(' ', microtime()); list($usec, $sec) = explode(' ', microtime());
$seed = (float) $sec + ((float) $usec * 100000); $seed = (float) $sec + ((float) $usec * 100000);
} }
@ -69,7 +69,7 @@ class Configuration
*/ */
public static function evalPattern($pattern) public static function evalPattern($pattern)
{ {
if ($pattern === null) { if ($pattern == null) {
$pattern = self::DEFAULT_PATTERN; $pattern = self::DEFAULT_PATTERN;
} }
return $pattern; return $pattern;
@ -80,10 +80,6 @@ class Configuration
*/ */
public static function evalKeys($keys) public static function evalKeys($keys)
{ {
// Return azerty
if (strtolower($keys) === 'azerty') {
return 'AZERTYUIOPQSDFGHJKLMWXCVBN';
}
// Return qwertz // Return qwertz
if (strtolower($keys) === 'qwertz') { if (strtolower($keys) === 'qwertz') {
return 'QWERTZUIOPASDFGHJKLYXCVBNM'; return 'QWERTZUIOPASDFGHJKLYXCVBNM';

View file

@ -26,20 +26,20 @@ class PDFRenderer
// Add the front svg // Add the front svg
$pdf->ImageSVG( $pdf->ImageSVG(
$front, // filename $file = $front,
10, // x $x = 10,
15, // y $y = 15,
'85', // width $w = '85',
'55' // height $h = '55'
); );
// Add the back svg // Add the back svg
$pdf->ImageSVG( $pdf->ImageSVG(
$back, // filename $file = $back,
95, // x $x = 95,
15, // y $y = 15,
'85', // width $w = '85',
'55' // height $h = '55'
); );

View file

@ -74,7 +74,7 @@ class RequestUtils
public static function parseText() public static function parseText()
{ {
if (isset($_POST['msg'])) { if (isset($_POST['msg'])) {
return substr($_POST['msg'], 0, 30); return substr($_POST['msg'], 0, 20);
} }
return ''; return '';
} }
@ -105,7 +105,7 @@ class RequestUtils
{ {
if ( if (
isset($_POST['keyboardlayout']) && isset($_POST['keyboardlayout']) &&
preg_match("/azerty|qwerty|qwertz/", $_POST['keyboardlayout']) preg_match("/qwerty|qwertz/", $_POST['keyboardlayout'])
) { ) {
return strtolower($_POST['keyboardlayout']); return strtolower($_POST['keyboardlayout']);
} }

View file

@ -1,14 +0,0 @@
box: raphiz/passwordcards
build:
steps:
- script:
name: install dependencies
code: composer install --no-interaction --prefer-source
- script:
name: run unit tests
code: composer test
deploy:
steps:
- script:
name: Deploying...
code: bash deploy.sh