guard-livereload 2.1.2 → 2.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/guard/livereload/version.rb +1 -1
- data/lib/guard/livereload/websocket.rb +5 -4
- 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: fabaf75aeae2ecb4184d5251770fcee69d4e27ee
|
4
|
+
data.tar.gz: 08ba0d686bd0bdbbd0713451b880da7dcd62810f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b552f47f4cfa00dab1a52406b96245eb4e8823bb8cacbeda25b7b4721b3f1ace6b6cebac6e14892a6e4d5b4d732e6e409396925b332677436dfb5d5eadc1fe7
|
7
|
+
data.tar.gz: e2ad5529164eb782a3084211a85e00c590cadc7bfa9b14a97040cf2ad7f3e34854e329817a8e9c217c27a1c009ef9ca786df09fbef02235e34609021c0365b3f
|
@@ -10,13 +10,14 @@ module Guard
|
|
10
10
|
def dispatch(data)
|
11
11
|
parser = Http::Parser.new
|
12
12
|
parser << data
|
13
|
-
|
13
|
+
# prepend with '.' to make request url usable as a file path
|
14
|
+
request_path = '.' + URI.parse(parser.request_url).path
|
14
15
|
if parser.http_method != 'GET' || parser.upgrade?
|
15
16
|
super #pass the request to websocket
|
16
|
-
elsif request_path == '
|
17
|
+
elsif request_path == './livereload.js'
|
17
18
|
_serve_file(_livereload_js_file)
|
18
|
-
elsif File.
|
19
|
-
_serve_file(request_path
|
19
|
+
elsif File.readable?(request_path) && !File.directory?(request_path)
|
20
|
+
_serve_file(request_path)
|
20
21
|
else
|
21
22
|
send_data("HTTP/1.1 404 Not Found\r\nContent-Type: text/plain\r\nContent-Length: 13\r\n\r\n404 Not Found")
|
22
23
|
close_connection_after_writing
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-livereload
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.3
|
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: 2014-
|
11
|
+
date: 2014-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard
|