Module: Chamber

Defined in:
lib/chamber/file.rb,
lib/chamber.rb,
lib/chamber/version.rb,
lib/chamber/file_set.rb,
lib/chamber/instance.rb,
lib/chamber/key_pair.rb,
lib/chamber/settings.rb,
lib/chamber/keys/base.rb,
lib/chamber/binary/runner.rb,
lib/chamber/commands/base.rb,
lib/chamber/commands/show.rb,
lib/chamber/commands/sign.rb,
lib/chamber/configuration.rb,
lib/chamber/namespace_set.rb,
lib/chamber/types/secured.rb,
lib/chamber/commands/files.rb,
lib/chamber/commands/secure.rb,
lib/chamber/commands/travis.rb,
lib/chamber/commands/verify.rb,
lib/chamber/files/signature.rb,
lib/chamber/keys/decryption.rb,
lib/chamber/keys/encryption.rb,
lib/chamber/commands/compare.rb,
lib/chamber/context_resolver.rb,
lib/chamber/refinements/hash.rb,
lib/chamber/commands/unsecure.rb,
lib/chamber/commands/securable.rb,
lib/chamber/integrations/rails.rb,
lib/chamber/commands/comparable.rb,
lib/chamber/commands/initialize.rb,
lib/chamber/errors/missing_index.rb,
lib/chamber/integrations/sinatra.rb,
lib/chamber/refinements/deep_dup.rb,
lib/chamber/filters/secure_filter.rb,
lib/chamber/encryption_methods/ssl.rb,
lib/chamber/errors/missing_setting.rb,
lib/chamber/refinements/enumerable.rb,
lib/chamber/encryption_methods/none.rb,
lib/chamber/errors/disallowed_class.rb,
lib/chamber/errors/invalid_key_type.rb,
lib/chamber/filters/insecure_filter.rb,
lib/chamber/filters/namespace_filter.rb,
lib/chamber/errors/decryption_failure.rb,
lib/chamber/errors/non_conforming_key.rb,
lib/chamber/filters/decryption_filter.rb,
lib/chamber/filters/encryption_filter.rb,
lib/chamber/filters/environment_filter.rb,
lib/chamber/encryption_methods/public_key.rb,
lib/chamber/errors/environment_conversion.rb,
lib/chamber/filters/failed_decryption_filter.rb,
lib/chamber/filters/translate_secure_keys_filter.rb

Overview

Internal: Respresents a set of namespaces which will be processed by Chamber at various stages when settings are loaded.

The main function that this class provides is the ability to create a NamespaceSet from either an array-like or hash-like object and the ability to allow callables to be passed which will then be executed.

Defined Under Namespace

Modules: Binary, Commands, EncryptionMethods, Errors, Files, Filters, Integrations, Keys, Refinements, Types Classes: Configuration, ContextResolver, File, FileSet, Instance, KeyPair, NamespaceSet, Settings

Constant Summary collapse

VERSION =
'3.1.1'

Class Method Summary collapse

Class Method Details

.[](key) ⇒ Object



18
19
20
# File 'lib/chamber.rb', line 18

def [](key)
  instance.[](key)
end

.configurationObject



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

def configuration
  instance.configuration
end

.decrypt(value, **args) ⇒ Object



34
35
36
# File 'lib/chamber.rb', line 34

def decrypt(value, **args)
  instance.decrypt(value, **args)
end

.dig(*args) ⇒ Object



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

def dig(*args)
  instance.dig(*args)
end

.dig!(*args) ⇒ Object



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

def dig!(*args)
  instance.dig!(*args)
end

.encrypt(value, **args) ⇒ Object



38
39
40
# File 'lib/chamber.rb', line 38

def encrypt(value, **args)
  instance.encrypt(value, **args)
end

.filenamesObject



46
47
48
# File 'lib/chamber.rb', line 46

def filenames
  instance.filenames
end

.filesObject



42
43
44
# File 'lib/chamber.rb', line 42

def files
  instance.files
end

.instanceObject



14
15
16
# File 'lib/chamber.rb', line 14

def instance
  @instance ||= Instance.new
end

.instance=(value) ⇒ Object

Sets the attribute instance

Parameters:

  • value

    the value to set the attribute instance to.



8
9
10
# File 'lib/chamber.rb', line 8

def instance=(value)
  @instance = value
end

.load(**args) ⇒ Object



10
11
12
# File 'lib/chamber.rb', line 10

def load(**args)
  self.instance = Instance.new(**args)
end

.namespacesObject



50
51
52
# File 'lib/chamber.rb', line 50

def namespaces
  instance.namespaces
end

.respond_to_missing?Object

.secureObject



54
55
56
# File 'lib/chamber.rb', line 54

def secure
  instance.secure
end

.signObject



58
59
60
# File 'lib/chamber.rb', line 58

def sign
  instance.sign
end

.to_environmentObject



66
67
68
# File 'lib/chamber.rb', line 66

def to_environment
  instance.to_environment
end

.to_hashObject



70
71
72
# File 'lib/chamber.rb', line 70

def to_hash
  instance.to_hash
end

.to_s(**args) ⇒ Object



74
75
76
77
78
# File 'lib/chamber.rb', line 74

def to_s(**args)
  return '' unless @instance

  instance.to_s(**args)
end

.verifyObject



62
63
64
# File 'lib/chamber.rb', line 62

def verify
  instance.verify
end