JezK
Edit File: page-MergeDirConfig_cpp_cxxcodebuilder.ri
U:RDoc::TopLevel[ i I"9src/apache2_module/MergeDirConfig.cpp.cxxcodebuilder:ETcRDoc::Parser::Simpleo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph;[I"># Phusion Passenger - https://www.phusionpassenger.com/ ;TI"5# Copyright (c) 2010-2016 Phusion Holding B.V. ;TI"# ;TI"L# "Passenger", "Phusion Passenger" and "Union Station" are registered ;TI"+# trademarks of Phusion Holding B.V. ;TI"# ;TI"U# Permission is hereby granted, free of charge, to any person obtaining a copy ;TI"V# of this software and associated documentation files (the "Software"), to deal ;TI"U# in the Software without restriction, including without limitation the rights ;TI"R# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ;TI"N# copies of the Software, and to permit persons to whom the Software is ;TI"A# furnished to do so, subject to the following conditions: ;TI"# ;TI"S# The above copyright notice and this permission notice shall be included in ;TI"<# all copies or substantial portions of the Software. ;TI"# ;TI"S# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ;TI"Q# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ;TI"T# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ;TI"O# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ;TI"V# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ;TI"R# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ;TI"# THE SOFTWARE.;To:RDoc::Markup::BlankLine o; ;[I"=# This file uses the cxxcodebuilder API. Learn more at: ;TI"0# https://github.com/phusion/cxxcodebuilder;T@$o; ;[I"7require 'phusion_passenger/apache2/config_options';T@$o; ;[I" def main;To:RDoc::Markup::Verbatim;[2I"/comment copyright_header_for(__FILE__), 1 ;TI" ;TI"separator ;TI" ;TI"comment %q{ ;TI"] MergeDirConfig.cpp is automatically generated from MergeDirConfig.cpp.cxxcodebuilder, ;TI"_ using definitions from src/ruby_supportlib/phusion_passenger/apache2/config_options.rb. ;TI"1 Edits to MergeDirConfig.cpp will be lost. ;TI" ;TI"% To update MergeDirConfig.cpp: ;TI" rake apache2 ;TI" ;TI"4 To force regeneration of MergeDirConfig.cpp: ;TI"5 rm -f src/apache2_module/MergeDirConfig.cpp ;TI"4 rake src/apache2_module/MergeDirConfig.cpp ;TI"} ;TI" ;TI"separator ;TI" ;TI"Wfilter_eligible_options(APACHE2_DIRECTORY_CONFIGURATION_OPTIONS).each do |option| ;TI"# if option[:type] == :string ;TI" add_code %Q{ ;TI"1 config->#{struct_field_for(option)} = ;TI": (add->#{struct_field_for(option)} == NULL) ? ;TI"1 base->#{struct_field_for(option)} : ;TI"/ add->#{struct_field_for(option)}; ;TI" } ;TI"' elsif option[:type] == :integer ;TI" add_code %Q{ ;TI"1 config->#{struct_field_for(option)} = ;TI"E (add->#{struct_field_for(option)} == UNSET_INT_VALUE) ? ;TI"1 base->#{struct_field_for(option)} : ;TI"/ add->#{struct_field_for(option)}; ;TI" } ;TI"$ elsif option[:type] == :flag ;TI" add_code %Q{ ;TI"1 config->#{struct_field_for(option)} = ;TI"F (add->#{struct_field_for(option)} == DirConfig::UNSET) ? ;TI"1 base->#{struct_field_for(option)} : ;TI"/ add->#{struct_field_for(option)}; ;TI" } ;TI" else ;TI"Z raise "Unknown option type #{option[:type].inspect} for option #{option[:name]}" ;TI" end ;TI" end ;T:@format0o; ;[I"end;T@$o; ;[I")def filter_eligible_options(options);To;;[I" options.reject do |option| ;TI" option[:alias_for] || ;TI", option.fetch(:field, true).nil? || ;TI"( option[:field].to_s =~ /\./ || ;TI"> !option.fetch(:auto_generate_nginx_merge_code, true) ;TI" end ;T;0o; ;[I"end;T@$o; ;[I"!def struct_field_for(option);To;;[I" if option.has_key?(:field) ;TI" option[:field] ;TI" else ;TI"4 result = option[:name].sub(/^Passenger/, '') ;TI") result[0] = result[0..0].downcase ;TI" result ;TI" end ;T;0o; ;[I"end;T@$o; ;[I" main;T: @file@:0@omit_headings_from_table_of_contents_below0