Skip to content

Commit

Permalink
Merge pull request #2396 from sparklemotion/flavorjones-drop-2.5-support
Browse files Browse the repository at this point in the history
drop support for ruby 2.5
  • Loading branch information
flavorjones committed Dec 24, 2021
2 parents 0a738db + b845c11 commit 5fcea42
Show file tree
Hide file tree
Showing 25 changed files with 66 additions and 104 deletions.
7 changes: 0 additions & 7 deletions .cross_rubies
Expand Up @@ -19,10 +19,3 @@
2.6.0:x86_64-darwin
2.6.0:arm64-darwin
2.6.0:aarch64-linux
2.5.0:i686-w64-mingw32
2.5.0:x86_64-w64-mingw32
2.5.0:i686-linux-gnu
2.5.0:x86_64-linux-gnu
2.5.0:x86_64-darwin
2.5.0:arm64-darwin
2.5.0:aarch64-linux
13 changes: 6 additions & 7 deletions .github/workflows/ci.yml
Expand Up @@ -59,7 +59,7 @@ jobs:
strategy:
fail-fast: false
matrix:
image: ["bionic", "bionic32"]
image: ["ubuntu", "ubuntu32"]
sys: ["enable"]
runs-on: ubuntu-latest
container:
Expand All @@ -78,7 +78,7 @@ jobs:
fail-fast: false
matrix:
sys: ["enable", "disable"]
ruby: ["2.5", "2.6", "2.7", "3.0"]
ruby: ["2.6", "2.7", "3.0"]
runs-on: ubuntu-latest
container:
image: ghcr.io/sparklemotion/nokogiri-test:mri-${{matrix.ruby}}
Expand All @@ -101,7 +101,7 @@ jobs:
fail-fast: false
matrix:
sys: ["enable", "disable"]
ruby: ["2.5", "2.6", "2.7", "3.0"]
ruby: ["2.6", "2.7", "3.0"]
runs-on: ubuntu-latest
container:
image: ghcr.io/sparklemotion/nokogiri-test:mri-${{matrix.ruby}}
Expand Down Expand Up @@ -210,7 +210,7 @@ jobs:
fail-fast: false
matrix:
sys: ["enable", "disable"]
ruby: ["2.5", "2.6", "2.7", "3.0"]
ruby: ["2.6", "2.7", "3.0"]
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -229,13 +229,12 @@ jobs:
- run: bundle exec rake test

