vagrant-listen-server 0.0.2 → 0.0.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/.gitignore +2 -0
- data/README.md +22 -24
- data/lib/vagrant-listen-server/version.rb +1 -1
- data/vagrant-listen-server.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6bc4b1dc74d14a2265d218cfd30d1a65a6d21c3
|
4
|
+
data.tar.gz: 5c2910bca19794cb808df5ba3ec21be5ced9efad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66746b24cd27bf4d4a003f6dab284e777266c0714738e9ae3a33ec17ff28cbe8f6c97610b36bdcdca517c52aa8b9cbae0af905e249f62ea8bc219cb9a6988740
|
7
|
+
data.tar.gz: 54fb1ba72bba130fce0c253e15e47a78f903d3bc38b0fbde36a92f5e1b231c7e02b8fae7c792bc4f6e625d9ebdd8e8f082a1702f0a6056b1cfba5122b4f4921e
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
Forward filesystem events from a host to a client
|
4
4
|
|
5
|
-
|
6
5
|
Vagrant's shared folders don't pass file modification notifications to the
|
7
6
|
guest. That means editing files locally won't trigger off inotify file events,
|
8
7
|
which means any build / test / servers that need to reload on change have to
|
@@ -15,13 +14,10 @@ are impossible. Statting takes forever.
|
|
15
14
|
Since polling implementations will probably rely on statting the file in some
|
16
15
|
way, this creates a pretty awful experience.
|
17
16
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
# The listen gem, as used by rsync-auto, is apparently a bit of a resource hog
|
24
|
-
# because it stats all files before sending events.
|
17
|
+
The best answer I've managed to find is forwarding filesystem events. The
|
18
|
+
listen gem is already used by vagrant, (as part of rsync-auto) and allows
|
19
|
+
forwarding of filesystem events over TCP, so that's what I've tried to stick
|
20
|
+
with.
|
25
21
|
|
26
22
|
|
27
23
|
## Clients
|
@@ -37,7 +33,6 @@ you'll have to be aware of loops created if filesystem notifications are passed
|
|
37
33
|
back from the guest to the host.
|
38
34
|
|
39
35
|
|
40
|
-
|
41
36
|
## Usage
|
42
37
|
|
43
38
|
Install the plugin:
|
@@ -47,29 +42,31 @@ Install the plugin:
|
|
47
42
|
Then in your Vagrantfile:
|
48
43
|
|
49
44
|
```ruby
|
45
|
+
config.vm.synced_folder '/host/code', '/client/code'
|
46
|
+
|
47
|
+
# You have to specify a private network for the guest to connect to.
|
48
|
+
config.vm.network :private_network, ip: '172.16.172.16'
|
49
|
+
|
50
50
|
if Vagrant.has_plugin? 'vagrant-listen-server'
|
51
|
-
|
51
|
+
# The host will always be the same IP as the private network with the last
|
52
|
+
# octet as .1
|
53
|
+
config.listen_server.ip = '172.168.172.1'
|
52
54
|
config.listen_server.port = 4000
|
53
|
-
config.listen_server.folders = '
|
54
|
-
config.listen_server.pid_file = '/tmp/
|
55
|
+
config.listen_server.folders = '/host/code'
|
56
|
+
config.listen_server.pid_file = '/tmp/servername.listen.pid'
|
55
57
|
end
|
56
58
|
```
|
57
59
|
|
58
60
|
|
59
61
|
## Other options
|
60
62
|
|
61
|
-
* rsync-auto
|
62
|
-
|
63
|
-
|
64
|
-
# Pros: Pushes files onto guest, so guest can fire native events
|
65
|
-
# Cons: Slow, apparently a resource hog.
|
63
|
+
* [rsync-auto](http://docs.vagrantup.com/v2/cli/rsync-auto.html)
|
64
|
+
|
65
|
+
Filesystem is shared using rsync-auto protocol instead of vboxsf
|
66
66
|
|
67
|
-
|
68
|
-
* rsync-mirror
|
69
|
-
https://github.com/ingenerator/vagrant-mirror/
|
70
|
-
Looks good, but super outdated.
|
67
|
+
* [rsync-mirror](https://github.com/ingenerator/vagrant-mirror/)
|
71
68
|
|
72
|
-
|
69
|
+
Hasn't been updated to work with vagrant's new plugin system.
|
73
70
|
|
74
71
|
|
75
72
|
## Development
|
@@ -81,8 +78,9 @@ vagrant plugin install vagrant-listen-server-0.0.1.gem
|
|
81
78
|
```
|
82
79
|
|
83
80
|
Other good vagrant plugins used for reference:
|
84
|
-
* https://github.com/mitchellh/vagrant-aws/blob/master/Rakefile
|
85
|
-
* vagrant-ls - http://www.noppanit.com/create-simple-vagrant-plugin/
|
81
|
+
* https://github.com/mitchellh/vagrant-aws/blob/master/Rakefile
|
82
|
+
* vagrant-ls - http://www.noppanit.com/create-simple-vagrant-plugin/
|
83
|
+
* vargant-notify - https://github.com/fgrehm/vagrant-notify/blob/master/lib/vagrant-notify/action/start_server.rb
|
86
84
|
|
87
85
|
|
88
86
|
## TODO:
|
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = VagrantPlugins::ListenServer::VERSION
|
9
9
|
spec.authors = ['David Kelso']
|
10
10
|
spec.email = ['david@kelso.id.au']
|
11
|
-
spec.summary = %q{Guard / Listen TCP server to
|
11
|
+
spec.summary = %q{Guard / Listen TCP server to publish filesystem events to guests.}
|
12
12
|
spec.homepage = 'https://github.com/zaius/vagrant-listen-server'
|
13
13
|
spec.license = 'MIT'
|
14
14
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-listen-server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Kelso
|
@@ -113,5 +113,5 @@ rubyforge_project:
|
|
113
113
|
rubygems_version: 2.2.2
|
114
114
|
signing_key:
|
115
115
|
specification_version: 4
|
116
|
-
summary: Guard / Listen TCP server to
|
116
|
+
summary: Guard / Listen TCP server to publish filesystem events to guests.
|
117
117
|
test_files: []
|