Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ruby 2.2, 2.3, and 2.4 to CI matrix #537

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/development.yml
Expand Up @@ -14,6 +14,9 @@ jobs:
- macos

ruby:
- 2.2
- 2.3
- 2.4
- 2.5
- 2.6
- 2.7
Expand Down
6 changes: 4 additions & 2 deletions Gemfile
Expand Up @@ -26,14 +26,16 @@ group :test do
gem 'rspec', '~> 3.3'
end

RUBY_VERSION_FLOAT = RUBY_VERSION[/\d+\.\d+/].to_f

group :development do
gem 'bundler'
gem 'gems', require: false
gem 'guard-rspec', require: false
gem 'guard-rubocop'
gem 'guard-rubocop' unless RUBY_VERSION_FLOAT < 2.4
gem 'netrc', require: false
gem 'octokit', require: false
gem 'pry-rescue'
gem 'rubocop', '0.91.0'
gem 'rubocop', '0.91.0' unless RUBY_VERSION_FLOAT < 2.4
gem 'yard', require: false
end
2 changes: 1 addition & 1 deletion lib/listen/adapter/base.rb
Expand Up @@ -88,7 +88,7 @@ def stop
private

def _stop
@run_thread&.kill
@run_thread && @run_thread.kill
ColinDKelley marked this conversation as resolved.
Show resolved Hide resolved
@run_thread = nil
end

Expand Down
2 changes: 1 addition & 1 deletion lib/listen/adapter/darwin.rb
Expand Up @@ -69,7 +69,7 @@ def _process_event(dir, path)
end

def _stop
@worker_thread&.kill
@worker_thread && @worker_thread.kill
ColinDKelley marked this conversation as resolved.
Show resolved Hide resolved
super
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/listen/adapter/linux.rb
Expand Up @@ -102,7 +102,7 @@ def _dir_event?(event)
end

def _stop
@worker&.close
@worker && @worker.close
ColinDKelley marked this conversation as resolved.
Show resolved Hide resolved

super
end
Expand Down
2 changes: 1 addition & 1 deletion lib/listen/event/config.rb
Expand Up @@ -25,7 +25,7 @@ def sleep(seconds)
end

def call(*args)
@block&.call(*args)
@block && @block.call(*args)
ColinDKelley marked this conversation as resolved.
Show resolved Hide resolved
end

def callable?
Expand Down
4 changes: 2 additions & 2 deletions lib/listen/event/loop.rb
Expand Up @@ -29,7 +29,7 @@ def initialize(config)
end

def wakeup_on_event
if started? && @wait_thread&.alive?
if started? && @wait_thread && @wait_thread.alive?
_wakeup(:event)
end
end
Expand Down Expand Up @@ -67,7 +67,7 @@ def pause
def stop
transition! :stopped

@wait_thread&.join
@wait_thread && @wait_thread.join
ColinDKelley marked this conversation as resolved.
Show resolved Hide resolved
@wait_thread = nil
end

Expand Down