livereload 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/livereload +1 -1
  2. data/lib/livereload.rb +4 -0
  3. metadata +2 -2
data/bin/livereload CHANGED
@@ -3,7 +3,7 @@ require 'rubygems'
3
3
  require 'livereload'
4
4
 
5
5
  dir = File.expand_path('.')
6
- exts = "html,css,js,png,gif,jpg,php,py,rb"
6
+ exts = "html,css,js,png,gif,jpg,php,py,rb,erb"
7
7
  host = "0.0.0.0"
8
8
  port = 10083
9
9
  LiveReload.run host, port, dir, exts
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
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 2
8
- - 1
9
- version: 1.2.1
8
+ - 2
9
+ version: 1.2.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Andrey Tarantsov