Sha256: aa36539c004826d96478b82e6e96a178941d0fcebc5772f7953187b918b6f570

Contents?: true

Size: 1.63 KB

Versions: 3

Compression:

Stored size: 1.63 KB

Contents

require "pathname"
require "java"

dependency_directory = $LOAD_PATH.detect { |path| Dir[File.join(path, 'html-unit/htmlunit-*.jar')].any? }

raise "Could not find html-unit/htmlunit-VERSION.jar in load path:\n  [ #{$LOAD_PATH.join(",\n    ")}\n  ]" unless dependency_directory

Dir[File.join(dependency_directory, "html-unit/*.jar")].each do |jar|
  require jar
end

java.lang.System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog")
java.lang.System.setProperty("org.apache.commons.logging.simplelog.defaultlog", "fatal")
java.lang.System.setProperty("org.apache.commons.logging.simplelog.showdatetime", "true")

# Container module for com.gargoylesoftware.htmlunit namespace.
module HtmlUnit
  java_import "com.gargoylesoftware.htmlunit.BrowserVersion"
  java_import "com.gargoylesoftware.htmlunit.History"
  java_import "com.gargoylesoftware.htmlunit.HttpMethod"
  java_import 'com.gargoylesoftware.htmlunit.ConfirmHandler'
  java_import "com.gargoylesoftware.htmlunit.NicelyResynchronizingAjaxController"
  java_import "com.gargoylesoftware.htmlunit.SilentCssErrorHandler"
  java_import "com.gargoylesoftware.htmlunit.WebClient"
  java_import "com.gargoylesoftware.htmlunit.WebResponseData"
  java_import "com.gargoylesoftware.htmlunit.WebResponse"
  java_import "com.gargoylesoftware.htmlunit.WaitingRefreshHandler"

  # Container module for com.gargoylesoftware.htmlunit.util namespace.
  module Util
    java_import "com.gargoylesoftware.htmlunit.util.NameValuePair"
    java_import "com.gargoylesoftware.htmlunit.util.WebConnectionWrapper"
  end

  # Disable history tracking
  History.field_reader :ignoreNewPages_
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
akephalos2-2.0.6 lib/akephalos/htmlunit.rb
akephalos2-2.0.5 lib/akephalos/htmlunit.rb
akephalos2-2.0.4 lib/akephalos/htmlunit.rb