From 84870381847cb83b6a530f5eef2460026ade49f6 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Mon, 6 Jun 2016 21:49:06 -0400 Subject: [PATCH] remove support for ruby 1.9.2, 1.9.3 and 2.0 closes #1227 closes #1279 --- .autotest | 6 +----- .cross_rubies | 3 --- .gitignore | 2 -- .travis.yml | 10 +--------- CHANGELOG.md | 10 ++++++++++ Manifest.txt | 2 +- README.md | 2 +- Rakefile | 6 ++---- ext/nokogiri/extconf.rb | 15 +-------------- test_all | 3 --- 10 files changed, 17 insertions(+), 42 deletions(-) diff --git a/.autotest b/.autotest index 9d7c26b4557..878238aca78 100644 --- a/.autotest +++ b/.autotest @@ -12,11 +12,7 @@ end Autotest.add_hook :run_command do |at| at.unit_diff = 'cat' - if ENV['ONENINE'] - system "rake1.9 compile" - else - system "rake compile" - end + system "rake compile" end Autotest.add_hook :ran_command do |at| diff --git a/.cross_rubies b/.cross_rubies index 8e67ddb0fbd..95c02767c39 100644 --- a/.cross_rubies +++ b/.cross_rubies @@ -1,6 +1,3 @@ -1.9.3-p551:i586-mingw32msvc -2.0.0-p645:i686-w64-mingw32 -2.0.0-p645:x86_64-w64-mingw32 2.1.6:i686-w64-mingw32 2.1.6:x86_64-w64-mingw32 2.2.2:i686-w64-mingw32 diff --git a/.gitignore b/.gitignore index 16ee670c028..f6774546efa 100644 --- a/.gitignore +++ b/.gitignore @@ -18,8 +18,6 @@ ext/java/Canna ext/java/nokogiri/**/*.class ext/nokogiri/*.dll gems -lib/nokogiri/1.8 -lib/nokogiri/1.9 lib/nokogiri/nokogiri.bundle lib/nokogiri/nokogiri.jar lib/nokogiri/nokogiri.rb diff --git a/.travis.yml b/.travis.yml index 069a823de73..88cd7e2af54 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,6 @@ language: ruby sudo: false rvm: -- 1.9.2 -- 1.9.3 - 2.0 - 2.1 - 2.2 @@ -21,14 +19,8 @@ matrix: allow_failures: # https://github.com/travis-ci/travis-ci/issues/5361 - os: osx - rvm: 2.3.0 + rvm: 2.3 exclude: - - os: osx - rvm: 1.9.2 - - os: osx - rvm: 1.9.3 - - os: osx - rvm: 2.0 - os: osx rvm: jruby-1.7 - os: osx diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ae138a157b..4ca023043d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,16 @@ # 2.0.0 / unreleased +## Backwards incompatibilities. + +This release ends support for: + +* Ruby 1.9.2, for which official support ended on 2014-07-31 +* Ruby 1.9.3, for which official support ended on 2015-02-23 +* Ruby 2.0.0, for which official support ended on 2016-02-24 + + + # 1.6.8 / 2016-06-06 diff --git a/Manifest.txt b/Manifest.txt index 7f515c4b821..ab31924685f 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -3,7 +3,7 @@ .editorconfig .gemtest .travis.yml -CHANGELOG.rdoc +CHANGELOG.md CONTRIBUTING.md C_CODING_STYLE.rdoc Gemfile diff --git a/README.md b/README.md index 0933667bdf6..ebe58c96ae7 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ end ## Requirements -* Ruby 1.9.3 or higher, including any development packages necessary +* Ruby 2.1.0 or higher, including any development packages necessary to compile native extensions. * In Nokogiri 1.6.0 and later libxml2 and libxslt are bundled with the diff --git a/Rakefile b/Rakefile index 5313b81c0ac..7f2ab26fa43 100644 --- a/Rakefile +++ b/Rakefile @@ -31,8 +31,6 @@ CrossRuby = Struct.new(:version, :host) { case minor_ver when nil raise "unsupported version: #{ver}" - when '1.9' - '191' else minor_ver.delete('.') << '0' end @@ -150,7 +148,7 @@ HOE = Hoe.spec 'nokogiri' do else self.spec_extras = { :extensions => ["ext/nokogiri/extconf.rb"], - :required_ruby_version => '>= 1.9.2' + :required_ruby_version => '>= 2.1.0' } end @@ -234,7 +232,7 @@ else libs = dependencies.map { |name, dep| "#{name}-#{dep["version"]}" }.join(', ') spec.required_ruby_version = [ - '>= 1.9.2', + '>= 2.1.0', "< #{CROSS_RUBIES.max_by(&:ver).minor_ver.succ}" ] diff --git a/ext/nokogiri/extconf.rb b/ext/nokogiri/extconf.rb index 80c6578eb46..f094ca27292 100644 --- a/ext/nokogiri/extconf.rb +++ b/ext/nokogiri/extconf.rb @@ -130,12 +130,7 @@ def package_config pkg, options={} end def nokogiri_try_compile - args = if defined?(RUBY_VERSION) && RUBY_VERSION <= "1.9.2" - ["int main() {return 0;}"] - else - ["int main() {return 0;}", "", {werror: true}] - end - try_compile(*args) + try_compile "int main() {return 0;}", "", {werror: true} end def check_libxml_version version=nil @@ -380,14 +375,6 @@ def using_system_libraries? arg_config('--use-system-libraries', !!ENV['NOKOGIRI_USE_SYSTEM_LIBRARIES']) end -# -# monkey patches -# - -# Workaround for Ruby bug #8074, introduced in Ruby 2.0.0, fixed in Ruby 2.1.0 -# https://bugs.ruby-lang.org/issues/8074 -@libdir_basename = "lib" if RUBY_VERSION < '2.1.0' - # # main # diff --git a/test_all b/test_all index affb35d6150..5b2a95eafba 100755 --- a/test_all +++ b/test_all @@ -15,9 +15,6 @@ RUBIES="\ ruby-2.3 \ ruby-2.2 \ ruby-2.1 \ - ruby-2.0.0-p648 \ - ruby-1.9.3-p551 \ - ruby-1.9.2-p330 \ jruby-9.0.4.0 \ jruby-1.7.19 "