diff --git a/.gitignore b/.gitignore index 69cfca9..ea23bc2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,11 @@ -.idea -.sass-cache /vendor/ /cache/* /logs/* silex.log /config/parameters.yml /.vagrant +node_modules/ +web/css/* +web/img/* +web/js/* + diff --git a/README.md b/README.md index 1654355..fcc595f 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,9 @@ Ensure that [VirtualBox](https://www.virtualbox.org), [Vagrant](http://www.vagra ``` 4. (from within the machine) `composer install` to install composer dependencies -5. (from within the machine) `compass compile` to compile styles -6. add the following to your /etc/hosts file +5. (from within the machine) `npm install` to grab npm dependencies +6. (from within the machine) `./node_modules/.bin/gulp` to compile styles +7. add the following to your /etc/hosts file ``` 10.10.10.10 app.local @@ -40,15 +41,14 @@ All done! Now you can access the application at [http://app.local/](http://app.l 3. Install Dependencies ``` - gem update --system - gem install compass - gem install susy + composer install + npm install ``` -4. Compile stylesheets +4. Compile assets ``` - compass compile + ./node_modules/.bin/gulp ``` 5. Create config/parameters.yml diff --git a/cache/.gitkeep b/cache/.gitkeep old mode 100644 new mode 100755 diff --git a/circle.yml b/circle.yml new file mode 100644 index 0000000..fcf84a0 --- /dev/null +++ b/circle.yml @@ -0,0 +1,34 @@ +machine: + php: + version: 7.0.4 + services: + - redis + +dependencies: + cache_directories: + - ~/.composer/cache + + override: + - composer install --dev --no-progress --no-interaction --prefer-dist + - npm install --no-progress + - ./node_modules/.bin/gulp + + post: + - mkdir -p $CIRCLE_TEST_REPORTS/phpunit + +test: + pre: + - "echo \"meetup_api_key: $MEETUP_API_KEY\nmeetup_group: $MEETUP_GROUP\" > config/parameters.yml" + override: + - php -S localhost:8080 -t web web/index.php: + background: true + - sleep 5 + - npm test + +deployment: + production: + branch: master + owner: AmsterdamPHP + commands: + - cp ~/.ssh/id_amsterdamphp.nl ~/.ssh/id_rsa + - ./vendor/bin/dep deploy diff --git a/composer.json b/composer.json index ad140c4..d1689aa 100644 --- a/composer.json +++ b/composer.json @@ -34,5 +34,9 @@ }, "repositories": [ - ] + ], + "require-dev": { + "deployer/deployer": "^4@dev", + "symfony/var-dumper": "^3.1" + } } diff --git a/composer.lock b/composer.lock index 78b2206..154bf42 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "10d5c439913d3f12eaf619fd35526724", - "content-hash": "45272a6f3a8802f1992d5f16c5c423e8", + "hash": "ce1146b2c399377b1274e0a77e55e015", + "content-hash": "0bd32018b237dc0dab8a1589d1afc04b", "packages": [ { "name": "dms/meetup-api-client", @@ -2048,11 +2048,1379 @@ "time": "2016-01-25 21:22:18" } ], - "packages-dev": [], + "packages-dev": [ + { + "name": "deployer/deployer", + "version": "4.x-dev", + "source": { + "type": "git", + "url": "https://github.com/deployphp/deployer.git", + "reference": "aa0a10992c8fc2e2b34ab6adff734f1f598c0ba7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/deployphp/deployer/zipball/aa0a10992c8fc2e2b34ab6adff734f1f598c0ba7", + "reference": "aa0a10992c8fc2e2b34ab6adff734f1f598c0ba7", + "shasum": "" + }, + "require": { + "deployer/phar-update": "^1.0", + "elfet/pure": "~2.0", + "php": ">=5.5.0", + "phpseclib/phpseclib": "~2.0", + "symfony/console": "~2.6|~3.0", + "symfony/finder": "~2.6|~3.0", + "symfony/process": "~2.6|~3.0", + "symfony/yaml": "~2.6|~3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.5" + }, + "suggest": { + "ext-sockets": "For parallel deployment", + "herzult/php-ssh": "For SSH support through native SSH2 extension" + }, + "bin": [ + "bin/dep" + ], + "type": "library", + "autoload": { + "psr-4": { + "Deployer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anton Medvedev", + "email": "anton@medv.io" + } + ], + "description": "Deployment Tool", + "homepage": "http://deployer.org", + "time": "2016-05-18 06:50:02" + }, + { + "name": "deployer/phar-update", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/deployphp/phar-update.git", + "reference": "df2670056d9922b6f02e055ce9846508656b02aa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/deployphp/phar-update/zipball/df2670056d9922b6f02e055ce9846508656b02aa", + "reference": "df2670056d9922b6f02e055ce9846508656b02aa", + "shasum": "" + }, + "require": { + "herrera-io/phar-update": "~2.0", + "php": ">=5.3.3", + "symfony/console": "^2.1|^3.0" + }, + "require-dev": { + "herrera-io/box": "~1.0", + "herrera-io/phpunit-test-case": "1.*", + "phpunit/phpunit": "3.7.*" + }, + "type": "library", + "autoload": { + "psr-4": { + "Deployer\\Component\\PharUpdate\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kevin Herrera", + "email": "kevin@herrera.io", + "homepage": "http://kevin.herrera.io" + }, + { + "name": "Anton Medvedev", + "email": "anton@medv.io", + "homepage": "http://medv.io" + } + ], + "description": "Integrates Phar Update to Symfony Console.", + "homepage": "https://github.com/deployphp/phar-update", + "keywords": [ + "console", + "phar", + "update" + ], + "time": "2016-04-06 13:32:59" + }, + { + "name": "elfet/pure", + "version": "v2.0.0", + "source": { + "type": "git", + "url": "https://github.com/elfet/purephp.git", + "reference": "9d6422d31b89c4f79c322df2a7772936a8bc74a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/elfet/purephp/zipball/9d6422d31b89c4f79c322df2a7772936a8bc74a1", + "reference": "9d6422d31b89c4f79c322df2a7772936a8bc74a1", + "shasum": "" + }, + "require": { + "react/react": "~0.4", + "symfony/console": "~2.6|~3.0", + "symfony/debug": "~2.6|~3.0", + "symfony/expression-language": "~2.6|~3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4", + "symfony/finder": "~2.6|~3.0", + "symfony/process": "~2.6|~3.0" + }, + "bin": [ + "pure" + ], + "type": "library", + "autoload": { + "psr-4": { + "Pure\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anton Medvedev", + "email": "anton@medv.io" + } + ], + "description": "Pure PHP key-value storage", + "time": "2016-03-19 14:26:03" + }, + { + "name": "evenement/evenement", + "version": "v2.0.0", + "source": { + "type": "git", + "url": "https://github.com/igorw/evenement.git", + "reference": "f6e843799fd4f4184d54d8fc7b5b3551c9fa803e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/igorw/evenement/zipball/f6e843799fd4f4184d54d8fc7b5b3551c9fa803e", + "reference": "f6e843799fd4f4184d54d8fc7b5b3551c9fa803e", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-0": { + "Evenement": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch", + "homepage": "http://wiedler.ch/igor/" + } + ], + "description": "Événement is a very simple event dispatching library for PHP", + "keywords": [ + "event-dispatcher", + "event-emitter" + ], + "time": "2012-11-02 14:49:47" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "31382fef2889136415751badebbd1cb022a4ed72" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/31382fef2889136415751badebbd1cb022a4ed72", + "reference": "31382fef2889136415751badebbd1cb022a4ed72", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "PSR-7 message implementation", + "keywords": [ + "http", + "message", + "stream", + "uri" + ], + "time": "2016-04-13 19:56:01" + }, + { + "name": "herrera-io/json", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/kherge-abandoned/php-json.git", + "reference": "60c696c9370a1e5136816ca557c17f82a6fa83f1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kherge-abandoned/php-json/zipball/60c696c9370a1e5136816ca557c17f82a6fa83f1", + "reference": "60c696c9370a1e5136816ca557c17f82a6fa83f1", + "shasum": "" + }, + "require": { + "ext-json": "*", + "justinrainbow/json-schema": ">=1.0,<2.0-dev", + "php": ">=5.3.3", + "seld/jsonlint": ">=1.0,<2.0-dev" + }, + "require-dev": { + "herrera-io/phpunit-test-case": "1.*", + "mikey179/vfsstream": "1.1.0", + "phpunit/phpunit": "3.7.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "files": [ + "src/lib/json_version.php" + ], + "psr-0": { + "Herrera\\Json": "src/lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kevin Herrera", + "email": "kevin@herrera.io", + "homepage": "http://kevin.herrera.io" + } + ], + "description": "A library for simplifying JSON linting and validation.", + "homepage": "http://herrera-io.github.com/php-json", + "keywords": [ + "json", + "lint", + "schema", + "validate" + ], + "time": "2013-10-30 16:51:34" + }, + { + "name": "herrera-io/phar-update", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/kherge-abandoned/php-phar-update.git", + "reference": "15643c90d3d43620a4f45c910e6afb7a0ad4b488" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kherge-abandoned/php-phar-update/zipball/15643c90d3d43620a4f45c910e6afb7a0ad4b488", + "reference": "15643c90d3d43620a4f45c910e6afb7a0ad4b488", + "shasum": "" + }, + "require": { + "herrera-io/json": "1.*", + "herrera-io/version": "1.*", + "php": ">=5.3.3" + }, + "require-dev": { + "herrera-io/phpunit-test-case": "1.*", + "mikey179/vfsstream": "1.1.0", + "phpunit/phpunit": "3.7.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "files": [ + "src/lib/constants.php" + ], + "psr-0": { + "Herrera\\Phar\\Update": "src/lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kevin Herrera", + "email": "kevin@herrera.io", + "homepage": "http://kevin.herrera.io" + } + ], + "description": "A library for self-updating Phars.", + "homepage": "http://herrera-io.github.com/php-phar-update", + "keywords": [ + "phar", + "update" + ], + "time": "2013-11-09 17:13:13" + }, + { + "name": "herrera-io/version", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/kherge-abandoned/php-version.git", + "reference": "d39d9642b92a04d8b8a28b871b797a35a2545e85" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kherge-abandoned/php-version/zipball/d39d9642b92a04d8b8a28b871b797a35a2545e85", + "reference": "d39d9642b92a04d8b8a28b871b797a35a2545e85", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "herrera-io/phpunit-test-case": "1.*", + "phpunit/phpunit": "3.7.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-0": { + "Herrera\\Version": "src/lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kevin Herrera", + "email": "kevin@herrera.io", + "homepage": "http://kevin.herrera.io" + } + ], + "description": "A library for creating, editing, and comparing semantic versioning numbers.", + "homepage": "http://github.com/herrera-io/php-version", + "keywords": [ + "semantic", + "version" + ], + "time": "2014-05-27 05:29:25" + }, + { + "name": "justinrainbow/json-schema", + "version": "1.6.1", + "source": { + "type": "git", + "url": "https://github.com/justinrainbow/json-schema.git", + "reference": "cc84765fb7317f6b07bd8ac78364747f95b86341" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/cc84765fb7317f6b07bd8ac78364747f95b86341", + "reference": "cc84765fb7317f6b07bd8ac78364747f95b86341", + "shasum": "" + }, + "require": { + "php": ">=5.3.29" + }, + "require-dev": { + "json-schema/json-schema-test-suite": "1.1.0", + "phpdocumentor/phpdocumentor": "~2", + "phpunit/phpunit": "~3.7" + }, + "bin": [ + "bin/validate-json" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-4": { + "JsonSchema\\": "src/JsonSchema/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" + }, + { + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" + } + ], + "description": "A library to validate a json schema.", + "homepage": "https://github.com/justinrainbow/json-schema", + "keywords": [ + "json", + "schema" + ], + "time": "2016-01-25 15:43:01" + }, + { + "name": "phpseclib/phpseclib", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/phpseclib/phpseclib.git", + "reference": "3d265f7c079f5b37d33475f996d7a383c5fc8aeb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/3d265f7c079f5b37d33475f996d7a383c5fc8aeb", + "reference": "3d265f7c079f5b37d33475f996d7a383c5fc8aeb", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phing/phing": "~2.7", + "phpunit/phpunit": "~4.0", + "sami/sami": "~2.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "suggest": { + "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", + "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", + "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", + "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations." + }, + "type": "library", + "autoload": { + "files": [ + "phpseclib/bootstrap.php" + ], + "psr-4": { + "phpseclib\\": "phpseclib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jim Wigginton", + "email": "terrafrost@php.net", + "role": "Lead Developer" + }, + { + "name": "Patrick Monnerat", + "email": "pm@datasphere.ch", + "role": "Developer" + }, + { + "name": "Andreas Fischer", + "email": "bantu@phpbb.com", + "role": "Developer" + }, + { + "name": "Hans-Jürgen Petrich", + "email": "petrich@tronic-media.com", + "role": "Developer" + }, + { + "name": "Graham Campbell", + "email": "graham@alt-three.com", + "role": "Developer" + } + ], + "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", + "homepage": "http://phpseclib.sourceforge.net", + "keywords": [ + "BigInteger", + "aes", + "asn.1", + "asn1", + "blowfish", + "crypto", + "cryptography", + "encryption", + "rsa", + "security", + "sftp", + "signature", + "signing", + "ssh", + "twofish", + "x.509", + "x509" + ], + "time": "2016-05-13 01:15:21" + }, + { + "name": "psr/http-message", + "version": "1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", + "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2015-05-04 20:22:00" + }, + { + "name": "psr/log", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-0": { + "Psr\\Log\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2012-12-21 11:40:51" + }, + { + "name": "react/cache", + "version": "v0.4.1", + "source": { + "type": "git", + "url": "https://github.com/reactphp/cache.git", + "reference": "558f614891341b1d817a8cdf9a358948ec49638f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/cache/zipball/558f614891341b1d817a8cdf9a358948ec49638f", + "reference": "558f614891341b1d817a8cdf9a358948ec49638f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "react/promise": "~2.0|~1.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Cache\\": "src\\" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Async caching.", + "keywords": [ + "cache" + ], + "time": "2016-02-25 18:17:16" + }, + { + "name": "react/child-process", + "version": "v0.4.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/child-process.git", + "reference": "8bf211533bcbb2034e00528a47400367570dc3d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/child-process/zipball/8bf211533bcbb2034e00528a47400367570dc3d7", + "reference": "8bf211533bcbb2034e00528a47400367570dc3d7", + "shasum": "" + }, + "require": { + "evenement/evenement": "~2.0", + "php": ">=5.4.0", + "react/event-loop": "0.4.*", + "react/stream": "0.4.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.4-dev" + } + }, + "autoload": { + "psr-4": { + "React\\ChildProcess\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Library for executing child processes.", + "keywords": [ + "process" + ], + "time": "2014-02-02 01:11:26" + }, + { + "name": "react/dns", + "version": "v0.4.2", + "source": { + "type": "git", + "url": "https://github.com/reactphp/dns.git", + "reference": "62f6201e487df8add209cc42f05ffca33ee1ba05" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/dns/zipball/62f6201e487df8add209cc42f05ffca33ee1ba05", + "reference": "62f6201e487df8add209cc42f05ffca33ee1ba05", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "react/cache": "~0.4.0|~0.3.0", + "react/promise": "~2.0|~1.1", + "react/socket": "~0.4.0|~0.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.4-dev" + } + }, + "autoload": { + "psr-4": { + "React\\Dns\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Async DNS resolver.", + "keywords": [ + "dns", + "dns-resolver" + ], + "time": "2016-02-24 23:45:36" + }, + { + "name": "react/event-loop", + "version": "v0.4.2", + "source": { + "type": "git", + "url": "https://github.com/reactphp/event-loop.git", + "reference": "164799f73175e1c80bba92a220ea35df6ca371dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/event-loop/zipball/164799f73175e1c80bba92a220ea35df6ca371dd", + "reference": "164799f73175e1c80bba92a220ea35df6ca371dd", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "suggest": { + "ext-event": "~1.0", + "ext-libev": "*", + "ext-libevent": ">=0.1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.5-dev" + } + }, + "autoload": { + "psr-4": { + "React\\EventLoop\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Event loop abstraction layer that libraries can use for evented I/O.", + "keywords": [ + "asynchronous", + "event-loop" + ], + "time": "2016-03-08 02:09:32" + }, + { + "name": "react/http", + "version": "v0.4.1", + "source": { + "type": "git", + "url": "https://github.com/reactphp/http.git", + "reference": "f575989d67b7db0a65f5dd7e431d8f47af6c2f7b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/http/zipball/f575989d67b7db0a65f5dd7e431d8f47af6c2f7b", + "reference": "f575989d67b7db0a65f5dd7e431d8f47af6c2f7b", + "shasum": "" + }, + "require": { + "evenement/evenement": "^2.0", + "guzzlehttp/psr7": "^1.0", + "php": ">=5.4.0", + "react/socket": "^0.4", + "react/stream": "^0.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.5-dev" + } + }, + "autoload": { + "psr-4": { + "React\\Http\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Library for building an evented http server.", + "keywords": [ + "http" + ], + "time": "2015-05-21 20:12:09" + }, + { + "name": "react/http-client", + "version": "v0.4.10", + "source": { + "type": "git", + "url": "https://github.com/reactphp/http-client.git", + "reference": "1a37937274cc7bf7ef194381c83f5a4ad5253575" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/http-client/zipball/1a37937274cc7bf7ef194381c83f5a4ad5253575", + "reference": "1a37937274cc7bf7ef194381c83f5a4ad5253575", + "shasum": "" + }, + "require": { + "evenement/evenement": "~2.0", + "guzzlehttp/psr7": "^1.0", + "php": ">=5.4.0", + "react/dns": "0.4.*", + "react/event-loop": "0.4.*", + "react/promise": "~2.2", + "react/socket-client": "^0.5 || ^0.4 || ^0.3", + "react/stream": "0.4.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.5-dev" + } + }, + "autoload": { + "psr-4": { + "React\\HttpClient\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Asynchronous HTTP client library.", + "keywords": [ + "http" + ], + "time": "2016-03-21 14:01:16" + }, + { + "name": "react/promise", + "version": "v2.4.1", + "source": { + "type": "git", + "url": "https://github.com/reactphp/promise.git", + "reference": "8025426794f1944de806618671d4fa476dc7626f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/promise/zipball/8025426794f1944de806618671d4fa476dc7626f", + "reference": "8025426794f1944de806618671d4fa476dc7626f", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "React\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com" + } + ], + "description": "A lightweight implementation of CommonJS Promises/A for PHP", + "time": "2016-05-03 17:50:52" + }, + { + "name": "react/react", + "version": "v0.4.2", + "source": { + "type": "git", + "url": "https://github.com/reactphp/react.git", + "reference": "457b6b8a16a37c11278cac0870d6d2ff911c5765" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/react/zipball/457b6b8a16a37c11278cac0870d6d2ff911c5765", + "reference": "457b6b8a16a37c11278cac0870d6d2ff911c5765", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "react/cache": "0.4.*", + "react/child-process": "0.4.*", + "react/dns": "0.4.*", + "react/event-loop": "0.4.*", + "react/http": "0.4.*", + "react/http-client": "0.4.*", + "react/promise": "~2.1", + "react/socket": "0.4.*", + "react/socket-client": "0.4.*", + "react/stream": "0.4.*" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "ext-event": "Allows for use of a more performant event-loop implementation.", + "ext-libev": "Allows for use of a more performant event-loop implementation.", + "ext-libevent": "Allows for use of a more performant event-loop implementation." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.5-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Nuclear Reactor written in PHP.", + "keywords": [ + "asynchronous", + "event-loop", + "reactor" + ], + "time": "2014-12-11 02:06:55" + }, + { + "name": "react/socket", + "version": "v0.4.3", + "source": { + "type": "git", + "url": "https://github.com/reactphp/socket.git", + "reference": "ce015ec5879b96f5d30905f035f223aa85013fcc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/socket/zipball/ce015ec5879b96f5d30905f035f223aa85013fcc", + "reference": "ce015ec5879b96f5d30905f035f223aa85013fcc", + "shasum": "" + }, + "require": { + "evenement/evenement": "~2.0|~1.0", + "php": ">=5.3.0", + "react/event-loop": "0.4.*|0.3.*", + "react/stream": "0.4.*|0.3.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.4-dev" + } + }, + "autoload": { + "psr-4": { + "React\\Socket\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Library for building an evented socket server.", + "keywords": [ + "Socket" + ], + "time": "2016-03-01 20:10:35" + }, + { + "name": "react/socket-client", + "version": "v0.4.5", + "source": { + "type": "git", + "url": "https://github.com/reactphp/socket-client.git", + "reference": "a25539f2cd30b4be56e35de9f96f6aa744246cc2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/socket-client/zipball/a25539f2cd30b4be56e35de9f96f6aa744246cc2", + "reference": "a25539f2cd30b4be56e35de9f96f6aa744246cc2", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "react/dns": "0.4.*", + "react/event-loop": "0.4.*", + "react/promise": "~2.0", + "react/stream": "0.4.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.4-dev" + } + }, + "autoload": { + "psr-4": { + "React\\SocketClient\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Async connector to open TCP/IP and SSL/TLS based connections.", + "keywords": [ + "Socket" + ], + "time": "2016-03-27 18:31:39" + }, + { + "name": "react/stream", + "version": "v0.4.3", + "source": { + "type": "git", + "url": "https://github.com/reactphp/stream.git", + "reference": "305b2328d2a2e157bc13b61a0f5c6e41b666b188" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/stream/zipball/305b2328d2a2e157bc13b61a0f5c6e41b666b188", + "reference": "305b2328d2a2e157bc13b61a0f5c6e41b666b188", + "shasum": "" + }, + "require": { + "evenement/evenement": "^2.0|^1.0", + "php": ">=5.3.8" + }, + "require-dev": { + "react/event-loop": "^0.4|^0.3", + "react/promise": "^2.0|^1.0" + }, + "suggest": { + "react/event-loop": "^0.4", + "react/promise": "^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.5-dev" + } + }, + "autoload": { + "psr-4": { + "React\\Stream\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Basic readable and writable stream interfaces that support piping.", + "keywords": [ + "pipe", + "stream" + ], + "time": "2015-10-07 18:32:58" + }, + { + "name": "seld/jsonlint", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/jsonlint.git", + "reference": "66834d3e3566bb5798db7294619388786ae99394" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/66834d3e3566bb5798db7294619388786ae99394", + "reference": "66834d3e3566bb5798db7294619388786ae99394", + "shasum": "" + }, + "require": { + "php": "^5.3 || ^7.0" + }, + "bin": [ + "bin/jsonlint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Seld\\JsonLint\\": "src/Seld/JsonLint/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "JSON Linter", + "keywords": [ + "json", + "linter", + "parser", + "validator" + ], + "time": "2015-11-21 02:21:41" + }, + { + "name": "symfony/debug", + "version": "v3.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "c9ed5a44dbc783a352f06b20440863c7463de907" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/c9ed5a44dbc783a352f06b20440863c7463de907", + "reference": "c9ed5a44dbc783a352f06b20440863c7463de907", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, + "require-dev": { + "symfony/class-loader": "~2.8|~3.0", + "symfony/http-kernel": "~2.8|~3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Debug Component", + "homepage": "https://symfony.com", + "time": "2016-05-24 10:06:56" + }, + { + "name": "symfony/expression-language", + "version": "v3.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/expression-language.git", + "reference": "9db6f176064fbd3f5ced4865be60b335b6a12723" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/expression-language/zipball/9db6f176064fbd3f5ced4865be60b335b6a12723", + "reference": "9db6f176064fbd3f5ced4865be60b335b6a12723", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\ExpressionLanguage\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony ExpressionLanguage Component", + "homepage": "https://symfony.com", + "time": "2016-03-10 11:16:56" + }, + { + "name": "symfony/var-dumper", + "version": "v3.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "436195b421e8c0493ca3e390c1fbecd8ee08c546" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/436195b421e8c0493ca3e390c1fbecd8ee08c546", + "reference": "436195b421e8c0493ca3e390c1fbecd8ee08c546", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "twig/twig": "~1.20|~2.0" + }, + "suggest": { + "ext-symfony_debug": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony mechanism for exploring and dumping PHP variables", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "time": "2016-05-24 10:06:56" + } + ], "aliases": [], "minimum-stability": "stable", "stability-flags": { - "dms/meetup-api-client": 20 + "twig/twig": 20, + "monolog/monolog": 20, + "dms/meetup-api-client": 20, + "deployer/deployer": 20 }, "prefer-stable": false, "prefer-lowest": false, diff --git a/composer.phar b/composer.phar deleted file mode 100755 index 2909dbd..0000000 Binary files a/composer.phar and /dev/null differ diff --git a/config.rb b/config.rb deleted file mode 100644 index cfd6bad..0000000 --- a/config.rb +++ /dev/null @@ -1,27 +0,0 @@ -# Require any additional compass plugins here. -require 'susy' - -# Set this to the root of your project when deployed: -http_path = "/" -css_dir = "web/css" -sass_dir = "scss" -images_dir = "img" -http_generated_images_path = "/img/sprites" -generated_images_dir = "web/img/sprites" -javascripts_dir = "javascripts" - -# You can select your preferred output style here (can be overridden via the command line): -# output_style = :expanded or :nested or :compact or :compressed - -# To enable relative paths to assets via compass helper functions. Uncomment: -# relative_assets = true - -# To disable debugging comments that display the original location of your selectors. Uncomment: -# line_comments = false - - -# If you prefer the indented syntax, you might want to regenerate this -# project again passing --syntax sass, or you can uncomment this: -# preferred_syntax = :sass -# and then run: -# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass \ No newline at end of file diff --git a/console b/console deleted file mode 100755 index 978c82e..0000000 --- a/console +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env php -run(); diff --git a/deploy.php b/deploy.php new file mode 100644 index 0000000..155f381 --- /dev/null +++ b/deploy.php @@ -0,0 +1,18 @@ +user('phpamst01') + ->identityFile() + ->env('deploy_path', '/data/www/raffles.amsterdamphp.nl'); + +after('deploy:update_code', 'deploy:shared'); diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..9257423 --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,55 @@ +var gulp = require('gulp'), + plumber = require('gulp-plumber'), + rename = require('gulp-rename'); +var autoprefixer = require('gulp-autoprefixer'); +var concat = require('gulp-concat'); +var uglify = require('gulp-uglify'); +var imagemin = require('gulp-imagemin'), + cache = require('gulp-cache'); +var minifycss = require('gulp-minify-css'); +var sass = require('gulp-sass'); +var sassIncl = require('sass-include-paths'); + +gulp.task('images', function(){ + gulp.src('source/images/**/*') + .pipe(cache(imagemin({ optimizationLevel: 3, progressive: true, interlaced: true }))) + .pipe(gulp.dest('web/img/')); +}); + +gulp.task('styles', function(){ + gulp.src(['source/scss/**/*.scss']) + .pipe(plumber({ + errorHandler: function (error) { + console.log(error.message); + this.emit('end'); + }})) + .pipe(sass({ + includePaths: sassIncl.nodeModulesSync() + })) + .pipe(autoprefixer('last 2 versions')) + .pipe(gulp.dest('web/css/')) + .pipe(rename({suffix: '.min'})) + .pipe(minifycss()) + .pipe(gulp.dest('web/css/')) +}); + +gulp.task('scripts', function(){ + return gulp.src('source/js/**/*.js') + .pipe(plumber({ + errorHandler: function (error) { + console.log(error.message); + this.emit('end'); + }})) + .pipe(concat('main.js')) + .pipe(gulp.dest('web/js/')) + .pipe(rename({suffix: '.min'})) + .pipe(uglify()) + .pipe(gulp.dest('web/js/')) +}); + +gulp.task('default', ['images', 'styles', 'scripts']); + +gulp.task('watch', function(){ + gulp.watch("source/scss/**/*.scss", ['styles']); + gulp.watch("source/js/**/*.js", ['scripts']); +}); diff --git a/package.json b/package.json new file mode 100644 index 0000000..5c51dec --- /dev/null +++ b/package.json @@ -0,0 +1,32 @@ +{ + "name": "AmsterdamPHP-Raffler", + "version": "1.0.0", + "description": "Raffle system for meetup groups", + "main": "gulpfile.js", + "scripts": { + "test": "./node_modules/.bin/mocha" + }, + "author": "AmsterdamPHP", + "license": "MIT", + "devDependencies": { + "chai": "^3.5.0", + "compass-mixins": "^0.12.10", + "gulp": "^3.9", + "gulp-autoprefixer": "^2.1.0", + "gulp-cache": "^0.2.8", + "gulp-concat": "^2.5.2", + "gulp-imagemin": "^2.2.1", + "gulp-minify-css": "^1.0.0", + "gulp-plumber": "^1.0.0", + "gulp-rename": "^1.2.2", + "gulp-sass": "^2.1", + "gulp-uglify": "^1.5", + "jquery-color-animation": "^1.5.1", + "mocha": "^2.5.3", + "mocha-generators": "^1.2.0", + "nightmare": "^2.5.0", + "sass-include-paths": "^4.5.0", + "sass-loader": "^3.2.0", + "susy": "^2.2.12" + } +} diff --git a/web/img/avatar.png b/source/images/avatar.png similarity index 100% rename from web/img/avatar.png rename to source/images/avatar.png diff --git a/web/img/logo.png b/source/images/logo.png similarity index 100% rename from web/img/logo.png rename to source/images/logo.png diff --git a/web/js/raffler.js b/source/js/raffler.js similarity index 100% rename from web/js/raffler.js rename to source/js/raffler.js diff --git a/scss/main.scss b/source/scss/main.scss similarity index 97% rename from scss/main.scss rename to source/scss/main.scss index cb8aa30..47d8379 100644 --- a/scss/main.scss +++ b/source/scss/main.scss @@ -8,7 +8,7 @@ $grid-padding: $gutter-width; @import "compass/css3"; /* other plugins */ -@import "susyone"; +@import "susy"; body { color: #ffffff; @@ -46,7 +46,7 @@ body { } } -@include at-breakpoint(0em 40em) { +@include susy-breakpoint(0em 40em) { .logo { line-height: 60px; @@ -108,6 +108,7 @@ body { background-position: center; background-size: cover; text-align: center; + background-color: #cccccc; .name { display: none; diff --git a/src/Raffle/MeetupService.php b/src/Raffle/MeetupService.php index d718bd2..b11b8b4 100644 --- a/src/Raffle/MeetupService.php +++ b/src/Raffle/MeetupService.php @@ -63,17 +63,27 @@ public function getEvents($bustCache = false) ) ); - // Filter out events further in the future than a day - $dayFromNow = (time() + (24 * 60 * 60)) * 1000; - $events = $events->filter(function($value) use ($dayFromNow) { - return ($value['time'] < $dayFromNow)? true : false; - }); - $this->saveInCache('events_cache', $events); return $events; } + /** + * @param bool $bustCache + * + * @return mixed + */ + public function getPresentAndPastEvents($bustCache = false) + { + $events = $this->getEvents($bustCache); + + // Filter out events further in the future than a day + $dayFromNow = (time() + (24 * 60 * 60)) * 1000; + return $events->filter(function($value) use ($dayFromNow) { + return ($value['time'] < $dayFromNow)? true : false; + }); + } + /** * Get a single event. * diff --git a/src/controllers.php b/src/controllers.php index fa0145d..6282eb0 100644 --- a/src/controllers.php +++ b/src/controllers.php @@ -5,9 +5,6 @@ use Raffle\RandomService; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\JsonResponse; -use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\Routing\Generator\UrlGenerator; // Event index @@ -16,7 +13,7 @@ return $app['twig']->render( 'index.html.twig', - array('meetups' => $app['meetup']->getEvents($cacheBusting)) + array('meetups' => $app['meetup']->getPresentAndPastEvents($cacheBusting)) ); })->bind('homepage'); diff --git a/templates/event.html.twig b/templates/event.html.twig index 4e65dc9..fbc0990 100644 --- a/templates/event.html.twig +++ b/templates/event.html.twig @@ -23,7 +23,7 @@ {% block javascripts %} - +