rack-livereload 0.5.2 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 95ceeb1c917edff2b8edb395486a66378d0d7fe86141a24b75460683a602dc47
4
- data.tar.gz: ba1ff59e4a7986d3ecdf89ea9e835356d727d6d2b409ae7ba1c7d74263e987b6
3
+ metadata.gz: a35835e7d43e034901a29d38af85f18c84e90185e5cdac19106989894e276a37
4
+ data.tar.gz: d8e2f08efe35ac78d09101297dffdbae471c773a00fdfaecce090fad9f434a1e
5
5
  SHA512:
6
- metadata.gz: 56a18bf50e1e39b0754e42d8e6eefb0bf4d1e8cd9fd946d41c072b0baa19ac245cda3b3643bc02beab4de5fcb86cb4dcd6a2e786e53ee2bc6e4e9197602bb87a
7
- data.tar.gz: f1a6415a7deff8820f5824553e7ccf0155ee5ac6eb61249892a174eba4cc6ebf6328d439fccdbd9e6603e898f73fcf83eeedbd21eded63a2a36b83236cd959ff
6
+ metadata.gz: '08b8c9a84a33d6b0c7160d9838a1a49f1ce441a3d1da128d5a33c5989fa1dfb926b0b970cb6834d1318f23f877700fae59126fdcf61ad1a1dd4bef350ea45ec7'
7
+ data.tar.gz: e3be722280f6d554e2d17881b20412adc65fd241e4ac8901b7fa38c65b1c7b5c12c54a57739cc3d3b0d7efa69a4ebc81d2119b479af4b1a1bbb9ec02d91e8328
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  ** LOOKING FOR MAINTAINER ** Please contact me if interested.
2
2
 
3
+ I recommend https://github.com/kirillplatonov/hotwire-livereload instead.
4
+
3
5
 
4
6
  # 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
7
 
@@ -105,3 +107,7 @@ use Rack::LiveReload, no_swf: true
105
107
  Once more browsers support WebSockets than don't, this option will be reversed and you'll have
106
108
  to explicitly include the Flash shim.
107
109
 
110
+ ### Rack support
111
+
112
+ - Rack 2 is supported until version `0.5.x` and is maintained in the `rack2` branch
113
+ - Rack 3 is supported in version `0.6.0` and later
@@ -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
@@ -20,11 +20,11 @@ module Rack
20
20
  end
21
21
 
22
22
  def chunked?
23
- @headers['Transfer-Encoding'] == 'chunked'
23
+ @headers['transfer-encoding'] == 'chunked'
24
24
  end
25
25
 
26
26
  def inline?
27
- @headers['Content-Disposition'] =~ %r{^inline}
27
+ @headers['content-disposition'] =~ %r{^inline}
28
28
  end
29
29
 
30
30
  def ignored?
@@ -37,7 +37,7 @@ module Rack
37
37
  end
38
38
 
39
39
  def html?
40
- @headers['Content-Type'] =~ %r{text/html|application/xhtml\+xml}
40
+ @headers['content-type'] =~ %r{text/html|application/xhtml\+xml}
41
41
  end
42
42
 
43
43
  def get?
@@ -27,10 +27,10 @@ module Rack
27
27
  processor = BodyProcessor.new(body, @options)
28
28
  processor.process!(env)
29
29
 
30
- headers['Content-Length'] = processor.content_length.to_s
30
+ headers['content-length'] = processor.content_length.to_s
31
31
 
32
32
  if processor.livereload_added
33
- headers['X-Rack-LiveReload'] = '1'
33
+ headers['x-rack-livereload'] = '1'
34
34
  end
35
35
 
36
36
  [ status, headers, processor.new_body ]
@@ -46,7 +46,7 @@ module Rack
46
46
  'application/swf'
47
47
  end
48
48
 
49
- [ 200, { 'Content-Type' => type, 'Content-Length' => ::File.size(file).to_s }, [ ::File.read(file) ] ]
49
+ [ 200, { 'content-type' => type, 'content-length' => ::File.size(file).to_s }, [ ::File.read(file) ] ]
50
50
  end
51
51
  end
52
52
  end
@@ -1,6 +1,6 @@
1
1
  require "rack/livereload"
2
2
 
3
3
  class Rack::LiveReload
4
- VERSION = '0.5.2'
4
+ VERSION = '0.6.0'
5
5
  end
6
6
 
@@ -36,6 +36,6 @@ Gem::Specification.new do |s|
36
36
  s.add_development_dependency "webmock"
