Projects
openEuler:Mainline
rubygem-rb-inotify
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
_service:tar_scm:rubygem-rb-inotify.spec
Changed
@@ -1,6 +1,6 @@ %global gem_name rb-inotify Name: rubygem-%{gem_name} -Version: 0.10.0 +Version: 0.10.1 Release: 1 Summary: A Ruby wrapper for Linux inotify, using FFI License: MIT @@ -54,5 +54,8 @@ %{gem_instdir}/spec %changelog +* Thu Jul 28 2022 hkgy <kaguyahatu@outlook.com> - 0.10.1-1 +- Update to 0.10.1 + * Tue Aug 18 2020 huangyangke <huangyangke@huawei.com> - 0.10.0-1 - package init
View file
_service
Changed
@@ -2,7 +2,7 @@ <service name="tar_scm"> <param name="scm">git</param> <param name="url">git@gitee.com:src-openeuler/rubygem-rb-inotify.git</param> - <param name="revision">96a01d71a91d59b55e793b44f76b3ef1c5a749a0</param> + <param name="revision">master</param> <param name="exclude">*</param> <param name="extract">*</param> </service>
View file
_service:tar_scm:rb-inotify-0.10.0.gem/checksums.yaml.gz -> _service:tar_scm:rb-inotify-0.10.1.gem/checksums.yaml.gz
Changed
@@ -1,7 +1,7 @@ --- SHA256: - metadata.gz: 508d32162686edac9f8899476c72f067947853be3bf54636c03e8e26af5f1db6 - data.tar.gz: 40ba36f43b4ddbc6659fdc60a23494fc0c3d3aea69e8da38100860b315410c10 + metadata.gz: 803cf77fe31e9334147381cbc2fcdc911f5c8c060582af70afb80ba00caa4967 + data.tar.gz: dc13bce654e7a7c20d17722db4a62d4a091a6f21918e8133702306d90d5e0ccb SHA512: - metadata.gz: e6a89d3e902bd71ed29ae54023f0a54be8fa525fa062a272a4291b35072fe75b1d597ce1d095eda32df4b6d842ea73321e770a9c67bb1492248c74c226cfc2ab - data.tar.gz: 70abecd11f1ceee101444d6cbd35c086ad0604a847d48b79c9fbda0658e3bc1ddad16c6047c1df50d84bdf7fa854251da66ede2106158b124eabe7d0b47bff7f + metadata.gz: 8b798f26a05bb0757e2bb29c49bdc07b694659c9bfd1a007be3fec48acbfccb59c049bbf17881c739f80f66fc63b03df15fb70574aaae73ce2f457667e726eec + data.tar.gz: c29ccd96375401b43d52ca09345ab235e11b044706ef4995525372961b126d4b845ac468c422c40dd77eec36995ac19855dccab85706a6458f34505bec5ac02b
View file
_service:tar_scm:rb-inotify-0.10.0.gem/data/.travis.yml -> _service:tar_scm:rb-inotify-0.10.1.gem/data/.travis.yml
Changed
@@ -11,11 +11,9 @@ - rvm: truffleruby - rvm: jruby-head - rvm: ruby-head - - rvm: rbx-3 allow_failures: - rvm: truffleruby - rvm: jruby - rvm: ruby-head - rvm: jruby-head - - rvm: rbx-3 fast_finish: true
View file
_service:tar_scm:rb-inotify-0.10.0.gem/data/LICENSE.md -> _service:tar_scm:rb-inotify-0.10.1.gem/data/LICENSE.md
Changed
@@ -1,7 +1,7 @@ -# The MIT License (MIT) +# The MIT License -Copyright, 2009, by Natalie Weizenbaum(https://github.com/nex3). -Copyright, 2017, by Samuel G. D. Williams(http://www.codeotaku.com/samuel-williams). +Copyright, 2009, by Natalie Weizenbaum(https://github.com/nex3). +Copyright, 2017, by Samuel G. D. Williams(http://www.codeotaku.com). 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:
View file
_service:tar_scm:rb-inotify-0.10.0.gem/data/README.md -> _service:tar_scm:rb-inotify-0.10.1.gem/data/README.md
Changed
@@ -10,7 +10,7 @@ !Code Climate(https://codeclimate.com/github/guard/rb-inotify.svg)(https://codeclimate.com/github/guard/rb-inotify) !Coverage Status(https://coveralls.io/repos/guard/rb-inotify/badge.svg)(https://coveralls.io/r/guard/rb-inotify) -## Basic Usage +## Usage The API is similar to the inotify C API, but with a more Rubyish feel. First, create a notifier: @@ -69,6 +69,16 @@ 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
View file
_service:tar_scm:rb-inotify-0.10.0.gem/data/lib/rb-inotify/notifier.rb -> _service:tar_scm:rb-inotify-0.10.1.gem/data/lib/rb-inotify/notifier.rb
Changed
@@ -51,12 +51,18 @@ def initialize @running = Mutex.new @pipe = IO.pipe + # JRuby shutdown sometimes runs IO finalizers before all threads finish. + if RUBY_ENGINE == 'jruby' + @pipe0.autoclose = false + @pipe1.autoclose = false + end @watchers = {} fd = Native.inotify_init unless fd < 0 @handle = IO.new(fd) + @handle.autoclose = false if RUBY_ENGINE == 'jruby' return end @@ -224,10 +230,13 @@ # @see #process def run @running.synchronize do + Thread.current:INOTIFY_RUN_THREAD = true @stop = false process until @stop end + ensure + Thread.current:INOTIFY_RUN_THREAD = false end # Stop watching for filesystem events. @@ -237,8 +246,10 @@ @stop = true @pipe.last.write "." - @running.synchronize do - # no-op: we just needed to wait until the lock was available + unless Thread.current:INOTIFY_RUN_THREAD + @running.synchronize do + # no-op: we just needed to wait until the lock was available + end end end
View file
_service:tar_scm:rb-inotify-0.10.0.gem/data/lib/rb-inotify/version.rb -> _service:tar_scm:rb-inotify-0.10.1.gem/data/lib/rb-inotify/version.rb
Changed
@@ -20,5 +20,5 @@ # THE SOFTWARE. module INotify - VERSION = '0.10.0' + VERSION = '0.10.1' end
View file
_service:tar_scm:rb-inotify-0.10.0.gem/data/spec/notifier_spec.rb -> _service:tar_scm:rb-inotify-0.10.1.gem/data/spec/notifier_spec.rb
Changed
@@ -101,6 +101,16 @@ expect(events.map(&:name)).to match_array(%w(one.txt two.txt)) end + + it "can be stopped from within a callback" do + barriers = Array.new(3) { Concurrent::Event.new } + barrier_queue = barriers.dup + events = recording(dir, :create) { @notifier.stop } + + run_thread = Thread.new { @notifier.run } + dir.join("one.txt").write("hello world") + run_thread.join + end end describe :fd do
View file
_service:tar_scm:rb-inotify-0.10.0.gem/metadata.gz -> _service:tar_scm:rb-inotify-0.10.1.gem/metadata.gz
Changed
@@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: rb-inotify version: !ruby/object:Gem::Version - version: 0.10.0 + version: 0.10.1 platform: ruby authors: - Natalie Weizenbaum @@ -9,7 +9,7 @@ autorequire: bindir: bin cert_chain: -date: 2018-12-15 00:00:00.000000000 Z +date: 2019-12-24 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: ffi @@ -127,8 +127,7 @@ - !ruby/object:Gem::Version version: '0' requirements: -rubyforge_project: -rubygems_version: 2.7.8 +rubygems_version: 3.0.4 signing_key: specification_version: 4 summary: A Ruby wrapper for Linux inotify, using FFI
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2