Skip to content

Commit

Permalink
Bump required ruby version to v2.4.0
Browse files Browse the repository at this point in the history
a9137ac introduced a use of Hash#transform_values in
Listen::Record#dir_entries, however that was only added to Ruby in
[v2.4](https://github.com/ruby/ruby/blob/v2_4_0/NEWS#core-classes-updates-outstanding-ones-only-).

This can lead to runtime errors when run on an older version of Ruby,
such as 2.2.7, which the gemspec previously implied was supported.

Also expand CI to match and test on Ruby v2.4.
  • Loading branch information
cgunther committed Mar 30, 2021
1 parent c00a57b commit 25a099b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/development.yml
Expand Up @@ -6,21 +6,22 @@ jobs:
test:
runs-on: ${{matrix.os}}-latest
continue-on-error: ${{matrix.experimental}}

strategy:
matrix:
os:
- ubuntu
- macos

ruby:
- 2.4
- 2.5
- 2.6
- 2.7

experimental: [false]
env: [""]

include:
- os: macos
ruby: truffleruby-head
Expand All @@ -34,14 +35,14 @@ jobs:
- os: ubuntu
ruby: head
experimental: true

steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby}}
bundler-cache: true

- name: Run tests
timeout-minutes: 6
run: |
Expand Down
2 changes: 1 addition & 1 deletion listen.gemspec
Expand Up @@ -32,7 +32,7 @@ Gem::Specification.new do |gem| # rubocop:disable Metrics/BlockLength
gem.executable = 'listen'
gem.require_path = 'lib'

gem.required_ruby_version = '>= 2.2.7' # rubocop:disable Gemspec/RequiredRubyVersion
gem.required_ruby_version = '>= 2.4.0' # rubocop:disable Gemspec/RequiredRubyVersion

gem.add_dependency 'rb-fsevent', '~> 0.10', '>= 0.10.3'
gem.add_dependency 'rb-inotify', '~> 0.9', '>= 0.9.10'
Expand Down

0 comments on commit 25a099b

Please sign in to comment.