πŸ“š The Open Source Discovery Service
Ruby HTML CSS JavaScript
Latest commit 6b3e07c Dec 28, 2016 @andrew andrew committed on GitHub Rename Repositories namespace to PackageManager (#1018)
* Rename Repositories namespace to PackageManager

* Renamed RepositoryDownloadWorker to PackageManagerDownloadWorker
Permalink
Failed to load latest commit information.
app Rename Repositories namespace to PackageManager (#1018) Dec 28, 2016
bin Rails 5 take 4 (#860) Nov 4, 2016
config Rename Repositories namespace to PackageManager (#1018) Dec 28, 2016
db Rename org description field to bio (#990) Dec 13, 2016
lib Rename Repositories namespace to PackageManager (#1018) Dec 28, 2016
log hello world Sep 30, 2014
public Update gemoji, fixes #1010 Dec 21, 2016
spec Rename Repositories namespace to PackageManager (#1018) Dec 28, 2016
vendor/assets Vendored tipsy assets and removed redundant sass-rails gem Mar 22, 2016
.codeclimate.yml Add codeclimate config Oct 24, 2016
.csslintrc Add codeclimate config Oct 24, 2016
.eslintignore Add codeclimate config Oct 24, 2016
.eslintrc Add codeclimate config Oct 24, 2016
.gitignore Ignore all kinds of log files Nov 19, 2016
.rspec Test setup Mar 6, 2016
.rubocop.yml Add codeclimate config Oct 24, 2016
.ruby-version Ruby 2.3.3, fixes #898 Dec 21, 2016
Brewfile Add Brewfile Mar 23, 2016
CODE_OF_CONDUCT.md Added code of conduct Mar 6, 2016
CONTRIBUTING.md small fix in contributing guide (#981) Dec 8, 2016
Capfile Update capistrano to 3.7.0, fixes #985 Dec 12, 2016
Dockerfile Ruby 2.3.3, fixes #898 Dec 21, 2016
Gemfile Generate sitemaps in parallel, fixes #986 (#1013) Dec 28, 2016
Gemfile.lock Generate sitemaps in parallel, fixes #986 (#1013) Dec 28, 2016
LICENSE.txt Added AGPL-3.0 license Mar 6, 2016
Procfile Add sidekiq config May 9, 2015
README.md Rename Repositories namespace to PackageManager (#1018) Dec 28, 2016
Rakefile emoji.rake doesnt exist anymore Dec 22, 2016
circle.yml Remove coveralls Nov 4, 2016
config.ru remove Rack::Deflater for now Jul 19, 2016
docker-compose.yml Initial dockerization Dec 25, 2015

README.md

Libraries.io πŸ“š

Build Status Slack chat Code Climate Test Coverage

Libraries.io helps developers find new open source libraries, modules and frameworks and keep track of ones they depend upon.

Contributors

Over 20 different people have contributed to the project, you can see them all here: https://github.com/librariesio/libraries.io/graphs/contributors

Development

Source hosted at GitHub. Report issues/feature requests on GitHub Issues. Follow us on Twitter @librariesio. We also hangout on Slack.

Getting Started

New to Ruby? No worries! You can follow these instructions to install a local server, or you can use the included Vagrant setup.

Installing a Local Server

First things first, you'll need to install Ruby 2.3.3. I recommend using the excellent rbenv, and ruby-build

brew install rbenv ruby-build
rbenv install 2.3.3
rbenv global 2.3.3

Next, you'll need to make sure that you have PostgreSQL installed. This can be done easily on OSX using Homebrew or by using http://postgresapp.com. Please see these further instructions for installing Postgres via Homebrew.

brew install postgres phantomjs elasticsearch

On Debian-based Linux distributions you can use apt-get to install Postgres:

sudo apt-get install postgresql postgresql-contrib libpq-dev

Now, let's install the gems from the Gemfile ("Gems" are synonymous with libraries in other languages).

gem install bundler && rbenv rehash
bundle install

Once all the gems are installed, we'll need to create the databases and tables. Rails makes this easy through the use of "Rake" tasks.

bundle exec rake db:create:all
bundle exec rake db:migrate

Go create a Personal access token on GitHub, then we can download some sample data:

 rails c
 irb> AuthToken.new(token: "<secure github token here>").save
 irb> PackageManager::NPM.update "pictogram"
 irb> PackageManager::Rubygems.update "split"
 irb> PackageManager::Bower.update "sbteclipse"

You can then index that data into elasticsearch with the following rake task:

rake projects:reindex github:reindex_repos github:reindex_issues

If you are working on anything related to the email-generation code, you can use MailCatcher. Since we use Bundler, please read the following before using MailCatcher.

Almost there! Now all we have to do is start up the Rails server and point our browser to http://localhost:3000

bundle exec rails s

Tests

Standard RSpec/Capybara tests are used for testing the application. The tests can be run with bundle exec rake.

You can set up the test environment with bundle exec rake db:test:prepare, which will create the test DB and populate its schema automatically. You don't need to do this for every test run, but it will let you easily keep up with migrations. If you find a large number of tests are failing you should probably run this.

If you are using the omniauth environment variables (GITHUB_KEY, GITHUB_SECRET etc) for another project, you will need to either

  • unset them before running your tests or
  • reset the omniauth environment variables after creating a GitHub (omniauth) application for this project

as it will use it to learn more about the developers and for pull requests.

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so we don't break it in a future version unintentionally.
  • Send a pull request. Bonus points for topic branches.

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Copyright

Copyright (c) 2016 Andrew Nesbitt. See LICENSE for details.