rack-livereload 0.5.1 → 0.5.2

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: a4ada2814d4f6fa252477480b6bee9fb1a7af79786a18807fe6774b3cb06e0df
4
- data.tar.gz: 3b88f7818d20ba7651356c4b2051306f0e4cf8911dc6a9335f8c0d7dee45590a
3
+ metadata.gz: 95ceeb1c917edff2b8edb395486a66378d0d7fe86141a24b75460683a602dc47
4
+ data.tar.gz: ba1ff59e4a7986d3ecdf89ea9e835356d727d6d2b409ae7ba1c7d74263e987b6
5
5
  SHA512:
6
- metadata.gz: dfe864b272edb851c0d28a1f15ec93240f865efe76363eea40b9e46dbafd66b7964521bac194ce1c8aab7ba3cb6f4804f1cce898915ceebcf51ee96239e63bbc
7
- data.tar.gz: 966c5862fd1e2b9bbddbdd3c72d4cb43e9a7093aa2680a1c326030d2315b818ef6a8c6ace968e42aa19f6eb40b5b2bbebe4a451c1368896a0b694c537f256ab9
6
+ metadata.gz: 56a18bf50e1e39b0754e42d8e6eefb0bf4d1e8cd9fd946d41c072b0baa19ac245cda3b3643bc02beab4de5fcb86cb4dcd6a2e786e53ee2bc6e4e9197602bb87a
7
+ data.tar.gz: f1a6415a7deff8820f5824553e7ccf0155ee5ac6eb61249892a174eba4cc6ebf6328d439fccdbd9e6603e898f73fcf83eeedbd21eded63a2a36b83236cd959ff
@@ -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.1'
4
+ VERSION = '0.5.2'
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"
39
+ s.add_runtime_dependency "rack", "< 3"
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.1
4
+ version: 0.5.2
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: 2023-04-13 00:00:00.000000000 Z
11
+ date: 2024-01-12 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: '0'
243
+ version: '3'
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: '0'
250
+ version: '3'
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,8 +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.0.3.1
310
- signing_key:
309
+ rubygems_version: 3.5.3
310
+ signing_key:
311
311
  specification_version: 4
312
312
  summary: Insert LiveReload into your app easily as Rack middleware
313
313
  test_files: