asciidoctor-epub3 1.5.0.alpha.16 → 1.5.0.alpha.17

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: bbc1a47f9a011cc194ab8cd731ec3d6121079f0a49e32540329d8b30fb390ecc
4
- data.tar.gz: c02ceac6c1c9259ff70a3b799ceb9ed70f5af5e5b233914882332b560f95259d
3
+ metadata.gz: 22c90a180a710ca315f1ef423cd70f5420a9e37ae045e4c0897e737161f1577d
4
+ data.tar.gz: f7c2398e711e506b3b3c5acecc46bf07e7a2ffc91feec0a72428988f0888350d
5
5
  SHA512:
6
- metadata.gz: 409a0b3d28aa559a14f33fd042b739595b1be0625b18044c308b088f3396479fc3859eece4d81bf9439d9c10e815061143eaed29506266154b9c22e6b2fd8100
7
- data.tar.gz: d1e8a6c56803400dc9181bbaacec99df81a522a24301e96adb40f19456066e16d27202da6ce8e48081ee177e51c166916ef951eefc3119aba3ea02235b1b3628
6
+ metadata.gz: fa4efe81a7a55f9fa7e186d86109b44853ecf9a97c1261ae5cfc5f0edced42911a4bfadabcc236cc39c49ac1d3fc24faba33b48578db66de40afbe36e89ff2cf
7
+ data.tar.gz: 300b3859bb41288dbcc06b87d810bb4a547b708a20f42fa555ddf3f44cace89a44d37b4a9532c948ebaea50b693e47a46876b2e92c49e3fb4031593469c87c6b
@@ -5,6 +5,10 @@
5
5
  This document provides a high-level view of the changes to the {project-name} by release.
6
6
  For a detailed view of what has changed, refer to the {uri-repo}/commits/master[commit history] on GitHub.
7
7
 
8
+ == 1.5.0.alpha.17 (2020-05-25) - @slonopotamus
9
+
10
+ * support remote URLs for audio/video/image (#333, #334)
11
+
8
12
  == 1.5.0.alpha.16 (2020-04-26) - @slonopotamus
9
13
 
10
14
  * add basic audio and video support (#9)
@@ -1,6 +1,6 @@
1
1
  = {project-name}: A _native_ EPUB3 converter for AsciiDoc
2
2
  Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]>
3
- v1.5.0.alpha.16, 2020-04-26
3
+ v1.5.0.alpha.17, 2020-05-25
4
4
  // Settings:
5
5
  :experimental:
6
6
  :idprefix:
@@ -244,7 +244,7 @@ module Asciidoctor
244
244
  @media_files.each do |file|
245
245
  if file[:name].start_with? %(#{docimagesdir}jacket/cover.)
246
246
  logger.warn %(path is reserved for cover artwork: #{file[:name]}; skipping file found in content)
247
- elsif ::File.readable? file[:path]
247
+ elsif file[:path].nil? || File.readable?(file[:path])
248
248
  mime_types = MIME::Types.type_for file[:name]
249
249
  mime_types.delete_if {|x| x.media_type != file[:media_type] }
250
250
  preferred_mime_type = mime_types.empty? ? nil : mime_types[0].content_type
@@ -930,13 +930,16 @@ document.addEventListener('DOMContentLoaded', function(event, reader) {
930
930
  epub_properties << 'svg' unless epub_properties.include? 'svg'
931
931
  end
932
932
 
933
- return if target.start_with? 'data:'
934
-
935
- out_dir = node.attr('outdir', nil, true) || doc_option(node.document, :to_dir)
936
- fs_path = (::File.join out_dir, target)
937
- unless ::File.exist? fs_path
938
- base_dir = root_document(node.document).base_dir
939
- fs_path = ::File.join base_dir, target
933
+ if Asciidoctor::Helpers.uriish? target
934
+ # We need to add both local and remote media files to manifect
935
+ fs_path = nil
936
+ else
937
+ out_dir = node.attr('outdir', nil, true) || doc_option(node.document, :to_dir)
938
+ fs_path = (::File.join out_dir, target)
939
+ unless ::File.exist? fs_path
940
+ base_dir = root_document(node.document).base_dir
941
+ fs_path = ::File.join base_dir, target
942
+ end
940
943
  end
941
944
  # We need *both* virtual and physical image paths. Unfortunately, references[:images] only has one of them.
942
945
  @media_files << { name: target, path: fs_path, media_type: media_type }
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Asciidoctor
4
4
  module Epub3
5
- VERSION = '1.5.0.alpha.16'
5
+ VERSION = '1.5.0.alpha.17'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-epub3
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0.alpha.16
4
+ version: 1.5.0.alpha.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Allen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-04-26 00:00:00.000000000 Z
12
+ date: 2020-05-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: asciidoctor-diagram