Skip to content

Commit

Permalink
Bump to 0.2.6; cleanup of whitespace and gemspec.
Browse files Browse the repository at this point in the history
  • Loading branch information
gregschmit committed Apr 14, 2021
1 parent 708100e commit f8b0c45
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 58 deletions.
1 change: 1 addition & 0 deletions .ruby-gemset
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rb-kqueue
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ruby-2.6.5
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

78 changes: 39 additions & 39 deletions lib/rb-kqueue/native/flags.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,48 +7,48 @@ module Native
module Flags
# Filters
if FFI::Platform::IS_FREEBSD
EVFILT_READ = -1
EVFILT_WRITE = -2
EVFILT_AIO = -3 # Attached to aio requests
EVFILT_VNODE = -4 # Attached to vnodes
EVFILT_PROC = -5 # Attached to struct proc
EVFILT_SIGNAL = -6 # Attached to struct proc
EVFILT_TIMER = -7 # Timers
EVFILT_PROCDESC = -8 # Attached to process descriptors
EVFILT_FS = -9 # Filesystem events
EVFILT_LIO = -10 # Attached to lio requests
EVFILT_USER = -11 # User events
EVFILT_SENDFILE = -12 # Attached to sendfile requests
EVFILT_SYSCOUNT = 12
EVFILT_READ = -1
EVFILT_WRITE = -2
EVFILT_AIO = -3 # Attached to aio requests
EVFILT_VNODE = -4 # Attached to vnodes
EVFILT_PROC = -5 # Attached to struct proc
EVFILT_SIGNAL = -6 # Attached to struct proc
EVFILT_TIMER = -7 # Timers
EVFILT_PROCDESC = -8 # Attached to process descriptors
EVFILT_FS = -9 # Filesystem events
EVFILT_LIO = -10 # Attached to lio requests
EVFILT_USER = -11 # User events
EVFILT_SENDFILE = -12 # Attached to sendfile requests
EVFILT_SYSCOUNT = 12
elsif FFI::Platform::IS_NETBSD
EVFILT_READ = 0
EVFILT_WRITE = 1
EVFILT_AIO = 2 # Attached to aio requests
EVFILT_VNODE = 3 # Attached to vnodes
EVFILT_PROC = 4 # Attached to struct proc
EVFILT_SIGNAL = 5 # Attached to struct proc
EVFILT_TIMER = 6 # Arbitrary timer (in ms)
EVFILT_SYSCOUNT = 7 # Number of filters
EVFILT_READ = 0
EVFILT_WRITE = 1
EVFILT_AIO = 2 # Attached to aio requests
EVFILT_VNODE = 3 # Attached to vnodes
EVFILT_PROC = 4 # Attached to struct proc
EVFILT_SIGNAL = 5 # Attached to struct proc
EVFILT_TIMER = 6 # Arbitrary timer (in ms)
EVFILT_SYSCOUNT = 7 # Number of filters
elsif FFI::Platform::IS_OPENBSD
EVFILT_READ = -1
EVFILT_WRITE = -2
EVFILT_AIO = -3 # Attached to aio requests
EVFILT_VNODE = -4 # Attached to vnodes
EVFILT_PROC = -5 # Attached to struct proc
EVFILT_SIGNAL = -6 # Attached to struct proc
EVFILT_TIMER = -7 # Timers
EVFILT_READ = -1
EVFILT_WRITE = -2
EVFILT_AIO = -3 # Attached to aio requests
EVFILT_VNODE = -4 # Attached to vnodes
EVFILT_PROC = -5 # Attached to struct proc
EVFILT_SIGNAL = -6 # Attached to struct proc
EVFILT_TIMER = -7 # Timers
else
EVFILT_READ = -1
EVFILT_WRITE = -2
EVFILT_AIO = -3 # Attached to aio requests
EVFILT_VNODE = -4 # Attached to vnodes
EVFILT_PROC = -5 # Attached to struct proc
EVFILT_SIGNAL = -6 # Attached to struct proc
EVFILT_TIMER = -7 # Timers
EVFILT_MACHPORT = -8 # Mach portsets
EVFILT_FS = -9 # Filesystem events
EVFILT_USER = -10 # User events
EVFILT_SESSION = -11 # Audit session events
EVFILT_READ = -1
EVFILT_WRITE = -2
EVFILT_AIO = -3 # Attached to aio requests
EVFILT_VNODE = -4 # Attached to vnodes
EVFILT_PROC = -5 # Attached to struct proc
EVFILT_SIGNAL = -6 # Attached to struct proc
EVFILT_TIMER = -7 # Timers
EVFILT_MACHPORT = -8 # Mach portsets
EVFILT_FS = -9 # Filesystem events
EVFILT_USER = -10 # User events
EVFILT_SESSION = -11 # Audit session events
end


Expand Down
2 changes: 1 addition & 1 deletion lib/rb-kqueue/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module KQueue
VERSION = [0, 2, 5]
VERSION = [0, 2, 6]
end
12 changes: 2 additions & 10 deletions rb-kqueue.gemspec
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# Generated by jeweler
# DO NOT EDIT THIS FILE DIRECTLY
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
# -*- encoding: utf-8 -*-

require File.expand_path('../lib/rb-kqueue/version', __FILE__)

Gem::Specification.new do |gem|
Expand All @@ -11,23 +6,20 @@ Gem::Specification.new do |gem|

gem.authors = ["Mathieu Arnold", "Nathan Weizenbaum"]
gem.email = %q{mat@mat.cc nex342@gmail.com}
gem.date = %q{2017-05-16}
gem.description = %q{A Ruby wrapper for BSD's kqueue, using FFI}
gem.extra_rdoc_files = %w(README.md)
gem.licenses = ['MIT']

gem.files = `git ls-files`.split(/\n/)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})

gem.homepage = %q{http://github.com/mat813/rb-kqueue}
gem.rdoc_options = ["--charset=UTF-8"]
gem.require_paths = ["lib"]
gem.rubygems_version = %q{1.3.5}
gem.summary = %q{A Ruby wrapper for BSD's kqueue, using FFI}

gem.add_runtime_dependency(%q<ffi>, [">= 0.5.0"])
gem.add_development_dependency(%q<yard>, [">= 0.4.0"])
gem.add_development_dependency(%q<rspec>, [">= 3.3.0"])
end

14 changes: 7 additions & 7 deletions spec/kqueue_queue_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@

context 'file is watched for writes' do
before do
queue.watch_file file.path, :write do
file_touched = !file_touched
end
queue.process
queue.watch_file file.path, :write do
file_touched = !file_touched
end
queue.process
end

context 'file is written to' do
it 'executes the defined block' do
expect { file.write 'test' }.to change { file_touched }.from(false).to true
end
it 'executes the defined block' do
expect { file.write 'test' }.to change { file_touched }.from(false).to true
end
end
end

Expand Down

0 comments on commit f8b0c45

Please sign in to comment.