A summary of data about the Ruby ecosystem.

https://github.com/guard/rb-inotify

A thorough inotify wrapper for Ruby using FFI.
https://github.com/guard/rb-inotify

Keywords from Contributors

activerecord activejob mvc rubygems ruby-gem rack nokogiri rspec xslt xerces

Last synced: about 6 hours ago
JSON representation

Repository metadata

A thorough inotify wrapper for Ruby using FFI.

README.md

rb-inotify

This is a simple wrapper over the inotify Linux kernel subsystem
for monitoring changes to files and directories.
It uses the FFI gem to avoid having to compile a C extension.

API documentation is available on rdoc.info.

Development Status

Usage

The API is similar to the inotify C API, but with a more Rubyish feel.
First, create a notifier:

notifier = INotify::Notifier.new

Then, tell it to watch the paths you're interested in
for the events you care about:

notifier.watch("path/to/foo.txt", :modify) {puts "foo.txt was modified!"}
notifier.watch("path/to/bar", :moved_to, :create) do |event|
  puts "#{event.name} is now in path/to/bar!"
end

Inotify can watch directories or individual files.
It can pay attention to all sorts of events;
for a full list, see the inotify man page.

Finally, you get at the events themselves:

notifier.run

This will loop infinitely, calling the appropriate callbacks when the files are changed.
If you don't want infinite looping,
you can also block until there are available events,
process them all at once,
and then continue on your merry way:

notifier.process

Advanced Usage

