Sha256: 99d87a63d26a9e62d401ed6101716de74949d17f31a1f89721365b3329edb160
Contents?: true
Size: 1.28 KB
Versions: 5
Compression:
Stored size: 1.28 KB
Contents
# Lux::Config - Config loader helpers Methods for config and pluin loading. ## Lux::Config::Plugins * loads plugins in selected namespace, default namespace :main * gets plugins in selected namespace ```ruby Lux.plugin name_or_folder Lux.plugin name: :foo, folder: '/.../...', namespace: [:main, :admin] Lux.plugin name: :bar Luxp.lugin.folders :admin # => [:foo] Luxp.lugin.folders # => [:foo, :bar] ``` ## Lux::Config::Secrets Similar to rails 5.1+, we can encode secrets for easy config. * using JWT HS512 * create and write sectes in YAML format in `./tmp/secrets.yaml` * run `lux secrets` to compile secretes to `./config/secrets.txt` * use "shared" hash for shared secrets * sectets are available in app via `Lux.secrets`, as struct object ### lux secrets * compiles unencoded sectes from `./tmp/secrets.yaml` to `./config/secrets.txt` * creates editable file `./tmp/secrets.yaml` from `./config/secrets.txt` if one exists * shows available secrets for current environment ### Example Env development Secrets file `./tmp/secrets.yaml` ``` shared: x: s b: c: nested production: a: p development: a: d ``` `lux secrets` - will compile secrets or create template if needed `lux c` - console ```ruby Lux.secrets.a == "d" Lux.secrets.x == "s" Lux.secrets.b.c == "nested" ```
Version data entries
5 entries across 5 versions & 1 rubygems