Class: Constancy

Inherits:
Object
  • Object
show all
Defined in:
lib/constancy/diff.rb,
lib/constancy.rb,
lib/constancy/cli.rb,
lib/constancy/config.rb,
lib/constancy/version.rb,
lib/constancy/sync_target.rb,
lib/constancy/token_source.rb,
lib/constancy/cli/pull_command.rb,
lib/constancy/cli/push_command.rb,
lib/constancy/cli/check_command.rb,
lib/constancy/cli/config_command.rb,
lib/constancy/cli/targets_command.rb

Overview

This software is public domain. No rights are reserved. See LICENSE for more information.

Defined Under Namespace

Classes: CLI, Config, ConfigFileInvalid, ConfigFileNotFound, ConsulTokenRequired, Diff, EnvTokenSource, InternalError, PassiveTokenSource, SyncTarget, Util, VaultConfigInvalid, VaultTokenSource

Constant Summary collapse

VERSION =
"0.5.0"
@@config =
nil

Class Method Summary collapse

Class Method Details

.configObject



22
23
24
# File 'lib/constancy.rb', line 22

def config
  @@config ||= Constancy::Config.new
end

.configure(path: nil, targets: nil, call_external_apis: true) ⇒ Object



26
27
28
# File 'lib/constancy.rb', line 26

def configure(path: nil, targets: nil, call_external_apis: true)
  @@config = Constancy::Config.new(path: path, targets: targets, call_external_apis: call_external_apis)
end

.configured?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/constancy.rb', line 30

def configured?
  not @@config.nil?
end