class

Cjules::Config

Inherits Reference < Object

Constants

ALIAS_RE = /\A[A-Za-z0-9._-]+\z/
DEFAULT_BASE = "https://jules.googleapis.com"

Constructors

load
Source
new(api_base : String = DEFAULT_BASE, default_repo : String | Nil = nil, default_branch : String | Nil = nil, slack_webhook : String | Nil = nil, discord_webhook : String | Nil = nil, current : String | Nil = nil, accounts : Hash(String, String) = {} of String => String)
Source

Class methods

format_account_line(alias_name : String, key : String, active : Bool) : String
Source
mask(key : String) : String
Source
path
Source
valid_alias?(name : String) : Bool
Source

Instance methods

accounts
Source
accounts=(accounts : Hash(String, String))
Source
active_alias

Whichever alias is "active" right now (env wins over disk).

Source
alias_for_key(key : String, except : String | Nil = nil) : String | Nil

Find an existing alias holding this exact key (excluding self).

Source
api_base
Source
api_base=(api_base : String)
Source
api_key

Active key, considering env override > current account.

Source
current
Source
current=(current : String | Nil)
Source
default_branch
Source
default_branch=(default_branch : String | Nil)
Source
default_repo
Source
default_repo=(default_repo : String | Nil)
Source
discord_webhook
Source
discord_webhook=(discord_webhook : String | Nil)
Source
env_account_override?
Source
remove_account(alias_name : String) : Bool
Source
require_api_key!
Source
save
Source
slack_webhook
Source
slack_webhook=(slack_webhook : String | Nil)
Source