Skip to content
No description, website, or topics provided.
Ruby Dockerfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
config
spec
views
.gitignore
.rspec
.ruby-version
CODE_OF_CONDUCT.md
Dockerfile
Gemfile
Gemfile.lock
LICENSE.txt
Procfile
Readme.md
app.rb
conda.rb
config.ru
docker-compose.yml
feed.rb
feed_once.rb

Readme.md

Conda API

A small service to make it easier for Libraries.io to read data about Conda Packages in different channels.

Essentials

  • Provide a REST interface for list of all names of packages (as json)
  • Provide a REST interface for list of versions for each package (as json)
  • Update info from Specs repo frequently

Extras

Development

Requirements

  • ruby 2.6.3
    • Installing via RVM or rbenv is recommended
  • redis
    • Ubuntu Linux: sudo apt-get install redis-server
    • OS X brew install redis brew services start redis

Local Development

Run bundle install to download all dependencies.

You can run a local server within a container with docker-compose docker-compose up or locally with bundle exec puma.

The server should now be running port 9292. This can be verified by going to http://localhost:9292 and verifying it sends back an 'Hello world' response.

Tests

Run the unit tests using rspec locally or within a built docker container docker build -t librariesio/conda-api . && docker run -it -e PORT=9292 -p 9292:9292 librariesio/conda-api rspec.

Getting the data locally

Run this (looks similar to the feed.rb file), to put the current data from the web into your Redis

$ docker-compose build
$ docker-compose run app ruby feed_once.rb
You can’t perform that action at this time.