Skip to content

IIC2113-2015-2-Grupo1/news-getter

Repository files navigation

News-Getter

Build Status Code Climate Codacy Badge

Make sure you have Ruby 2.2.3 installed.

Local

Setup

Install bundler and Nokogiri:

$ gem install --no-ri --no-rdoc bundler
$ gem install --no-ri --no-rdoc nokogiri

# if using rbenv
$ rbenv rehash

Install gems:

$ bundle install

Create Postgres database:

CREATE DATABASE "news-getter";

Run

$ rackup --host 0.0.0.0 -p 5000

# Available on:
# http://localhost:5000/

Test

$ rspec

Deploy

You need a Postgres container running on port 5432 with host named db.

$ export APP_ENV="PRODUCTION"

Metric_FU

$ rake metrics:all

Development with Docker

# Build
$ docker build --no-cache --rm --tag=news-getter .

# Run
$ docker run --publish 5000:5000 --rm --name=news-getter news-getter