Class: Deployme::Provider
- Inherits:
-
Object
- Object
- Deployme::Provider
- Extended by:
- Forwardable
- Defined in:
- lib/deployme/provider.rb
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
- #deploy ⇒ Object
- #execute ⇒ Object
-
#initialize(deployment:, config:) ⇒ Provider
constructor
A new instance of Provider.
Constructor Details
#initialize(deployment:, config:) ⇒ Provider
Returns a new instance of Provider.
16 17 18 19 |
# File 'lib/deployme/provider.rb', line 16 def initialize(deployment:, config:) @deployment = deployment @config = config end |
Class Method Details
.all ⇒ Object
12 13 14 |
# File 'lib/deployme/provider.rb', line 12 def self.all Providers.constants.map { |c| Providers.const_get(c) } end |
.defaults ⇒ Object
8 9 10 |
# File 'lib/deployme/provider.rb', line 8 def self.defaults {} end |
Instance Method Details
#deploy ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/deployme/provider.rb', line 21 def deploy deployment.notify(:start) execute deployment.notify(:finish) rescue StandardError => e deployment.notify(:error, e) raise end |
#execute ⇒ Object
32 33 34 |
# File 'lib/deployme/provider.rb', line 32 def execute raise NotImplementedError end |