windows:
continue-on-error: ${{matrix.ruby == '2.5'}} # see https://github.com/sparklemotion/nokogiri/issues/2354
needs: ["basic"]
strategy:
fail-fast: false
matrix:
sys: ["enable", "disable"]
ruby: ["2.5", "2.6", "2.7", "3.0", "mingw"]
ruby: ["2.6", "2.7", "3.0", "mingw"]
runs-on: windows-latest
steps:
- name: configure git crlf
Expand Down Expand Up @@ -263,7 +262,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["jruby-9.2"]
ruby: ["jruby-9.3"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/gem-install.yml
Expand Up @@ -42,7 +42,7 @@ jobs:
fail-fast: false
matrix:
sys: ["enable", "disable"]
ruby: ["2.5", "2.6", "2.7", "3.0", "head"]
ruby: ["2.6", "2.7", "3.0", "head"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["2.5", "2.6", "2.7", "3.0"]
ruby: ["2.6", "2.7", "3.0"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["2.5", "2.6", "2.7", "3.0"]
ruby: ["2.6", "2.7", "3.0"]
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -189,7 +189,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["2.5", "2.6", "2.7", "3.0"]
ruby: ["2.6", "2.7", "3.0"]
runs-on: windows-latest
steps:
- uses: MSP-Greg/setup-ruby-pkgs@v1
Expand Down Expand Up @@ -226,7 +226,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ["jruby-9.2", "jruby-head"]
ruby: ["jruby-9.3", "jruby-head"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
19 changes: 6 additions & 13 deletions .github/workflows/generate-ci-images.yml
Expand Up @@ -30,27 +30,20 @@ jobs:
push: true
tags: ghcr.io/sparklemotion/nokogiri-test:alpine
file: oci-images/nokogiri-test/alpine.dockerfile
- name: bionic
- name: ubuntu
uses: docker/build-push-action@v2
with:
context: "."
push: true
tags: ghcr.io/sparklemotion/nokogiri-test:bionic
file: oci-images/nokogiri-test/bionic.dockerfile
- name: bionic32
tags: ghcr.io/sparklemotion/nokogiri-test:ubuntu
file: oci-images/nokogiri-test/ubuntu.dockerfile
- name: ubuntu32
uses: docker/build-push-action@v2
with:
context: "."
push: true
tags: ghcr.io/sparklemotion/nokogiri-test:bionic32
file: oci-images/nokogiri-test/bionic32.dockerfile
- name: mri-2.5
uses: docker/build-push-action@v2
with:
context: "."
push: true
tags: ghcr.io/sparklemotion/nokogiri-test:mri-2.5
file: oci-images/nokogiri-test/mri-2.5.dockerfile
tags: ghcr.io/sparklemotion/nokogiri-test:ubuntu32
file: oci-images/nokogiri-test/ubuntu32.dockerfile
- name: mri-2.6
uses: docker/build-push-action@v2
with:
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Expand Up @@ -18,6 +18,13 @@ Note that this version of Nokogiri opts-in to the ["MFA required to publish" set

A related discussion about Trust exists at [#2357](https://github.com/sparklemotion/nokogiri/issues/2357) in which I invite you to participate if you have feelings or opinions on this topic.

#### Ruby

This release ends support for:

* Ruby 2.5, for which [official support ended 2021-03-31](https://www.ruby-lang.org/en/downloads/branches/).
* JRuby 9.2, which is a Ruby 2.5-compatible release.


### Dependencies

Expand Down
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -107,8 +107,8 @@ We bump `Major.Minor.Patch` versions following this guidance:

Requirements:

- Ruby >= 2.5
- JRuby >= 9.2.0.0
- Ruby >= 2.6
- JRuby >= 9.3.0.0


### Native Gems: Faster, more reliable installation
Expand All @@ -117,12 +117,12 @@ Requirements:

### Supported Platforms

As of v1.11.0, Nokogiri ships pre-compiled, "native" gems for the following platforms:
Nokogiri ships pre-compiled, "native" gems for the following platforms:

- Linux: `x86-linux` and `x86_64-linux` (req: `glibc >= 2.17`), including musl platforms like Alpine
- Darwin/MacOS: `x86_64-darwin` and `arm64-darwin`
- Windows: `x86-mingw32` and `x64-mingw32`
- Java: any platform running JRuby 9.2 or higher
- Java: any platform running JRuby 9.3 or higher

To determine whether your system supports one of these gems, look at the output of `bundle platform` or `ruby -e 'puts Gem::Platform.local.to_s'`.

Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Expand Up @@ -39,7 +39,7 @@ environment:
INSTALL_PACKAGES: "mingw-w64-i686-libxslt"
EXTCONF_PARAMS: "--use-system-libraries"

- ruby_version: 25
- ruby_version: 25
- ruby_version: 26
- ruby_version: 26
INSTALL_PACKAGES: "mingw-w64-i686-libxslt"
EXTCONF_PARAMS: "--use-system-libraries"
21 changes: 13 additions & 8 deletions nokogiri.gemspec
Expand Up @@ -40,7 +40,12 @@ Gem::Specification.new do |spec|

spec.license = "MIT"

spec.required_ruby_version = ">= 2.5.0"
if java_p # rubocop:disable Style/ConditionalAssignment
# TODO: drop this more-liberal requirement for jruby when https://github.com/jruby/jruby/issues/6904 is fixed
spec.required_ruby_version = ">= 2.5.0"
else
spec.required_ruby_version = ">= 2.6.0" # rubocop:disable Gemspec/DuplicatedAssignment
end

spec.homepage = "https://nokogiri.org"
spec.metadata = {
Expand Down Expand Up @@ -323,20 +328,20 @@ Gem::Specification.new do |spec|

spec.add_development_dependency("bundler", "~> 2.2")
spec.add_development_dependency("hoe-markdown", "~> 1.4")
spec.add_development_dependency("minitest", "~> 5.8")
spec.add_development_dependency("minitest", "~> 5.15")
spec.add_development_dependency("minitest-reporters", "~> 1.4")
spec.add_development_dependency("rake", "~> 13.0")
spec.add_development_dependency("rake-compiler", "= 1.1.6")
spec.add_development_dependency("rake-compiler-dock", "~> 1.1")
spec.add_development_dependency("rdoc", ">= 6.3.2")
spec.add_development_dependency("rexical", "~> 1.0.5")
spec.add_development_dependency("rubocop", "~> 1.7")
spec.add_development_dependency("rubocop-minitest", "~> 0.15")
spec.add_development_dependency("rubocop-performance", "~> 1.11")
spec.add_development_dependency("rdoc", "~> 6.3")
spec.add_development_dependency("rexical", "~> 1.0.7")
spec.add_development_dependency("rubocop", "~> 1.23")
spec.add_development_dependency("rubocop-minitest", "~> 0.17")
spec.add_development_dependency("rubocop-performance", "~> 1.12")
spec.add_development_dependency("rubocop-rake", "~> 0.6")
spec.add_development_dependency("rubocop-shopify", "~> 2.3")
spec.add_development_dependency("ruby_memcheck", "~> 1.0")
spec.add_development_dependency("simplecov", "~> 0.20")
spec.add_development_dependency("simplecov", "~> 0.21")

spec.extensions << "ext/nokogiri/extconf.rb"
end
2 changes: 1 addition & 1 deletion oci-images/nokogiri-test/debian-libxml-et-al.step
@@ -1,3 +1,3 @@
# -*- dockerfile -*-

RUN apt-get install -y libxslt-dev libxml2-dev pkg-config
RUN apt-get install -y libxslt-dev libxml2-dev zlib1g-dev pkg-config
34 changes: 0 additions & 34 deletions oci-images/nokogiri-test/mri-2.5.dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion oci-images/nokogiri-test/mri-2.6.dockerfile
Expand Up @@ -15,7 +15,7 @@ RUN apt-get install -y valgrind

# -*- dockerfile -*-

RUN apt-get install -y libxslt-dev libxml2-dev pkg-config
RUN apt-get install -y libxslt-dev libxml2-dev zlib1g-dev pkg-config


# -*- dockerfile -*-
Expand Down
2 changes: 1 addition & 1 deletion oci-images/nokogiri-test/mri-2.7.dockerfile
Expand Up @@ -15,7 +15,7 @@ RUN apt-get install -y valgrind

# -*- dockerfile -*-

RUN apt-get install -y libxslt-dev libxml2-dev pkg-config
RUN apt-get install -y libxslt-dev libxml2-dev zlib1g-dev pkg-config


# -*- dockerfile -*-
Expand Down
2 changes: 1 addition & 1 deletion oci-images/nokogiri-test/mri-3.0.dockerfile
Expand Up @@ -15,7 +15,7 @@ RUN apt-get install -y valgrind

# -*- dockerfile -*-

RUN apt-get install -y libxslt-dev libxml2-dev pkg-config
RUN apt-get install -y libxslt-dev libxml2-dev zlib1g-dev pkg-config


# -*- dockerfile -*-
Expand Down
2 changes: 1 addition & 1 deletion oci-images/nokogiri-test/truffle-nightly.dockerfile
Expand Up @@ -15,7 +15,7 @@ RUN apt-get install -y valgrind

# -*- dockerfile -*-

RUN apt-get install -y libxslt-dev libxml2-dev pkg-config
RUN apt-get install -y libxslt-dev libxml2-dev zlib1g-dev pkg-config


# -*- dockerfile -*-
Expand Down
@@ -1,4 +1,4 @@
FROM ubuntu:bionic
FROM ubuntu:focal

# -*- dockerfile -*-

Expand All @@ -10,7 +10,7 @@ RUN apt-get install -y apt-utils

# -*- dockerfile -*-

RUN apt-get install -y libxslt-dev libxml2-dev pkg-config
RUN apt-get install -y libxslt-dev libxml2-dev zlib1g-dev pkg-config


# -*- dockerfile -*-
Expand Down
@@ -1,4 +1,4 @@
FROM ubuntu:bionic
FROM ubuntu:focal

<%= File.read "debian-prelude.step" %>
Expand Down
@@ -1,4 +1,4 @@
FROM i386/ubuntu:bionic
FROM i386/ubuntu:focal

# -*- dockerfile -*-

Expand All @@ -10,7 +10,7 @@ RUN apt-get install -y apt-utils

# -*- dockerfile -*-

RUN apt-get install -y libxslt-dev libxml2-dev pkg-config
RUN apt-get install -y libxslt-dev libxml2-dev zlib1g-dev pkg-config


# -*- dockerfile -*-
Expand Down
@@ -1,4 +1,4 @@
FROM i386/ubuntu:bionic
FROM i386/ubuntu:focal

<%= File.read "debian-prelude.step" %>
Expand Down
2 changes: 1 addition & 1 deletion rakelib/cext-depend.rake
Expand Up @@ -14,7 +14,7 @@ namespace "cext" do
sh "makedepend -f depend -Y -I. *.c 2> /dev/null"
dep = File.read("depend")
dep.gsub!(%r{ \./}, " $(srcdir)/")
File.open("depend", "w") { |f| f.write(dep) }
File.write("depend", dep)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion rakelib/docker.rake
Expand Up @@ -8,7 +8,7 @@ module DockerHelper
IMAGE_DIR = "oci-images/nokogiri-test"
IMAGE_NAME = "ghcr.io/sparklemotion/nokogiri-test"
RUBIES = {
mri: ["2.5", "2.6", "2.7", "3.0"],
mri: ["2.6", "2.7", "3.0"],
truffle: ["nightly"],
}

Expand Down
1 change: 1 addition & 0 deletions rakelib/extensions.rake
Expand Up @@ -282,6 +282,7 @@ namespace "gem" do
desc "build native gem for #{plat} platform"
task plat do
RakeCompilerDock.sh(<<~EOT, platform: plat)
rvm use 3.0 &&
gem install bundler --no-document &&
bundle &&
bundle exec rake gem:#{plat}:builder MAKE='nice make -j`nproc`'
Expand Down
2 changes: 1 addition & 1 deletion rakelib/set-version-to-timestamp.rake
Expand Up @@ -18,7 +18,7 @@ task "set-version-to-timestamp" do
raise("Could not hack the VERSION constant")
end

File.open(version_file_path, "w") { |f| f.write(version_file_contents) }
File.write(version_file_path, version_file_contents)

puts "NOTE: wrote version as \"#{fake_version}\""
end

0 comments on commit 5fcea42

Please sign in to comment.