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.
Files changed (5) hide show
  1. data/Manifest.txt +1 -0
  2. data/README.rdoc +14 -6
  3. data/Rakefile +1 -1
  4. data/examples/app.rb +23 -0
  5. metadata +7 -6
@@ -12,3 +12,4 @@ spec/sinatra-auto-reload_spec.rb
12
12
  spec/spec.opts
13
13
  spec/spec_helper.rb
14
14
  tasks/rspec.rake
15
+ examples/app.rb
@@ -1,26 +1,34 @@
1
1
  = sinatra-auto-reload
2
2
 
3
- * http://github.com/#{github_username}/#{project_name}
3
+ * http://github.com/shokai/sinatra-auto-reload
4
4
 
5
5
  == DESCRIPTION:
6
6
 
7
- FIX (describe your package)
7
+ Sinatra Auto Reloader automatically reload your browser when you save code/html/js/images
8
8
 
9
9
  == FEATURES/PROBLEMS:
10
10
 
11
- * FIX (list of features or problems)
11
+ * need to fix for application running on Sub URL
12
12
 
13
13
  == SYNOPSIS:
14
14
 
15
- FIX (code sample of usage)
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
- * FIX (list of requirements)
26
+ * run on sinatra 1.0
27
+ * Firefox + Greasemonkey or Chrome
20
28
 
21
29
  == INSTALL:
22
30
 
23
- * FIX (sudo gem install, anything else)
31
+ * gem install sinatra-auto-reload
24
32
 
25
33
  == LICENSE:
26
34
 
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require 'hoe'
4
4
  require 'fileutils'
5
5
  require './lib/sinatra-auto-reload'
6
6
 
7
- VERSION = '0.0.1'
7
+ VERSION = '0.0.2'
8
8
 
9
9
  Hoe.plugin :newgem
10
10
  # Hoe.plugin :website
@@ -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: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
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: FIX (describe your package)
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/#{github_username}/#{project_name}
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: FIX (describe your package)
114
+ summary: Sinatra Auto Reloader automatically reload your browser when you save code/html/js/images
114
115
  test_files: []
115
116