guard-livereload 0.1.2 → 0.1.3

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.
data/README.rdoc CHANGED
@@ -18,12 +18,12 @@ Add guard definition to your Guardfile by running this command:
18
18
 
19
19
  guard init livereload
20
20
 
21
- Install {livereload Safari/Chrome extension}[http://github.com/mockko/livereload]
21
+ Install {LiveReload Safari/Chrome extension}[http://github.com/mockko/livereload#readme]
22
22
 
23
23
  == Usage
24
24
 
25
25
  Please read {guard usage doc}[http://github.com/guard/guard#readme]
26
- and {livereload extension usage doc}[http://github.com/mockko/livereload]
26
+ and {LiveReload extension usage doc}[http://github.com/mockko/livereload#readme]
27
27
 
28
28
  == Guardfile
29
29
 
@@ -31,20 +31,22 @@ You can adapt your 'view' files like you want.
31
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
- watch('^app/.+\.(erb|haml)$')
35
- watch('^app/helpers/.+\.rb$')
36
- watch('^/public/.+\.(css|js|html)$')
37
- watch('^config/locales/.+\.ym$')
34
+ watch('app/.+\.(erb|haml)$')
35
+ watch('app/helpers/.+\.rb$')
36
+ watch('public/.+\.(css|js|html)$')
37
+ watch('config/locales/.+\.yml$')
38
38
  end
39
39
 
40
40
  == Options
41
41
 
42
- LiveReload guard have three options (host, port, api_version):
42
+ LiveReload guard have five options (host, port, api_version, apply_js_live and apply_css_live):
43
43
 
44
44
  guard 'livereload', :port => '35728' do
45
45
  ...
46
46
  end
47
47
 
48
+ See {LiveReload configuration doc}[http://github.com/mockko/livereload#readme] for more info about those options.
49
+
48
50
  == Development
49
51
 
50
52
  - Source hosted at {GitHub}[http://github.com/guard/guard-livereload]
@@ -8,9 +8,11 @@ module Guard
8
8
  attr_accessor :reactor
9
9
 
10
10
  def start
11
- options[:api_version] ||= '1.4'
12
- options[:host] ||= '0.0.0.0'
13
- options[:port] ||= '35729'
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
14
16
 
15
17
  @reactor = Reactor.new(options)
16
18
  end
@@ -9,6 +9,7 @@ module Guard
9
9
 
10
10
  def initialize(options)
11
11
  @web_sockets = []
12
+ @options = options
12
13
  @thread = start_threaded_reactor(options)
13
14
  end
14
15
 
@@ -19,7 +20,7 @@ module Guard
19
20
  def reload_browser(paths = [])
20
21
  UI.info "Reloading browser: #{paths.join(' ')}"
21
22
  paths.each do |path|
22
- data = ['refresh', { :path => path, :apply_js_live => false, :apply_css_live => true }].to_json
23
+ data = ['refresh', { :path => path, :apply_js_live => @options[:apply_js_live], :apply_css_live => @options[:apply_css_live] }].to_json
23
24
  UI.debug data
24
25
  @web_sockets.each { |ws| ws.send(data) }
25
26
  end
@@ -1,6 +1,6 @@
1
1
  guard 'livereload' do
2
- watch('^app/.+\.(erb|haml)$')
3
- watch('^app/helpers/.+\.rb$')
4
- watch('^/public/.+\.(css|js|html)$')
5
- watch('^config/locales/.+\.ym$')
2
+ watch('app/.+\.(erb|haml)$')
3
+ watch('app/helpers/.+\.rb$')
4
+ watch('public/.+\.(css|js|html)$')
5
+ watch('config/locales/.+\.yml$')
6
6
  end
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module LiveReloadVersion
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
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: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
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-10-16 00:00:00 +02:00
18
+ date: 2010-12-06 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -72,12 +72,12 @@ dependencies:
72
72
  requirements:
73
73
  - - ~>
74
74
  - !ruby/object:Gem::Version
75
- hash: 19
75
+ hash: 25
76
76
  segments:
77
77
  - 1
78
78
  - 0
79
- - 2
80
- version: 1.0.2
79
+ - 7
80
+ version: 1.0.7
81
81
  type: :development
82
82
  version_requirements: *id004
83
83
  - !ruby/object:Gem::Dependency
@@ -88,12 +88,12 @@ dependencies:
88
88
  requirements:
89
89
  - - ~>
90
90
  - !ruby/object:Gem::Version
91
- hash: 29
91
+ hash: 9
92
92
  segments:
93
93
  - 0
94
94
  - 1
95
- - 3
96
- version: 0.1.3
95
+ - 9
96
+ version: 0.1.9
97
97
  type: :development
98
98
  version_requirements: *id005
99
99
  - !ruby/object:Gem::Dependency
@@ -104,12 +104,12 @@ dependencies:
104
104
  requirements:
105
105
  - - ~>
106
106
  - !ruby/object:Gem::Version
107
- hash: 15
107
+ hash: 7
108
108
  segments:
109
109
  - 2
110
+ - 2
110
111
  - 0
111
- - 0
112
- version: 2.0.0
112
+ version: 2.2.0
113
113
  type: :development
114
114
  version_requirements: *id006
115
115
  description: Guard::LiveReload automatically reload your browser when 'view' files are modified.