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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 99b16e5ab09105d5dbb28f37ce455d787a62fdee
4
- data.tar.gz: dd1b28e6cd2a2d910073d82464d9b1ac235c0660
3
+ metadata.gz: 33489fae9e11817c4a99bc9dcb32469ff57f868a
4
+ data.tar.gz: 9e9b280254e2972ca50826fdf6a72b79186a3d9d
5
5
  SHA512:
6
- metadata.gz: c06222c9fd8e790581de00cbc1020a1bb9db90df276a59936cbba614cc0eb6f54c289114eff26289aa9dce89d695861de2abab4e265fdef12f22fc49de14e1f2
7
- data.tar.gz: d6e3629e8c61d471788a95455af7f54e92e231e29b74087fa63a4498a1c6846a85371e0471452f713700cf1ad261652ac8d7ab356688c0e8eda928f2f875f1d5
6
+ metadata.gz: 887d78ad996b9be7a08ce2db1a70a5282ecbd2f8d7fdf8c075b8000ecebaa30b91cacc074566d97cb4e3fa64d9f5fb33c220ebbd9f35b6eaf7c23315d99df199
7
+ data.tar.gz: 560aa156264bcdc29986d6423b33196e52d12c38233fdd5743d3e84e322eba9accc401cfe46b3973497fedd3d538296ddd62f7ee300ddb8a3ba06409500ed998
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kitabu (2.0.1)
4
+ kitabu (2.0.2)
5
5
  activesupport
6
6
  eeepub-with-cover-support
7
7
  i18n
@@ -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('html').first.inner_html
67
+ content = Footnotes::HTML.process(toc.content).html.css('body').first.inner_html
68
68
 
69
69
  locals = config.merge({
70
70
  content: content,
@@ -28,7 +28,7 @@ module Kitabu
28
28
  tag.set_attribute("id", permalink)
29
29
  end
30
30
 
31
- html.css("body").to_xhtml.gsub(/<body>(.*?)<\/body>/m, "\\1")
31
+ html.css("body").first.inner_html
32
32
  end
33
33
 
34
34
  # Traverse every title normalizing its content as a permalink.
@@ -2,7 +2,7 @@ module Kitabu
2
2
  module Version
3
3
  MAJOR = 2
4
4
  MINOR = 0
5
- PATCH = 1
5
+ PATCH = 2
6
6
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
7
7
  end
8
8
  end
@@ -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
@@ -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 html2text: false, kindlegen: false, prince: false
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.1
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-15 00:00:00.000000000 Z
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