softcover 1.6.2 → 1.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/Gemfile.lock +1 -1
- data/lib/softcover/builders/epub.rb +1 -1
- data/lib/softcover/commands/check.rb +3 -3
- data/lib/softcover/commands/epub_validator.rb +1 -1
- data/lib/softcover/utils.rb +1 -1
- data/lib/softcover/version.rb +1 -1
- data/spec/commands/epub_validator_spec.rb +34 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d11057ebeea09cb563797b0bd041806d981e9731a35d25f3b2c4a8197982f4e2
|
4
|
+
data.tar.gz: af6811fa06aff4fc4e2502aaf6410540d754dd61c335072134fca94f7fa40a19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6abbbdee93d942c6dd4f2368a3d8288f5e7e06c10407d819ca014ce00109f62bfe7b773258551e2f6d60553ee5ee723369ab59503488397861732a86d09dac6
|
7
|
+
data.tar.gz: 9fd31614391b186465d4b610d2cd06799e82941d1998b4342918120790e08f81610032b085ba932092c6660c55cc858700941e4c75e7ca5398ea0e86140c13f5
|
data/.travis.yml
CHANGED
@@ -11,7 +11,7 @@ before_install:
|
|
11
11
|
- sudo apt-get install -qq inkscape ghostscript
|
12
12
|
- sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh
|
13
13
|
- export PATH=$PATH:`echo ~`
|
14
|
-
- curl -O -L https://github.com/IDPF/epubcheck/releases/download/v4.
|
14
|
+
- curl -O -L https://github.com/IDPF/epubcheck/releases/download/v4.2.2/epubcheck-4.2.2.zip && unzip epubcheck-4.2.2.zip -d ~
|
15
15
|
- wget https://softcover-static.s3.amazonaws.com/Bodoni%2072%20Smallcaps%20Book.ttf && sudo cp 'Bodoni 72 Smallcaps Book.ttf' /usr/share/fonts/truetype/bodoni-classic
|
16
16
|
- sudo fc-cache -fsv
|
17
17
|
# - gem i softcover && softcover check # NOTE: enable to troubleshoot tex, gs, calibre, epubcheck, issus
|
data/Gemfile.lock
CHANGED
@@ -100,7 +100,7 @@ module Softcover
|
|
100
100
|
%(<?xml version="1.0" encoding="UTF-8"?>
|
101
101
|
<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1">
|
102
102
|
<head>
|
103
|
-
<meta name="dtb:uid" content="
|
103
|
+
<meta name="dtb:uid" content="urn:uuid:#{uuid}"/>
|
104
104
|
<meta name="dtb:depth" content="2"/>
|
105
105
|
<meta name="dtb:totalPageCount" content="0"/>
|
106
106
|
<meta name="dtb:maxPageNumber" content="0"/>
|
@@ -81,9 +81,9 @@ module Softcover
|
|
81
81
|
when :zip
|
82
82
|
"Install zip (e.g., apt-get install zip)"
|
83
83
|
when :epubcheck
|
84
|
-
url = 'https://github.com/
|
85
|
-
message = "EpubCheck 4.
|
86
|
-
message += " ∟ Unzip and place epubcheck-4.
|
84
|
+
url = 'https://github.com/w3c/epubcheck/releases/download/v4.2.2/epubcheck-4.2.2.zip'
|
85
|
+
message = "EpubCheck 4.2.2 (#{url})\n"
|
86
|
+
message += " ∟ Unzip and place epubcheck-4.2.2/ in a directory on your path"
|
87
87
|
when :inkscape
|
88
88
|
message = "Inkscape (https://inkscape.org/)"
|
89
89
|
when :python2
|
@@ -10,7 +10,7 @@ module Softcover
|
|
10
10
|
epub = path("ebooks/#{manifest.filename}.epub")
|
11
11
|
if File.exist?(epub)
|
12
12
|
puts "Validating EPUB..."
|
13
|
-
system("#{java} -jar #{epubcheck} #{epub}")
|
13
|
+
system("#{java} -jar #{epubcheck} --locale en -w #{epub}")
|
14
14
|
else
|
15
15
|
puts "File '#{epub}' not found"
|
16
16
|
puts "Run 'softcover build:epub' to generate"
|
data/lib/softcover/utils.rb
CHANGED
@@ -260,7 +260,7 @@ module Softcover::Utils
|
|
260
260
|
get_filename(:'ebook-convert')
|
261
261
|
when :epubcheck
|
262
262
|
# Finds EpubCheck anywhere on the path.
|
263
|
-
version_4 = path('epubcheck-4.
|
263
|
+
version_4 = path('epubcheck-4.2.2/epubcheck.jar')
|
264
264
|
first_path(version_4) || get_filename(:'epubcheck') || ""
|
265
265
|
when :inkscape
|
266
266
|
default = '/Applications/Inkscape.app/Contents/MacOS/inkscape'
|
data/lib/softcover/version.rb
CHANGED
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Softcover::Commands::EpubValidator do
|
4
|
+
context 'epub file exists' do
|
5
|
+
before(:all) do
|
6
|
+
remove_book
|
7
|
+
chdir_to_fixtures
|
8
|
+
silence { `softcover new book --polytex` }
|
9
|
+
chdir_to_book
|
10
|
+
silence { `softcover build:epub` }
|
11
|
+
end
|
12
|
+
|
13
|
+
after(:all) { remove_book }
|
14
|
+
|
15
|
+
subject { silence { Softcover::Commands::EpubValidator.validate! } }
|
16
|
+
it { should be_true }
|
17
|
+
end
|
18
|
+
|
19
|
+
context 'epub file not exists' do
|
20
|
+
before(:all) do
|
21
|
+
remove_book
|
22
|
+
chdir_to_fixtures
|
23
|
+
silence { `softcover new book --polytex` }
|
24
|
+
chdir_to_book
|
25
|
+
end
|
26
|
+
|
27
|
+
after(:all) { remove_book }
|
28
|
+
|
29
|
+
it 'should raise SystemExit error' do
|
30
|
+
expect { silence { Softcover::Commands::EpubValidator.validate! } }.to raise_error(SystemExit)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: softcover
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Hartl
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-05-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: polytexnic
|
@@ -593,6 +593,7 @@ files:
|
|
593
593
|
- spec/commands/build_spec.rb
|
594
594
|
- spec/commands/check_spec.rb
|
595
595
|
- spec/commands/deployment_spec.rb
|
596
|
+
- spec/commands/epub_validator_spec.rb
|
596
597
|
- spec/commands/generator_spec.rb
|
597
598
|
- spec/commands/opener_spec.rb
|
598
599
|
- spec/commands/publisher_spec.rb
|
@@ -626,7 +627,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
626
627
|
- !ruby/object:Gem::Version
|
627
628
|
version: '0'
|
628
629
|
requirements: []
|
629
|
-
rubygems_version: 3.
|
630
|
+
rubygems_version: 3.0.3
|
630
631
|
signing_key:
|
631
632
|
specification_version: 4
|
632
633
|
summary: An ebook production system & sales and marketing platform for technical authors
|
@@ -645,6 +646,7 @@ test_files:
|
|
645
646
|
- spec/commands/build_spec.rb
|
646
647
|
- spec/commands/check_spec.rb
|
647
648
|
- spec/commands/deployment_spec.rb
|
649
|
+
- spec/commands/epub_validator_spec.rb
|
648
650
|
- spec/commands/generator_spec.rb
|
649
651
|
- spec/commands/opener_spec.rb
|
650
652
|
- spec/commands/publisher_spec.rb
|