Gobierto budgets data is a Ruby gems that contains some classes, constants and helpers to help load data into Gobierto instances.
Add this line to your Gemfile
:
gem "gobierto_budgets_data"
You should define the following environment variables in the application:
GOBIERTO_S3_BUCKET_NAME
: S3 bucket name where files will be uploadedGOBIERTO_AWS_REGION
: S3 region nameGOBIERTO_AWS_ACCESS_KEY_ID
: S3 access keyGOBIERTO_AWS_SECRET_ACCESS_KEY
: S3 secret keyELASTICSEARCH_URL
: Elasticsearch URLELASTICSEARCH_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/elastic_search_schemas.rake"