Class: Capistrano::Configuration Private
- Inherits:
-
Object
- Object
- Capistrano::Configuration
- Defined in:
- lib/torquebox/capistrano/recipes.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
Instance Method Details
#create_deployment_descriptor(root) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/torquebox/capistrano/recipes.rb', line 23 def create_deployment_descriptor( root ) dd = { 'application'=>{ # Force the encoding to UTF-8 on 1.9 since the value may be ASCII-8BIT, which marshals as an encoded bytestream, not a String. 'root'=>"#{root.respond_to?(:force_encoding) ? root.force_encoding('UTF-8') : root}", }, } if ( exists?( :app_host ) ) dd['web'] ||= {} dd['web']['host'] = app_host end if ( exists?( :app_context ) ) dd['web'] ||= {} dd['web']['context'] = app_context end if ( exists?( :app_ruby_version ) ) dd['ruby'] ||= {} dd['ruby']['version'] = app_ruby_version end if ( exists?( :app_environment ) && ! app_environment.empty? ) dd['environment'] = app_environment end if ( exists?( :rails_env ) ) dd['environment'] ||= {} dd['environment']['RAILS_ENV'] = rails_env end if (exists?( :stomp_host ) ) dd['stomp'] ||= {} dd['stomp']['host'] = stomp_host end dd end |