Module: Rigup::Base
- Included in:
- DeployBase
- Defined in:
- lib/rigup/base.rb
Instance Method Summary collapse
- #config ⇒ Object
- #context ⇒ Object
- #logger ⇒ Object
- #release_path ⇒ Object
- #shared_path ⇒ Object
- #site_dir ⇒ Object
Instance Method Details
#config ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/rigup/base.rb', line 8 def config unless @config @config = {} if ::File.exists?(f=::File.join(release_path,'rigup.yml')) file_config = ::YAML.load(String.from_file(f)) @config.merge!(file_config) @config = ::Rigup::Config.new(@config) end end @config end |
#context ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/rigup/base.rb', line 20 def context @context ||= ::Rigup::Context.new({ :config => config, :logger => logger, :pwd => ::Dir.pwd }) end |
#logger ⇒ Object
4 5 6 |
# File 'lib/rigup/base.rb', line 4 def logger @logger ||= ::Logger.new(STDOUT) end |
#release_path ⇒ Object
28 29 30 |
# File 'lib/rigup/base.rb', line 28 def release_path @release_path ||= ::File.('.') end |
#shared_path ⇒ Object
36 37 38 |
# File 'lib/rigup/base.rb', line 36 def shared_path @shared_path ||= ::File.('shared',site_dir) end |
#site_dir ⇒ Object
32 33 34 |
# File 'lib/rigup/base.rb', line 32 def site_dir @site_dir ||= ::File.('../..',release_path) end |