guard-livereload 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
@@ -20,7 +20,11 @@ module Guard
|
|
20
20
|
def reload_browser(paths = [])
|
21
21
|
UI.info "Reloading browser: #{paths.join(' ')}"
|
22
22
|
paths.each do |path|
|
23
|
-
data = ['refresh', {
|
23
|
+
data = ['refresh', {
|
24
|
+
:path => path,
|
25
|
+
:apply_js_live => @options[:apply_js_live],
|
26
|
+
:apply_css_live => @options[:apply_css_live]
|
27
|
+
}].to_json
|
24
28
|
UI.debug data
|
25
29
|
@web_sockets.each { |ws| ws.send(data) }
|
26
30
|
end
|
@@ -32,7 +36,7 @@ module Guard
|
|
32
36
|
Thread.new do
|
33
37
|
EventMachine.run do
|
34
38
|
UI.info "LiveReload #{options[:api_version]} is waiting for a browser to connect."
|
35
|
-
EventMachine
|
39
|
+
EventMachine.start_server(options[:host], options[:port], EventMachine::WebSocket::Connection, {}) do |ws|
|
36
40
|
ws.onopen do
|
37
41
|
begin
|
38
42
|
UI.info "Browser connected."
|
@@ -1,6 +1,6 @@
|
|
1
1
|
guard 'livereload' do
|
2
|
-
watch(
|
3
|
-
watch(
|
4
|
-
watch(
|
5
|
-
watch(
|
2
|
+
watch(%r{app/.+\.(erb|haml)$})
|
3
|
+
watch(%r{app/helpers/.+\.rb$})
|
4
|
+
watch(%r{public/.+\.(css|js|html)$})
|
5
|
+
watch(%r{config/locales/.+\.yml$})
|
6
6
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-livereload
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 6
|
10
|
+
version: 0.1.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Thibaud Guillaume-Gentil
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-12-
|
18
|
+
date: 2010-12-16 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -42,12 +42,12 @@ dependencies:
|
|
42
42
|
requirements:
|
43
43
|
- - ~>
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
hash:
|
45
|
+
hash: 23
|
46
46
|
segments:
|
47
47
|
- 0
|
48
|
-
-
|
49
|
-
-
|
50
|
-
version: 0.
|
48
|
+
- 2
|
49
|
+
- 0
|
50
|
+
version: 0.2.0
|
51
51
|
type: :runtime
|
52
52
|
version_requirements: *id002
|
53
53
|
- !ruby/object:Gem::Dependency
|