spec/liberty_buildpack/services/mongo_spec.rb
#----------------------------------------------
# Helper method that adds <application> or <webapplication> into a REXML server.xml doc
#----------------------------------------------
Helper method that adds  or  into a REXML server.xml doc
Helper method that adds or into a REXML server . xml doc
def add_application(doc, application_type, lib_id, api = nil)
        app = REXML::Element.new(application_type, doc)
        app.add_attribute('name', 'myapp')
        if lib_id.nil? == false
          classloader_element = REXML::Element.new('classloader', app)
          classloader_element.add_attribute('commonLibraryRef', lib_id)
        end
        if api.nil? == false
          classloader_element = REXML::Element.new('classloader', app)
          classloader_element.add_attribute('apiTypeVisibility', api)
        end
      end
def add_application ( doc , application_type , lib_id , api = nil ) app = REXML :: Element . new ( application_type , doc ) app . add_attribute ( 'name' , 'myapp' ) if lib_id . nil? == false classloader_element = REXML :: Element . new ( 'classloader' , app ) classloader_element . add_attribute ( 'commonLibraryRef' , lib_id ) end if api . nil? == false classloader_element = REXML :: Element . new ( 'classloader' , app ) classloader_element . add_attribute ( 'apiTypeVisibility' , api ) end end
Helper method that adds <application> or <webapplication> into a REXML server.xml doc
Helper method that adds <application > or <webapplication > into a REXML server . xml doc
# Between lib_id and api visibility, only one can be set.
doc
application_type
lib_id
api