Follow the most popular users on Github.
The application is published here.
Read below for some documentation, there are more documentation here as well.
GitHub's API has some limitations, you can read more at https://developer.github.com/v3/search/#about-the-search-api and https://developer.github.com/v3/search/#rate-limit
PHP Version 5.4, 5.5, 5.6
Check composer.json for dependencies needed.
Those components in composer.json
certainly has some dependencies as well. (Hopefully those will be installed without problems).
If composer install
fails it may depend on the --dev specific dependencies.
They use cURL so enable it or skip those dependencies running
composer install --no-dev
instead.
KEEP IN MIND if you run using composer install --no-dev
you cannot
run tests.
Memcached and MySQL is a dependency as well.
Keep in mind that the login WONT work without a valid GITHUB_CLIENT_ID
and GITHUB_CLIENT_SECRET
.
First of get composer
Then run composer install
and all the dependencies will be installed.
Windows can have trouble setting up memcached...
First of all you need memcached for windows, there's a guide here. In the section "Installing PHP Extension" get a file here instead, and choose your php version.
If you can't get memcached (Notice the d at the end). but can install
memcache you will need to change the line here
from new \Memcached()
to new \Memcache()
.
There's a great guide on how you setup memcached here.
If you can't install memcached there's a branch for you without it here.
Set up a database with the name specified in path/to/pophub/app/config/app.php
in DB_CONNECTION =>
, a database username in DB_USER =>
and a database password
in DB_PASSWORD =>
Run the command line script located at path/to/pophub
called pop
.
Run it like this: php pop create
First of, set chmod +x
on the script located at path/to/pophub
called pop
.
Then run it like this: php pop create
Here is the table needed.
CREATE TABLE followers (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
user VARCHAR(255) NOT NULL,
owner VARCHAR(255) NOT NULL,
created_at DATETIME NOT NULL);
Locate to path/to/pophub/app/
then just run PHP's built-in server using the command: php -S localhost:9999
and the application will be served.
The tests for the main applicaiton are located at path/to/pophub/app/tests/
Tests for "helpers" are located at path/to/pophub/kagu/tests/
To run the tests just locate to path/to/pophub/
and type vendor/bin/phpunit app/tests/
and for the "helpers" type vendor/bin/phpunit kagu/tests/
To get code coverage simply locate to path/to/pophub/
and type vendor/bin/phpunit --coverage-html ./report app/tests/
and PHPUnit will generate a report for you.
Continuous Integration using Travis CI can be found at https://travis-ci.org/jh222xk/pophub
Code coverage using Coveralls can be found at https://coveralls.io/r/jh222xk/pophub