guard-livereload 2.1.3 → 2.2.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 +4 -4
- data/lib/guard/livereload/version.rb +1 -1
- data/lib/guard/livereload/websocket.rb +3 -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: 6438ed8e32a0a10561779433f83cea7758ed2ef0
|
|
4
|
+
data.tar.gz: 1ea38925e9e93dc623635aaaad26b49b56b27cf1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 28cc6523b28af8b55e7dfe0c35abd22ac54319e8e7716fd80395a15f67ae5e992bb8769d8b025802aab63858dc3b8a94e652e08eb581f2a96f86bba5ecaddb49
|
|
7
|
+
data.tar.gz: 8db556e9c7a62182be2d1e042bd4311a1a554aa7db1f80ba7e123b61a78b09512b153ed5ed8c657e25161d1e82001b0315b7fb8c9efb10490137b995dd9b43ec
|
|
@@ -12,6 +12,7 @@ module Guard
|
|
|
12
12
|
parser << data
|
|
13
13
|
# prepend with '.' to make request url usable as a file path
|
|
14
14
|
request_path = '.' + URI.parse(parser.request_url).path
|
|
15
|
+
request_path += '/index.html' if File.directory? request_path
|
|
15
16
|
if parser.http_method != 'GET' || parser.upgrade?
|
|
16
17
|
super #pass the request to websocket
|
|
17
18
|
elsif request_path == './livereload.js'
|
|
@@ -33,7 +34,8 @@ module Guard
|
|
|
33
34
|
end
|
|
34
35
|
|
|
35
36
|
def _content_type(path)
|
|
36
|
-
case File.extname(path)
|
|
37
|
+
case File.extname(path).downcase
|
|
38
|
+
when '.html', '.htm' then 'text/html'
|
|
37
39
|
when '.css' then 'text/css'
|
|
38
40
|
when '.js' then 'application/ecmascript'
|
|
39
41
|
when '.gif' then 'image/gif'
|
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.
|
|
4
|
+
version: 2.2.0
|
|
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-05-
|
|
11
|
+
date: 2014-05-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: guard
|