Hello community,

here is the log from the commit of package rubygem-listen for openSUSE:Factory 
checked in at 2015-12-14 10:13:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-listen (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-listen.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-listen"

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-listen/rubygem-listen.changes    
2015-08-05 06:50:35.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-listen.new/rubygem-listen.changes       
2015-12-14 10:13:52.000000000 +0100
@@ -1,0 +2,12 @@
+Mon Nov 23 05:29:59 UTC 2015 - [email protected]
+
+- updated to version 3.0.5
+ see installed CHANGELOG.md
+
+-------------------------------------------------------------------
+Thu Nov  5 05:30:23 UTC 2015 - [email protected]
+
+- updated to version 3.0.4
+ see installed CHANGELOG.md
+
+-------------------------------------------------------------------

Old:
----
  listen-3.0.3.gem

New:
----
  listen-3.0.5.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-listen.spec ++++++
--- /var/tmp/diff_new_pack.emw2rt/_old  2015-12-14 10:13:52.000000000 +0100
+++ /var/tmp/diff_new_pack.emw2rt/_new  2015-12-14 10:13:52.000000000 +0100
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-listen
-Version:        3.0.3
+Version:        3.0.5
 Release:        0
 %define mod_name listen
 %define mod_full_name %{mod_name}-%{version}

++++++ listen-3.0.3.gem -> listen-3.0.5.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md       2015-07-23 12:02:20.000000000 +0200
+++ new/README.md       2015-11-18 20:14:39.000000000 +0100
@@ -1,4 +1,4 @@
-### :warning: Listen is [looking for new 
maintainers](https://groups.google.com/forum/#!topic/guard-dev/2Td0QTvTIsE). 
Please [contact me](mailto:[email protected]) if you're interested.
+:exclamation: Listen is currently accepting more maintainers. Please [read 
this](https://github.com/guard/guard/wiki/Maintainers) if you're interested in 
joining the team.
 
 # Listen
 
@@ -6,19 +6,6 @@
 
 The Listen gem listens to file modifications and notifies you about the 
changes.
 
-## Known issues / Quickfixes / Workarounds
-
-*NOTE: TCP functionality has been removed from Listen 3.x - please use Listen
-2.x until alternative server and client gems are created/released for 3.x.*
-
-*NOTE: Ruby 1.9.3 is no longer maintained (and may not work with Listen) - 
it's best to upgrade to Ruby 2.2.2*
-
-For other issues, just head over here: 
https://github.com/guard/listen/wiki/Quickfixes,-known-issues-and-workarounds
-
-## Tips and Techniques
-
-Make sure you know these few basic tricks: 
https://github.com/guard/listen/wiki/Tips-and-Techniques
-
 ## Features
 
 * OS-optimized adapters on MRI for Mac OS X 10.6+, Linux, \*BSD and Windows, 
[more info](#listen-adapters) below.
@@ -28,21 +15,21 @@
 * Increased change detection accuracy on OS X HFS and VFAT volumes.
 * Tested on MRI Ruby environments (2.0+ only) via [Travis 
CI](https://travis-ci.org/guard/listen),
 
-NOTE: TCP functionality has been moved to a separate gem (listen-server and 
listen-client)
-
-NOTES:
-- Some filesystems won't work without polling (VM/Vagrant Shared folders, NFS, 
Samba, sshfs, etc.)
-- Specs suite on JRuby and Rubinius aren't reliable on Travis CI, but should 
work.
-- Windows and \*BSD adapter aren't continuously and automaticaly tested.
-
+## Issues / limitations
 
-## Pending features / issues
+* Limited support for symlinked directories 
([#279](https://github.com/guard/listen/issues/279)):
+  * Symlinks are always followed 
([#25](https://github.com/guard/listen/issues/25)).
+  * Symlinked directories pointing within a watched directory are not 
supported ([#273](https://github.com/guard/listen/pull/273)- see [Duplicate 
directory 
errors](https://github.com/guard/listen/wiki/Duplicate-directory-errors)).
+* No directory/adapter-specific configuration options.
+* Support for plugins planned for future.
+* TCP functionality was removed in Listen 
[3.0.0](https://github.com/guard/listen/releases/tag/v3.0.0) 
([#319](https://github.com/guard/listen/issues/319), 
[#218](https://github.com/guard/listen/issues/218)). There are plans to extract 
this feature to separate gems 
([#258](https://github.com/guard/listen/issues/258)), until this is finished, 
you can use by locking the `listen` gem to version `'~> 2.10'`.
+* Some filesystems won't work without polling (VM/Vagrant Shared folders, NFS, 
Samba, sshfs, etc.).
+* Specs suite on JRuby and Rubinius aren't reliable on Travis CI, but should 
work.
+* Windows and \*BSD adapter aren't continuously and automatically tested.
+* OSX adapter has some performance limitations 
([#342](https://github.com/guard/listen/issues/342)).
+* Ruby 1.9.3 is no longer maintained (and may not work with Listen) - it's 
best to upgrade to Ruby 2.2.2.
 
-* symlinked directories aren't fully transparent yet: 
https://github.com/guard/listen/issues/279
-* Directory/adapter specific configuration options
-* Support for plugins
-
-Pull request or help is very welcome for these.
+Pull requests or help is very welcome for these.
 
 ## Install
 
@@ -52,7 +39,6 @@
 gem 'listen', '~> 3.0' # NOTE: for TCP functionality, use '~> 2.10' for now
 ```
 
-
 ## Usage
 
 Call `Listen.to` with either a single directory or multiple directories, then 
define the "changes" callback in a block.
@@ -72,7 +58,7 @@
 Listeners can also be easily paused/unpaused:
 
 ``` ruby
-listener = Listen.to('dir/path/to/listen') { |modified, added, removed| # ... }
+listener = Listen.to('dir/path/to/listen') { |modified, added, removed| puts 
'handle changes here...' }
 
 listener.start
 listener.paused? # => false
@@ -102,13 +88,13 @@
 sleep
 ```
 
-Note: Ignoring regexp patterns are evaluated against relative paths.
+Note: `:ignore` regexp patterns are evaluated against relative paths.
 
-Note: ignoring paths does not improve performance - except when Polling
+Note: Ignoring paths does not improve performance, except when Polling 
([#274](https://github.com/guard/listen/issues/274))
 
 ### Only
 
-Listen catches all files (less the ignored once) by default, if you want to 
only listen to a specific type of file (ie: just rb extension) you should use 
the `only` option/method.
+Listen catches all files (less the ignored ones) by default. If you want to 
only listen to a specific type of file (i.e., just `.rb` extension), you should 
use the `only` option/method.
 
 ``` ruby
 listener = Listen.to('dir/path/to/listen', only: /\.rb$/) { |modified, added, 
removed| # ... }
@@ -117,7 +103,7 @@
 sleep
 ```
 
-Note: ':only' regexp patterns are evaluated only against relative **file** 
paths.
+Note: `:only` regexp patterns are evaluated only against relative **file** 
paths.
 
 
 ## Changes callback
@@ -174,14 +160,15 @@
 relative: false                                 # Whether changes should be 
relative to current dir or not
                                                 # default: false
 
-debug: true                                     # Enable Listen logger
-                                                # default: false
-
 polling_fallback_message: 'custom message'      # Set a custom polling 
fallback message (or disable it with false)
                                                 # default: "Listen will be 
polling for changes. Learn more at 
https://github.com/guard/listen#listen-adapters.";
 ```
 
-Also, setting the environment variable `LISTEN_GEM_DEBUGGING=1` does the same 
as `debug: true` above.
+## Debugging
+
+Setting the environment variable `LISTEN_GEM_DEBUGGING=1` sets up the INFO 
level logger, while `LISTEN_GEM_DEBUGGING=2` sets up the DEBUG level logger. 
+
+You can also set `Listen.logger` to a custom logger.
 
 
 ## Listen adapters
@@ -202,7 +189,7 @@
 
 ### On Windows
 
-If your are on Windows, it's recommended to use the 
[`wdm`](https://github.com/Maher4Ever/wdm) adapter instead of polling.
+If you are on Windows, it's recommended to use the 
[`wdm`](https://github.com/Maher4Ever/wdm) adapter instead of polling.
 
 Please add the following to your Gemfile:
 
@@ -212,7 +199,7 @@
 
 ### On \*BSD
 
-If your are on \*BSD you can try to use the 
[`rb-kqueue`](https://github.com/mat813/rb-kqueue) adapter instead of polling.
+If you are on \*BSD you can try to use the 
[`rb-kqueue`](https://github.com/mat813/rb-kqueue) adapter instead of polling.
 
 Please add the following to your Gemfile:
 
@@ -234,7 +221,6 @@
 
 See [TROUBLESHOOTING](https://github.com/guard/listen/wiki/Troubleshooting)
 
-
 ## Performance
 
 If Listen seems slow or unresponsive, make sure you're not using the Polling 
adapter (you should see a warning upon startup if you are).
@@ -255,6 +241,8 @@
 
 When in doubt, LISTEN_GEM_DEBUGGING=2 can help discover the actual events and 
time they happened.
 
+See also [Tips and 
Techniques](https://github.com/guard/listen/wiki/Tips-and-Techniques).
+
 ## Development
 
 * Documentation hosted at 
[RubyDoc](http://rubydoc.info/github/guard/listen/master/frames).
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/listen/adapter/base.rb 
new/lib/listen/adapter/base.rb
--- old/lib/listen/adapter/base.rb      2015-07-23 12:02:20.000000000 +0200
+++ new/lib/listen/adapter/base.rb      2015-11-18 20:14:39.000000000 +0100
@@ -85,12 +85,19 @@
         end
       end
 
+      def stop
+        _stop
+      end
+
       def self.usable?
         const_get('OS_REGEXP') =~ RbConfig::CONFIG['target_os']
       end
 
       private
 
+      def _stop
+      end
+
       def _timed(title)
         start = Time.now.to_f
         yield
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/listen/adapter/config.rb 
new/lib/listen/adapter/config.rb
--- old/lib/listen/adapter/config.rb    2015-07-23 12:02:20.000000000 +0200
+++ new/lib/listen/adapter/config.rb    2015-11-18 20:14:39.000000000 +0100
@@ -9,6 +9,9 @@
       attr_reader :adapter_options
 
       def initialize(directories, queue, silencer, adapter_options)
+        # Default to current directory if no directories are supplied
+        directories = [Dir.pwd] if directories.to_a.empty?
+        
         # TODO: fix (flatten, array, compact?)
         @directories = directories.map do |directory|
           Pathname.new(directory.to_s).realpath
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/listen/adapter/darwin.rb 
new/lib/listen/adapter/darwin.rb
--- old/lib/listen/adapter/darwin.rb    2015-07-23 12:02:20.000000000 +0200
+++ new/lib/listen/adapter/darwin.rb    2015-11-18 20:14:39.000000000 +0100
@@ -16,32 +16,27 @@
       # NOTE: each directory gets a DIFFERENT callback!
       def _configure(dir, &callback)
         require 'rb-fsevent'
+
         opts = { latency: options.latency }
 
         @workers ||= ::Queue.new
         @workers << FSEvent.new.tap do |worker|
+          _log :debug, "fsevent: watching: #{dir.to_s.inspect}"
           worker.watch(dir.to_s, opts, &callback)
         end
       end
 
-      # NOTE: _run is called within a thread, so run every other
-      # worker in it's own thread
       def _run
         first = @workers.pop
-        until @workers.empty?
-          next_worker = @workers.pop
-          Listen::Internals::ThreadPool.add do
-            begin
-              next_worker.run
-            rescue
-              _log_exception 'run() in extra thread(s) failed: %s: %s'
-            end
-          end
-        end
-        first.run
+
+        # NOTE: _run is called within a thread, so run every other
+        # worker in it's own thread
+        _run_workers_in_background(_to_array(@workers))
+        _run_worker(first)
       end
 
       def _process_event(dir, event)
+        _log :debug, "fsevent: processing event: #{event.inspect}"
         event.each do |path|
           new_path = Pathname.new(path.sub(/\/$/, ''))
           _log :debug, "fsevent: #{new_path}"
@@ -50,6 +45,27 @@
           _queue_change(:dir, dir, rel_path, recursive: true)
         end
       end
+
+      def _run_worker(worker)
+        _log :debug, "fsevent: running worker: #{worker.inspect}"
+        worker.run
+      rescue
+        _log_exception 'fsevent: running worker failed: %s:%s called from: 
%s', caller
+      end
+
+      def _run_workers_in_background(workers)
+        workers.each do |worker|
+          # NOTE: while passing local variables to the block below is not
+          # thread safe, using 'worker' from the enumerator above is ok
+          Listen::Internals::ThreadPool.add { _run_worker(worker) }
+        end
+      end
+
+      def _to_array(queue)
+        workers = []
+        workers << queue.pop until queue.empty?
+        workers
+      end
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/listen/adapter/linux.rb 
new/lib/listen/adapter/linux.rb
--- old/lib/listen/adapter/linux.rb     2015-07-23 12:02:20.000000000 +0200
+++ new/lib/listen/adapter/linux.rb     2015-11-18 20:14:39.000000000 +0100
@@ -27,7 +27,7 @@
       EOS
 
       def _configure(directory, &callback)
-        Kernel.require 'rb-inotify'
+        require 'rb-inotify'
         @worker ||= ::INotify::Notifier.new
         @worker.watch(directory.to_s, *options.events, &callback)
       rescue Errno::ENOSPC
@@ -97,6 +97,10 @@
       def _dir_event?(event)
         event.flags.include?(:isdir)
       end
+
+      def _stop
+        @worker.close
+      end
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/listen/backend.rb new/lib/listen/backend.rb
--- old/lib/listen/backend.rb   2015-07-23 12:02:20.000000000 +0200
+++ new/lib/listen/backend.rb   2015-11-18 20:14:39.000000000 +0100
@@ -27,7 +27,7 @@
     end
 
     def stop
-      # TODO: does nothing
+      adapter.stop
     end
 
     def min_delay_between_events
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/listen/directory.rb new/lib/listen/directory.rb
--- old/lib/listen/directory.rb 2015-07-23 12:02:20.000000000 +0200
+++ new/lib/listen/directory.rb 2015-11-18 20:14:39.000000000 +0100
@@ -20,10 +20,16 @@
                rel_path, options.inspect, previous.inspect, current.inspect)
       end
 
-      current.each do |full_path|
-        type = detect_type(full_path)
-        item_rel_path = full_path.relative_path_from(dir).to_s
-        _change(snapshot, type, item_rel_path, options)
+      begin
+        current.each do |full_path|
+          type = ::File.lstat(full_path.to_s).directory? ? :dir : :file
+          item_rel_path = full_path.relative_path_from(dir).to_s
+          _change(snapshot, type, item_rel_path, options)
+        end
+      rescue Errno::ENOENT
+        # The directory changed meanwhile, so rescan it
+        current = Set.new(path.children)
+        retry
       end
 
       # TODO: this is not tested properly
@@ -66,15 +72,5 @@
       opts.delete(:recursive)
       snapshot.invalidate(type, path, opts)
     end
-
-    def self.detect_type(full_path)
-      # TODO: should probably check record first
-      stat = ::File.lstat(full_path.to_s)
-      stat.directory? ? :dir : :file
-    rescue Errno::ENOENT
-      # TODO: ok, it should really check the record here
-      # report as dir for scanning
-      :dir
-    end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/listen/record/symlink_detector.rb 
new/lib/listen/record/symlink_detector.rb
--- old/lib/listen/record/symlink_detector.rb   2015-07-23 12:02:20.000000000 
+0200
+++ new/lib/listen/record/symlink_detector.rb   2015-11-18 20:14:39.000000000 
+0100
@@ -11,7 +11,7 @@
 
         Directory: %s
 
-        is already begin watched through: %s
+        is already being watched through: %s
 
         MORE INFO: #{WIKI}
       EOS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/listen/version.rb new/lib/listen/version.rb
--- old/lib/listen/version.rb   2015-07-23 12:02:20.000000000 +0200
+++ new/lib/listen/version.rb   2015-11-18 20:14:39.000000000 +0100
@@ -1,3 +1,3 @@
 module Listen
-  VERSION = '3.0.3'
+  VERSION = '3.0.5'
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2015-07-23 12:02:20.000000000 +0200
+++ new/metadata        2015-11-18 20:14:39.000000000 +0100
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: listen
 version: !ruby/object:Gem::Version
-  version: 3.0.3
+  version: 3.0.5
 platform: ruby
 authors:
 - Thibaud Guillaume-Gentil
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2015-07-23 00:00:00.000000000 Z
+date: 2015-11-18 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: rb-fsevent


Reply via email to