Class: BeamUp::Core
- Inherits:
-
Object
- Object
- BeamUp::Core
- Defined in:
- lib/beam_up/core.rb
Class Method Summary collapse
- .configuration ⇒ Object
- .configure {|configuration| ... } ⇒ Object
- .deploy!(path = nil, provider: nil) ⇒ Object
Class Method Details
.configuration ⇒ Object
12 13 14 |
# File 'lib/beam_up/core.rb', line 12 def configuration @configuration ||= configuration_file || raise(ConfigurationError, "No .beam_up.yml found. Run `beam_up init PROVIDER` to create one.") end |
.configure {|configuration| ... } ⇒ Object
8 9 10 |
# File 'lib/beam_up/core.rb', line 8 def configure yield(configuration) end |
.deploy!(path = nil, provider: nil) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/beam_up/core.rb', line 16 def deploy!(path = nil, provider: nil) config = configuration_file config.provider = provider if provider deploy_path = path || config.path || raise(ConfigurationError, "No path specified") config.validate! execute! config.before_actions provider_class = PROVIDERS[config.provider.to_s] || raise(ConfigurationError, "Unknown provider: #{config.provider}") result = provider_class.new(config.provider_config).deploy! deploy_path execute! config.after_actions result end |