All hanami contributors in one place
Ruby HTML CSS
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
apps
config Replace container initialization to system folder Feb 14, 2018
db Use latest method, create history repository method for all setting c… Feb 19, 2018
lib
public
spec Privacy policy (GDPR) May 25, 2018
system Replace container initialization to system folder Feb 14, 2018
.env.development.sample Be secure by default by avoiding credentials fallback for admin Feb 7, 2018
.env.test.sample Be secure by default by avoiding credentials fallback for admin Feb 7, 2018
.gitignore Rename env files to sample Oct 9, 2017
.hanami.server.guardfile Add guard puma and disable hanami reloader for production Dec 4, 2017
.hanamirc Initialize new hanami app Mar 13, 2017
.rspec
.travis.yml Fix build on ruby 2.5.1 Apr 15, 2018
Gemfile Update library dependencies Jul 12, 2018
Gemfile.lock
LICENSE.txt Add license to project Apr 3, 2017
Procfile
README.md updated Development part in README Oct 28, 2017
Rakefile Initialize new hanami app Mar 13, 2017
config.ru Remove redundant require Apr 28, 2018

README.md

Hanami contributors

Display all hanami contributors on the one page.

JSON API

GET /api/contributors

{
  "count": Integer,
  "data":[{
    "github": String,
    "avatar_url": String,
    "since": "2017-03-08 09:00:56 UTC",
    "commits_count": Integer
  },
  ...
  ]
}

GET /api/contributors/:github

{
  "status": "ok",
  "contributor": {
    "github": String,
    "avatar_url": String,
    "since": "2017-03-08 09:00:56 UTC",
    "commits": [{
      "url": String,
      "title": String,
      "created_at": "2017-03-08 09:00:56 UTC"
    },
    ...
  }
}

Development

First

Copy .env files

cp .env.development.sample .env.development && cp .env.test.sample .env.test

Second

Create GitHub keys for data aggregation. You can do it here.

After that you need to set GITHUB_API_ID (Client ID) and GITHUB_API_KEY (Client Secret) env variables in # in .env.development file:

# in .env.development
GITHUB_API_ID="<id>"
GITHUB_API_KEY="<key>"

Third

You need to create db table and call all migrations, for this run this commands

bundle exec hanami db prepare

After that, you need to call data aggregation. For this just call db/seed.rb file:

bundle exec ruby db/seed.rb

Attention: this code may be work around 1h (on my local machine). Be sure that you have this time before the start.

License

Check LICENSE.txt file