Move to ruby 2.5 as the earliest supported version.
2.4 is nearly two years beyond EOL now. Closes #484.
This commit is contained in:
parent
90728d7109
commit
cf258bbb71
|
@ -12,7 +12,7 @@ jobs:
|
||||||
- name: Install and set up ruby
|
- name: Install and set up ruby
|
||||||
uses: ruby/setup-ruby@v1
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
ruby-version: 2.4
|
ruby-version: '2.5'
|
||||||
bundler-cache: true
|
bundler-cache: true
|
||||||
|
|
||||||
- name: Rubocop
|
- name: Rubocop
|
||||||
|
|
|
@ -8,12 +8,12 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu]
|
os: [ubuntu]
|
||||||
ruby: ['2.4', '2.5', '2.6', '2.7', '3.0', '3.1', head, jruby, jruby-head, truffleruby, truffleruby-head]
|
ruby: ['2.5', '2.6', '2.7', '3.0', '3.1', head, jruby, jruby-head, truffleruby, truffleruby-head]
|
||||||
include:
|
include:
|
||||||
- os: macos
|
- os: macos
|
||||||
ruby: 2.4
|
ruby: '2.5'
|
||||||
- os: windows
|
- os: windows
|
||||||
ruby: 2.4
|
ruby: '2.5'
|
||||||
runs-on: ${{ matrix.os }}-latest
|
runs-on: ${{ matrix.os }}-latest
|
||||||
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.os == 'windows' }}
|
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.os == 'windows' }}
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -7,7 +7,7 @@ inherit_from: .rubocop_todo.yml
|
||||||
# Set this to the minimum supported ruby in the gemspec. Otherwise
|
# Set this to the minimum supported ruby in the gemspec. Otherwise
|
||||||
# we get errors if our ruby version doesn't match.
|
# we get errors if our ruby version doesn't match.
|
||||||
AllCops:
|
AllCops:
|
||||||
TargetRubyVersion: 2.4
|
TargetRubyVersion: 2.5
|
||||||
NewCops: enable
|
NewCops: enable
|
||||||
|
|
||||||
# Allow this in this file because adding the extra lines is pointless.
|
# Allow this in this file because adding the extra lines is pointless.
|
||||||
|
|
|
@ -17,6 +17,6 @@ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
|
||||||
)
|
)
|
||||||
|
|
||||||
SimpleCov.start do
|
SimpleCov.start do
|
||||||
# enable_coverage :branch <-- Re-enable this when we move to ruby ~> 2.5.
|
enable_coverage :branch
|
||||||
add_filter ['/test/', '/samples/']
|
add_filter ['/test/', '/samples/']
|
||||||
end
|
end
|
||||||
|
|
|
@ -406,7 +406,6 @@ module Zip
|
||||||
def on_success_replace
|
def on_success_replace
|
||||||
dirname, basename = ::File.split(name)
|
dirname, basename = ::File.split(name)
|
||||||
::Dir::Tmpname.create(basename, dirname) do |tmp_filename|
|
::Dir::Tmpname.create(basename, dirname) do |tmp_filename|
|
||||||
begin
|
|
||||||
if yield tmp_filename
|
if yield tmp_filename
|
||||||
::File.rename(tmp_filename, name)
|
::File.rename(tmp_filename, name)
|
||||||
::File.chmod(@file_permissions, name) unless @create
|
::File.chmod(@file_permissions, name) unless @create
|
||||||
|
@ -417,7 +416,6 @@ module Zip
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
# Copyright (C) 2002, 2003 Thomas Sondergaard
|
# Copyright (C) 2002, 2003 Thomas Sondergaard
|
||||||
# rubyzip is free software; you can redistribute it and/or
|
# rubyzip is free software; you can redistribute it and/or
|
||||||
|
|
|
@ -25,7 +25,7 @@ Gem::Specification.new do |s|
|
||||||
'wiki_uri' => 'https://github.com/rubyzip/rubyzip/wiki'
|
'wiki_uri' => 'https://github.com/rubyzip/rubyzip/wiki'
|
||||||
}
|
}
|
||||||
|
|
||||||
s.required_ruby_version = '>= 2.4'
|
s.required_ruby_version = '>= 2.5'
|
||||||
|
|
||||||
s.add_development_dependency 'minitest', '~> 5.4'
|
s.add_development_dependency 'minitest', '~> 5.4'
|
||||||
s.add_development_dependency 'rake', '~> 12.3.3'
|
s.add_development_dependency 'rake', '~> 12.3.3'
|
||||||
|
|
|
@ -445,7 +445,7 @@ class FileNonmutatingTest < MiniTest::Test
|
||||||
'*/foo/**/*.txt' => ['globTest/foo/bar/baz/foo.txt']
|
'*/foo/**/*.txt' => ['globTest/foo/bar/baz/foo.txt']
|
||||||
}.each do |spec, expected_results|
|
}.each do |spec, expected_results|
|
||||||
results = zf.glob(spec)
|
results = zf.glob(spec)
|
||||||
assert(results.all? { |entry| entry.kind_of? ::Zip::Entry })
|
assert(results.all?(::Zip::Entry))
|
||||||
|
|
||||||
result_strings = results.map(&:to_s)
|
result_strings = results.map(&:to_s)
|
||||||
missing_matches = expected_results - result_strings
|
missing_matches = expected_results - result_strings
|
||||||
|
|
Loading…
Reference in New Issue