my_ebook_pub 0.2.1 → 0.3.0
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.
- checksums.yaml +4 -4
- data/bin/assets/template.erb +3 -0
- data/bin/pub +2 -2
- data/lib/my_ebook_pub.rb +5 -1
- data/lib/my_ebook_pub/version.rb +1 -1
- data/my_ebook_pub.gemspec +0 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ac2253b998ce3f1dd5027af84a44a4df94fc28c
|
4
|
+
data.tar.gz: 60505b771b02f4cf4aad80c53904001a77456386
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 516abea23d2533dabbe5251df47c5d3e61a168123a6890662c55838fe9bb50c0ad371eaf89006eac87a608476859b09eb86af85938464c1b4246eddedf6e7161
|
7
|
+
data.tar.gz: ecfa6af2181ecff73b043405618303c85153540db57ab47c3af06f648dcfab2559ea8b4f8a8a7b938a70f6af6148934458a24a0bf61625837d583b9017c5d359
|
data/bin/assets/template.erb
CHANGED
data/bin/pub
CHANGED
@@ -25,10 +25,10 @@ when 'new'
|
|
25
25
|
STDOUT.puts Dir.glob('**/*')
|
26
26
|
STDOUT.puts 'Your project is ready for content!'
|
27
27
|
when 'generate', 'gen'
|
28
|
-
STDOUT.puts 'Generating
|
28
|
+
STDOUT.puts 'Generating your draft to the output directory...'
|
29
29
|
require 'my_ebook_pub'
|
30
30
|
MyEbookPub.generate parse_options
|
31
|
-
STDOUT.puts "Your file is ready. See ./output/
|
31
|
+
STDOUT.puts "Your file is ready. See ./output/draft.#{parse_options}"
|
32
32
|
else
|
33
33
|
STDOUT.puts <<-EOF
|
34
34
|
Usage:
|
data/lib/my_ebook_pub.rb
CHANGED
@@ -108,9 +108,13 @@ HERE
|
|
108
108
|
@location = 'content'
|
109
109
|
@content = cover + preface + toc + content
|
110
110
|
html = ERB.new(@template).result(binding)
|
111
|
-
product_name = '
|
111
|
+
product_name = 'draft'
|
112
112
|
|
113
113
|
case file_type
|
114
|
+
when 'html'
|
115
|
+
File.open("output/#{product_name}.html", 'w+') do |file|
|
116
|
+
file.write(html)
|
117
|
+
end
|
114
118
|
when 'pdf'
|
115
119
|
File.open("output/#{product_name}.pdf", 'w+') do |file|
|
116
120
|
file.write(Docverter::Conversion.run do |c|
|
data/lib/my_ebook_pub/version.rb
CHANGED
data/my_ebook_pub.gemspec
CHANGED
@@ -14,7 +14,6 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
17
|
-
#spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
17
|
spec.executables = ["pub"]
|
19
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
19
|
spec.require_paths = ["lib"]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: my_ebook_pub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Haeffner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|