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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d45878d866d4e40b65f8e1003006551bfa627c59864133b5d9fdc6c32c608cb
4
- data.tar.gz: 01dd62e47a1f55b4a4b70f8ce5969491718cfe6927b6a76e7006d5b885ee1b1b
3
+ metadata.gz: d11057ebeea09cb563797b0bd041806d981e9731a35d25f3b2c4a8197982f4e2
4
+ data.tar.gz: af6811fa06aff4fc4e2502aaf6410540d754dd61c335072134fca94f7fa40a19
5
5
  SHA512:
6
- metadata.gz: aa6fb51a924efde86189f94e24b03a8aad5b37e651f27319e4a2fff3f60946d27a410e2069e22e5bdc3ae9287be2c649a6b69b53510af729f14c6e014a085633
7
- data.tar.gz: e535781e8ecd46316ab045abebc55b637b1365792f73ed3be867155a4bddcac48e83f7878a0fe8f4f111e86644fcba6ad6a52c777cb006bf9fbe3ccaeb940bf1
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.0.2/epubcheck-4.0.2.zip && unzip epubcheck-4.0.2.zip -d ~
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- softcover (1.6.2)
4
+ softcover (1.6.3)
5
5
  activesupport (~> 4.2.3)
6
6
  async_sinatra (~> 1.1.0)
7
7
  coffee-script (>= 2.2.0)
@@ -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="#{uuid}"/>
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/IDPF/epubcheck/releases/download/v4.0.2/epubcheck-4.0.2.zip'
85
- message = "EpubCheck 4.0.2 (#{url})\n"
86
- message += " ∟ Unzip and place epubcheck-4.0.2/ in a directory on your path"
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"
@@ -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.0.2/epubcheck.jar')
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'
@@ -1,3 +1,3 @@
1
1
  module Softcover
2
- VERSION = "1.6.2"
2
+ VERSION = "1.6.3"
3
3
  end
@@ -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.2
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-04-16 00:00:00.000000000 Z
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.1.2
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