vagrant-fsevents 0.4.2 → 0.4.3
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +19 -0
- data/lib/vagrant-fsevents/paths.rb +19 -6
- data/lib/vagrant-fsevents/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff3c027295a82cc4458e19498c34f67405a6d7b499b9d92ce5f1734c03180fc2
|
4
|
+
data.tar.gz: 94e3895892dfe5720a339870e9b8cb51fd9400cad118b629be231156c66601cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d6eb87e0ca897174facbd5bbea0a2f117b6e4c956408dee6f5fec7c9b2c7fea7e8681e9bd8b6098691380a144957c69204f20bb7c94eb5c23849616781c5686
|
7
|
+
data.tar.gz: c7b42f798582d22e07d118b3140860002507afc67fba4542a970e2adacba1c6f40497c96743a131705664dd59a8c8da0fefff6b729e08a6bc74862db62d0edf7
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.4.3 - 2019-03-31
|
4
|
+
|
5
|
+
- Added new 'include' keyword (complimenting the 'exclude' keyword) to help work around symlink issues with guard/listen
|
6
|
+
|
3
7
|
## 0.4.2 - 2019-03-08
|
4
8
|
|
5
9
|
- Combined event alerting into single multi-line string instead of multiple single lines
|
data/README.md
CHANGED
@@ -94,6 +94,24 @@ config.vm.synced_folder ".", "/vagrant", fsevents: true,
|
|
94
94
|
This will exclude all files inside the `path1` and `some/directory`. It will
|
95
95
|
also exclude files such as `another/directory/path1`.
|
96
96
|
|
97
|
+
### Including files
|
98
|
+
|
99
|
+
By default, the entire directory tree of the synced folder on the host machine
|
100
|
+
is watched. However, there are potential [issues with symlinks][symlink-issues]
|
101
|
+
that can arise from this approach, so until a more robust fix is in place you
|
102
|
+
can work around symlink issues by overriding the default watch path(s) with the
|
103
|
+
`:include` option. This takes an array of strings (as relative paths) to folders
|
104
|
+
which must exist when the watch begins (no regexp support), and replaces the
|
105
|
+
default synced_folder path with these individual folder paths.
|
106
|
+
|
107
|
+
```ruby
|
108
|
+
config.vm.synced_folder ".", "/vagrant", fsevents: true,
|
109
|
+
include: ["./src"]
|
110
|
+
```
|
111
|
+
|
112
|
+
This will watch only the files inside `src`, ignoring all other files and
|
113
|
+
folders in the synced path.
|
114
|
+
|
97
115
|
### Guest path override
|
98
116
|
|
99
117
|
If your actual path on the VM is not the same as the one in `synced_folder`, for
|
@@ -138,3 +156,4 @@ This plugin used [`vagrant-rsync-back`][vagrant-rsync-back] by @smerill and the
|
|
138
156
|
[vagrant-bindfs]: https://github.com/gael-ian/vagrant-bindfs
|
139
157
|
[vagrant-rsync-back]: https://github.com/smerrill/vagrant-rsync-back
|
140
158
|
[vagrant-fsnotify]: https://github.com/adrienkohlbecker/vagrant-fsnotify
|
159
|
+
[symlink-issues]: https://github.com/guard/listen/wiki/Duplicate-directory-errors
|
@@ -21,13 +21,11 @@ module VagrantPlugins
|
|
21
21
|
folder.each do |id, opts|
|
22
22
|
next unless active_for_folder? opts[:fsevents]
|
23
23
|
|
24
|
-
|
25
|
-
hostpath = Vagrant::Util::Platform.fs_real_path(hostpath).to_s
|
24
|
+
hostpaths = get_hostpaths(opts, machine)
|
26
25
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
@watch[hostpath] = { id: id, machine: machine, opts: opts }
|
26
|
+
hostpaths.each do |hostpath|
|
27
|
+
@watch[hostpath] = { id: id, machine: machine, opts: opts }
|
28
|
+
end
|
31
29
|
end
|
32
30
|
end
|
33
31
|
end
|
@@ -69,6 +67,21 @@ module VagrantPlugins
|
|
69
67
|
)
|
70
68
|
)
|
71
69
|
end
|
70
|
+
|
71
|
+
# Get the hostpath(s) for a given synced folder
|
72
|
+
def get_hostpaths(options, machine)
|
73
|
+
paths = (options[:include] || [options[:hostpath]])
|
74
|
+
hostpaths = []
|
75
|
+
paths.each do |path|
|
76
|
+
hostpath = File.expand_path(path, machine.env.root_path)
|
77
|
+
hostpath = Vagrant::Util::Platform.fs_real_path(hostpath).to_s
|
78
|
+
|
79
|
+
# Avoid creating a nested directory
|
80
|
+
hostpath += '/' unless hostpath.end_with?('/')
|
81
|
+
hostpaths << hostpath
|
82
|
+
end
|
83
|
+
hostpaths
|
84
|
+
end
|
72
85
|
end
|
73
86
|
end
|
74
87
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-fsevents
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wolf Hatch
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|