listen 3.5.1 → 3.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 321b55dd88acb041f6dfa31d44047d4f90ebfa970adb85d82facd5ceff94db90
4
- data.tar.gz: 4e4eb8728548f782d6b99b7b9b40473102f31315e27dae2bacf2b146c2609969
3
+ metadata.gz: 656e49f1b6eca9a31fd9c09b916aa73ed6d3df255e4859c4b77ebdb7a0f4a6bf
4
+ data.tar.gz: 98be9697f64242c869fa47211477f84f8b636402fa4e865989e1b54e020a8032
5
5
  SHA512:
6
- metadata.gz: 843e2fe248d9216087fc09e8a5e70f6ee10ed27e55fe993939c93ee1260d55fa3076a684579cae143f304e24b5ecc98318de0e00678e63bee9f52192b1e7292b
7
- data.tar.gz: a74621cffdb908165c010b50848e07e9eef9eed9e53b3449533752f2a54caceb5d57c9e1e02c43560a3e6832d6210fd3540e838de34c6f6d1e391d496a5bf8de
6
+ metadata.gz: af8bfbe37ce9b791f78ebdee29c32781742f3e58e98eae92381c34169bdf389db38f82228b77a56ba13e73646dbb7d2dae9a275be0c5b75e300010adb4382129
7
+ data.tar.gz: f97c76664f9aa893bd89bcf93484701a6bda473ab9b13e2101cacb4f450f5ca0d116362027368fe561a724fb0c55213bbc6944bd58b0ee4cb6812f588d00feeb
data/README.md CHANGED
@@ -25,10 +25,8 @@ The `listen` gem listens to file modifications and notifies you about the change
25
25
  * Support for plugins planned for future.
26
26
  * 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'`.
27
27
  * Some filesystems won't work without polling (VM/Vagrant Shared folders, NFS, Samba, sshfs, etc.).
28
- * Specs suite on JRuby and Rubinius aren't reliable on Travis CI, but should work.
29
28
  * Windows and \*BSD adapter aren't continuously and automatically tested.
30
29
  * OSX adapter has some performance limitations ([#342](https://github.com/guard/listen/issues/342)).
31
- * FreeBSD users need patched version of rb-kqueue (as of 2020/11). See #475 for the issue, mat813/rb-kqueue#12 for the patch, and Bug 250432 in bugzilla.
32
30
  * Listeners do not notify across forked processes, if you wish for multiple processes to receive change notifications you must [listen inside of each process](https://github.com/guard/listen/issues/398#issuecomment-223957952).
33
31
 
34
32
  Pull requests or help is very welcome for these.
data/lib/listen/file.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'digest/md5'
3
+ require 'digest'
4
4
 
5
5
  module Listen
6
6
  class File
@@ -53,7 +53,7 @@ module Listen
53
53
  # then at ???14.998, but the fstat time would be ???14.0 in
54
54
  # both cases).
55
55
  #
56
- # If change happend at ???14.999997, the mtime is 14.0, so for
56
+ # If change happened at ???14.999997, the mtime is 14.0, so for
57
57
  # an mtime=???14.0 we assume it could even be almost ???15.0
58
58
  #
59
59
  # So if Time.now.to_f is ???15.999998 and stat reports mtime
@@ -67,9 +67,11 @@ module Listen
67
67
  #
68
68
  return if data[:mtime].to_i + 2 <= Time.now.to_f
69
69
 
70
- md5 = Digest::MD5.file(path).digest
71
- record.update_file(rel_path, data.merge(md5: md5))
72
- :modified if record_data[:md5] && md5 != record_data[:md5]
70
+ sha = Digest::SHA256.file(path).digest
71
+ record.update_file(rel_path, data.merge(sha: sha))
72
+ if record_data[:sha] && sha != record_data[:sha]
73
+ :modified
74
+ end
73
75
  rescue SystemCallError
74
76
  record.unset_path(rel_path)
75
77
  :removed
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Listen
4
- VERSION = '3.5.1'
4
+ VERSION = '3.6.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: listen
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.1
4
+ version: 3.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thibaud Guillaume-Gentil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-30 00:00:00.000000000 Z
11
+ date: 2021-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rb-fsevent
@@ -103,9 +103,9 @@ metadata:
103
103
  allowed_push_host: https://rubygems.org
104
104
  bug_tracker_uri: https://github.com/guard/listen/issues
105
105
  changelog_uri: https://github.com/guard/listen/releases
106
- documentation_uri: https://www.rubydoc.info/gems/listen/3.5.1
106
+ documentation_uri: https://www.rubydoc.info/gems/listen/3.6.0
107
107
  homepage_uri: https://github.com/guard/listen
108
- source_code_uri: https://github.com/guard/listen/tree/v3.5.1
108
+ source_code_uri: https://github.com/guard/listen/tree/v3.6.0
109
109
  post_install_message:
110
110
  rdoc_options: []
111
111
  require_paths: