All Projects → xmisao → Bestgems.org

xmisao / Bestgems.org

Licence: agpl-3.0
Gem ranking and downloads trends providing service.

Programming Languages

ruby
36898 projects - #4 most used programming language

Labels

Projects that are alternatives of or similar to Bestgems.org

One
The open source Cloud & Edge Computing Platform bringing real freedom to your Enterprise Cloud 🚀
Stars: ✭ 725 (+763.1%)
Mutual labels:  rubygems
Drafting
Ruby gem for saving drafts of ActiveRecord models
Stars: ✭ 41 (-51.19%)
Mutual labels:  rubygems
Svgeez
A Ruby gem for automatically generating an SVG sprite from a folder of SVG icons.
Stars: ✭ 69 (-17.86%)
Mutual labels:  rubygems
Rails Settings
Manage settings with Ruby on Rails
Stars: ✭ 807 (+860.71%)
Mutual labels:  rubygems
Kitchen Terraform
Test Kitchen plugins for testing Terraform configurations
Stars: ✭ 963 (+1046.43%)
Mutual labels:  rubygems
Appraisal
A Ruby library for testing your library against different versions of dependencies.
Stars: ✭ 1,075 (+1179.76%)
Mutual labels:  rubygems
Unread
Handle unread records and mark them as read with Ruby on Rails
Stars: ✭ 638 (+659.52%)
Mutual labels:  rubygems
Enseada
A Cloud native multi-package registry
Stars: ✭ 80 (-4.76%)
Mutual labels:  rubygems
Datev
Ruby gem for DATEV exports via CSV
Stars: ✭ 33 (-60.71%)
Mutual labels:  rubygems
Ruby Statistics
Ruby gem for some statistical operations without any statistical language dependency
Stars: ✭ 67 (-20.24%)
Mutual labels:  rubygems
Leaky Gems
A list of Ruby gems that have known memory leaks (and issues)
Stars: ✭ 895 (+965.48%)
Mutual labels:  rubygems
Api schema
DSL for describing APIs and generate swagger json
Stars: ✭ 18 (-78.57%)
Mutual labels:  rubygems
Webmention Client Ruby
A Ruby gem for sending Webmention notifications.
Stars: ✭ 60 (-28.57%)
Mutual labels:  rubygems
Materialize Sass
Materializecss rubygem for Rails Asset Pipeline / Sprockets
Stars: ✭ 785 (+834.52%)
Mutual labels:  rubygems
Tabler Rubygem
Rubygem for https://tabler.github.io
Stars: ✭ 77 (-8.33%)
Mutual labels:  rubygems
Gemstash
A RubyGems.org cache and private gem server
Stars: ✭ 638 (+659.52%)
Mutual labels:  rubygems
Hanami Webpack
A RubyGem to allow you to use the Webpack as your asset pipeline in Hanami.
Stars: ✭ 50 (-40.48%)
Mutual labels:  rubygems
Pluck all
A more efficient way to get data from database. Like #pluck method but return array of hashes instead.
Stars: ✭ 83 (-1.19%)
Mutual labels:  rubygems
Karafka
Framework for Apache Kafka based Ruby and Rails applications development.
Stars: ✭ 1,223 (+1355.95%)
Mutual labels:  rubygems
Whatthegem
Ruby gem information, stats and usage for your terminal
Stars: ✭ 63 (-25%)
Mutual labels:  rubygems

BestGems.org

Ruby gems downloads ranking site.

Hosted on http://bestgems.org/.

For developers

System requirements

  • UNIX like operating system. (Debian or Ubuntu are recommended)
  • Ruby 2.4+
  • Middleware
    • PostgreSQL 9.6
  • Libraries
    • libleveldb-dev
  • Docker (Recommended)

Examples

Libraries installation on Debian or Ubuntu

sudo apt-get install libleveldb-dev

PostgreSQL installation from Docker

docker run \
  -d \
  --name bestgems-pg \
  -p 5432:5432 \
  -e POSTGRES_USER=bestgems \
  -e POSTGRES_PASSWORD=bestgems \
  postgres:9.6-alpine

Get the source

Clone this repository.

git clone [email protected]:xmisao/bestgems.org.git
cd bestgems.org

Install gems

Execute bundle install.

bundle install --path vendor/bundle

Configure environment variable

Export environment variables.

export RACK_ENV=production
export APP_ENV=production
export BESTGEMS_DB_HOST=127.0.0.1
export BESTGEMS_DB_USER=bestgems
export BESTGEMS_DB_PASSWORD=bestgems
export BESTGEMS_DB_NAME=bestgems
export BESTGEMS_LEVELDB_DIR=db/trends
export BESTGEMS_API_KEY=dummy_token

Execute migration

Execute migration.

bundle exec rake db:migration

Import data

Step 1. Import dummy data

Import sample data.

bundle exec rake dev:import_sample

Step 2. Import categories data

Import categories data.

bundle exec ruby tools/import_categories.rb tools/data/initial_categories.csv

Step 3. Import additional data

Start servers

Start servers. The following command starts two processes that the application server and the trend server.

bin/start
NOTE:

The application server is BestGems.org main process which is implemented using Sinatra. Trend server is BestGems.org subprocess which is LevelDB wrapper using dRuby. BestGems.org requires those processes are running correctly.

Import data from RubyGems.org

Import additional data from RubyGems.org. Execute the following on another console.

bundle exec ruby tools/import_gem_detail.rb http://127.0.0.1:9292/api dummy_token

Finish!

Open http://localhost:9292/ in your browser.

Testing

Running test will destroy PostgreSQL data and LevelDB data. We recommend to prepare isolated environment by following steps.

Step 1. Configure testing environment variables

export RACK_ENV=production
export APP_ENV=production
export BESTGEMS_DB_HOST=127.0.0.1
export BESTGEMS_DB_USER=bestgems
export BESTGEMS_DB_PASSWORD=bestgems
export BESTGEMS_DB_NAME=bestgems-test # Important!
export BESTGEMS_LEVELDB_DIR=db/trends-test # Important!
export BESTGEMS_API_KEY=dummy_token

Step 2. Create testing database

PGPASSWORD=bestgems psql -U bestgems -h 127.0.0.1 -c 'CREATE DATABASE "bestgems-test";'
bundle exec rake db:migration

Step 3. Run test

bundle exec rake test

Format the source

Format the source by rufo.

bundle exec rake format

Build status

Build Status

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].