diff --git a/.travis.yml b/.travis.yml
index 3209843..f00aa31 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,19 +1,10 @@
rvm:
- - 1.8.7
- - 1.9.2
- 1.9.3
- 2.0.0
branches:
only:
- master
gemfile:
- - gemfiles/rails30.gemfile
- - gemfiles/rails31.gemfile
- gemfiles/rails32.gemfile
- gemfiles/rails40.gemfile
-matrix:
- exclude:
- - rvm: 1.8.7
- gemfile: gemfiles/rails40.gemfile
- - rvm: 1.9.2
- gemfile: gemfiles/rails40.gemfile
+
diff --git a/Appraisals b/Appraisals
index e80ed07..2e0bfb2 100644
--- a/Appraisals
+++ b/Appraisals
@@ -1,11 +1,3 @@
-appraise 'rails30' do
- gem 'rails', '~> 3.0.0'
-end
-
-appraise 'rails31' do
- gem 'rails', '~> 3.1.0'
-end
-
appraise 'rails32' do
gem 'rails', '~> 3.2.0'
end
diff --git a/README.md b/README.md
index c351e40..e4e0e19 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
[![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/)!
+Hey, you've got [LiveReload](http://www.livereload.com/) in my [Rack](http://rack.rubyforge.org/)!
No need for browser extensions anymore! Just plug it in your middleware stack and go!
Even supports browsers without WebSockets!
@@ -26,7 +26,7 @@ Then add the middleware to your Rails middleware stack by editing your `config/e
MyApp::Application.configure do
# Add Rack::LiveReload to the bottom of the middleware stack with the default options.
- config.middleware.insert_after ActionDispatch::Static, Rack::LiveReload
+ config.middleware.use Rack::LiveReload
# ...
end
diff --git a/gemfiles/rails30.gemfile b/gemfiles/rails30.gemfile
deleted file mode 100644
index eaf7f8d..0000000
--- a/gemfiles/rails30.gemfile
+++ /dev/null
@@ -1,7 +0,0 @@
-# This file was generated by Appraisal
-
-source "http://rubygems.org"
-
-gem "rails", "~> 3.0.0"
-
-gemspec :path=>"../"
\ No newline at end of file
diff --git a/gemfiles/rails31.gemfile b/gemfiles/rails31.gemfile
deleted file mode 100644
index 5a7622b..0000000
--- a/gemfiles/rails31.gemfile
+++ /dev/null
@@ -1,7 +0,0 @@
-# This file was generated by Appraisal
-
-source "http://rubygems.org"
-
-gem "rails", "~> 3.1.0"
-
-gemspec :path=>"../"
\ No newline at end of file
diff --git a/lib/rack/livereload/processing_skip_analyzer.rb b/lib/rack/livereload/processing_skip_analyzer.rb
index ec2b654..ba6ae63 100644
--- a/lib/rack/livereload/processing_skip_analyzer.rb
+++ b/lib/rack/livereload/processing_skip_analyzer.rb
@@ -28,8 +28,7 @@ module Rack
end
def ignored?
- path = @env['QUERY_STRING'].empty? ? @env['PATH_INFO'] : "#{@env['PATH_INFO']}?#{@env['QUERY_STRING']}"
- @options[:ignore] and @options[:ignore].any? { |filter| path[filter] }
+ @options[:ignore] and @options[:ignore].any? { |filter| @env['PATH_INFO'][filter] }
end
def bad_browser?
diff --git a/spec/rack/livereload/body_processor_spec.rb b/spec/rack/livereload/body_processor_spec.rb
index fad68b6..331471c 100644
--- a/spec/rack/livereload/body_processor_spec.rb
+++ b/spec/rack/livereload/body_processor_spec.rb
@@ -15,7 +15,7 @@ describe Rack::LiveReload::BodyProcessor do
end
it 'responds false when no head tag' do
- regex.match("").should be_false
+ regex.match("").should be_falsey
end
end
diff --git a/spec/rack/livereload/processing_skip_analyzer_spec.rb b/spec/rack/livereload/processing_skip_analyzer_spec.rb
index 600e386..bc28426 100644
--- a/spec/rack/livereload/processing_skip_analyzer_spec.rb
+++ b/spec/rack/livereload/processing_skip_analyzer_spec.rb
@@ -14,7 +14,7 @@ describe Rack::LiveReload::ProcessingSkipAnalyzer do
describe '#skip_processing?' do
it "should skip processing" do
- subject.skip_processing?.should be_true
+ subject.skip_processing?.should be_truthy
end
end
@@ -22,13 +22,13 @@ describe Rack::LiveReload::ProcessingSkipAnalyzer do
let(:options) { { :ignore => [ %r{file} ] } }
context 'path contains ignore pattern' do
- let(:env) { { 'PATH_INFO' => '/this/file', 'QUERY_STRING' => '' } }
+ let(:env) { { 'PATH_INFO' => '/this/file' } }
it { should be_ignored }
end
context 'root path' do
- let(:env) { { 'PATH_INFO' => '/', 'QUERY_STRING' => '' } }
+ let(:env) { { 'PATH_INFO' => '/' } }
it { should_not be_ignored }
end
@@ -56,8 +56,7 @@ describe Rack::LiveReload::ProcessingSkipAnalyzer do
describe '#ignored?' do
let(:path_info) { 'path info' }
- let(:query_string) { 'query_string' }
- let(:env) { { 'PATH_INFO' => path_info, 'QUERY_STRING' => query_string } }
+ let(:env) { { 'PATH_INFO' => path_info } }
context 'no ignore set' do
it { should_not be_ignored }
@@ -68,12 +67,6 @@ describe Rack::LiveReload::ProcessingSkipAnalyzer do
it { should be_ignored }
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
diff --git a/spec/rack/livereload_spec.rb b/spec/rack/livereload_spec.rb
index d955ab5..9322706 100644
--- a/spec/rack/livereload_spec.rb
+++ b/spec/rack/livereload_spec.rb
@@ -7,7 +7,9 @@ describe Rack::LiveReload do
subject { middleware }
- its(:app) { should == app }
+ it 'should be an app' do
+ middleware.app.should be == app
+ end
let(:env) { {} }
let(:options) { {} }
@@ -20,7 +22,7 @@ describe Rack::LiveReload do
end
it 'should return the js file' do
- middleware._call(env).should be_true
+ middleware._call(env).should be_truthy
end
end
end