guard-livereload 2.5.1 → 2.5.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.
- checksums.yaml +4 -4
- data/.travis.yml +4 -7
- data/CONTRIBUTING.md +17 -0
- data/README.md +7 -1
- data/lib/guard/livereload/version.rb +1 -1
- data/lib/guard/livereload/websocket.rb +5 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd97821380806c4b6c34d9a4447c0ed258988189
|
4
|
+
data.tar.gz: e70736ffc039b04327eb2097356f52771338a026
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b312ff75cd42e3aa85537d1d5b1b3fe80a84bc153d61fe21aebbaa2d4244e353a75967f5f8eabd8a239a8e58caac301e05dc0d676b52cb99c759184892732af0
|
7
|
+
data.tar.gz: 144d2f66663b2dc12dbe95782742ba21d0befabfba821e4d6fba6ad60f7de60cdcd5a025260479b0979824508eba01ee8709af31cbb6e1fb47223b4f29986a03
|
data/.travis.yml
CHANGED
@@ -1,15 +1,12 @@
|
|
1
1
|
language: ruby
|
2
2
|
bundler_args: --without development
|
3
3
|
rvm:
|
4
|
-
-
|
5
|
-
-
|
6
|
-
- 2.1.0
|
7
|
-
- jruby-19mode
|
8
|
-
- rbx-19mode
|
4
|
+
- 2.2.3
|
5
|
+
- jruby-head
|
9
6
|
matrix:
|
10
7
|
allow_failures:
|
11
|
-
- rvm: jruby-
|
12
|
-
- rvm: rbx-19mode
|
8
|
+
- rvm: jruby-head
|
13
9
|
notifications:
|
14
10
|
recipients:
|
15
11
|
- thibaud@thibaud.me
|
12
|
+
sudo: false
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
`Guard::LiveReload` is a volunteer effort, so the easier it is to reproduce your problem, the faster it may get solved.
|
2
|
+
|
3
|
+
Please try to provide enough info to reproduce a problem, including:
|
4
|
+
|
5
|
+
1. Running `bundle exec guard -d` to show full debugging output.
|
6
|
+
|
7
|
+
2. Any console output your browser shows.
|
8
|
+
|
9
|
+
3. Mentioning what you're doing and how (local/remote livereload, which browser, which OS, which extension, with `Rack`, `Rails`, `Jekyll` or whatever, etc.).
|
10
|
+
|
11
|
+
3. Ideally, providing a small repository with your setup so we can reproduce the issue ourselves.
|
12
|
+
|
13
|
+
4. Going through our [Troubleshooting](https://github.com/guard/guard-livereload/wiki/Troubleshooting) guide to see if there's a quick fix for your problem already.
|
14
|
+
|
15
|
+
5. It's better to create a new issue (with full info above) than to add to an existing issue (unless you're absolutely sure it's exactly the same issue). It's better to link issues to each other instead.
|
16
|
+
|
17
|
+
That's it!
|
data/README.md
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
### :warning: Guard::LiveReload is looking for a new maintainer. Please [contact me](mailto:thibaud@thibaud.gg) if you're interested.
|
2
2
|
|
3
|
+
[](https://gitter.im/guard/guard-livereload?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
4
|
+
|
3
5
|
# Guard::LiveReload
|
4
6
|
|
5
|
-
[](http://badge.fury.io/rb/guard-livereload) [](http://travis-ci.org/guard/guard-livereload) [](https://gemnasium.com/guard/guard-livereload) [](https://codeclimate.com/github/guard/guard-livereload) [](https://coveralls.io/r/guard/guard-livereload)
|
6
8
|
|
7
9
|
LiveReload guard allows to automatically reload your browser when 'view' files are modified.
|
8
10
|
|
@@ -90,6 +92,10 @@ See [LiveReload configuration doc](https://github.com/mockko/livereload/blob/mas
|
|
90
92
|
|
91
93
|
## Troubleshooting
|
92
94
|
|
95
|
+
To work out what's wrong and where, just follow this easy guide: https://github.com/guard/guard-livereload/wiki/Troubleshooting
|
96
|
+
|
97
|
+
### Other issues:
|
98
|
+
|
93
99
|
##### 1. "hw.ncpu" is an unknown key.
|
94
100
|
|
95
101
|
Solution: just upgrade the `listen` gem to '3.x' (Listen is used by Guard).
|
@@ -6,6 +6,9 @@ require 'uri'
|
|
6
6
|
module Guard
|
7
7
|
class LiveReload
|
8
8
|
class WebSocket < EventMachine::WebSocket::Connection
|
9
|
+
HTTP_DATA_FORBIDDEN = "HTTP/1.1 403 Forbidden\r\nContent-Type: text/plain\r\nContent-Length: 13\r\n\r\n403 Forbidden"
|
10
|
+
HTTP_DATA_NOT_FOUND = "HTTP/1.1 404 Not Found\r\nContent-Type: text/plain\r\nContent-Length: 13\r\n\r\n404 Not Found"
|
11
|
+
|
9
12
|
def initialize(options)
|
10
13
|
@livereload_js_path = options[:livereload_js_path]
|
11
14
|
super
|
@@ -58,8 +61,8 @@ module Guard
|
|
58
61
|
|
59
62
|
def _serve(path)
|
60
63
|
return _serve_file(_livereload_js_path) if path == './livereload.js'
|
61
|
-
|
62
|
-
send_data(
|
64
|
+
data = _readable_file(path) ? HTTP_DATA_FORBIDDEN : HTTP_DATA_NOT_FOUND
|
65
|
+
send_data(data)
|
63
66
|
close_connection_after_writing
|
64
67
|
end
|
65
68
|
|
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.5.
|
4
|
+
version: 2.5.2
|
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:
|
11
|
+
date: 2016-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard
|
@@ -96,6 +96,7 @@ files:
|
|
96
96
|
- ".rubocop_merged_for_hound.yml"
|
97
97
|
- ".rubocop_todo.yml"
|
98
98
|
- ".travis.yml"
|
99
|
+
- CONTRIBUTING.md
|
99
100
|
- Gemfile
|
100
101
|
- Guardfile
|
101
102
|
- LICENSE.txt
|