Class: Zanzibar::Actions::Bundle
- Defined in:
- lib/zanzibar/actions/bundle.rb
Overview
Download or verify the secrets in a Zanzifile
Instance Attribute Summary collapse
-
#local_secrets ⇒ Object
The resolved secrets from the Zanzifile.resolved.
-
#remote_secrets ⇒ Object
The unresolved secrets from the Zanzifile.
-
#settings ⇒ Object
The settings defined in the Zanzifile.
-
#update ⇒ Object
Whether to disregard local secrets and re-download regardness.
-
#zanzibar ⇒ Object
writeonly
Our Zanzibar client.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(ui, options, args = {}) ⇒ Bundle
constructor
An action that will fetch secrets defined in a Zanzifile.
-
#run ⇒ Object
Coordinate downloading to secrets (or skipping ones we already have).
Constructor Details
#initialize(ui, options, args = {}) ⇒ Bundle
An action that will fetch secrets defined in a Zanzifile
31 32 33 34 |
# File 'lib/zanzibar/actions/bundle.rb', line 31 def initialize(ui, , args = {}) super(ui, ) @update = args[:update] end |
Instance Attribute Details
#local_secrets ⇒ Object
The resolved secrets from the Zanzifile.resolved
19 20 21 |
# File 'lib/zanzibar/actions/bundle.rb', line 19 def local_secrets @local_secrets end |
#remote_secrets ⇒ Object
The unresolved secrets from the Zanzifile
15 16 17 |
# File 'lib/zanzibar/actions/bundle.rb', line 15 def remote_secrets @remote_secrets end |
#settings ⇒ Object
The settings defined in the Zanzifile
11 12 13 |
# File 'lib/zanzibar/actions/bundle.rb', line 11 def settings @settings end |
#update ⇒ Object
Whether to disregard local secrets and re-download regardness
23 24 25 |
# File 'lib/zanzibar/actions/bundle.rb', line 23 def update @update end |
#zanzibar=(value) ⇒ Object
Our Zanzibar client
27 28 29 |
# File 'lib/zanzibar/actions/bundle.rb', line 27 def (value) = value end |
Instance Method Details
#run ⇒ Object
Coordinate downloading to secrets (or skipping ones we already have)
38 39 40 41 42 43 44 45 46 |
# File 'lib/zanzibar/actions/bundle.rb', line 38 def run ensure_zanzifile load_required_secrets ensure_secrets_path validate_environment load_resolved_secrets if resolved_file? validate_local_secrets unless @update run! end |