Class: Eien::CLI::Deploy
Instance Method Summary collapse
Methods inherited from CLI
Instance Method Details
#apply ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/eien/cli/deploy.rb', line 33 def apply rescue_and_exit do context = ::Eien.context_or_default([:context]) app = ::Eien.app_or_default([:app]) require_context!(context) require_app!(app) ::Eien::Deploy::ApplyTask.new( context, app, ).run! end end |
#generate ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/eien/cli/deploy.rb', line 11 def generate rescue_and_exit do context = ::Eien.context_or_default([:context]) app = ::Eien.app_or_default([:app]) require_context!(context) require_app!(app) resources = ::Eien::Deploy::GenerateTask.new( context, app, ).run! puts resources .map(&:to_h) .map(&:deep_stringify_keys) .map(&:to_yaml) .join("\n") end end |