Skip to content

About

Gobierto data configuration and utilities

Resources

Stars

0 stars

Watchers

4 watching

Forks

Repository files navigation

Gobierto budgets data

Gobierto budgets data is a Ruby gems that contains some classes, constants and helpers to help load data into Gobierto instances.

How to use this gem

Add this line to your Gemfile:

gem "gobierto_budgets_data"

Requirements

You should define the following environment variables in the application:

  • GOBIERTO_S3_BUCKET_NAME: S3 bucket name where files will be uploaded
  • GOBIERTO_AWS_REGION: S3 region name
  • GOBIERTO_AWS_ACCESS_KEY_ID: S3 access key
  • GOBIERTO_AWS_SECRET_ACCESS_KEY: S3 secret key
  • ELASTICSEARCH_URL: Elasticsearch URL
  • ELASTICSEARCH_WRITING_URL: Elasticsearch URL with write enabled

If you want to load Rake tasks you should include this snippet in the Rakefile:

# Load tasks from gobierto_budgets_data
spec = Gem::Specification.find_by_name "gobierto_budgets_data"
load "#{spec.gem_dir}/lib/tasks/data.rake"
load "#{spec.gem_dir}/lib/tasks/budgets_import.rake"
load "#{spec.gem_dir}/lib/tasks/total_budgets_import.rake"
load "#{spec.gem_dir}/lib/tasks/elastic_search_schemas.rake"

Tests

The tests use a local Postgres (database gobierto_budgets_data_test, created when missing, or BUDGETS_TEST_DATABASE) and the Elasticsearch at ELASTICSEARCH_URL (default http://localhost:9200), where they create and delete the indices test-budgets-forecast and test-data.

bundle exec rake test

About

Gobierto data configuration and utilities

Resources

Stars

0 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages