Class: Kraaken::Config
- Inherits:
-
Object
- Object
- Kraaken::Config
- Defined in:
- lib/kraaken/config.rb
Instance Method Summary collapse
- #cloud ⇒ Object
- #credentials ⇒ Object
- #ingress ⇒ Object
- #load_template(name, **locals) ⇒ Object
- #logger ⇒ Object
- #ssh ⇒ Object
Instance Method Details
#cloud ⇒ Object
8 9 10 |
# File 'lib/kraaken/config.rb', line 8 def cloud @cloud ||= Kraaken::Cloud::Hetzner.new(config: self) end |
#credentials ⇒ Object
4 5 6 |
# File 'lib/kraaken/config.rb', line 4 def credentials @credentials ||= Kraaken::Credentials::OnePassword.new end |
#ingress ⇒ Object
16 17 18 |
# File 'lib/kraaken/config.rb', line 16 def ingress @ingress ||= Kraaken::Cloudflare.new(config: self) end |
#load_template(name, **locals) ⇒ Object
24 25 26 27 28 |
# File 'lib/kraaken/config.rb', line 24 def load_template(name, **locals) locals[:config] = self name = File.("../config/#{name}", __dir__) unless name.start_with?("/") ERB.new(File.read(name)).result_with_hash(locals) end |