sinatra-auto-reload 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest.txt +1 -0
- data/README.rdoc +14 -6
- data/Rakefile +1 -1
- data/examples/app.rb +23 -0
- metadata +7 -6
data/Manifest.txt
CHANGED
data/README.rdoc
CHANGED
@@ -1,26 +1,34 @@
|
|
1
1
|
= sinatra-auto-reload
|
2
2
|
|
3
|
-
* http://github.com
|
3
|
+
* http://github.com/shokai/sinatra-auto-reload
|
4
4
|
|
5
5
|
== DESCRIPTION:
|
6
6
|
|
7
|
-
|
7
|
+
Sinatra Auto Reloader automatically reload your browser when you save code/html/js/images
|
8
8
|
|
9
9
|
== FEATURES/PROBLEMS:
|
10
10
|
|
11
|
-
*
|
11
|
+
* need to fix for application running on Sub URL
|
12
12
|
|
13
13
|
== SYNOPSIS:
|
14
14
|
|
15
|
-
|
15
|
+
1. load on your sinatra application
|
16
|
+
require 'sinatra-auto-reloader' if development?
|
17
|
+
|
18
|
+
2. Install userscript for chrome/firefox
|
19
|
+
http://hostname:port/sinatra_auto_reload.user.js
|
20
|
+
|
21
|
+
It checks last modified time (http://hostname:port/sinatra_auto_reload)
|
22
|
+
every second.
|
16
23
|
|
17
24
|
== REQUIREMENTS:
|
18
25
|
|
19
|
-
*
|
26
|
+
* run on sinatra 1.0
|
27
|
+
* Firefox + Greasemonkey or Chrome
|
20
28
|
|
21
29
|
== INSTALL:
|
22
30
|
|
23
|
-
*
|
31
|
+
* gem install sinatra-auto-reload
|
24
32
|
|
25
33
|
== LICENSE:
|
26
34
|
|
data/Rakefile
CHANGED
data/examples/app.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'rubygems'
|
3
|
+
require 'sinatra'
|
4
|
+
require 'rack'
|
5
|
+
require 'sinatra-auto-reload' if development?
|
6
|
+
#require '../lib/sinatra-auto-reload' if development?
|
7
|
+
|
8
|
+
|
9
|
+
get '/' do
|
10
|
+
@host = env['HTTP_HOST']
|
11
|
+
if development?
|
12
|
+
@mes = erb %{
|
13
|
+
hello world<br />
|
14
|
+
install <a href="http://<%=@host%>/sinatra_auto_reload.user.js">userscript</a><br />
|
15
|
+
it automatically reload your web browser
|
16
|
+
}
|
17
|
+
else
|
18
|
+
@mes = 'ruby app.rb -e development<br />or<br />shotgun app.rb'
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
|
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: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- shokai
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
version: 2.6.0
|
51
51
|
type: :development
|
52
52
|
version_requirements: *id002
|
53
|
-
description:
|
53
|
+
description: Sinatra Auto Reloader automatically reload your browser when you save code/html/js/images
|
54
54
|
email:
|
55
55
|
- hashimoto@shokai.org
|
56
56
|
executables: []
|
@@ -76,8 +76,9 @@ files:
|
|
76
76
|
- spec/spec.opts
|
77
77
|
- spec/spec_helper.rb
|
78
78
|
- tasks/rspec.rake
|
79
|
+
- examples/app.rb
|
79
80
|
has_rdoc: true
|
80
|
-
homepage: http://github.com
|
81
|
+
homepage: http://github.com/shokai/sinatra-auto-reload
|
81
82
|
licenses: []
|
82
83
|
|
83
84
|
post_install_message:
|
@@ -110,6 +111,6 @@ rubyforge_project: sinatra-auto-reload
|
|
110
111
|
rubygems_version: 1.3.7
|
111
112
|
signing_key:
|
112
113
|
specification_version: 3
|
113
|
-
summary:
|
114
|
+
summary: Sinatra Auto Reloader automatically reload your browser when you save code/html/js/images
|
114
115
|
test_files: []
|
115
116
|
|