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
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 2.4
|
||||
ruby-version: '2.5'
|
||||
bundler-cache: true
|
||||
|
||||
- name: Rubocop
|
||||
|
|
|
@ -8,12 +8,12 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
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:
|
||||
- os: macos
|
||||
ruby: 2.4
|
||||
ruby: '2.5'
|
||||
- os: windows
|
||||
ruby: 2.4
|
||||
ruby: '2.5'
|
||||
runs-on: ${{ matrix.os }}-latest
|
||||
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.os == 'windows' }}
|
||||
steps:
|
||||
|
|
|
@ -7,7 +7,7 @@ inherit_from: .rubocop_todo.yml
|
|||
# Set this to the minimum supported ruby in the gemspec. Otherwise
|
||||
# we get errors if our ruby version doesn't match.
|
||||
AllCops:
|
||||
TargetRubyVersion: 2.4
|
||||
TargetRubyVersion: 2.5
|
||||
NewCops: enable
|
||||
|
||||
# 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
|
||||
# enable_coverage :branch <-- Re-enable this when we move to ruby ~> 2.5.
|
||||
enable_coverage :branch
|
||||
add_filter ['/test/', '/samples/']
|
||||
end
|
||||
|
|
|
@ -406,14 +406,12 @@ module Zip
|
|||
def on_success_replace
|
||||
dirname, basename = ::File.split(name)
|
||||
::Dir::Tmpname.create(basename, dirname) do |tmp_filename|
|
||||
begin
|
||||
if yield tmp_filename
|
||||
::File.rename(tmp_filename, name)
|
||||
::File.chmod(@file_permissions, name) unless @create
|
||||
end
|
||||
ensure
|
||||
::File.unlink(tmp_filename) if ::File.exist?(tmp_filename)
|
||||
if yield tmp_filename
|
||||
::File.rename(tmp_filename, name)
|
||||
::File.chmod(@file_permissions, name) unless @create
|
||||
end
|
||||
ensure
|
||||
::File.unlink(tmp_filename) if ::File.exist?(tmp_filename)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -25,7 +25,7 @@ Gem::Specification.new do |s|
|
|||
'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 'rake', '~> 12.3.3'
|
||||
|
|
|
@ -445,7 +445,7 @@ class FileNonmutatingTest < MiniTest::Test
|
|||
'*/foo/**/*.txt' => ['globTest/foo/bar/baz/foo.txt']
|
||||
}.each do |spec, expected_results|
|
||||
results = zf.glob(spec)
|
||||
assert(results.all? { |entry| entry.kind_of? ::Zip::Entry })
|
||||
assert(results.all?(::Zip::Entry))
|
||||
|
||||
result_strings = results.map(&:to_s)
|
||||
missing_matches = expected_results - result_strings
|
||||
|
|
Loading…
Reference in New Issue