lib/liberty_buildpack/framework/jrebel_agent.rb
#-----------------------------------------------------------------------------------------
# Determines if the application/server contains a rebel-remote.xml to provide a configured JRebel agent
#
# @return [String] the detected versioned ID if the environment and config are valid, otherwise nil
#------------------------------------------------------------------------------------------
Determines if the application/server contains a rebel-remote.xml to provide a configured JRebel agent
Determines if the application / server contains a rebel - remote . xml to provide a configured JRebel agent
def detect
      return nil unless enabled?
      rebel_remote_xmls = Dir.glob(["#{@app_dir}/**/rebel-remote.xml"])
      @logger.debug("rebel_remote_xmls=[#{rebel_remote_xmls.join(', ')}]")
      if !rebel_remote_xmls.empty?
        @logger.debug('Found rebel-remote.xml, enabling JRebel')
        @version, @uri = LibertyBuildpack::Repository::ConfiguredItem.find_item(@configuration)
        @nosetup_zip = "jrebel-#{@version}-nosetup.zip"
        "jrebel-#{@version}"
      else
        @logger.debug('No rebel-remote.xml found in the application.')
        nil
      end
    end
def detect return nil unless enabled? rebel_remote_xmls = Dir . glob ( [ "#{@app_dir}/**/rebel-remote.xml" ] ) @logger . debug ( "rebel_remote_xmls=[#{rebel_remote_xmls.join(', ')}]" ) if ! rebel_remote_xmls . empty? @logger . debug ( 'Found rebel-remote.xml, enabling JRebel' ) @version , @uri = LibertyBuildpack :: Repository :: ConfiguredItem . find_item ( @configuration ) @nosetup_zip = "jrebel-#{@version}-nosetup.zip" "jrebel-#{@version}" else @logger . debug ( 'No rebel-remote.xml found in the application.' ) nil end end
Determines if the application/server contains a rebel-remote.xml to provide a configured JRebel agent
Determines if the application / server contains a rebel - remote . xml to provide a configured JRebel agent
the detected versioned ID if the environment and config are valid, otherwise nil
the detected versioned ID if the environment and config are valid otherwise nil
String