Sometimes it's necessary to have finer control over the underlying IO operations
than is provided by the simple callback API.
The trick to this is that the {INotify::Notifier#to_io Notifier#to_io} method
returns a fully-functional IO object,
with a file descriptor and everything.
This means, for example, that it can be passed to IO#select:

 # Wait 10 seconds for an event then give up
 if IO.select([notifier.to_io], [], [], 10)
   notifier.process
 end

It can even be used with EventMachine:

 require 'eventmachine'

 EM.run do
   EM.watch notifier.to_io do
     notifier.process
   end
 end

Unfortunately, this currently doesn't work under JRuby.
JRuby currently doesn't use native file descriptors for the IO object,
so we can't use the notifier's file descriptor as a stand-in.

Resource Limits

If you get an error like inotify event queue has overflowed you might be running into system limits. You can add the following to your /etc/sysctl.conf to increase the number of files that can be monitored:

fs.inotify.max_user_watches = 100000
fs.inotify.max_queued_events = 100000
fs.inotify.max_user_instances = 100000

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

Released under the MIT license.

Copyright, 2009, by Natalie Weizenbaum.
Copyright, 2017, by Samuel G. D. Williams.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 3 days ago

Total Commits: 202
Total Committers: 35
Avg Commits per committer: 5.771
Development Distribution Score (DDS): 0.381

Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0

Name Email Commits
Nathan Weizenbaum n****2@g****m 125
Samuel Williams s****s@o****z 21
Matthew Draper m****w@t****t 8
Jun Aruga j****a@r****m 4
Cezary Baginski c****y@c****t 3
Sven Dahlstrand s****d@g****m 3
nishidy n****o@g****m 3
Steven McDonald s****d@a****u 2
Aleksei Gusev a****v@g****m 2
Jonathan Hefner j****n@h****o 2
Mikhail Gusarov d****g@d****t 2
Philou p****u@f****r 2
Robert Reiz r****1@g****m 2
Thomas E. Enebo t****o@g****m 2
Sylvain Joyeux s****x@1****m 1
Akshay Moghe a****e@m****m 1
Kurt Robert Rudolph k****h@e****m 1
Markus Schirp m****j@s****t 1
daniel watson o****y@g****m 1
Rodrigo Rosenfeld Rosas r****s@g****m 1
Patrick LÜhne p****b@l****e 1
Paolo Agazzone a****a@i****t 1
Nikita Vasilevsky n****i@g****m 1
Nicolas Viennot n****s@v****z 1
Nicolas Leger n****r 1
Kenichi Kamiya k****1@g****m 1
Juha Erkkilä J****a@o****i 1
Hiroki Yagita y****o@g****m 1
Geoff Youngs g****t@i****k 1
Dirk von Grünigen d****k@v****m 1
and 5 more...

Committer domains:


Issue and Pull Request metadata

Last synced: 3 months ago

Total issues: 46
Total pull requests: 58
Average time to close issues: about 1 year
Average time to close pull requests: 4 months
Total issue authors: 42
Total pull request authors: 39
Average comments per issue: 5.15
Average comments per pull request: 3.33
Merged pull request: 43
Bot issues: 0
Bot pull requests: 0

Past year issues: 1
Past year pull requests: 1
Past year average time to close issues: about 15 hours
Past year average time to close pull requests: N/A
Past year issue authors: 1
Past year pull request authors: 1
Past year average comments per issue: 6.0
Past year average comments per pull request: 5.0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/guard/rb-inotify

Top Issue Authors

  • ioquatix (4)
  • fsobanski (2)
  • puneet24 (1)
  • sebbASF (1)
  • daveola (1)
  • junaruga (1)
  • mnightwardskytap (1)
  • swaathi (1)
  • sanemat (1)
  • dorra (1)
  • shuhaowu (1)
  • amoghe (1)
  • AnchorCat (1)
  • phuonglm (1)
  • mufid (1)

Top Pull Request Authors

  • junaruga (7)
  • matthewd (6)
  • ioquatix (3)
  • nvasilevski (2)
  • e2 (2)
  • reiz (2)
  • jonathanhefner (2)
  • msducheminjr (2)
  • paoloaga (2)
  • njam (2)
  • AnchorCat (2)
  • hron (1)
  • kachick (1)
  • vongruenigen (1)
  • amoghe (1)

Top Issue Labels

Top Pull Request Labels


Package metadata

gem.coop: rb-inotify

A Ruby wrapper for Linux inotify, using FFI

  • Homepage: https://github.com/guard/rb-inotify
  • Documentation: http://www.rubydoc.info/gems/rb-inotify/
  • Licenses: MIT
  • Latest release: 0.11.1 (published over 1 year ago)
  • Last Synced: 2025-12-08T08:35:19.758Z (4 days ago)
  • Versions: 34
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 438,352,608 Total
  • Docker Downloads: 3,537,020,149
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 0.018%
    • Docker downloads count: 0.023%
    • Downloads: 0.05%
  • Maintainers (2)
rubygems.org: rb-inotify

A Ruby wrapper for Linux inotify, using FFI

  • Homepage: https://github.com/guard/rb-inotify
  • Documentation: http://www.rubydoc.info/gems/rb-inotify/
  • Licenses: MIT
  • Latest release: 0.11.1 (published over 1 year ago)
  • Last Synced: 2025-12-08T18:31:00.983Z (3 days ago)
  • Versions: 34
  • Dependent Packages: 347
  • Dependent Repositories: 857,448
  • Downloads: 438,450,722 Total
  • Docker Downloads: 3,537,020,149
  • Rankings:
    • Dependent repos count: 0.016%
    • Downloads: 0.048%
    • Docker downloads count: 0.054%
    • Dependent packages count: 0.126%
    • Average: 1.136%
    • Stargazers count: 3.176%
    • Forks count: 3.399%
  • Maintainers (2)
alpine-v3.18: ruby-rb-inotify

A Ruby wrapper for Linux inotify, using FFI

  • Homepage: https://github.com/guard/rb-inotify
  • Licenses: MIT
  • Latest release: 0.10.1-r3 (published over 2 years ago)
  • Last Synced: 2025-12-03T13:14:23.310Z (9 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 7.084%
    • Stargazers count: 14.034%
    • Forks count: 14.304%
  • Maintainers (1)
alpine-v3.16: ruby-rb-inotify

A Ruby wrapper for Linux inotify, using FFI

  • Homepage: https://github.com/guard/rb-inotify
  • Licenses: MIT
  • Latest release: 0.10.1-r2 (published over 3 years ago)
  • Last Synced: 2025-12-02T10:53:59.784Z (10 days ago)
  • Versions: 1
  • Dependent Packages: 2
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Average: 8.326%
    • Stargazers count: 10.436%
    • Forks count: 10.824%
    • Dependent packages count: 12.044%
  • Maintainers (1)
alpine-edge: ruby-rb-inotify

A Ruby wrapper for Linux inotify, using FFI

  • Homepage: https://github.com/guard/rb-inotify
  • Licenses: MIT
  • Latest release: 0.11.1-r1 (published 8 months ago)
  • Last Synced: 2025-12-02T10:46:33.441Z (10 days ago)
  • Versions: 5
  • Dependent Packages: 1
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 6.031%
    • Average: 9.045%
    • Forks count: 14.962%
    • Stargazers count: 15.189%
  • Maintainers (1)
alpine-v3.15: ruby-rb-inotify

A Ruby wrapper for Linux inotify, using FFI

  • Homepage: https://github.com/guard/rb-inotify
  • Licenses: MIT
  • Latest release: 0.10.1-r1 (published about 4 years ago)
  • Last Synced: 2025-12-07T18:03:44.963Z (4 days ago)
  • Versions: 1
  • Dependent Packages: 3
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Average: 9.087%
    • Stargazers count: 9.642%
    • Forks count: 10.229%
    • Dependent packages count: 16.479%
  • Maintainers (1)
alpine-v3.17: ruby-rb-inotify

A Ruby wrapper for Linux inotify, using FFI

  • Homepage: https://github.com/guard/rb-inotify
  • Licenses: MIT
  • Latest release: 0.10.1-r2 (published over 3 years ago)
  • Last Synced: 2025-12-03T11:56:28.625Z (9 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Stargazers count: 12.883%
    • Forks count: 12.906%
    • Average: 13.261%
    • Dependent packages count: 27.254%
  • Maintainers (1)
conda-forge.org: rb-rb-inotify

  • Homepage: https://rubygems.org/gems/rb-inotify
  • Licenses: MIT
  • Latest release: 0.10.1 (published over 5 years ago)
  • Last Synced: 2025-12-01T10:05:53.836Z (11 days ago)
  • Versions: 2
  • Dependent Packages: 2
  • Dependent Repositories: 1
  • Rankings:
    • Dependent packages count: 19.607%
    • Stargazers count: 21.887%
    • Average: 22.267%
    • Forks count: 23.16%
    • Dependent repos count: 24.412%
alpine-v3.20: ruby-rb-inotify

A Ruby wrapper for Linux inotify, using FFI

  • Homepage: https://github.com/guard/rb-inotify
  • Licenses: MIT
  • Latest release: 0.11.1-r0 (published over 1 year ago)
  • Last Synced: 2025-12-03T10:18:34.361Z (9 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
  • Maintainers (1)
alpine-v3.21: ruby-rb-inotify

A Ruby wrapper for Linux inotify, using FFI

  • Homepage: https://github.com/guard/rb-inotify
  • Licenses: MIT
  • Latest release: 0.11.1-r0 (published over 1 year ago)
  • Last Synced: 2025-12-07T18:03:59.608Z (4 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
  • Maintainers (1)
alpine-v3.22: ruby-rb-inotify

A Ruby wrapper for Linux inotify, using FFI

  • Homepage: https://github.com/guard/rb-inotify
  • Licenses: MIT
  • Latest release: 0.11.1-r1 (published 8 months ago)
  • Last Synced: 2025-12-05T17:04:46.816Z (6 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
  • Maintainers (1)
alpine-v3.19: ruby-rb-inotify

A Ruby wrapper for Linux inotify, using FFI

  • Homepage: https://github.com/guard/rb-inotify
  • Licenses: MIT
  • Latest release: 0.10.1-r3 (published over 2 years ago)
  • Last Synced: 2025-12-02T13:31:38.657Z (10 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
  • Maintainers (1)

Dependencies

Gemfile rubygems
  • coveralls >= 0 development
  • pry >= 0 development
  • pry-coolline >= 0 development
  • simplecov >= 0 development
  • tty-prompt >= 0 development
rb-inotify.gemspec rubygems
  • bundler >= 0 development
  • concurrent-ruby >= 0 development
  • rake >= 0 development
  • rspec ~> 3.6 development
  • ffi ~> 1.0
.github/workflows/test.yaml actions
  • actions/checkout v4 composite
  • ruby/setup-ruby v1 composite

Score: 32.145014376032634