persie 0.0.1.alpha1 → 0.0.1.alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ /* Write stylesheets here. */
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.alpha1
4
+ version: 0.0.1.alpha.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andor Chen
@@ -188,16 +188,20 @@ files:
188
188
  - lib/persie/builder.rb
189
189
  - lib/persie/builders/epub.rb
190
190
  - lib/persie/builders/mobi.rb
191
+ - lib/persie/builders/multiple_htmls.rb
191
192
  - lib/persie/builders/pdf.rb
192
- - lib/persie/builders/site.rb
193
+ - lib/persie/builders/single_html.rb
194
+ - lib/persie/chunkable.rb
193
195
  - lib/persie/cli.rb
194
196
  - lib/persie/dependency.rb
195
197
  - lib/persie/generator.rb
198
+ - lib/persie/gepub_ext.rb
196
199
  - lib/persie/server.rb
197
200
  - lib/persie/ui.rb
198
201
  - lib/persie/version.rb
199
202
  - persie.gemspec
200
- - spec/build_pdf_command_spec.rb
203
+ - spec/build_epub_cmd_spec.rb
204
+ - spec/build_pdf_cmd_spec.rb
201
205
  - spec/fixtures/a-book-with-parts/.gitignore
202
206
  - spec/fixtures/a-book-with-parts/Gemfile
203
207
  - spec/fixtures/a-book-with-parts/book.adoc
@@ -216,19 +220,18 @@ files:
216
220
  - spec/fixtures/a-book/manuscript/preface.adoc
217
221
  - spec/fixtures/a-book/themes/pdf/pdf.css
218
222
  - spec/htmlbook_spec.rb
219
- - spec/new_command_spec.rb
220
- - spec/pdf_builder_spec.rb
223
+ - spec/new_cmd_spec.rb
221
224
  - spec/spec_helper.rb
222
- - spec/version_command_spec.rb
223
- - templates/Gemfile.txt
225
+ - spec/version_cmd_spec.rb
226
+ - templates/Gemfile.erb
224
227
  - templates/book.adoc.erb
225
228
  - templates/chapter1.adoc
226
229
  - templates/chapter2.adoc
227
230
  - templates/gitignore.txt
228
231
  - templates/preface.adoc
229
232
  - templates/stylesheets/epub.css
233
+ - templates/stylesheets/html.css
230
234
  - templates/stylesheets/pdf.css
231
- - templates/stylesheets/site.css
232
235
  - workflow.png
233
236
  homepage: https://github.com/AndorChen/persie
234
237
  licenses:
@@ -256,7 +259,8 @@ signing_key:
256
259
  specification_version: 2
257
260
  summary: 电子书制作工具
258
261
  test_files:
259
- - spec/build_pdf_command_spec.rb
262
+ - spec/build_epub_cmd_spec.rb
263
+ - spec/build_pdf_cmd_spec.rb
260
264
  - spec/fixtures/a-book-with-parts/.gitignore
261
265
  - spec/fixtures/a-book-with-parts/Gemfile
262
266
  - spec/fixtures/a-book-with-parts/book.adoc
@@ -275,7 +279,6 @@ test_files:
275
279
  - spec/fixtures/a-book/manuscript/preface.adoc
276
280
  - spec/fixtures/a-book/themes/pdf/pdf.css
277
281
  - spec/htmlbook_spec.rb
278
- - spec/new_command_spec.rb
279
- - spec/pdf_builder_spec.rb
282
+ - spec/new_cmd_spec.rb
280
283
  - spec/spec_helper.rb
281
- - spec/version_command_spec.rb
284
+ - spec/version_cmd_spec.rb
@@ -1,57 +0,0 @@
1
- require_relative 'spec_helper'
2
-
3
- describe 'Cli#new' do
4
-
5
- before(:all) do
6
- book_slug = 'sample-book'
7
- tmp_dir = File.join(::Persie::GEM_ROOT, 'tmp')
8
- book_dir = File.join(tmp_dir, book_slug)
9
-
10
- FileUtils.mkdir_p(tmp_dir) unless Dir.exist? tmp_dir
11
- FileUtils.remove_dir(book_dir) if Dir.exist? book_dir
12
-
13
- FileUtils.cd(tmp_dir) do
14
- persie_command "new #{book_slug}"
15
- end
16
-
17
- FileUtils.cd book_dir
18
- end
19
-
20
- it 'generates a master file' do
21
- expect(File.exist?('book.adoc')).to be true
22
- end
23
-
24
- it 'generates a .gitignore' do
25
- expect(File.exist?('.gitignore')).to be true
26
- end
27
-
28
- it 'generates a Gemfile' do
29
- expect(File.exist?('Gemfile')).to be true
30
- end
31
-
32
- it 'puts correct persie version in Gemfile' do
33
- content = File.read('Gemfile')
34
- expect(content).to match(/gem 'persie', '(\d+\.\d+\.\d+\.?\w*)'/m)
35
- end
36
-
37
- it 'generates a themes directory' do
38
- expect(Dir.exist?('themes')).to be true
39
- end
40
-
41
- it 'generates a builds directory' do
42
- expect(Dir.exist?('builds')).to be true
43
- end
44
-
45
- it 'generates a images directory' do
46
- expect(Dir.exist?('images')).to be true
47
- end
48
-
49
- it 'generates a plugins directory' do
50
- expect(Dir.exist?('plugins')).to be true
51
- end
52
-
53
- it 'generates a tmp directory' do
54
- expect(Dir.exist?('tmp')).to be true
55
- end
56
-
57
- end
@@ -1,39 +0,0 @@
1
- require_relative 'spec_helper'
2
-
3
- describe 'PDF Builder' do
4
-
5
- before(:all) do
6
- @book = ::Persie::Book.new(A_BOOK_PATH)
7
- @builder = ::Persie::PDF.new(@book, test: true)
8
- end
9
-
10
- it 'responds to #build' do
11
- expect(@builder.respond_to?(:build)).to be true
12
- end
13
-
14
- describe '#convert_to_html' do
15
- it 'generates a html file' do
16
- @builder.convert_to_html
17
-
18
- path = File.join(A_BOOK_PATH, 'tmp', 'pdf', 'a-book.html')
19
- expect(File.exist? path).to be true
20
-
21
- FileUtils.remove_dir File.join(A_BOOK_PATH, 'tmp', 'pdf')
22
- end
23
- end
24
-
25
- describe '#convert_to_pdf' do
26
- it 'generates a pdf file' do
27
- @builder.convert_to_html
28
- @builder.restart_page_number
29
- @builder.convert_to_pdf
30
-
31
- path = File.join(A_BOOK_PATH, 'builds', 'pdf', 'a-book.pdf')
32
- expect(File.exist? path).to be true
33
-
34
- FileUtils.remove_dir File.join(A_BOOK_PATH, 'tmp', 'pdf')
35
- FileUtils.remove_dir File.join(A_BOOK_PATH, 'builds', 'pdf')
36
- end
37
- end
38
-
39
- end
@@ -1 +0,0 @@
1
- /* Write Site stylesheets here. */