37
37
  s.add_development_dependency "nokogiri", ("< 1.6" if RUBY_VERSION < "1.9") # Nokogiri >= 1.6 requires Ruby >= 1.9
38
38
  s.add_development_dependency 'appraisal', '~> 2.2.0'
39
- s.add_runtime_dependency "rack", "< 3"
39
+ s.add_runtime_dependency "rack", "~> 3.0.8"
40
40
  end
41
41
 
@@ -40,7 +40,7 @@ describe Rack::LiveReload::ProcessingSkipAnalyzer do
40
40
  end
41
41
 
42
42
  context 'chunked response' do
43
- let(:headers) { { 'Transfer-Encoding' => 'chunked' } }
43
+ let(:headers) { { 'transfer-encoding' => 'chunked' } }
44
44
 
45
45
  it { should be_chunked }
46
46
  end
@@ -48,7 +48,7 @@ describe Rack::LiveReload::ProcessingSkipAnalyzer do
48
48
 
49
49
  describe '#inline?' do
50
50
  context 'inline disposition' do
51
- let(:headers) { { 'Content-Disposition' => 'inline; filename=my_inlined_file' } }
51
+ let(:headers) { { 'content-disposition' => 'inline; filename=my_inlined_file' } }
52
52
 
53
53
  it { should be_inline }
54
54
  end
@@ -90,19 +90,19 @@ describe Rack::LiveReload::ProcessingSkipAnalyzer do
90
90
 
91
91
  describe '#html?' do
92
92
  context 'HTML content' do
93
- let(:headers) { { 'Content-Type' => 'text/html' } }
93
+ let(:headers) { { 'content-type' => 'text/html' } }
94
94
 
95
95
  it { should be_html }
96
96
  end
97
97
 
98
98
  context 'XHTML content' do
99
- let(:headers) { { 'Content-Type' => 'application/xhtml+xml' } }
99
+ let(:headers) { { 'content-type' => 'application/xhtml+xml' } }
100
100
 
101
101
  it { should be_html }
102
102
  end
103
103
 
104
104
  context 'PDF content' do
105
- let(:headers) { { 'Content-Type' => 'application/pdf' } }
105
+ let(:headers) { { 'content-type' => 'application/pdf' } }
106
106
 
107
107
  it { should_not be_html }
108
108
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-livereload
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Bintz
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-12 00:00:00.000000000 Z
11
+ date: 2024-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -238,16 +238,16 @@ dependencies:
238
238
  name: rack
239
239
  requirement: !ruby/object:Gem::Requirement
240
240
  requirements:
241
- - - "<"
241
+ - - "~>"
242
242
  - !ruby/object:Gem::Version
243
- version: '3'
243
+ version: 3.0.8
244
244
  type: :runtime
245
245
  prerelease: false
246
246
  version_requirements: !ruby/object:Gem::Requirement
247
247
  requirements:
248
- - - "<"
248
+ - - "~>"
249
249
  - !ruby/object:Gem::Version
250
- version: '3'
250
+ version: 3.0.8
251
251
  description: Insert LiveReload into your app easily as Rack middleware
252
252
  email:
253
253
  - john@coswellproductions.com
@@ -291,7 +291,7 @@ homepage: https://github.com/onesupercoder/rack-livereload
291
291
  licenses:
292
292
  - MIT
293
293
  metadata: {}
294
- post_install_message:
294
+ post_install_message:
295
295
  rdoc_options: []
296
296
  require_paths:
297
297
  - lib
@@ -306,17 +306,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
306
306
  - !ruby/object:Gem::Version
307
307
  version: '0'
308
308
  requirements: []
309
- rubygems_version: 3.5.3
310
- signing_key:
309
+ rubygems_version: 3.1.4
310
+ signing_key:
311
311
  specification_version: 4
312
312
  summary: Insert LiveReload into your app easily as Rack middleware
313
- test_files:
314
- - features/skip_certain_browsers.feature
315
- - features/step_definitions/given/i_have_a_rack_app_with_live_reload.rb
316
- - features/step_definitions/then/i_should_not_have_livereload_code.rb
317
- - features/step_definitions/when/i_make_a_request_with_headers.rb
318
- - features/support/env.rb
319
- - spec/rack/livereload/body_processor_spec.rb
320
- - spec/rack/livereload/processing_skip_analyzer_spec.rb
321
- - spec/rack/livereload_spec.rb
322
- - spec/spec_helper.rb
313
+ test_files: []