io-watch 0.4.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 197b7721bf73d747ba737369fc907fb390c9d1b76fcf673918476fb25ff31fd5
4
- data.tar.gz: 7eb67828008e3680fcc86512b624630b2f3bf26731c1b7e14373ab5719e33609
3
+ metadata.gz: 0fc26487e8282e4fb61d521424ea49b98606676fb04768fbe94e5244a44b4642
4
+ data.tar.gz: '08666b566a234b2e64c49ea40ff878070d12cb53398cf3b883bff22ef1542bbb'
5
5
  SHA512:
6
- metadata.gz: 1100eb530ebc9684d833394c0eda71383a7248959b4b7757ec1587e50a1db0691abe8afcdf2322b4718f95536ab796f59a3ed235d7d4f58ac6120aef68bf4f78
7
- data.tar.gz: 3aeb06da9803b9242be48fe66a423578011614423732c5a6f7a90772a19fade4eb471b1efb631043b06f83b70ecc9f1554e47b671d55c0b468a61c3cd8ad1c3c
6
+ metadata.gz: 51ee161b28baae33c5745658a77a82dd01bca7b6b350a60af90a19d38c3bbb329b00c242a81ae58134ea91445101c719f6b6b2a85013bb668390f31c52d7580c
7
+ data.tar.gz: 9224e4d78d0509c987aba237df97babd0ed6caef5cc1f7012b4151c3ac84cd81ba2f67aa473163ce542d6325cbbf79c87ffeffb53b43de2c1142d5bc4596d618
checksums.yaml.gz.sig CHANGED
Binary file
@@ -27,7 +27,7 @@ class IO
27
27
  #
28
28
  # @parameter roots [Array(String)] The list of root directories to watch. Changes to these directories, and their children, recursively, will be reported.
29
29
  # @parameter latency [Float] The latency to use when watching the filesystem.
30
- def initialize(roots, latency = 0.1)
30
+ def initialize(roots, latency: nil)
31
31
  @roots = roots
32
32
  @latency = latency
33
33
  end
@@ -42,7 +42,11 @@ class IO
42
42
  # @yields {|event| ...} Yielded for each event that occurs.
43
43
  # @parameter event [Hash] The event that occurred.
44
44
  def run
45
- environment = {'IO_WATCH_LATENCY' => @latency.to_s}
45
+ environment = {}
46
+ if @latency
47
+ environment['IO_WATCH_LATENCY'] = @latency.to_s
48
+ end
49
+
46
50
  IO.pipe do |input, output|
47
51
  pid = Process.spawn(environment, self.class.command_path, *@roots, out: output)
48
52
  output.close
@@ -5,6 +5,6 @@
5
5
 
6
6
  class IO
7
7
  module Watch
8
- VERSION = '0.4.1'
8
+ VERSION = '0.5.0'
9
9
  end
10
10
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: io-watch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
@@ -1,6 +1,2 @@
1
- ����c���?@�r+���U��,���j��������z;Q��ܞ���;)��jo���0�e0�����.������0W6�������pm���|���7���V�Qga�?~I��ISd���Q�*
2
- �8_��I�B�g�����գI
3
- cѕ���
4
- ���M�C�U���.�(0��*v��� W{n�{�dC�� k�壅/9m�'�Ia�^2�j"��n��`a�غԵ�Ҳ���0U�w
5
- K���ơ:q_�y!Qz���(Z����I�oo�Wp=�8Qߖŕ��Bjk�/����2U�u�J�W�+�i� 1 ڛ���}��x�6��c���V�)4���
6
- �Ӏ~�a;"$,��Ҥs�x�׽�P*�A!����
1
+ A"�:~gI�Щ҈��W���{h1�g-4�(�Lw~�+��9���څW�wɫ�?E�^%��5 H�'��D�6G5���Ϙ�e]��>���6ٯ�������������KH}�P�v�mU 7�F���x��M)0ʙ��$+������
2
+ O�$ ^�����