sinatra-auto-reload 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/README.rdoc +6 -5
- data/Rakefile +1 -1
- data/lib/sinatra/views/auto_reload_user_js.erb +1 -2
- metadata +3 -3
data/History.txt
CHANGED
data/README.rdoc
CHANGED
@@ -12,23 +12,24 @@ Sinatra Auto Reloader automatically reload your browser when you save code/html/
|
|
12
12
|
|
13
13
|
== SYNOPSIS:
|
14
14
|
|
15
|
-
|
15
|
+
===load on your sinatra application
|
16
16
|
require 'sinatra/auto-reloader' if development?
|
17
17
|
|
18
|
-
|
18
|
+
===Install userscript for chrome/firefox
|
19
19
|
http://hostname:port/sinatra_auto_reload.user.js
|
20
20
|
|
21
21
|
It checks last modified time (http://hostname:port/sinatra_auto_reload)
|
22
22
|
every second.
|
23
23
|
|
24
|
-
|
24
|
+
===ignore files
|
25
25
|
define on your application
|
26
26
|
|
27
27
|
def auto_reload_ignores
|
28
|
-
[/db.*/, /config.yaml/]
|
28
|
+
[/db.*/, /config.yaml/, /log.*/, /tmp.*/]
|
29
29
|
end
|
30
30
|
|
31
|
-
|
31
|
+
===examples
|
32
|
+
see examples/app.rb
|
32
33
|
|
33
34
|
== REQUIREMENTS:
|
34
35
|
|
data/Rakefile
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
// @namespace http://shokai.org/
|
5
5
|
// @description reload Firefox/Chrome when <%= @host %> was modified
|
6
6
|
// @include http://<%=@host%>/*
|
7
|
-
// @version 0.0.
|
7
|
+
// @version 0.0.2
|
8
8
|
// @author shokai (Sho Hashimoto)
|
9
9
|
// ==/UserScript==
|
10
10
|
|
@@ -14,7 +14,6 @@ setInterval(function(){
|
|
14
14
|
var req = new XMLHttpRequest;
|
15
15
|
req.open("GET", "http://<%=@host%>/sinatra_auto_reload", true);
|
16
16
|
req.onload = function(){
|
17
|
-
console.log(req.responseText);
|
18
17
|
(self.old && req.responseText != self.old) && location.reload(true);
|
19
18
|
self.old = req.responseText;
|
20
19
|
};
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-auto-reload
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- shokai
|