kitabu 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/kitabu/exporter/html.rb +1 -1
- data/lib/kitabu/toc/html.rb +1 -1
- data/lib/kitabu/version.rb +1 -1
- data/spec/kitabu/exporter/html_spec.rb +10 -0
- data/spec/spec_helper.rb +7 -1
- data/vendor/bin/tidy5_linux +0 -0
- data/vendor/bin/tidy5_osx +0 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33489fae9e11817c4a99bc9dcb32469ff57f868a
|
4
|
+
data.tar.gz: 9e9b280254e2972ca50826fdf6a72b79186a3d9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 887d78ad996b9be7a08ce2db1a70a5282ecbd2f8d7fdf8c075b8000ecebaa30b91cacc074566d97cb4e3fa64d9f5fb33c220ebbd9f35b6eaf7c23315d99df199
|
7
|
+
data.tar.gz: 560aa156264bcdc29986d6423b33196e52d12c38233fdd5743d3e84e322eba9accc401cfe46b3973497fedd3d538296ddd62f7ee300ddb8a3ba06409500ed998
|
data/Gemfile.lock
CHANGED
data/lib/kitabu/exporter/html.rb
CHANGED
@@ -64,7 +64,7 @@ module Kitabu
|
|
64
64
|
#
|
65
65
|
def parse_layout(html)
|
66
66
|
toc = TOC::HTML.generate(html)
|
67
|
-
content = Footnotes::HTML.process(toc.content).html.css('
|
67
|
+
content = Footnotes::HTML.process(toc.content).html.css('body').first.inner_html
|
68
68
|
|
69
69
|
locals = config.merge({
|
70
70
|
content: content,
|
data/lib/kitabu/toc/html.rb
CHANGED
data/lib/kitabu/version.rb
CHANGED
@@ -9,6 +9,16 @@ describe Kitabu::Exporter::HTML do
|
|
9
9
|
let(:html) { File.read(file) }
|
10
10
|
before { format.export }
|
11
11
|
|
12
|
+
it "generates valid markup", osx: RUBY_PLATFORM.include?('darwin') do
|
13
|
+
`./vendor/bin/tidy5_osx '#{file}' 2>&1 > /dev/null`
|
14
|
+
expect($?.exitstatus).to eq(0)
|
15
|
+
end
|
16
|
+
|
17
|
+
it "generates valid markup", linux: RUBY_PLATFORM.include?('linux') do
|
18
|
+
`./vendor/bin/tidy5_linux '#{file}' 2>&1 > /dev/null`
|
19
|
+
expect($?.exitstatus).to eq(0)
|
20
|
+
end
|
21
|
+
|
12
22
|
it "keeps html file around" do
|
13
23
|
expect(file).to be_file
|
14
24
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -22,7 +22,13 @@ RSpec.configure do |config|
|
|
22
22
|
config.include(SpecHelper)
|
23
23
|
config.include(Matchers)
|
24
24
|
|
25
|
-
config.filter_run_excluding
|
25
|
+
config.filter_run_excluding(
|
26
|
+
html2text: false,
|
27
|
+
kindlegen: false,
|
28
|
+
prince: false,
|
29
|
+
osx: false,
|
30
|
+
linux: false
|
31
|
+
)
|
26
32
|
|
27
33
|
cleaner = proc do
|
28
34
|
[TMPDIR].each do |i|
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitabu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nando Vieira
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -361,6 +361,8 @@ files:
|
|
361
361
|
- templates/text/03_Syntax_Highlighting.erb
|
362
362
|
- templates/text/04_Dynamic_Content.erb
|
363
363
|
- templates/text/05_Exporting_Files.md
|
364
|
+
- vendor/bin/tidy5_linux
|
365
|
+
- vendor/bin/tidy5_osx
|
364
366
|
homepage: http://rubygems.org/gems/kitabu
|
365
367
|
licenses:
|
366
368
|
- MIT
|