guard-livereload 0.1.3 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,7 @@ LiveReload guard allows to automatically reload your browser when 'view' files a
4
4
 
5
5
  == Install
6
6
 
7
- Please be sure to have {guard}[http://github.com/guard/guard] installed before continue.
7
+ Please be sure to have {Guard}[http://github.com/guard/guard] installed before continue.
8
8
 
9
9
  Install the gem:
10
10
 
@@ -22,13 +22,13 @@ Install {LiveReload Safari/Chrome extension}[http://github.com/mockko/livereload
22
22
 
23
23
  == Usage
24
24
 
25
- Please read {guard usage doc}[http://github.com/guard/guard#readme]
25
+ Please read {Guard usage doc}[http://github.com/guard/guard#readme]
26
26
  and {LiveReload extension usage doc}[http://github.com/mockko/livereload#readme]
27
27
 
28
28
  == Guardfile
29
29
 
30
30
  You can adapt your 'view' files like you want.
31
- Please read {guard doc}[http://github.com/guard/guard#readme] for more info about Guardfile DSL.
31
+ Please read {Guard doc}[http://github.com/guard/guard#readme] for more info about Guardfile DSL.
32
32
 
33
33
  guard 'livereload' do
34
34
  watch('app/.+\.(erb|haml)$')
@@ -39,12 +39,20 @@ Please read {guard doc}[http://github.com/guard/guard#readme] for more info abou
39
39
 
40
40
  == Options
41
41
 
42
- LiveReload guard have five options (host, port, api_version, apply_js_live and apply_css_live):
42
+ LiveReload guard have 5 options that you can set like this:
43
43
 
44
- guard 'livereload', :port => '35728' do
44
+ guard 'livereload', :api_version => '1.3', :port => '35728' do
45
45
  ...
46
46
  end
47
47
 
48
+ Available options:
49
+
50
+ :api_version => '1.3' # default '1.4'
51
+ :host => '127.3.3.1' # default '0.0.0.0'
52
+ :port => '12345' # default '35729'
53
+ :apply_js_live => false # default true
54
+ :apply_css_live => false # default true
55
+
48
56
  See {LiveReload configuration doc}[http://github.com/mockko/livereload#readme] for more info about those options.
49
57
 
50
58
  == Development
@@ -5,16 +5,26 @@ module Guard
5
5
  class LiveReload < Guard
6
6
 
7
7
  autoload :Reactor, 'guard/livereload/reactor'
8
+
8
9
  attr_accessor :reactor
9
10
 
11
+ # =================
12
+ # = Guard methods =
13
+ # =================
14
+
15
+ def initialize(watchers = [], options = {})
16
+ super
17
+ @options = {
18
+ :api_version => '1.4',
19
+ :host => '0.0.0.0',
20
+ :port => '35729',
21
+ :apply_js_live => true,
22
+ :apply_css_live => true
23
+ }.update(options)
24
+ end
25
+
10
26
  def start
11
- options[:api_version] ||= '1.4'
12
- options[:host] ||= '0.0.0.0'
13
- options[:port] ||= '35729'
14
- options[:apply_js_live] ||= true
15
- options[:apply_css_live] ||= true
16
-
17
- @reactor = Reactor.new(options)
27
+ @reactor = Reactor.new(@options)
18
28
  end
19
29
 
20
30
  def stop
@@ -9,8 +9,8 @@ module Guard
9
9
 
10
10
  def initialize(options)
11
11
  @web_sockets = []
12
- @options = options
13
- @thread = start_threaded_reactor(options)
12
+ @options = options
13
+ @thread = start_threaded_reactor(options)
14
14
  end
15
15
 
16
16
  def stop
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module LiveReloadVersion
3
- VERSION = "0.1.3"
3
+ VERSION = "0.1.5"
4
4
  end
5
5
  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: 29
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 3
10
- version: 0.1.3
9
+ - 5
10
+ version: 0.1.5
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-06 00:00:00 +01:00
18
+ date: 2010-12-14 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -26,10 +26,12 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- hash: 3
29
+ hash: 19
30
30
  segments:
31
31
  - 0
32
- version: "0"
32
+ - 2
33
+ - 2
34
+ version: 0.2.2
33
35
  type: :runtime
34
36
  version_requirements: *id001
35
37
  - !ruby/object:Gem::Dependency
@@ -104,12 +106,12 @@ dependencies:
104
106
  requirements:
105
107
  - - ~>
106
108
  - !ruby/object:Gem::Version
107
- hash: 7
109
+ hash: 3
108
110
  segments:
109
111
  - 2
110
- - 2
112
+ - 3
111
113
  - 0
112
- version: 2.2.0
114
+ version: 2.3.0
113
115
  type: :development
114
116
  version_requirements: *id006
115
117
  description: Guard::LiveReload automatically reload your browser when 'view' files are modified.