Skip to content

jh222xk/pophub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PopHub

Follow the most popular users on Github.

Build Status

Coverage Status

The application is published here.

Documentation

Read below for some documentation, there are more documentation here as well.

Limitations

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

Dependencies

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.

Local version

Keep in mind

Keep in mind that the login WONT work without a valid GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET.

Install dependencies

First of get composer

Then run composer install and all the dependencies will be installed.

Windows

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().

Ubuntu

There's a great guide on how you setup memcached here.

If you can't install memcached for some reason

If you can't install memcached there's a branch for you without it here.

Database

Settings

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 =>

Create table using pop command

Windows

Run the command line script located at path/to/pophub called pop.

Run it like this: php pop create

Linux/OSX

First of, set chmod +x on the script located at path/to/pophub called pop.

Then run it like this: php pop create

Create table manually

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);

Run the application

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.

Tests

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/

Run 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/

Test/Code coverage

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.

Travis

Continuous Integration using Travis CI can be found at https://travis-ci.org/jh222xk/pophub

Coveralls

Code coverage using Coveralls can be found at https://coveralls.io/r/jh222xk/pophub

About

Follow the most popular users on Github

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published