persie 0.0.1.alpha.3 → 0.0.1.alpha.4

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: 729f476116ca77747076a2d077279a86973b8e0b
4
- data.tar.gz: b3b49bfb5e1a47b9929208b1e9aa8f2e8f25835a
3
+ metadata.gz: 6b437d64aaed652751c674d9532c158d314de8ab
4
+ data.tar.gz: efb6b8f9a87bfcb127bff9f84b5e1dd27825de32
5
5
  SHA512:
6
- metadata.gz: 6c5554d1d3d93269c4afdc681c5a73c3eff23c349ef2765825f87420e15dd56653faf0de3d9db4bd0fd0e7164e00487df02f9f054c26122b02c14a6c26a36d63
7
- data.tar.gz: d2d6db4b5330bf2dab43b1580aaf316e70a3fda224e1313af095416b16c81c0bf29f5268ce9759bf91757246317383bc5e59ffced04e4f6ebead1ef07cd5a9a5
6
+ metadata.gz: a79990b9eb02fe21c08505e86b9a1c18cbe3c1a82dacaf80dde2e58098ad96c7b13b297ddd24e8b412f63229beebb72b3659ea659f62ad4a20efd0f9a64c9516
7
+ data.tar.gz: ddb3d776f12396311a279b25f9260dfed03c8660f380918f300e8f67d4455970c7651840ae09b602af2e5ee83fae0e99c3af5eb60352f8008d8e086c004cbd09
@@ -0,0 +1 @@
1
+ 2.2.2
data/Gemfile CHANGED
@@ -1,3 +1,4 @@
1
1
  source 'https://rubygems.org'
2
+ ruby '2.2.2'
2
3
 
3
4
  gemspec
