Compare commits
40 Commits
Author | SHA1 | Date |
---|---|---|
John Bintz | 8cf0ebec60 | |
John Bintz | c0c47cc83b | |
John Bintz | 16c1ba76ed | |
John Bintz | f830396dbf | |
John Bintz | 41bdc64bcb | |
John Bintz | 651d202dd2 | |
John Bintz | ffa5d63ffc | |
John Bintz | d06a756c8d | |
John Bintz | ef3895cbcf | |
John Bintz | 727296953b | |
John Bintz | 618feb865c | |
John Bintz | f5cbf07d21 | |
John Bintz | 493aa6255d | |
Chris Kelly | e7cbf825d9 | |
Payam Moghaddam | 9a4316ce37 | |
John Bintz | 952ea670dd | |
John Bintz | 5cdf2368e8 | |
Hiraku NAKANO | 5b5d62925f | |
samcon | 27063b7d20 | |
John Chow | d67df1bb77 | |
Robert Coleman | 64449acbc9 | |
John Bintz | 13ac1c85f3 | |
Charles Maresh | 165f057cd3 | |
John Bintz | 40a2ab41fb | |
Adam Spiers | cd592e9c41 | |
John Bintz | 81a14b4357 | |
Stefan Wrobel | 89b4a710e8 | |
John Bintz | ab8fe2944a | |
Stefan Wrobel | 707d2955e0 | |
Stefan Wrobel | e9f4417307 | |
Stefan Wrobel | a0ed81e1b4 | |
Stefan Wrobel | 117f251ff7 | |
John Bintz | 81fb8384cb | |
John Bintz | 85a27e6bec | |
Ben Woosley | 1891dbb920 | |
John Bintz | e43835bdbf | |
John Bintz | 25a5d217f5 | |
Theo Bittencourt | d665d6e3f0 | |
John Bintz | 176ce40003 | |
John Bintz | 13e09428f3 |
|
@ -1,5 +1,7 @@
|
||||||
*.gem
|
*.gem
|
||||||
.bundle
|
.bundle
|
||||||
Gemfile.lock
|
Gemfile.lock
|
||||||
|
gemfiles/*.lock
|
||||||
pkg/*
|
pkg/*
|
||||||
*.orig
|
*.orig
|
||||||
|
tmp/
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
rvm:
|
rvm:
|
||||||
- 1.8.7
|
|
||||||
- 1.9.2
|
|
||||||
- 1.9.3
|
- 1.9.3
|
||||||
|
- 2.0.0
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
gemfile:
|
gemfile:
|
||||||
- gemfiles/rails30.gemfile
|
|
||||||
- gemfiles/rails31.gemfile
|
|
||||||
- gemfiles/rails32.gemfile
|
- gemfiles/rails32.gemfile
|
||||||
|
- gemfiles/rails40.gemfile
|
||||||
|
|
||||||
|
|
12
Appraisals
12
Appraisals
|
@ -1,11 +1,7 @@
|
||||||
appraise 'rails30' do
|
|
||||||
gem 'rails', '~> 3.0.0'
|
|
||||||
end
|
|
||||||
|
|
||||||
appraise 'rails31' do
|
|
||||||
gem 'rails', '~> 3.1.0'
|
|
||||||
end
|
|
||||||
|
|
||||||
appraise 'rails32' do
|
appraise 'rails32' do
|
||||||
gem 'rails', '~> 3.2.0'
|
gem 'rails', '~> 3.2.0'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
appraise 'rails40' do
|
||||||
|
gem 'rails', '~> 4.0.0'
|
||||||
|
end
|
||||||
|
|
68
README.md
68
README.md
|
@ -1,47 +1,69 @@
|
||||||
<a href="http://travis-ci.org/johnbintz/rack-livereload"><img src="https://secure.travis-ci.org/johnbintz/rack-livereload.png" /></a>
|
# Rack::LiveReload
|
||||||
|
|
||||||
Hey, you've got [LiveReload](http://www.livereload.com/) in my [Rack](http://rack.rubyforge.org/)!
|
_This fork is deprecated: Go check out https://github.com/onesupercoder/rack-livereload instead._
|
||||||
|
|
||||||
|
<a href="http://travis-ci.org/johnbintz/rack-livereload"><img src="https://secure.travis-ci.org/johnbintz/rack-livereload.png" /></a>
|
||||||
|
[![Code Climate](https://codeclimate.com/github/johnbintz/rack-livereload.png)](https://codeclimate.com/github/johnbintz/rack-livereload)
|
||||||
|
|
||||||
|
Hey, you've got [LiveReload](http://livereload.com/) in my [Rack](http://rack.rubyforge.org/)!
|
||||||
No need for browser extensions anymore! Just plug it in your middleware stack and go!
|
No need for browser extensions anymore! Just plug it in your middleware stack and go!
|
||||||
Even supports browsers without WebSockets!
|
Even supports browsers without WebSockets!
|
||||||
|
|
||||||
Use this with [guard-livereload](http://github.com/guard/guard-livereload) for maximum fun!
|
Use this with [guard-livereload](http://github.com/guard/guard-livereload) for maximum fun!
|
||||||
|
|
||||||
## Install
|
## Installation
|
||||||
|
|
||||||
`gem install rack-livereload`
|
|
||||||
|
|
||||||
## Using in...
|
|
||||||
|
|
||||||
### Rails
|
### Rails
|
||||||
|
|
||||||
|
Add the gem to your Gemfile.
|
||||||
In `config/environments/development.rb`:
|
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
gem "rack-livereload", group: :development
|
||||||
|
```
|
||||||
|
|
||||||
|
Then add the middleware to your Rails middleware stack by editing your `config/environments/development.rb`.
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
# config/environments/development.rb
|
||||||
|
|
||||||
MyApp::Application.configure do
|
MyApp::Application.configure do
|
||||||
config.middleware.insert_after(ActionDispatch::Static, Rack::LiveReload)
|
# Add Rack::LiveReload to the bottom of the middleware stack with the default options:
|
||||||
|
config.middleware.insert_after ActionDispatch::Static, Rack::LiveReload
|
||||||
|
|
||||||
# ...or, change some options...
|
# or, if you're using better_errors:
|
||||||
|
config.middleware.insert_before Rack::Lock, Rack::LiveReload
|
||||||
|
|
||||||
config.middleware.insert_before(
|
# ...
|
||||||
Rack::Lock, Rack::LiveReload,
|
|
||||||
:min_delay => 500,
|
|
||||||
:max_delay => 10000,
|
|
||||||
:port => 56789,
|
|
||||||
:host => 'myhost.cool.wow',
|
|
||||||
:ignore => [ %r{dont/modify\.html$} ]
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
### config.ru/Sinatra
|
#### Tweaking the options
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
# Specifying Rack::LiveReload options.
|
||||||
|
config.middleware.use(Rack::LiveReload,
|
||||||
|
min_delay : 500, # default 1000
|
||||||
|
max_delay : 10_000, # default 60_000
|
||||||
|
live_reload_port : 56789, # default 35729
|
||||||
|
host : 'myhost.cool.wow',
|
||||||
|
ignore : [ %r{dont/modify\.html$} ]
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
In addition, Rack::LiveReload's position within middleware stack can be
|
||||||
|
specified by inserting it relative to an exsiting middleware via
|
||||||
|
`insert_before` or `insert_after`. See the [Rails on Rack: Adding a
|
||||||
|
Middleware](http://guides.rubyonrails.org/rails_on_rack.html#adding-a-middleware)
|
||||||
|
section for more detail.
|
||||||
|
|
||||||
|
### Sinatra / config.ru
|
||||||
|
|
||||||
``` ruby
|
``` ruby
|
||||||
require 'rack-livereload'
|
require 'rack-livereload'
|
||||||
|
|
||||||
use Rack::LiveReload
|
use Rack::LiveReload
|
||||||
# ...or...
|
# ...or...
|
||||||
use Rack::LiveReload, :min_delay => 500, ...
|
use Rack::LiveReload, min_delay: 500, ...
|
||||||
```
|
```
|
||||||
|
|
||||||
## How it works
|
## How it works
|
||||||
|
@ -69,13 +91,13 @@ your browser doesn't need it. The SWF WebSocket implementor won't be loaded unle
|
||||||
WebSockets support or if you force it in the middleware stack:
|
WebSockets support or if you force it in the middleware stack:
|
||||||
|
|
||||||
``` ruby
|
``` ruby
|
||||||
use Rack::LiveReload, :force_swf => true
|
use Rack::LiveReload, force_swf: true
|
||||||
```
|
```
|
||||||
|
|
||||||
If you don't want any of the web-sockets-js code included at all, use the `no_swf` option:
|
If you don't want any of the web-sockets-js code included at all, use the `no_swf` option:
|
||||||
|
|
||||||
``` ruby
|
``` ruby
|
||||||
use Rack::LiveReload, :no_swf => true
|
use Rack::LiveReload, no_swf: true
|
||||||
```
|
```
|
||||||
|
|
||||||
Once more browsers support WebSockets than don't, this option will be reversed and you'll have
|
Once more browsers support WebSockets than don't, this option will be reversed and you'll have
|
||||||
|
|
|
@ -1,157 +0,0 @@
|
||||||
PATH
|
|
||||||
remote: /Volumes/work/current/open_source/rack-livereload
|
|
||||||
specs:
|
|
||||||
rack-livereload (0.3.6)
|
|
||||||
rack
|
|
||||||
|
|
||||||
GEM
|
|
||||||
remote: http://rubygems.org/
|
|
||||||
specs:
|
|
||||||
abstract (1.0.0)
|
|
||||||
actionmailer (3.0.12)
|
|
||||||
actionpack (= 3.0.12)
|
|
||||||
mail (~> 2.2.19)
|
|
||||||
actionpack (3.0.12)
|
|
||||||
activemodel (= 3.0.12)
|
|
||||||
activesupport (= 3.0.12)
|
|
||||||
builder (~> 2.1.2)
|
|
||||||
erubis (~> 2.6.6)
|
|
||||||
i18n (~> 0.5.0)
|
|
||||||
rack (~> 1.2.5)
|
|
||||||
rack-mount (~> 0.6.14)
|
|
||||||
rack-test (~> 0.5.7)
|
|
||||||
tzinfo (~> 0.3.23)
|
|
||||||
activemodel (3.0.12)
|
|
||||||
activesupport (= 3.0.12)
|
|
||||||
builder (~> 2.1.2)
|
|
||||||
i18n (~> 0.5.0)
|
|
||||||
activerecord (3.0.12)
|
|
||||||
activemodel (= 3.0.12)
|
|
||||||
activesupport (= 3.0.12)
|
|
||||||
arel (~> 2.0.10)
|
|
||||||
tzinfo (~> 0.3.23)
|
|
||||||
activeresource (3.0.12)
|
|
||||||
activemodel (= 3.0.12)
|
|
||||||
activesupport (= 3.0.12)
|
|
||||||
activesupport (3.0.12)
|
|
||||||
addressable (2.2.8)
|
|
||||||
appraisal (0.4.1)
|
|
||||||
bundler
|
|
||||||
rake
|
|
||||||
arel (2.0.10)
|
|
||||||
builder (2.1.2)
|
|
||||||
crack (0.3.1)
|
|
||||||
cucumber (1.2.0)
|
|
||||||
builder (>= 2.1.2)
|
|
||||||
diff-lcs (>= 1.1.3)
|
|
||||||
gherkin (~> 2.10.0)
|
|
||||||
json (>= 1.4.6)
|
|
||||||
daemons (1.1.8)
|
|
||||||
diff-lcs (1.1.3)
|
|
||||||
em-websocket (0.3.6)
|
|
||||||
addressable (>= 2.1.1)
|
|
||||||
eventmachine (>= 0.12.9)
|
|
||||||
erubis (2.6.6)
|
|
||||||
abstract (>= 1.0.0)
|
|
||||||
eventmachine (0.12.10)
|
|
||||||
ffi (1.0.11)
|
|
||||||
gherkin (2.10.0)
|
|
||||||
json (>= 1.4.6)
|
|
||||||
guard (1.0.3)
|
|
||||||
ffi (>= 0.5.0)
|
|
||||||
thor (>= 0.14.6)
|
|
||||||
guard-cucumber (0.8.0)
|
|
||||||
cucumber (>= 1.2.0)
|
|
||||||
guard (>= 0.8.3)
|
|
||||||
guard-livereload (0.4.2)
|
|
||||||
em-websocket (>= 0.2.0)
|
|
||||||
guard (>= 0.10.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
guard-rspec (0.7.3)
|
|
||||||
guard (>= 0.10.0)
|
|
||||||
httparty (0.8.3)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_xml
|
|
||||||
i18n (0.5.0)
|
|
||||||
json (1.7.3)
|
|
||||||
mail (2.2.19)
|
|
||||||
activesupport (>= 2.3.6)
|
|
||||||
i18n (>= 0.4.0)
|
|
||||||
mime-types (~> 1.16)
|
|
||||||
treetop (~> 1.4.8)
|
|
||||||
metaclass (0.0.1)
|
|
||||||
mime-types (1.18)
|
|
||||||
mocha (0.11.4)
|
|
||||||
metaclass (~> 0.0.1)
|
|
||||||
multi_json (1.3.6)
|
|
||||||
multi_xml (0.5.1)
|
|
||||||
polyglot (0.3.3)
|
|
||||||
rack (1.2.5)
|
|
||||||
rack-mount (0.6.14)
|
|
||||||
rack (>= 1.0.0)
|
|
||||||
rack-test (0.5.7)
|
|
||||||
rack (>= 1.0)
|
|
||||||
rails (3.0.12)
|
|
||||||
actionmailer (= 3.0.12)
|
|
||||||
actionpack (= 3.0.12)
|
|
||||||
activerecord (= 3.0.12)
|
|
||||||
activeresource (= 3.0.12)
|
|
||||||
activesupport (= 3.0.12)
|
|
||||||
bundler (~> 1.0)
|
|
||||||
railties (= 3.0.12)
|
|
||||||
railties (3.0.12)
|
|
||||||
actionpack (= 3.0.12)
|
|
||||||
activesupport (= 3.0.12)
|
|
||||||
rake (>= 0.8.7)
|
|
||||||
rdoc (~> 3.4)
|
|
||||||
thor (~> 0.14.4)
|
|
||||||
rake (0.9.2.2)
|
|
||||||
rdoc (3.12)
|
|
||||||
json (~> 1.4)
|
|
||||||
rspec (2.10.0)
|
|
||||||
rspec-core (~> 2.10.0)
|
|
||||||
rspec-expectations (~> 2.10.0)
|
|
||||||
rspec-mocks (~> 2.10.0)
|
|
||||||
rspec-core (2.10.1)
|
|
||||||
rspec-expectations (2.10.0)
|
|
||||||
diff-lcs (~> 1.1.3)
|
|
||||||
rspec-mocks (2.10.1)
|
|
||||||
shotgun (0.9)
|
|
||||||
rack (>= 1.0)
|
|
||||||
sinatra (1.2.8)
|
|
||||||
rack (~> 1.1)
|
|
||||||
tilt (>= 1.2.2, < 2.0)
|
|
||||||
thin (1.3.1)
|
|
||||||
daemons (>= 1.0.9)
|
|
||||||
eventmachine (>= 0.12.6)
|
|
||||||
rack (>= 1.0.0)
|
|
||||||
thor (0.14.6)
|
|
||||||
tilt (1.3.3)
|
|
||||||
treetop (1.4.10)
|
|
||||||
polyglot
|
|
||||||
polyglot (>= 0.3.1)
|
|
||||||
tzinfo (0.3.33)
|
|
||||||
webmock (1.8.7)
|
|
||||||
addressable (>= 2.2.7)
|
|
||||||
crack (>= 0.1.7)
|
|
||||||
|
|
||||||
PLATFORMS
|
|
||||||
ruby
|
|
||||||
|
|
||||||
DEPENDENCIES
|
|
||||||
appraisal (~> 0.4)
|
|
||||||
cucumber
|
|
||||||
guard
|
|
||||||
guard-cucumber
|
|
||||||
guard-livereload
|
|
||||||
guard-rspec
|
|
||||||
httparty
|
|
||||||
mocha
|
|
||||||
rack-livereload!
|
|
||||||
rails (~> 3.0.0)
|
|
||||||
rake
|
|
||||||
rspec
|
|
||||||
shotgun
|
|
||||||
sinatra
|
|
||||||
thin
|
|
||||||
webmock
|
|
|
@ -1,7 +0,0 @@
|
||||||
# This file was generated by Appraisal
|
|
||||||
|
|
||||||
source "http://rubygems.org"
|
|
||||||
|
|
||||||
gem "rails", "~> 3.1.0"
|
|
||||||
|
|
||||||
gemspec :path=>"../"
|
|
|
@ -1,169 +0,0 @@
|
||||||
PATH
|
|
||||||
remote: /Volumes/work/current/open_source/rack-livereload
|
|
||||||
specs:
|
|
||||||
rack-livereload (0.3.6)
|
|
||||||
rack
|
|
||||||
|
|
||||||
GEM
|
|
||||||
remote: http://rubygems.org/
|
|
||||||
specs:
|
|
||||||
actionmailer (3.1.4)
|
|
||||||
actionpack (= 3.1.4)
|
|
||||||
mail (~> 2.3.0)
|
|
||||||
actionpack (3.1.4)
|
|
||||||
activemodel (= 3.1.4)
|
|
||||||
activesupport (= 3.1.4)
|
|
||||||
builder (~> 3.0.0)
|
|
||||||
erubis (~> 2.7.0)
|
|
||||||
i18n (~> 0.6)
|
|
||||||
rack (~> 1.3.6)
|
|
||||||
rack-cache (~> 1.1)
|
|
||||||
rack-mount (~> 0.8.2)
|
|
||||||
rack-test (~> 0.6.1)
|
|
||||||
sprockets (~> 2.0.3)
|
|
||||||
activemodel (3.1.4)
|
|
||||||
activesupport (= 3.1.4)
|
|
||||||
builder (~> 3.0.0)
|
|
||||||
i18n (~> 0.6)
|
|
||||||
activerecord (3.1.4)
|
|
||||||
activemodel (= 3.1.4)
|
|
||||||
activesupport (= 3.1.4)
|
|
||||||
arel (~> 2.2.3)
|
|
||||||
tzinfo (~> 0.3.29)
|
|
||||||
activeresource (3.1.4)
|
|
||||||
activemodel (= 3.1.4)
|
|
||||||
activesupport (= 3.1.4)
|
|
||||||
activesupport (3.1.4)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
addressable (2.2.8)
|
|
||||||
appraisal (0.4.1)
|
|
||||||
bundler
|
|
||||||
rake
|
|
||||||
arel (2.2.3)
|
|
||||||
builder (3.0.0)
|
|
||||||
crack (0.3.1)
|
|
||||||
cucumber (1.2.0)
|
|
||||||
builder (>= 2.1.2)
|
|
||||||
diff-lcs (>= 1.1.3)
|
|
||||||
gherkin (~> 2.10.0)
|
|
||||||
json (>= 1.4.6)
|
|
||||||
daemons (1.1.8)
|
|
||||||
diff-lcs (1.1.3)
|
|
||||||
em-websocket (0.3.6)
|
|
||||||
addressable (>= 2.1.1)
|
|
||||||
eventmachine (>= 0.12.9)
|
|
||||||
erubis (2.7.0)
|
|
||||||
eventmachine (0.12.10)
|
|
||||||
ffi (1.0.11)
|
|
||||||
gherkin (2.10.0)
|
|
||||||
json (>= 1.4.6)
|
|
||||||
guard (1.0.3)
|
|
||||||
ffi (>= 0.5.0)
|
|
||||||
thor (>= 0.14.6)
|
|
||||||
guard-cucumber (0.8.0)
|
|
||||||
cucumber (>= 1.2.0)
|
|
||||||
guard (>= 0.8.3)
|
|
||||||
guard-livereload (0.4.2)
|
|
||||||
em-websocket (>= 0.2.0)
|
|
||||||
guard (>= 0.10.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
guard-rspec (0.7.3)
|
|
||||||
guard (>= 0.10.0)
|
|
||||||
hike (1.2.1)
|
|
||||||
httparty (0.8.3)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_xml
|
|
||||||
i18n (0.6.0)
|
|
||||||
json (1.7.3)
|
|
||||||
mail (2.3.3)
|
|
||||||
i18n (>= 0.4.0)
|
|
||||||
mime-types (~> 1.16)
|
|
||||||
treetop (~> 1.4.8)
|
|
||||||
metaclass (0.0.1)
|
|
||||||
mime-types (1.18)
|
|
||||||
mocha (0.11.4)
|
|
||||||
metaclass (~> 0.0.1)
|
|
||||||
multi_json (1.3.6)
|
|
||||||
multi_xml (0.5.1)
|
|
||||||
polyglot (0.3.3)
|
|
||||||
rack (1.3.6)
|
|
||||||
rack-cache (1.2)
|
|
||||||
rack (>= 0.4)
|
|
||||||
rack-mount (0.8.3)
|
|
||||||
rack (>= 1.0.0)
|
|
||||||
rack-protection (1.2.0)
|
|
||||||
rack
|
|
||||||
rack-ssl (1.3.2)
|
|
||||||
rack
|
|
||||||
rack-test (0.6.1)
|
|
||||||
rack (>= 1.0)
|
|
||||||
rails (3.1.4)
|
|
||||||
actionmailer (= 3.1.4)
|
|
||||||
actionpack (= 3.1.4)
|
|
||||||
activerecord (= 3.1.4)
|
|
||||||
activeresource (= 3.1.4)
|
|
||||||
activesupport (= 3.1.4)
|
|
||||||
bundler (~> 1.0)
|
|
||||||
railties (= 3.1.4)
|
|
||||||
railties (3.1.4)
|
|
||||||
actionpack (= 3.1.4)
|
|
||||||
activesupport (= 3.1.4)
|
|
||||||
rack-ssl (~> 1.3.2)
|
|
||||||
rake (>= 0.8.7)
|
|
||||||
rdoc (~> 3.4)
|
|
||||||
thor (~> 0.14.6)
|
|
||||||
rake (0.9.2.2)
|
|
||||||
rdoc (3.12)
|
|
||||||
json (~> 1.4)
|
|
||||||
rspec (2.10.0)
|
|
||||||
rspec-core (~> 2.10.0)
|
|
||||||
rspec-expectations (~> 2.10.0)
|
|
||||||
rspec-mocks (~> 2.10.0)
|
|
||||||
rspec-core (2.10.1)
|
|
||||||
rspec-expectations (2.10.0)
|
|
||||||
diff-lcs (~> 1.1.3)
|
|
||||||
rspec-mocks (2.10.1)
|
|
||||||
shotgun (0.9)
|
|
||||||
rack (>= 1.0)
|
|
||||||
sinatra (1.3.2)
|
|
||||||
rack (~> 1.3, >= 1.3.6)
|
|
||||||
rack-protection (~> 1.2)
|
|
||||||
tilt (~> 1.3, >= 1.3.3)
|
|
||||||
sprockets (2.0.4)
|
|
||||||
hike (~> 1.2)
|
|
||||||
rack (~> 1.0)
|
|
||||||
tilt (~> 1.1, != 1.3.0)
|
|
||||||
thin (1.3.1)
|
|
||||||
daemons (>= 1.0.9)
|
|
||||||
eventmachine (>= 0.12.6)
|
|
||||||
rack (>= 1.0.0)
|
|
||||||
thor (0.14.6)
|
|
||||||
tilt (1.3.3)
|
|
||||||
treetop (1.4.10)
|
|
||||||
polyglot
|
|
||||||
polyglot (>= 0.3.1)
|
|
||||||
tzinfo (0.3.33)
|
|
||||||
webmock (1.8.7)
|
|
||||||
addressable (>= 2.2.7)
|
|
||||||
crack (>= 0.1.7)
|
|
||||||
|
|
||||||
PLATFORMS
|
|
||||||
ruby
|
|
||||||
|
|
||||||
DEPENDENCIES
|
|
||||||
appraisal (~> 0.4)
|
|
||||||
cucumber
|
|
||||||
guard
|
|
||||||
guard-cucumber
|
|
||||||
guard-livereload
|
|
||||||
guard-rspec
|
|
||||||
httparty
|
|
||||||
mocha
|
|
||||||
rack-livereload!
|
|
||||||
rails (~> 3.1.0)
|
|
||||||
rake
|
|
||||||
rspec
|
|
||||||
shotgun
|
|
||||||
sinatra
|
|
||||||
thin
|
|
||||||
webmock
|
|
|
@ -1,167 +0,0 @@
|
||||||
PATH
|
|
||||||
remote: /Volumes/work/current/open_source/rack-livereload
|
|
||||||
specs:
|
|
||||||
rack-livereload (0.3.6)
|
|
||||||
rack
|
|
||||||
|
|
||||||
GEM
|
|
||||||
remote: http://rubygems.org/
|
|
||||||
specs:
|
|
||||||
actionmailer (3.2.3)
|
|
||||||
actionpack (= 3.2.3)
|
|
||||||
mail (~> 2.4.4)
|
|
||||||
actionpack (3.2.3)
|
|
||||||
activemodel (= 3.2.3)
|
|
||||||
activesupport (= 3.2.3)
|
|
||||||
builder (~> 3.0.0)
|
|
||||||
erubis (~> 2.7.0)
|
|
||||||
journey (~> 1.0.1)
|
|
||||||
rack (~> 1.4.0)
|
|
||||||
rack-cache (~> 1.2)
|
|
||||||
rack-test (~> 0.6.1)
|
|
||||||
sprockets (~> 2.1.2)
|
|
||||||
activemodel (3.2.3)
|
|
||||||
activesupport (= 3.2.3)
|
|
||||||
builder (~> 3.0.0)
|
|
||||||
activerecord (3.2.3)
|
|
||||||
activemodel (= 3.2.3)
|
|
||||||
activesupport (= 3.2.3)
|
|
||||||
arel (~> 3.0.2)
|
|
||||||
tzinfo (~> 0.3.29)
|
|
||||||
activeresource (3.2.3)
|
|
||||||
activemodel (= 3.2.3)
|
|
||||||
activesupport (= 3.2.3)
|
|
||||||
activesupport (3.2.3)
|
|
||||||
i18n (~> 0.6)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
addressable (2.2.8)
|
|
||||||
appraisal (0.4.1)
|
|
||||||
bundler
|
|
||||||
rake
|
|
||||||
arel (3.0.2)
|
|
||||||
builder (3.0.0)
|
|
||||||
crack (0.3.1)
|
|
||||||
cucumber (1.2.0)
|
|
||||||
builder (>= 2.1.2)
|
|
||||||
diff-lcs (>= 1.1.3)
|
|
||||||
gherkin (~> 2.10.0)
|
|
||||||
json (>= 1.4.6)
|
|
||||||
daemons (1.1.8)
|
|
||||||
diff-lcs (1.1.3)
|
|
||||||
em-websocket (0.3.6)
|
|
||||||
addressable (>= 2.1.1)
|
|
||||||
eventmachine (>= 0.12.9)
|
|
||||||
erubis (2.7.0)
|
|
||||||
eventmachine (0.12.10)
|
|
||||||
ffi (1.0.11)
|
|
||||||
gherkin (2.10.0)
|
|
||||||
json (>= 1.4.6)
|
|
||||||
guard (1.0.3)
|
|
||||||
ffi (>= 0.5.0)
|
|
||||||
thor (>= 0.14.6)
|
|
||||||
guard-cucumber (0.8.0)
|
|
||||||
cucumber (>= 1.2.0)
|
|
||||||
guard (>= 0.8.3)
|
|
||||||
guard-livereload (0.4.2)
|
|
||||||
em-websocket (>= 0.2.0)
|
|
||||||
guard (>= 0.10.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
guard-rspec (0.7.3)
|
|
||||||
guard (>= 0.10.0)
|
|
||||||
hike (1.2.1)
|
|
||||||
httparty (0.8.3)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_xml
|
|
||||||
i18n (0.6.0)
|
|
||||||
journey (1.0.3)
|
|
||||||
json (1.7.3)
|
|
||||||
mail (2.4.4)
|
|
||||||
i18n (>= 0.4.0)
|
|
||||||
mime-types (~> 1.16)
|
|
||||||
treetop (~> 1.4.8)
|
|
||||||
metaclass (0.0.1)
|
|
||||||
mime-types (1.18)
|
|
||||||
mocha (0.11.4)
|
|
||||||
metaclass (~> 0.0.1)
|
|
||||||
multi_json (1.3.6)
|
|
||||||
multi_xml (0.5.1)
|
|
||||||
polyglot (0.3.3)
|
|
||||||
rack (1.4.1)
|
|
||||||
rack-cache (1.2)
|
|
||||||
rack (>= 0.4)
|
|
||||||
rack-protection (1.2.0)
|
|
||||||
rack
|
|
||||||
rack-ssl (1.3.2)
|
|
||||||
rack
|
|
||||||
rack-test (0.6.1)
|
|
||||||
rack (>= 1.0)
|
|
||||||
rails (3.2.3)
|
|
||||||
actionmailer (= 3.2.3)
|
|
||||||
actionpack (= 3.2.3)
|
|
||||||
activerecord (= 3.2.3)
|
|
||||||
activeresource (= 3.2.3)
|
|
||||||
activesupport (= 3.2.3)
|
|
||||||
bundler (~> 1.0)
|
|
||||||
railties (= 3.2.3)
|
|
||||||
railties (3.2.3)
|
|
||||||
actionpack (= 3.2.3)
|
|
||||||
activesupport (= 3.2.3)
|
|
||||||
rack-ssl (~> 1.3.2)
|
|
||||||
rake (>= 0.8.7)
|
|
||||||
rdoc (~> 3.4)
|
|
||||||
thor (~> 0.14.6)
|
|
||||||
rake (0.9.2.2)
|
|
||||||
rdoc (3.12)
|
|
||||||
json (~> 1.4)
|
|
||||||
rspec (2.10.0)
|
|
||||||
rspec-core (~> 2.10.0)
|
|
||||||
rspec-expectations (~> 2.10.0)
|
|
||||||
rspec-mocks (~> 2.10.0)
|
|
||||||
rspec-core (2.10.1)
|
|
||||||
rspec-expectations (2.10.0)
|
|
||||||
diff-lcs (~> 1.1.3)
|
|
||||||
rspec-mocks (2.10.1)
|
|
||||||
shotgun (0.9)
|
|
||||||
rack (>= 1.0)
|
|
||||||
sinatra (1.3.2)
|
|
||||||
rack (~> 1.3, >= 1.3.6)
|
|
||||||
rack-protection (~> 1.2)
|
|
||||||
tilt (~> 1.3, >= 1.3.3)
|
|
||||||
sprockets (2.1.3)
|
|
||||||
hike (~> 1.2)
|
|
||||||
rack (~> 1.0)
|
|
||||||
tilt (~> 1.1, != 1.3.0)
|
|
||||||
thin (1.3.1)
|
|
||||||
daemons (>= 1.0.9)
|
|
||||||
eventmachine (>= 0.12.6)
|
|
||||||
rack (>= 1.0.0)
|
|
||||||
thor (0.14.6)
|
|
||||||
tilt (1.3.3)
|
|
||||||
treetop (1.4.10)
|
|
||||||
polyglot
|
|
||||||
polyglot (>= 0.3.1)
|
|
||||||
tzinfo (0.3.33)
|
|
||||||
webmock (1.8.7)
|
|
||||||
addressable (>= 2.2.7)
|
|
||||||
crack (>= 0.1.7)
|
|
||||||
|
|
||||||
PLATFORMS
|
|
||||||
ruby
|
|
||||||
|
|
||||||
DEPENDENCIES
|
|
||||||
appraisal (~> 0.4)
|
|
||||||
cucumber
|
|
||||||
guard
|
|
||||||
guard-cucumber
|
|
||||||
guard-livereload
|
|
||||||
guard-rspec
|
|
||||||
httparty
|
|
||||||
mocha
|
|
||||||
rack-livereload!
|
|
||||||
rails (~> 3.2.0)
|
|
||||||
rake
|
|
||||||
rspec
|
|
||||||
shotgun
|
|
||||||
sinatra
|
|
||||||
thin
|
|
||||||
webmock
|
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
source "http://rubygems.org"
|
source "http://rubygems.org"
|
||||||
|
|
||||||
gem "rails", "~> 3.0.0"
|
gem "rails", "~> 4.0.0"
|
||||||
|
|
||||||
gemspec :path=>"../"
|
gemspec :path=>"../"
|
|
@ -1,6 +1,6 @@
|
||||||
require "rack/livereload"
|
require "rack/livereload"
|
||||||
|
|
||||||
class Rack::LiveReload
|
class Rack::LiveReload
|
||||||
VERSION = '0.3.13'
|
VERSION = '0.3.16'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,12 @@ module Rack
|
||||||
|
|
||||||
attr_reader :content_length, :new_body, :livereload_added
|
attr_reader :content_length, :new_body, :livereload_added
|
||||||
|
|
||||||
|
def protocol
|
||||||
|
@options[:protocol] || "http"
|
||||||
|
end
|
||||||
|
|
||||||
def livereload_local_uri
|
def livereload_local_uri
|
||||||
"http://localhost:#{@options[:live_reload_port]}/livereload.js"
|
"#{protocol}://localhost:#{@options[:live_reload_port]}/livereload.js"
|
||||||
end
|
end
|
||||||
|
|
||||||
def initialize(body, options)
|
def initialize(body, options)
|
||||||
|
@ -45,7 +49,7 @@ module Rack
|
||||||
begin
|
begin
|
||||||
http.send_request('GET', uri.path)
|
http.send_request('GET', uri.path)
|
||||||
@use_vendored = false
|
@use_vendored = false
|
||||||
rescue Timeout::Error, Errno::ECONNREFUSED, EOFError
|
rescue ::Timeout::Error, Errno::ECONNREFUSED, EOFError, IOError
|
||||||
@use_vendored = true
|
@use_vendored = true
|
||||||
rescue => e
|
rescue => e
|
||||||
$stderr.puts e.inspect
|
$stderr.puts e.inspect
|
||||||
|
@ -61,6 +65,7 @@ module Rack
|
||||||
end
|
end
|
||||||
|
|
||||||
def process!(env)
|
def process!(env)
|
||||||
|
@env = env
|
||||||
@body.close if @body.respond_to?(:close)
|
@body.close if @body.respond_to?(:close)
|
||||||
|
|
||||||
@new_body = [] ; @body.each { |line| @new_body << line.to_s }
|
@new_body = [] ; @body.each { |line| @new_body << line.to_s }
|
||||||
|
@ -70,10 +75,29 @@ module Rack
|
||||||
|
|
||||||
@new_body.each do |line|
|
@new_body.each do |line|
|
||||||
if !@livereload_added && line['<head']
|
if !@livereload_added && line['<head']
|
||||||
host_to_use = (@options[:host] || env['HTTP_HOST'] || 'localhost').gsub(%r{:.*}, '')
|
line.gsub!(HEAD_TAG_REGEX) { |match| %{#{match}#{template.result(binding)}} }
|
||||||
|
|
||||||
app_root = ENV['RAILS_RELATIVE_URL_ROOT'] || ''
|
@livereload_added = true
|
||||||
|
end
|
||||||
|
|
||||||
|
@content_length += line.bytesize
|
||||||
|
@processed = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def app_root
|
||||||
|
ENV['RAILS_RELATIVE_URL_ROOT'] || ''
|
||||||
|
end
|
||||||
|
|
||||||
|
def host_to_use
|
||||||
|
(@options[:host] || @env['HTTP_HOST'] || 'localhost').gsub(%r{:.*}, '')
|
||||||
|
end
|
||||||
|
|
||||||
|
def template
|
||||||
|
ERB.new(::File.read(::File.expand_path('../../../../skel/livereload.html.erb', __FILE__)))
|
||||||
|
end
|
||||||
|
|
||||||
|
def livereload_source
|
||||||
if use_vendored?
|
if use_vendored?
|
||||||
src = "#{app_root}#{LIVERELOAD_JS_PATH.dup}?host=#{host_to_use}"
|
src = "#{app_root}#{LIVERELOAD_JS_PATH.dup}?host=#{host_to_use}"
|
||||||
else
|
else
|
||||||
|
@ -84,16 +108,7 @@ module Rack
|
||||||
src << "&maxdelay=#{@options[:max_delay]}" if @options[:max_delay]
|
src << "&maxdelay=#{@options[:max_delay]}" if @options[:max_delay]
|
||||||
src << "&port=#{@options[:port]}" if @options[:port]
|
src << "&port=#{@options[:port]}" if @options[:port]
|
||||||
|
|
||||||
template = ERB.new(::File.read(::File.expand_path('../../../../skel/livereload.html.erb', __FILE__)))
|
src
|
||||||
|
|
||||||
line.gsub!(HEAD_TAG_REGEX) { |match| %{#{match}#{template.result(binding)}} }
|
|
||||||
|
|
||||||
@livereload_added = true
|
|
||||||
end
|
|
||||||
|
|
||||||
@content_length += line.bytesize
|
|
||||||
@processed = true
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,7 +16,7 @@ module Rack
|
||||||
end
|
end
|
||||||
|
|
||||||
def skip_processing?
|
def skip_processing?
|
||||||
!html? || chunked? || inline? || ignored? || bad_browser?
|
!html? || chunked? || inline? || ignored? || bad_browser? || !get?
|
||||||
end
|
end
|
||||||
|
|
||||||
def chunked?
|
def chunked?
|
||||||
|
@ -28,7 +28,8 @@ module Rack
|
||||||
end
|
end
|
||||||
|
|
||||||
def ignored?
|
def ignored?
|
||||||
@options[:ignore] and @options[:ignore].any? { |filter| @env['PATH_INFO'][filter] }
|
path = @env['QUERY_STRING'].empty? ? @env['PATH_INFO'] : "#{@env['PATH_INFO']}?#{@env['QUERY_STRING']}"
|
||||||
|
@options[:ignore] and @options[:ignore].any? { |filter| path[filter] }
|
||||||
end
|
end
|
||||||
|
|
||||||
def bad_browser?
|
def bad_browser?
|
||||||
|
@ -36,7 +37,11 @@ module Rack
|
||||||
end
|
end
|
||||||
|
|
||||||
def html?
|
def html?
|
||||||
@headers['Content-Type'] =~ %r{text/html} and @status == 200
|
@headers['Content-Type'] =~ %r{text/html}
|
||||||
|
end
|
||||||
|
|
||||||
|
def get?
|
||||||
|
@env['REQUEST_METHOD'] == 'GET'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,6 +8,7 @@ Gem::Specification.new do |s|
|
||||||
s.authors = ["John Bintz"]
|
s.authors = ["John Bintz"]
|
||||||
s.email = ["john@coswellproductions.com"]
|
s.email = ["john@coswellproductions.com"]
|
||||||
s.homepage = ""
|
s.homepage = ""
|
||||||
|
s.license = "MIT"
|
||||||
s.summary = %q{Insert LiveReload into your app easily as Rack middleware}
|
s.summary = %q{Insert LiveReload into your app easily as Rack middleware}
|
||||||
s.description = %q{Insert LiveReload into your app easily as Rack middleware}
|
s.description = %q{Insert LiveReload into your app easily as Rack middleware}
|
||||||
|
|
||||||
|
@ -32,7 +33,7 @@ Gem::Specification.new do |s|
|
||||||
s.add_development_dependency "guard-cucumber"
|
s.add_development_dependency "guard-cucumber"
|
||||||
s.add_development_dependency "guard-livereload"
|
s.add_development_dependency "guard-livereload"
|
||||||
s.add_development_dependency "webmock"
|
s.add_development_dependency "webmock"
|
||||||
s.add_development_dependency "nokogiri"
|
s.add_development_dependency "nokogiri", ("< 1.6" if RUBY_VERSION < "1.9") # Nokogiri >= 1.6 requires Ruby >= 1.9
|
||||||
s.add_development_dependency 'appraisal', '~> 0.4'
|
s.add_development_dependency 'appraisal', '~> 0.4'
|
||||||
s.add_runtime_dependency "rack"
|
s.add_runtime_dependency "rack"
|
||||||
end
|
end
|
||||||
|
|
|
@ -11,5 +11,5 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RACK_LIVERELOAD_PORT = <%= @options[:live_reload_port] %>;
|
RACK_LIVERELOAD_PORT = <%= @options[:live_reload_port] %>;
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="<%= src %>"></script>
|
<script type="text/javascript" src="<%= livereload_source %>"></script>
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ describe Rack::LiveReload::BodyProcessor do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'responds false when no head tag' do
|
it 'responds false when no head tag' do
|
||||||
regex.match("<header></header>").should be_false
|
regex.match("<header></header>").should be_falsey
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -14,36 +14,29 @@ describe Rack::LiveReload::ProcessingSkipAnalyzer do
|
||||||
|
|
||||||
describe '#skip_processing?' do
|
describe '#skip_processing?' do
|
||||||
it "should skip processing" do
|
it "should skip processing" do
|
||||||
subject.skip_processing?.should be_true
|
subject.skip_processing?.should be_truthy
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#bad_browser?' do
|
describe '#ignored?' do
|
||||||
let(:user_agent) { described_class::BAD_USER_AGENTS.first.source }
|
|
||||||
|
|
||||||
it { should be_bad_browser }
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'ignored' do
|
|
||||||
let(:options) { { :ignore => [ %r{file} ] } }
|
let(:options) { { :ignore => [ %r{file} ] } }
|
||||||
|
|
||||||
context 'not root' do
|
context 'path contains ignore pattern' do
|
||||||
let(:env) { { 'PATH_INFO' => '/this/file' } }
|
let(:env) { { 'PATH_INFO' => '/this/file', 'QUERY_STRING' => '' } }
|
||||||
|
|
||||||
it { should be_ignored }
|
it { should be_ignored }
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'root' do
|
context 'root path' do
|
||||||
let(:env) { { 'PATH_INFO' => '/' } }
|
let(:env) { { 'PATH_INFO' => '/', 'QUERY_STRING' => '' } }
|
||||||
|
|
||||||
it { should_not be_ignored }
|
it { should_not be_ignored }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'not text/html' do
|
describe '#chunked?' do
|
||||||
let(:headers) { { 'Content-Type' => 'application/pdf' } }
|
context 'regular response' do
|
||||||
|
it { should_not be_chunked }
|
||||||
it { should_not be_html }
|
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'chunked response' do
|
context 'chunked response' do
|
||||||
|
@ -51,17 +44,20 @@ describe Rack::LiveReload::ProcessingSkipAnalyzer do
|
||||||
|
|
||||||
it { should be_chunked }
|
it { should be_chunked }
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
describe '#inline?' do
|
||||||
context 'inline disposition' do
|
context 'inline disposition' do
|
||||||
let(:headers) { { 'Content-Disposition' => 'inline; filename=my_inlined_file' } }
|
let(:headers) { { 'Content-Disposition' => 'inline; filename=my_inlined_file' } }
|
||||||
|
|
||||||
it { should be_inline }
|
it { should be_inline }
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
describe '#ignored?' do
|
describe '#ignored?' do
|
||||||
let(:path_info) { 'path info' }
|
let(:path_info) { 'path info' }
|
||||||
let(:env) { { 'PATH_INFO' => path_info } }
|
let(:query_string) { 'query_string' }
|
||||||
|
let(:env) { { 'PATH_INFO' => path_info, 'QUERY_STRING' => query_string } }
|
||||||
|
|
||||||
context 'no ignore set' do
|
context 'no ignore set' do
|
||||||
it { should_not be_ignored }
|
it { should_not be_ignored }
|
||||||
|
@ -72,6 +68,70 @@ describe Rack::LiveReload::ProcessingSkipAnalyzer do
|
||||||
|
|
||||||
it { should be_ignored }
|
it { should be_ignored }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'ignore set including query_string' do
|
||||||
|
let(:options) { { :ignore => [ %r{#{path_info}\?#{query_string}} ] } }
|
||||||
|
|
||||||
|
it { should be_ignored }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
describe '#bad_browser?' do
|
||||||
|
context 'Firefox' do
|
||||||
|
it { should_not be_bad_browser }
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'BAD browser' do
|
||||||
|
let(:user_agent) { described_class::BAD_USER_AGENTS.first.source }
|
||||||
|
|
||||||
|
it { should be_bad_browser }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
describe '#html?' do
|
||||||
|
context 'HTML content' do
|
||||||
|
let(:headers) { { 'Content-Type' => 'text/html' } }
|
||||||
|
|
||||||
|
it { should be_html }
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'PDF content' do
|
||||||
|
let(:headers) { { 'Content-Type' => 'application/pdf' } }
|
||||||
|
|
||||||
|
it { should_not be_html }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
describe '#get?' do
|
||||||
|
context 'GET request' do
|
||||||
|
let(:env) { { 'REQUEST_METHOD' => 'GET' } }
|
||||||
|
|
||||||
|
it { should be_get }
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'PUT request' do
|
||||||
|
let(:env) { { 'REQUEST_METHOD' => 'PUT' } }
|
||||||
|
|
||||||
|
it { should_not be_get }
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'POST request' do
|
||||||
|
let(:env) { { 'REQUEST_METHOD' => 'POST' } }
|
||||||
|
|
||||||
|
it { should_not be_get }
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'DELETE request' do
|
||||||
|
let(:env) { { 'REQUEST_METHOD' => 'DELETE' } }
|
||||||
|
|
||||||
|
it { should_not be_get }
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'PATCH request' do
|
||||||
|
let(:env) { { 'REQUEST_METHOD' => 'PATCH' } }
|
||||||
|
|
||||||
|
it { should_not be_get }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,9 @@ describe Rack::LiveReload do
|
||||||
|
|
||||||
subject { middleware }
|
subject { middleware }
|
||||||
|
|
||||||
its(:app) { should == app }
|
it 'should be an app' do
|
||||||
|
middleware.app.should be == app
|
||||||
|
end
|
||||||
|
|
||||||
let(:env) { {} }
|
let(:env) { {} }
|
||||||
let(:options) { {} }
|
let(:options) { {} }
|
||||||
|
@ -20,7 +22,7 @@ describe Rack::LiveReload do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should return the js file' do
|
it 'should return the js file' do
|
||||||
middleware._call(env).should be_true
|
middleware._call(env).should be_truthy
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue