TLDR; Getting Started With Bundler
This page will explain on how to get started with Legion via Bundler. If you just want to install the gem and skip bundler, go to this TLDR
Instructions
Installation, running basics
git clone https://bitbucket.org/legion-io/legion.git
cd legion
bundle update
bundle exec exe/legion
Control+C to exit
Installing a LEX
Edit
Gemfile
to add in the lex(s) you wantAdd a line like this
gem 'lex-http'
Repeat for each LEX you want to install
Run
bundle update
Configuring Legion
Legion will look in the following paths, in this order and stop when it finds a valid directory
/etc/legionio
"#{ENV['home']}/legionio"
~/legionio
./settings
./
Legion will then load all .json files and merge them into
Legion::Settings
(see examples below)If Legion is running, you will need to stop and start it to have the new settings take affect
LEX Settings can be added to the json configs directly, example LEX::Pushover requires the token setting so you can do this
{”extensions”:{”pushover”:{”token”:”abc”}}}
Config Examples
When using Bundler, LEXs will not be installed automatically. If you run the legion
command after installing the legion gem, it will automatically install the gems needed on start. This is a major difference between using bundler and using the gem directly