Sha256: 23bb15755521f205b8a390937d4a9877dcc8848d2b0ca4a1797787bfcb29f50b

Contents?: true

Size: 1.15 KB

Versions: 8

Compression:

Stored size: 1.15 KB

Contents

module Nokogiri
  # The version of Nokogiri you are using
  VERSION = '1.4.0'

  # More complete version information about libxml
  VERSION_INFO = {}
  VERSION_INFO['warnings']              = []
  VERSION_INFO['nokogiri']              = VERSION
  if defined?(LIBXML_VERSION)
    VERSION_INFO['libxml']              = {}
    VERSION_INFO['libxml']['binding']   = 'extension'
    VERSION_INFO['libxml']['compiled']  = LIBXML_VERSION
    VERSION_INFO['libxml']['loaded']    = LIBXML_PARSER_VERSION.scan(/^(.*)(..)(..)$/).first.collect{|j|j.to_i}.join(".")

    if VERSION_INFO['libxml']['compiled'] != VERSION_INFO['libxml']['loaded']
      warning = "Nokogiri was built against LibXML version #{VERSION_INFO['libxml']['compiled']}, but has dynamically loaded #{VERSION_INFO['libxml']['loaded']}"
      VERSION_INFO['warnings'] << warning
      warn "WARNING: #{warning}"
    end
  end

  def self.uses_libxml? # :nodoc:
    !Nokogiri::VERSION_INFO['libxml'].nil?
  end

  def self.ffi? # :nodoc:
    uses_libxml? && Nokogiri::VERSION_INFO['libxml']['binding'] == 'ffi'
  end

  def self.is_2_6_16? # :nodoc:
    Nokogiri::VERSION_INFO['libxml']['loaded'] <= '2.6.16'
  end
end

Version data entries

8 entries across 8 versions & 4 rubygems

Version Path
rubyjedi-nokogiri_java-1.4.0.20100513161003-java lib/nokogiri/version.rb
revo-nokogiri-1.4.0-java lib/nokogiri/version.rb
revo-nokogiri-1.4.0.20100202165440-java lib/nokogiri/version.rb
superfeedr-nokogiri-1.4.0.20091116183308 lib/nokogiri/version.rb
nokogiri-1.4.0-java lib/nokogiri/version.rb
nokogiri-1.4.0-x86-mswin32 lib/nokogiri/version.rb
nokogiri-1.4.0-x86-mingw32 lib/nokogiri/version.rb
nokogiri-1.4.0 lib/nokogiri/version.rb