rack-livereload 0.3.16 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 45e7c6041deae2a58061f897768f0ae2663ddc57
4
- data.tar.gz: 44a14af6a1f3c44ca02aff9d00ceb7f6124db258
2
+ SHA256:
3
+ metadata.gz: a4ada2814d4f6fa252477480b6bee9fb1a7af79786a18807fe6774b3cb06e0df
4
+ data.tar.gz: 3b88f7818d20ba7651356c4b2051306f0e4cf8911dc6a9335f8c0d7dee45590a
5
5
  SHA512:
6
- metadata.gz: e69c85c54378bfdecdecf54afc9c7abb12b6ac6695c1950f3554e76d778dc5047dc00fbdb1e569be51ab074b8fc33c58aa4fa2c768f53a1cf792c03bc01a1172
7
- data.tar.gz: e2787341175b92c70c6cc91adbd18d2da4afadf9002d13d0ce31e06176cf34683802493a844103c365fa6caffb62f45272ad25e42012b771f0080febe0c0dc20
6
+ metadata.gz: dfe864b272edb851c0d28a1f15ec93240f865efe76363eea40b9e46dbafd66b7964521bac194ce1c8aab7ba3cb6f4804f1cce898915ceebcf51ee96239e63bbc
7
+ data.tar.gz: 966c5862fd1e2b9bbddbdd3c72d4cb43e9a7093aa2680a1c326030d2315b818ef6a8c6ace968e42aa19f6eb40b5b2bbebe4a451c1368896a0b694c537f256ab9
data/.gitignore CHANGED
@@ -1,7 +1,9 @@
1
1
  *.gem
2
2
  .bundle
3
3
  Gemfile.lock
