guard-livereload 2.1.3 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fabaf75aeae2ecb4184d5251770fcee69d4e27ee
4
- data.tar.gz: 08ba0d686bd0bdbbd0713451b880da7dcd62810f
3
+ metadata.gz: 6438ed8e32a0a10561779433f83cea7758ed2ef0
4
+ data.tar.gz: 1ea38925e9e93dc623635aaaad26b49b56b27cf1
5
5
  SHA512:
6
- metadata.gz: 1b552f47f4cfa00dab1a52406b96245eb4e8823bb8cacbeda25b7b4721b3f1ace6b6cebac6e14892a6e4d5b4d732e6e409396925b332677436dfb5d5eadc1fe7
7
- data.tar.gz: e2ad5529164eb782a3084211a85e00c590cadc7bfa9b14a97040cf2ad7f3e34854e329817a8e9c217c27a1c009ef9ca786df09fbef02235e34609021c0365b3f
6
+ metadata.gz: 28cc6523b28af8b55e7dfe0c35abd22ac54319e8e7716fd80395a15f67ae5e992bb8769d8b025802aab63858dc3b8a94e652e08eb581f2a96f86bba5ecaddb49
7
+ data.tar.gz: 8db556e9c7a62182be2d1e042bd4311a1a554aa7db1f80ba7e123b61a78b09512b153ed5ed8c657e25161d1e82001b0315b7fb8c9efb10490137b995dd9b43ec
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module LiveReloadVersion
3
- VERSION = '2.1.3'
3
+ VERSION = '2.2.0'
4
4
  end
5
5
  end
@@ -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.1.3
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-21 00:00:00.000000000 Z
11
+ date: 2014-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: guard