module Orchestrate::Rails::UserGuide::TheBasics

orchestrate-rails - the basics

Orchestrate.io information

Orchestrate.io offers a free developer tier.

The configuration file

The configuration file is a JSON file that is used to set up the orchestrate.io client during rails initialization. The template is shown below.

{
  "base_url":"https://api.orchestrate.io/v0",
  "user":"put-api-key-from-orchestrate.io-here",
  "verbose":"true"
}

Setting verbose to true prints each HTTP request line to the standard output.

The configuration file may reside anywhere that makes sense, for example:

<rails-root>/lib/orchestrate_config.json

Orchestrate::Application::Connect.config is used to pass the config file location to orchestrate-rails. Rails provides for a number of ways to do this; one is to make the call during initialization by adding the following line to <rails-root>/config/application.rb:

Orchestrate::Application::Connect.config "./lib/orchestrate_config.json"

The Gemfile

# Orchestrate.io gems depend on httparty
gem "orchestrate-api"
gem "orchestrate-rails"

Next

Properties, attributes and the schema