4
+ .ruby-version
4
5
  gemfiles/*.lock
5
6
  pkg/*
6
7
  *.orig
7
8
  tmp/
9
+ .idea
data/.travis.yml CHANGED
@@ -1,10 +1,17 @@
1
1
  rvm:
2
- - 1.9.3
3
- - 2.0.0
2
+ - 2.5.1
3
+ - 2.7.1
4
4
  branches:
5
5
  only:
6
6
  - master
7
7
  gemfile:
8
- - gemfiles/rails32.gemfile
9
- - gemfiles/rails40.gemfile
10
-
8
+ - gemfiles/rails51.gemfile
9
+ - gemfiles/rails602.gemfile
10
+ matrix:
11
+ exclude:
12
+ - rvm: 2.5.1
13
+ gemfile: gemfiles/rails51.gemfile
14
+ - rvm: 2.7.1
15
+ gemfile: gemfiles/rails602.gemfile
16
+ - rvm: 3.2.2
17
+ gemfile: gemfiles/rails7.gemfile
data/Guardfile CHANGED
@@ -1,7 +1,7 @@
1
1
  # A sample Guardfile
2
2
  # More info at https://github.com/guard/guard#readme
3
3
 
4
- guard 'rspec', :cli => '-c' do
4
+ guard 'rspec', :cmd => 'rspec -c' do
5
5
  watch(%r{^spec/.+_spec\.rb$})
6
6
  watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
7
7
  watch('spec/spec_helper.rb') { "spec" }
@@ -15,3 +15,15 @@ guard 'cucumber' do
15
15
  watch(%r{^features/.+\.feature$})
16
16
  watch(%r{^features/support/.+$}) { 'features' }
17
17
  end
18
+
19
+ guard :bundler do
20
+ require 'guard/bundler'
21
+ require 'guard/bundler/verify'
22
+ helper = Guard::Bundler::Verify.new
23
+
24
+ files = ['Gemfile']
25
+ files += Dir['*.gemspec'] if files.any? { |f| helper.uses_gemspec?(f) }
26
+
27
+ # Assume files are symlinked from somewhere
28
+ files.each { |file| watch(helper.real_path(file)) }
29
+ end
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
- # Rack::LiveReload
1
+ ** LOOKING FOR MAINTAINER ** Please contact me if interested.
2
2
 
3
- <a href="http://travis-ci.org/johnbintz/rack-livereload"><img src="https://secure.travis-ci.org/johnbintz/rack-livereload.png" /></a>
4
- [![Code Climate](https://codeclimate.com/github/johnbintz/rack-livereload.png)](https://codeclimate.com/github/johnbintz/rack-livereload)
3
+
4
+ # Rack::LiveReload [![Build Status](https://travis-ci.org/onesupercoder/rack-livereload.svg?branch=master)](https://travis-ci.org/onesupercoder/rack-livereload) [![Maintainability](https://api.codeclimate.com/v1/badges/6b3cafaf0d8752d0ac55/maintainability)](https://codeclimate.com/github/onesupercoder/rack-livereload/maintainability)
5
5
 
6
6
  Hey, you've got [LiveReload](http://livereload.com/) in my [Rack](http://rack.rubyforge.org/)!
7
7
  No need for browser extensions anymore! Just plug it in your middleware stack and go!
@@ -16,7 +16,7 @@ Use this with [guard-livereload](http://github.com/guard/guard-livereload) for m
16
16
  Add the gem to your Gemfile.
17
17
 
18
18
  ```ruby
19
- gem "rack-livereload", :group => :development
19
+ gem "rack-livereload", group: :development
20
20
  ```
21
21
 
22
22
  Then add the middleware to your Rails middleware stack by editing your `config/environments/development.rb`.
@@ -25,9 +25,15 @@ Then add the middleware to your Rails middleware stack by editing your `config/e
25
25
  # config/environments/development.rb
26
26
 
27
27
  MyApp::Application.configure do
28
- # Add Rack::LiveReload to the bottom of the middleware stack with the default options.
28
+ # Add Rack::LiveReload to the bottom of the middleware stack with the default options:
29
29
  config.middleware.insert_after ActionDispatch::Static, Rack::LiveReload
30
+
31
+ # or, if you're using better_errors:
32
+ config.middleware.insert_before Rack::Lock, Rack::LiveReload
30
33
 
34
+ # or, if you're using better_errors with rails 6.
35
+ config.middleware.insert_before Rack::Runtime, Rack::LiveReload
36
+
31
37
  # ...
32
38
  end
33
39
  ```
@@ -37,15 +43,20 @@ end
37
43
  ```ruby
38
44
  # Specifying Rack::LiveReload options.
39
45
  config.middleware.use(Rack::LiveReload,
40
- :min_delay => 500, # default 1000
41
- :max_delay => 10_000, # default 60_000
42
- :live_reload_port => 56789, # default 35729
43
- :host => 'myhost.cool.wow',
44
- :ignore => [ %r{dont/modify\.html$} ]
46
+ min_delay: 500, # default 1000
47
+ max_delay: 10_000, # default 60_000
48
+ live_reload_port: 56789, # default 35729
49
+ live_reload_scheme: 'ws', # default ws, use wss for ssl
50
+ host: 'myhost.cool.wow',
51
+ ignore: [ %r{dont/modify\.html$} ]
45
52
  )
46
53
  ```
47
54
 
48
- 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.
55
+ In addition, Rack::LiveReload's position within middleware stack can be
56
+ specified by inserting it relative to an existing middleware via
57
+ `insert_before` or `insert_after`. See the [Rails on Rack: Adding a
58
+ Middleware](http://guides.rubyonrails.org/rails_on_rack.html#adding-a-middleware)
59
+ section for more detail.
49
60
 
50
61
  ### Sinatra / config.ru
51
62
 
@@ -54,7 +65,7 @@ require 'rack-livereload'
54
65
 
55
66
  use Rack::LiveReload
56
67
  # ...or...
57
- use Rack::LiveReload, :min_delay => 500, ...
68
+ use Rack::LiveReload, min_delay: 500, ...
58
69
  ```
59
70
 
60
71
  ## How it works
@@ -82,13 +93,13 @@ your browser doesn't need it. The SWF WebSocket implementor won't be loaded unle
82
93
  WebSockets support or if you force it in the middleware stack:
83
94
 
84
95
  ``` ruby
85
- use Rack::LiveReload, :force_swf => true
96
+ use Rack::LiveReload, force_swf: true
86
97
  ```
87
98
 
88
99
  If you don't want any of the web-sockets-js code included at all, use the `no_swf` option:
89
100
 
90
101
  ``` ruby
91
- use Rack::LiveReload, :no_swf => true
102
+ use Rack::LiveReload, no_swf: true
92
103
  ```
93
104
 
94
105
  Once more browsers support WebSockets than don't, this option will be reversed and you'll have
@@ -2,6 +2,6 @@ Given /^I have a Rack app with Rack::LiveReload$/ do
2
2
  @app = Rack::Builder.new do
3
3
  use Rack::LiveReload
4
4
 
5
- run lambda { |env| [ 200, { 'Content-Type' => 'text/html' }, [ "<html><head></head><body></body></html>" ] ] }
5
+ run lambda { |env| [ 200, { 'content-type' => 'text/html' }, [ "<html><head></head><body></body></html>" ] ] }
6
6
  end
7
7
  end
@@ -1,4 +1,4 @@
1
1
  Then /^I should not have any Rack::LiveReload code$/ do
2
- @response.body.should_not include("rack/livereload.js")
2
+ expect(@response.body).not_to include("rack/livereload.js")
3
3
  end
4
4
 
@@ -0,0 +1,5 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem "rails", "~> 5.1.6"
4
+
5
+ gemspec :path=>"../"
@@ -0,0 +1,5 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem "rails", "~> 6.0.2"
4
+
5
+ gemspec :path=>"../"
@@ -0,0 +1,5 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem "rails", "~> 7.0.4.3"
4
+
5
+ gemspec :path=>"../"