data/History.md CHANGED
@@ -1,3 +1,10 @@
1
+ == 0.0.1.alpha.4 / 2015-05-28
2
+
3
+ - 修正 mobi 格式中文乱码问题([#4](https://github.com/AndorChen/persie/issues/4))
4
+ - 减小 mobi 文件的大小([#7](https://github.com/AndorChen/persie/issues/7))
5
+ - 自动生成交叉引用的文本([#9](https://github.com/AndorChen/persie/issues/9))
6
+ - 升级 gem 版本
7
+
1
8
  == 0.0.1.alpha.3 / 2014-10-22
2
9
 
3
10
  - 让 iBooks 使用样式表中指定的字体([#1](https://github.com/AndorChen/persie/issues/1))
data/README.md CHANGED
@@ -7,6 +7,12 @@
7
7
 
8
8
  电子书工具链。
9
9
 
10
+ ## 安装
11
+
12
+ ```
13
+ gem 'persie', github: 'AndorChen/persie'
14
+ ```
15
+
10
16
  ## 特性
11
17
 
12
18
  ### 一出四
@@ -21,28 +27,6 @@
21
27
 
22
28
  参见[用户手册](http://andorchen.github.io/persie-manual/)。
23
29
 
24
- ## FAQ
25
-
26
- **问:为什么开发这个程序?**
27
-
28
- 答:我有生成电子书的需求,而目前市面上并没有合我心意的类似工具。我在挠自己的痒处。
29
-
30
- **问:为什么没有“那个”功能?**
31
-
32
- 答:我只知道我自己哪里痒,不知道你哪里痒。如果你也痒,请[告诉](https://github.com/AndorChen/persie/issues)我你痒在何处。我可以给你挠,但不保证能为你止痒。
33
-
34
- **问:使用中遇到问题怎么办?**
35
-
36
- 答:首先我很抱歉,因为我能力有限,无法保证不出问题。如果遇到问题,而你自己无法解决,或许你可以[告诉](https://github.com/AndorChen/persie/issues)我,咱们一起解决。
37
-
38
- **问:生成的电子书好难看,你得做点儿什么!**
39
-
40
- 答:精力有限,暂时不打算提供基础样式。如果你有迫切的需求,做好预算后随时可以[联系](mailto:andor.chen.27@gmail.com)我。
41
-
42
- **问:我很喜欢这个工具,想表示表示,该怎么做?**
43
-
44
- 答:不会吧,烂成这样的程序!好吧,如果你真想表示一下,那就买本[我翻译的书](https://selfstore.io/~andor)吧。
45
-
46
30
  ## 作者
47
31
 
48
32
  [Andor Chen](http://about.ac)
@@ -2,12 +2,15 @@ require 'asciidoctor'
2
2
  require 'rouge'
3
3
 
4
4
  require 'time'
5
+ require 'cgi/util'
5
6
 
6
7
  module Persie
7
8
  # A custom Asciidoctor backend, convert AsciiDoc to O'Reilly HTMLBook.
8
9
  class HTMLBook
9
10
  include ::Asciidoctor::Converter
10
11
 
12
+ attr_reader :captions
13
+
11
14
  register_for 'htmlbook'
12
15
 
13
16
  EPUB_FORMATS = ['epub', 'duokan']
@@ -34,6 +37,8 @@ module Persie
34
37
  # These two vars are used to auto-numbering figures, listing, etc
35
38
  @reset_num = nil
36
39
  @nums = Hash.new(0)
40
+
41
+ @captions = Hash.new
37
42
  end
38
43
 
39
44
  def convert(node, transform = nil)
@@ -47,6 +52,7 @@ module Persie
47
52
  ebook_format = node.attr('ebook-format')
48
53
 
49
54
  result = []
55
+ result << %(<?xml version="1.0" encoding="UTF-8" ?>) if EPUB_FORMATS.include? ebook_format
50
56
  result << '<!DOCTYPE html>'
51
57
  lang_attr = %(lang="#{node.attr('lang', 'en')}")
52
58
  if EPUB_FORMATS.include? ebook_format
@@ -171,9 +177,9 @@ MathJax.Hub.Config({
171
177
  sections.each do |section|
172
178
  data_type = data_type_of(section)
173
179
  data_type_attr = %( data-type="#{data_type}")
174
- section_num = (section.numbered && !section.caption && section.level <= sectnumlevels) ? %(#{section.sectnum} ) : nil
180
+ section_num = (section.numbered && !section.caption && section.level <= sectnumlevels) ? %(#{section.sectnum}) : nil
175
181
  result << %(<li#{data_type_attr}>)
176
- before_title = caption_before_title_of(section, section_num)
182
+ before_title = sectnum_of(section, section_num)
177
183
  label = if before_title.nil?
178
184
  nil
179
185
  else
@@ -218,7 +224,7 @@ MathJax.Hub.Config({
218
224
 
219
225
  result = [%(<#{wrapper_tag} data-type="#{data_type}"#{id_attr}#{class_attr}>)]
220
226
 
221
- before_title = caption_before_title_of(node, sectnum)
227
+ before_title = sectnum_of(node, sectnum)
222
228
  label = if before_title.nil?
223
229
  nil
224
230
  else
@@ -425,13 +431,14 @@ MathJax.Hub.Config({
425
431
  # You can set `linenums' block attribute to turn on line numbers for specific source block
426
432
  def listing(node)
427
433
  if node.style == 'source'
428
- language = node.attr('language') # will fall back to global language attribute
434
+ language = node.attr('language', 'plaintext')
429
435
  highlight = node.document.attr?('highlight')
430
436
  linenums = node.attr?('linenums')
431
437
 
432
438
  if highlight
433
439
  classes = "highlight language-#{language}"
434
- pre_element = rouge_highlight(node.content, language, classes, linenums)
440
+ unescaped_content = CGI::unescape_html(node.content)
441
+ pre_element = rouge_highlight(unescaped_content, language, classes, linenums)
435
442
  else
436
443
  if linenums
437
444
  pre_element = rouge_highlight(node.content, 'plaintext', '', true)
@@ -590,7 +597,7 @@ MathJax.Hub.Config({
590
597
  id_attr = node.id ? %( id="#{node.id}") : nil
591
598
  role = node.role ? %( #{node.role}) : nil
592
599
  class_attr = %( class="sidebar#{role}")
593
- title_element = node.title? ? %(<h5>#{node.title}</h5>) : nil
600
+ title_element = node.title? ? %(<h5>#{captioned_title_mod_of(node)}</h5>) : nil
594
601
  epub_type_attr = if EPUB_FORMATS.include?(ebook_format)
595
602
  ' epub:type="sidebar"'
596
603
  else
@@ -715,6 +722,10 @@ MathJax.Hub.Config({
715
722
  result * "\n"
716
723
  end
717
724
 
725
+ def pass(node)
726
+ node.content
727
+ end
728
+
718
729
  def verse(node)
719
730
  id_attr = node.id ? %( id="#{node.id}") : nil
720
731
  classes = ['verse', node.role].compact
@@ -793,11 +804,17 @@ MathJax.Hub.Config({
793
804
  case node.type
794
805
  when :xref
795
806
  refid = node.attr('refid') || target
796
- text = node.text || (node.document.references[:ids][refid] || %([#{refid}]))
807
+
808
+ real_id = refid.split('#', 2).last
809
+ caption = node.document.attr('captions').nil? ? nil : node.document.attr('captions')[real_id]
810
+
811
+ text = node.text || caption || node.document.references[:ids][refid] || %([#{refid}])
812
+
797
813
  if (ebook_format == 'pdf' || single_page_html?(node)) && !target.start_with?('#')
798
814
  parts = target.split('#', 2)
799
815
  target = "##{parts.last}"
800
816
  end
817
+
801
818
  %(<a href="#{target}">#{text}</a>)
802
819
  when :ref
803
820
  %(<a id="#{target}"></a>)
@@ -1047,7 +1064,7 @@ MathJax.Hub.Config({
1047
1064
  # Genarate auto-numbered caption to titles for chapter, appendix, part, etc.
1048
1065
  #
1049
1066
  # QUESTION: Cannot get appendix number from `sectnum'?
1050
- def caption_before_title_of(node, sectnum)
1067
+ def sectnum_of(node, sectnum)
1051
1068
  data_type = data_type_of(node)
1052
1069
 
1053
1070
  if !sectnum.nil? && data_type == 'chapter' && node.document.attr?('chapter-caption')
@@ -1060,10 +1077,26 @@ MathJax.Hub.Config({
1060
1077
  output = sectnum
1061
1078
  end
1062
1079
 
1080
+ # no traling dot for sub-sections
1081
+ output = output.chomp('.') if output.is_a?(String)
1082
+
1083
+ # Collect caption, but only on first run
1084
+ if node.document.attr('captions').nil?
1085
+ @captions[node.id] = if output.nil?
1086
+ nil
1087
+ else
1088
+ if output.split('.').size > 1 # if this is sub-section
1089
+ node.document.attr('section-caption').sub('%NUM%', output)
1090
+ else
1091
+ output
1092
+ end
1093
+ end
1094
+ end
1095
+
1063
1096
  output
1064
1097
  end
1065
1098
 
1066
- # Cause we would call `caption_before_title_of' many times,
1099
+ # Cause we would call `sectnum_of' many times,
1067
1100
  # so we should reset the numbers after one call.
1068
1101
  def reset_numbers_of_chapter_appendix_part_for(node)
1069
1102
  attrs = node.document.attributes
@@ -1082,12 +1115,11 @@ MathJax.Hub.Config({
1082
1115
  ctx = node.context
1083
1116
  # FIXME maybe node.parent is not correct
1084
1117
  level_1_num = node.parent.sectnum.split('.', 2).first
1085
- @reset_num ||= level_1_num
1086
1118
 
1087
1119
  if @reset_num != level_1_num
1088
1120
  @nums.each_key { |k| @nums[k] = 0 }
1089
1121
  @nums["#{ctx}"] += 1
1090
- @reset_num = nil
1122
+ @reset_num = level_1_num
1091
1123
  else
1092
1124
  @nums["#{ctx}"] += 1
1093
1125
  end
@@ -1100,13 +1132,14 @@ MathJax.Hub.Config({
1100
1132
  nil
1101
1133
  end
1102
1134
 
1103
- space = if node.document.attr? 'caption-append-space'
1104
- ' '
1105
- else
1106
- nil
1135
+ # Collect caption, but only on first run
1136
+ if node.document.attr('captions').nil?
1137
+ @captions[node.id] = caption_replaced
1107
1138
  end
1108
1139
 
1109
- %(#{label}#{space}#{node.title})
1140
+ traling = node.document.attr('caption-trailing', ' ')
1141
+
1142
+ %(#{label}#{traling}#{node.title})
1110
1143
  end
1111
1144
 
1112
1145
  # Use rouge to highlight source code
@@ -1,6 +1,7 @@
1
1
  require 'asciidoctor'
2
2
 
3
3
  require 'fileutils'
4
+ require 'yaml'
4
5
 
5
6
  require_relative 'ui'
6
7
  require_relative 'asciidoctor_ext/htmlbook'
@@ -19,6 +20,7 @@ module Persie
19
20
  def initialize(book, options = {})
20
21
  @book = book
21
22
  @options = options
23
+ @captions_file = File.join(@book.tmp_dir, 'captions.yml')
22
24
  @document = ::Asciidoctor.load_file(@book.master_file, adoc_options)
23
25
  @book.slug = @document.attr('slug', File.basename(@book.base_dir))
24
26
  end
@@ -50,6 +52,23 @@ module Persie
50
52
  end
51
53
  end
52
54
 
55
+ def generate_captions
56
+ # DO NOT re-generate captions on second run
57
+ return if File.exist? @captions_file
58
+
59
+ @document.convert
60
+ File.write(@captions_file, @document.converter.captions.to_yaml)
61
+
62
+ # Reload, since we need load captions on second run
63
+ @document = ::Asciidoctor.load_file(@book.master_file, adoc_options)
64
+ end
65
+
66
+ def delete_captions
67
+ return unless File.exist? @captions_file
68
+
69
+ File.unlink @captions_file
70
+ end
71
+
53
72
  private
54
73
 
55
74
  # Generates sample or not.
@@ -58,6 +77,11 @@ module Persie
58
77
  false
59
78
  end
60
79
 
80
+ def load_captions
81
+ return nil unless File.exist? @captions_file
82
+ YAML.load_file @captions_file
83
+ end
84
+
61
85
  # Filts contents, only keep samples if in sample mode.
62
86
  def register_spine_item_processor
63
87
  require_relative 'asciidoctor_ext/spine_item_processor'
@@ -90,7 +114,8 @@ module Persie
90
114
  'persie-version' => VERSION,
91
115
  'builds-dir' => @book.builds_dir,
92
116
  'themes-dir' => @book.themes_dir,
93
- 'imagesdir' => @book.images_dir
117
+ 'imagesdir' => @book.images_dir,
118
+ 'captions' => load_captions
94
119
  }
95
120
 
96
121
  attrs['is-sample'] = true if sample?
@@ -24,12 +24,14 @@ module Persie
24
24
  info '=== Build ePub ' << '=' * 57
25
25
 
26
26
  self.before_build
27
+ self.generate_captions
27
28
  self.check_sample
28
29
  self.convert_to_single_html
29
30
  self.generate_spine_items
30
31
  self.chunk
31
32
  self.generate_epub
32
33
  self.validate
34
+ self.delete_captions
33
35
  self.after_build
34
36
 
35
37
  info END_LINE
@@ -144,7 +146,11 @@ module Persie
144
146
  # Gets ePub file path.
145
147
  def epub_path(relative = false)
146
148
  name = sample? ? "#{@book.slug}-sample" : @book.slug
147
- path = File.join('builds', 'epub', "#{name}.epub")
149
+
150
+ rev = @document.attr?('revnumber') ? "-#{@document.attr('revnumber')}" : nil
151
+ rev = nil if sample?
152
+
153
+ path = File.join('builds', 'epub', "#{name}#{rev}.epub")
148
154
  return path if relative
149
155
 
150
156
  File.join(@book.base_dir, path)
@@ -12,10 +12,12 @@ module Persie
12
12
  info '=== Build mobi ' << '=' * 57
13
13
 
14
14
  self.before_build
15
+ self.generate_captions
15
16
  self.check_dependency
16
17
  check_sample
17
18
  self.check_epub
18
19
  self.generate_mobi
20
+ self.delete_captions
19
21
  self.after_build
20
22
 
21
23
  info END_LINE
@@ -44,7 +46,7 @@ module Persie
44
46
  FileUtils.chdir File.dirname(self.epub_path) do
45
47
  info 'Converting to mobi...'
46
48
 
47
- system "kindlegen -c2 #{self.epub_path(true)}"
49
+ system "kindlegen -c2 -dont_append_source #{self.epub_path(true)}"
48
50
 
49
51
  mobi_file = File.basename(self.mobi_path)
50
52
  if File.exist? mobi_file
@@ -64,15 +66,23 @@ module Persie
64
66
  # Gets ePub file path.
65
67
  def epub_path(relative=false)
66
68
  name = sample? ? "#{@book.slug}-sample" : @book.slug
67
- return "#{name}.epub" if relative
68
69
 
69
- File.join(@book.builds_dir, 'epub', "#{name}.epub")
70
+ rev = @document.attr?('revnumber') ? "-#{@document.attr('revnumber')}" : nil
71
+ rev = nil if sample?
72
+
73
+ return "#{name}#{rev}.epub" if relative
74
+
75
+ File.join(@book.builds_dir, 'epub', "#{name}#{rev}.epub")
70
76
  end
71
77
 
72
78
  # Gets mobi file path.
73
79
  def mobi_path(relative = false)
74
80
  name = sample? ? "#{@book.slug}-sample" : @book.slug
75
- path = File.join('builds', 'mobi', "#{name}.mobi")
81
+
82
+ rev = @document.attr?('revnumber') ? "-#{@document.attr('revnumber')}" : nil
83
+ rev = nil if sample?
84
+
85
+ path = File.join('builds', 'mobi', "#{name}#{rev}.mobi")
76
86
  return path if relative
77
87
 
78
88
  File.join(@book.base_dir, path)
@@ -19,11 +19,13 @@ module Persie
19
19
  info '=== Build Mutiple HTML ' << '=' * 49
20
20
 
21
21
  self.before_build
22
+ self.generate_captions
22
23
  self.check_sample
23
24
  self.convert_to_single_html
24
25
  self.generate_spine_items
25
26
  self.chunk
26
27
  self.copy_images
28
+ self.delete_captions
27
29
  self.after_build
28
30
 
29
31
  info 'Location: builds/html/multiple/'
@@ -39,7 +41,7 @@ module Persie
39
41
  # QUSTION: is this necessary?
40
42
  FileUtils.rm_r(images_dir) if File.directory?(images_dir)
41
43
 
42
- info 'Copy images...'
44
+ info 'Copying images...'
43
45
  FileUtils.cp_r "#{@book.images_dir}/.", images_dir
44
46
  confirm ' Done'
45
47
  end
@@ -14,11 +14,13 @@ module Persie
14
14
  info '=== Build PDF ' << '=' * 58
15
15
 
16
16
  self.before_build
17
+ self.generate_captions
17
18
  self.check_dependency
18
19
  self.check_sample
19
20
  self.convert_to_html
20
21
  self.restart_page_number
21
22
  self.convert_to_pdf
23
+ self.delete_captions
22
24
  self.after_build
23
25
 
24
26
  info END_LINE
@@ -47,7 +49,11 @@ module Persie
47
49
  # Gets PDF file path.
48
50
  def pdf_path(relative = false)
49
51
  name = sample? ? "#{@book.slug}-sample" : @book.slug
50
- path = File.join('builds', 'pdf', "#{name}.pdf")
52
+
53
+ rev = @document.attr?('revnumber') ? "-#{@document.attr('revnumber')}" : nil
54
+ rev = nil if sample?
55
+
56
+ path = File.join('builds', 'pdf', "#{name}#{rev}.pdf")
51
57
  return path if relative
52
58
 
53
59
  File.join(@book.base_dir, path)
@@ -59,7 +65,7 @@ module Persie
59
65
  html = @document.convert
60
66
  prepare_directory(self.html_path)
61
67
  File.write(self.html_path, html)
62
- confirm ' HTMl file created'
68
+ confirm ' HTML file created'
63
69
  info " Location: #{self.html_path(true)}"
64
70
  info '' # new line
65
71
  end
@@ -14,8 +14,10 @@ module Persie
14
14
  info '=== Build Single HTML ' << '=' * 50
15
15
 
16
16
  self.before_build
17
+ self.generate_captions
17
18
  self.check_sample
18
19
  self.generate_html
20
+ self.delete_captions
19
21
  self.after_build
20
22
 
21
23
  info END_LINE
@@ -57,13 +57,14 @@ module Persie
57
57
  top_level_sections = resolve_top_level_sections(root)
58
58
 
59
59
  # stupid check, incase of something went wrong
60
+ if @options.debug?
61
+ info 'sections count: ' << top_level_sections.count.inspect
62
+ info 'spine_items: ' << self.spine_items.inspect
63
+ end
64
+
60
65
  unless top_level_sections.count == self.spine_items.count
61
66
  error ' Count of sections DO NOT equal to spine items count.'
62
67
  error ' Terminated!'
63
- if @options.debug?
64
- info 'sections count: ' + top_level_sections.count
65
- info 'spine_items: ' + self.spine_items.inspect
66
- end
67
68
  info '=' * 72
68
69
  exit 31
69
70
  end
@@ -245,7 +246,7 @@ module Persie
245
246
  def replace_footnote_with_sup(footnotes)
246
247
  footnotes.each_with_index do |fn, i|
247
248
  index = i + 1
248
- fn.replace(%(<sup><a id="fn-ref-#{index}" href="#fn-#{index}">#{index}</a></sup>))
249
+ fn.replace(%(<sup>[<a id="fn-ref-#{index}" href="#fn-#{index}">#{index}</a>]</sup>))
249
250
  end
250
251
 
251
252
  nil
@@ -1,3 +1,3 @@
1
1
  module Persie
2
- VERSION = '0.0.1.alpha.3'
2
+ VERSION = '0.0.1.alpha.4'
3
3
  end
@@ -30,13 +30,13 @@ Gem::Specification.new do |s|
30
30
 
31
31
  s.add_runtime_dependency('thor', '0.19.1')
32
32
  s.add_runtime_dependency('uuid', '2.3.7')
33
- s.add_runtime_dependency('rouge', '1.7.2')
33
+ s.add_runtime_dependency('rouge', '1.9.0')
34
34
  s.add_runtime_dependency('gepub', '0.6.9.2')
35
- s.add_runtime_dependency('liquid', '2.6.1')
36
- s.add_runtime_dependency('colorize', '0.7.3')
37
- s.add_runtime_dependency('nokogiri', '1.6.3.1')
38
- s.add_runtime_dependency('thread_safe', '0.3.4')
39
- s.add_runtime_dependency('asciidoctor', '1.5.1')
35
+ s.add_runtime_dependency('liquid', '3.0.2')
36
+ s.add_runtime_dependency('colorize', '0.7.7')
37
+ s.add_runtime_dependency('nokogiri', '1.6.6.2')
38
+ s.add_runtime_dependency('thread_safe', '0.3.5')
39
+ s.add_runtime_dependency('asciidoctor', '1.5.2')
40
40
 
41
41
  s.add_development_dependency('rake', '~> 10.3.2')
42
42
  s.add_development_dependency('rspec', '~> 3.1.0')
@@ -5,7 +5,7 @@ describe 'Cli#build(epub)' do
5
5
  it 'generates a epub file' do
6
6
  FileUtils.cd(A_BOOK_PATH) do
7
7
  persie_command 'build epub'
8
- path = 'builds/epub/a-book.epub'
8
+ path = 'builds/epub/a-book-0.0.1.epub'
9
9
 
10
10
  expect(path).to be_exists
11
11
 
@@ -5,7 +5,7 @@ describe 'Cli#build(pdf)' do
5
5
  it 'generates a pdf file' do
6
6
  FileUtils.cd(A_BOOK_PATH) do
7
7
  persie_command 'build pdf'
8
- path = 'builds/pdf/a-book.pdf'
8
+ path = 'builds/pdf/a-book-0.0.1.pdf'
9
9
 
10
10
  expect(path).to be_exists
11
11
 
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: persie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.alpha.3
4
+ version: 0.0.1.alpha.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andor Chen
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 1.7.2
47
+ version: 1.9.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 1.7.2
54
+ version: 1.9.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: gepub
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -72,99 +72,99 @@ dependencies:
72
72
  requirements:
73
73
  - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 2.6.1
75
+ version: 3.0.2
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - '='
81
81
  - !ruby/object:Gem::Version
82
- version: 2.6.1
82
+ version: 3.0.2
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: colorize
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: 0.7.3
89
+ version: 0.7.7
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - '='
95
95
  - !ruby/object:Gem::Version
96
- version: 0.7.3
96
+ version: 0.7.7
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: nokogiri
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - '='
102
102
  - !ruby/object:Gem::Version
103
- version: 1.6.3.1
103
+ version: 1.6.6.2
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - '='
109
109
  - !ruby/object:Gem::Version
110
- version: 1.6.3.1
110
+ version: 1.6.6.2
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: thread_safe
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: 0.3.4
117
+ version: 0.3.5
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - '='
123
123
  - !ruby/object:Gem::Version
124
- version: 0.3.4
124
+ version: 0.3.5
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: asciidoctor
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - '='
130
130
  - !ruby/object:Gem::Version
131
- version: 1.5.1
131
+ version: 1.5.2
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - '='
137
137
  - !ruby/object:Gem::Version
138
- version: 1.5.1
138
+ version: 1.5.2
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rake
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ~>
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
145
  version: 10.3.2
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ~>
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
152
  version: 10.3.2
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: rspec
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ~>
157
+ - - "~>"
158
158
  - !ruby/object:Gem::Version
159
159
  version: 3.1.0
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ~>
164
+ - - "~>"
165
165
  - !ruby/object:Gem::Version
166
166
  version: 3.1.0
167
- description: 使用 AsciiDoc 编写书籍内容,通过 persie 将其转换成 PDF,ePub 和 Mobi 格式电子书。
167
+ description: "使用 AsciiDoc 编写书籍内容,通过 persie 将其转换成 PDF,ePub 和 Mobi 格式电子书。"
168
168
  email: andor.chen.27@gmail.com
169
169
  executables:
170
170
  - persie
@@ -173,8 +173,9 @@ extra_rdoc_files:
173
173
  - README.md
174
174
  - LICENSE
175
175
  files:
176
- - .gitignore
177
- - .rspec
176
+ - ".gitignore"
177
+ - ".rspec"
178
+ - ".ruby-version"
178
179
  - Gemfile
179
180
  - History.md
180
181
  - LICENSE
@@ -241,25 +242,25 @@ licenses:
241
242
  metadata: {}
242
243
  post_install_message:
243
244
  rdoc_options:
244
- - --charset=UTF-8
245
+ - "--charset=UTF-8"
245
246
  require_paths:
246
247
  - lib
247
248
  required_ruby_version: !ruby/object:Gem::Requirement
248
249
  requirements:
249
- - - '>='
250
+ - - ">="
250
251
  - !ruby/object:Gem::Version
251
252
  version: 1.9.3
252
253
  required_rubygems_version: !ruby/object:Gem::Requirement
253
254
  requirements:
254
- - - '>'
255
+ - - ">"
255
256
  - !ruby/object:Gem::Version
256
257
  version: 1.3.1
257
258
  requirements: []
258
259
  rubyforge_project:
259
- rubygems_version: 2.0.3
260
+ rubygems_version: 2.4.5
260
261
  signing_key:
261
262
  specification_version: 2
262
- summary: 电子书制作工具
263
+ summary: "电子书制作工具"
263
264
  test_files:
264
265
  - spec/build_epub_cmd_spec.rb
265
266
  - spec/build_pdf_cmd_spec.rb