Skip to content

Commit

Permalink
version bump to v1.10.3
Browse files Browse the repository at this point in the history
  • Loading branch information
flavorjones committed Apr 22, 2019
1 parent d31f742 commit 8e24af5
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions lib/nokogiri/version.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
module Nokogiri
# The version of Nokogiri you are using
VERSION = "1.10.2"
VERSION = "1.10.3"

class VersionInfo # :nodoc:
def jruby?
::JRUBY_VERSION if RUBY_PLATFORM == "java"
end

def engine
defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'mri'
defined?(RUBY_ENGINE) ? RUBY_ENGINE : "mri"
end

def loaded_parser_version
Expand All @@ -27,7 +27,7 @@ def libxml2?
end

def libxml2_using_system?
! libxml2_using_packaged?
!libxml2_using_packaged?
end

def libxml2_using_packaged?
Expand All @@ -46,44 +46,44 @@ def warnings

def to_hash
hash_info = {}
hash_info['warnings'] = []
hash_info['nokogiri'] = Nokogiri::VERSION
hash_info['ruby'] = {}
hash_info['ruby']['version'] = ::RUBY_VERSION
hash_info['ruby']['platform'] = ::RUBY_PLATFORM
hash_info['ruby']['description'] = ::RUBY_DESCRIPTION
hash_info['ruby']['engine'] = engine
hash_info['ruby']['jruby'] = jruby? if jruby?
hash_info["warnings"] = []
hash_info["nokogiri"] = Nokogiri::VERSION
hash_info["ruby"] = {}
hash_info["ruby"]["version"] = ::RUBY_VERSION
hash_info["ruby"]["platform"] = ::RUBY_PLATFORM
hash_info["ruby"]["description"] = ::RUBY_DESCRIPTION
hash_info["ruby"]["engine"] = engine
hash_info["ruby"]["jruby"] = jruby? if jruby?

if libxml2?
hash_info['libxml'] = {}
hash_info['libxml']['binding'] = 'extension'
hash_info["libxml"] = {}
hash_info["libxml"]["binding"] = "extension"
if libxml2_using_packaged?
hash_info['libxml']['source'] = "packaged"
hash_info['libxml']['libxml2_path'] = NOKOGIRI_LIBXML2_PATH
hash_info['libxml']['libxslt_path'] = NOKOGIRI_LIBXSLT_PATH
hash_info['libxml']['libxml2_patches'] = NOKOGIRI_LIBXML2_PATCHES
hash_info['libxml']['libxslt_patches'] = NOKOGIRI_LIBXSLT_PATCHES
hash_info["libxml"]["source"] = "packaged"
hash_info["libxml"]["libxml2_path"] = NOKOGIRI_LIBXML2_PATH
hash_info["libxml"]["libxslt_path"] = NOKOGIRI_LIBXSLT_PATH
hash_info["libxml"]["libxml2_patches"] = NOKOGIRI_LIBXML2_PATCHES
hash_info["libxml"]["libxslt_patches"] = NOKOGIRI_LIBXSLT_PATCHES
else
hash_info['libxml']['source'] = "system"
hash_info["libxml"]["source"] = "system"
end
hash_info['libxml']['compiled'] = compiled_parser_version
hash_info['libxml']['loaded'] = loaded_parser_version
hash_info['warnings'] = warnings
hash_info["libxml"]["compiled"] = compiled_parser_version
hash_info["libxml"]["loaded"] = loaded_parser_version
hash_info["warnings"] = warnings
elsif jruby?
hash_info['xerces'] = Nokogiri::XERCES_VERSION
hash_info['nekohtml'] = Nokogiri::NEKO_VERSION
hash_info["xerces"] = Nokogiri::XERCES_VERSION
hash_info["nekohtml"] = Nokogiri::NEKO_VERSION
end

hash_info
end

def to_markdown
begin
require 'psych'
require "psych"
rescue LoadError
end
require 'yaml'
require "yaml"
"# Nokogiri (#{Nokogiri::VERSION})\n" +
YAML.dump(to_hash).each_line.map { |line| " #{line}" }.join
end
Expand Down

0 comments on commit 8e24af5

Please sign in to comment.