Sha256: fa1ee66291d8897c0a33493b46d0874f4c3d46cd4f72fa87fb30734fd38773ad

Contents?: true

Size: 870 Bytes

Versions: 1

Compression:

Stored size: 870 Bytes

Contents

module Trinidad
  module Extensions
    require File.expand_path('../../trinidad-libs/trinidad-hotdeploy-extension.jar', __FILE__)

    module Hotdeploy
      VERSION = '0.3.1'
    end

    class HotdeployWebAppExtension < WebAppExtension
      def configure(tomcat, app_context)
        @options[:monitor] ||= File.join(app_context.doc_base, 'tmp/restart.txt')
        monitor = File.expand_path(@options[:monitor])
        delay = @options[:delay] || 1000

        listener = org.jruby.trinidad.HotDeployLifecycleListener.new(app_context, monitor, delay)
        app_context.addLifecycleListener(listener)
        listener
      end
    end

    class HotdeployOptionsExtension < OptionsExtension
      def configure(parser, default_options)
        default_options[:extensions] ||= {}
        default_options[:extensions][:hotdeploy] = []
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
trinidad_hotdeploy_extension-0.3.1 lib/trinidad_hotdeploy_extension.rb