guard-livereload 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +4 -0
- data/lib/guard/livereload/reactor.rb +3 -3
- data/lib/guard/livereload/version.rb +1 -1
- metadata +17 -17
data/README.rdoc
CHANGED
@@ -21,6 +21,10 @@ Add guard definition to your Guardfile by running this command:
|
|
21
21
|
|
22
22
|
Install {LiveReload Safari/Chrome extension}[http://github.com/mockko/livereload#readme]
|
23
23
|
|
24
|
+
To optimize communication with the LiveReload extension, install the yajl-ruby to increase JSON performance:
|
25
|
+
|
26
|
+
gem install yajl-ruby
|
27
|
+
|
24
28
|
== Usage
|
25
29
|
|
26
30
|
Please read {Guard usage doc}[http://github.com/guard/guard#readme] and {LiveReload extension usage doc}[http://github.com/mockko/livereload#readme]
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'em-websocket'
|
2
|
-
require '
|
2
|
+
require 'multi_json'
|
3
3
|
|
4
4
|
module Guard
|
5
5
|
class LiveReload
|
@@ -20,11 +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 = MultiJson.encode(['refresh', {
|
24
24
|
:path => "#{Dir.pwd}/#{path}",
|
25
25
|
:apply_js_live => @options[:apply_js_live],
|
26
26
|
:apply_css_live => @options[:apply_css_live]
|
27
|
-
}]
|
27
|
+
}])
|
28
28
|
UI.debug data
|
29
29
|
@web_sockets.each { |ws| ws.send(data) }
|
30
30
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-livereload
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,12 +9,12 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-08-
|
12
|
+
date: 2011-08-09 00:00:00.000000000 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: guard
|
17
|
-
requirement: &
|
17
|
+
requirement: &2161472340 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: 0.4.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *2161472340
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: em-websocket
|
28
|
-
requirement: &
|
28
|
+
requirement: &2161471560 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -33,21 +33,21 @@ dependencies:
|
|
33
33
|
version: 0.2.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *2161471560
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
|
-
name:
|
39
|
-
requirement: &
|
38
|
+
name: multi_json
|
39
|
+
requirement: &2161470980 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
|
-
- -
|
42
|
+
- - ~>
|
43
43
|
- !ruby/object:Gem::Version
|
44
|
-
version: 1.
|
44
|
+
version: 1.0.3
|
45
45
|
type: :runtime
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *2161470980
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: bundler
|
50
|
-
requirement: &
|
50
|
+
requirement: &2161470400 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ~>
|
@@ -55,10 +55,10 @@ dependencies:
|
|
55
55
|
version: '1.0'
|
56
56
|
type: :development
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *2161470400
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: rspec
|
61
|
-
requirement: &
|
61
|
+
requirement: &2161469800 !ruby/object:Gem::Requirement
|
62
62
|
none: false
|
63
63
|
requirements:
|
64
64
|
- - ~>
|
@@ -66,10 +66,10 @@ dependencies:
|
|
66
66
|
version: '2.5'
|
67
67
|
type: :development
|
68
68
|
prerelease: false
|
69
|
-
version_requirements: *
|
69
|
+
version_requirements: *2161469800
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: guard-rspec
|
72
|
-
requirement: &
|
72
|
+
requirement: &2161469140 !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
75
|
- - ~>
|
@@ -77,7 +77,7 @@ dependencies:
|
|
77
77
|
version: '0.2'
|
78
78
|
type: :development
|
79
79
|
prerelease: false
|
80
|
-
version_requirements: *
|
80
|
+
version_requirements: *2161469140
|
81
81
|
description: Guard::LiveReload automatically reloads your browser when 'view' files
|
82
82
|
are modified.
|
83
83
|
email:
|