epuber 0.7.0 → 0.7.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: 6560c1375c0b773b66e5938c09a94767ad7a9e8dae29b670e469028828e88db9
4
- data.tar.gz: e6c72d1f60af9ea5b2f60b7bd9ee044d8896abe0d3e0a8ebead44965a1971876
3
+ metadata.gz: 120dc4807061db90872cae78086dc39e71ad1102d317c7f5a7cf1e24ff18e4a2
4
+ data.tar.gz: 8ef80f5cebf4007f49c9e57f4a2429ac41afc4307cb1c20e85ab5c9f1ae89c27
5
5
  SHA512:
6
- metadata.gz: 40f4c800bb62695192e7934402dae40c34540b0eebc175cc951bce8d669e4e9d61c855864281b134945d9e5b51f41467fb329a1a66ca47b326af2383151b2956
7
- data.tar.gz: aa8ad6eeba9f8f0223dc3a4a62aef8477a0a6c7444441f871eb3a4d7138f60f3891e27227c49f96076669b9842a87c9e10e271822cb78a03f80712b237bf74cb
6
+ metadata.gz: 5ff86e09420783826158a9808500f3c02c45426e22203324d9a5b4a62326a045aedf0425417ef0d9f59a173e3d01bff195de2fa524e2add51a40db2bf5e8ec05
7
+ data.tar.gz: 29db60c84cf5c0e75ca992c5eb34d301b20a36c08c31883e829d2290bc100caf9a7ab05fd24ce073cea1314eb01959d9e15fc94af89ee45c1440f2d764dff098
data/lib/epuber/server.rb CHANGED
@@ -487,7 +487,9 @@ module Epuber
487
487
  def handle_file(file_path)
488
488
  return not_found unless File.exists?(file_path)
489
489
 
490
- last_modified(File.mtime(file_path))
490
+ mtime = File.mtime(file_path)
491
+ last_modified(mtime)
492
+ etag(mtime.to_s)
491
493
 
492
494
  case File.extname(file_path)
493
495
  when '.styl'
@@ -507,7 +509,7 @@ module Epuber
507
509
  end
508
510
  end
509
511
 
510
- send_file(file_path, type: type)
512
+ send_file(file_path, type: type, last_modified: mtime)
511
513
  end
512
514
  end
513
515
 
@@ -570,6 +572,7 @@ module Epuber
570
572
 
571
573
  case File.extname(full_path)
572
574
  when '.xhtml'
575
+ content_type :xhtml
573
576
  handle_xhtml_file(full_path)
574
577
  else
575
578
  handle_file(full_path)
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Epuber
4
- VERSION = '0.7.0'
4
+ VERSION = '0.7.2'
5
5
 
6
6
  HOME_URL = 'https://github.com/epuber-io/epuber'
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epuber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Kříž
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-22 00:00:00.000000000 Z
11
+ date: 2022-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -585,7 +585,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
585
585
  - !ruby/object:Gem::Version
586
586
  version: '0'
587
587
  requirements: []
588
- rubygems_version: 3.3.9
588
+ rubygems_version: 3.3.21
589
589
  signing_key:
590
590
  specification_version: 4
591
591
  summary: Epuber is simple tool to compile and pack source files into EPUB format.