livereload 1.2.1 → 1.2.2
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.
- data/bin/livereload +1 -1
- data/lib/livereload.rb +4 -0
- metadata +2 -2
data/bin/livereload
CHANGED
data/lib/livereload.rb
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
require 'em-websocket'
|
2
2
|
require 'directory_watcher'
|
3
3
|
|
4
|
+
# Chrome sometimes sends HTTP/1.0 requests in violation of WebSockets spec
|
5
|
+
EventMachine::WebSocket::HandlerFactory::PATH = /^(\w+) (\/[^\s]*) HTTP\/1\.[01]$/
|
6
|
+
|
4
7
|
module LiveReload
|
5
8
|
VERSION = "1.2"
|
6
9
|
|
@@ -19,6 +22,7 @@ module LiveReload
|
|
19
22
|
|
20
23
|
def self.run(host, port, dir, exts)
|
21
24
|
EM.kqueue = true if EM.kqueue?
|
25
|
+
# Could someone with more knowledge of glob specify that the ".git" directory should not be searched
|
22
26
|
$dw = DirectoryWatcher.new dir, :glob => "**/*.{#{exts}}", :scanner => :em
|
23
27
|
|
24
28
|
puts
|