softcover 1.7.1 → 1.7.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.
- checksums.yaml +4 -4
- data/Gemfile.lock +33 -33
- data/lib/softcover/article_template/html/stylesheets/softcover.css +6 -0
- data/lib/softcover/book_template/html/stylesheets/softcover.css +6 -0
- data/lib/softcover/cli.rb +1 -1
- data/lib/softcover/commands/check.rb +3 -3
- data/lib/softcover/utils.rb +3 -6
- data/lib/softcover/version.rb +1 -1
- data/softcover.gemspec +3 -3
- data/spec/builders/pdf_spec.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz: '
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '03961f991d4553331d9dad48a1f3cda5754cd493e12c6161ba9157955831cbe7'
|
|
4
|
+
data.tar.gz: c9780421d820bb9e9068daebff29a2aff74ee4f958cae2292ee5f6bb79739e65
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c5a786aa431d8b3fb533275a3951750846b7555fb7513346d91205caa81a30767303fe3854d44d0c6cb97323986ba11d0c1a0ab6b0c8c0147fc379e2f56ec2dc
|
|
7
|
+
data.tar.gz: 4a673b41f0e6105f973a7066ef66ba42c0fde254b8d1d2ba9541e3a2a100d68069d54a96fda7931bdd7707e96c90cc4dd67d7e59e2e91a4755a50376b5a8d4b8
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
softcover (1.7.
|
|
4
|
+
softcover (1.7.2)
|
|
5
5
|
activesupport (~> 4.2.3)
|
|
6
6
|
async_sinatra (~> 1.1.0)
|
|
7
7
|
coffee-script (>= 2.2.0)
|
|
@@ -12,8 +12,8 @@ PATH
|
|
|
12
12
|
maruku (~> 0.7.1)
|
|
13
13
|
msgpack (~> 1.2.0)
|
|
14
14
|
nokogiri (>= 1.6.0, < 2.0)
|
|
15
|
-
polytexnic (~> 1.6
|
|
16
|
-
pygments.rb (~>
|
|
15
|
+
polytexnic (~> 1.6)
|
|
16
|
+
pygments.rb (~> 2.1)
|
|
17
17
|
rest-client (>= 1.8.0)
|
|
18
18
|
ruby-progressbar (~> 1.10)
|
|
19
19
|
sanitize (>= 4.6.3, < 5.3.0)
|
|
@@ -40,32 +40,32 @@ GEM
|
|
|
40
40
|
coffee-script-source
|
|
41
41
|
execjs
|
|
42
42
|
coffee-script-source (1.12.2)
|
|
43
|
-
concurrent-ruby (1.1.
|
|
43
|
+
concurrent-ruby (1.1.8)
|
|
44
44
|
coveralls (0.8.23)
|
|
45
45
|
json (>= 1.8, < 3)
|
|
46
46
|
simplecov (~> 0.16.1)
|
|
47
47
|
term-ansicolor (~> 1.3)
|
|
48
48
|
thor (>= 0.19.4, < 2.0)
|
|
49
49
|
tins (~> 1.6)
|
|
50
|
-
crack (0.4.
|
|
51
|
-
|
|
50
|
+
crack (0.4.5)
|
|
51
|
+
rexml
|
|
52
52
|
crass (1.0.6)
|
|
53
|
-
curb (0.9.
|
|
53
|
+
curb (0.9.11)
|
|
54
54
|
daemons (1.3.1)
|
|
55
|
-
diff-lcs (1.
|
|
56
|
-
docile (1.3.
|
|
55
|
+
diff-lcs (1.4.4)
|
|
56
|
+
docile (1.3.5)
|
|
57
57
|
domain_name (0.5.20190701)
|
|
58
58
|
unf (>= 0.0.5, < 1.0.0)
|
|
59
59
|
eventmachine (1.2.7)
|
|
60
60
|
execjs (2.7.0)
|
|
61
|
-
ffi (1.
|
|
61
|
+
ffi (1.14.2)
|
|
62
62
|
hashdiff (1.0.1)
|
|
63
63
|
http-accept (1.7.0)
|
|
64
64
|
http-cookie (1.0.3)
|
|
65
65
|
domain_name (~> 0.5)
|
|
66
66
|
i18n (0.9.5)
|
|
67
67
|
concurrent-ruby (~> 1.0)
|
|
68
|
-
json (2.3.
|
|
68
|
+
json (2.3.1)
|
|
69
69
|
kramdown (2.3.0)
|
|
70
70
|
rexml
|
|
71
71
|
listen (3.2.1)
|
|
@@ -75,34 +75,34 @@ GEM
|
|
|
75
75
|
method_source (1.0.0)
|
|
76
76
|
mime-types (3.3.1)
|
|
77
77
|
mime-types-data (~> 3.2015)
|
|
78
|
-
mime-types-data (3.
|
|
79
|
-
mini_portile2 (2.
|
|
80
|
-
minitest (5.14.
|
|
78
|
+
mime-types-data (3.2021.0225)
|
|
79
|
+
mini_portile2 (2.5.0)
|
|
80
|
+
minitest (5.14.4)
|
|
81
81
|
msgpack (1.2.10)
|
|
82
|
-
multi_json (1.15.0)
|
|
83
82
|
netrc (0.11.0)
|
|
84
|
-
nokogiri (1.
|
|
85
|
-
mini_portile2 (~> 2.
|
|
86
|
-
|
|
83
|
+
nokogiri (1.11.1)
|
|
84
|
+
mini_portile2 (~> 2.5.0)
|
|
85
|
+
racc (~> 1.4)
|
|
86
|
+
nokogumbo (2.0.4)
|
|
87
87
|
nokogiri (~> 1.8, >= 1.8.4)
|
|
88
|
-
polytexnic (1.6.
|
|
88
|
+
polytexnic (1.6.2)
|
|
89
89
|
json (~> 2.3.0)
|
|
90
90
|
kramdown (>= 1.17, < 3.0)
|
|
91
91
|
msgpack (~> 1.2.0)
|
|
92
|
-
nokogiri (
|
|
93
|
-
pygments.rb (~>
|
|
94
|
-
pry (0.
|
|
92
|
+
nokogiri (>= 1.6.0, < 2.0)
|
|
93
|
+
pygments.rb (~> 2.1)
|
|
94
|
+
pry (0.14.0)
|
|
95
95
|
coderay (~> 1.1)
|
|
96
96
|
method_source (~> 1.0)
|
|
97
|
-
public_suffix (4.0.
|
|
98
|
-
pygments.rb (
|
|
99
|
-
|
|
97
|
+
public_suffix (4.0.6)
|
|
98
|
+
pygments.rb (2.1.0)
|
|
99
|
+
racc (1.5.2)
|
|
100
100
|
rack (1.6.13)
|
|
101
101
|
rack-protection (1.5.5)
|
|
102
102
|
rack
|
|
103
103
|
rack-test (1.1.0)
|
|
104
104
|
rack (>= 1.0, < 3)
|
|
105
|
-
rake (13.0.
|
|
105
|
+
rake (13.0.3)
|
|
106
106
|
rb-fsevent (0.10.4)
|
|
107
107
|
rb-inotify (0.10.1)
|
|
108
108
|
ffi (~> 1.0)
|
|
@@ -120,10 +120,10 @@ GEM
|
|
|
120
120
|
rspec-expectations (2.14.5)
|
|
121
121
|
diff-lcs (>= 1.1.3, < 2.0)
|
|
122
122
|
rspec-mocks (2.14.6)
|
|
123
|
-
ruby-prof (1.4.
|
|
124
|
-
ruby-progressbar (1.
|
|
123
|
+
ruby-prof (1.4.3)
|
|
124
|
+
ruby-progressbar (1.11.0)
|
|
125
125
|
safe_yaml (1.0.4)
|
|
126
|
-
sanitize (5.2.
|
|
126
|
+
sanitize (5.2.3)
|
|
127
127
|
crass (~> 1.0.2)
|
|
128
128
|
nokogiri (>= 1.8.0)
|
|
129
129
|
nokogumbo (~> 2.0)
|
|
@@ -145,17 +145,17 @@ GEM
|
|
|
145
145
|
daemons (~> 1.0, >= 1.0.9)
|
|
146
146
|
eventmachine (~> 1.0, >= 1.0.4)
|
|
147
147
|
rack (~> 1.0)
|
|
148
|
-
thor (1.0
|
|
148
|
+
thor (1.1.0)
|
|
149
149
|
thread_safe (0.3.6)
|
|
150
150
|
tilt (2.0.10)
|
|
151
|
-
tins (1.
|
|
151
|
+
tins (1.28.0)
|
|
152
152
|
sync
|
|
153
|
-
tzinfo (1.2.
|
|
153
|
+
tzinfo (1.2.9)
|
|
154
154
|
thread_safe (~> 0.1)
|
|
155
155
|
unf (0.1.4)
|
|
156
156
|
unf_ext
|
|
157
157
|
unf_ext (0.0.7.7)
|
|
158
|
-
webmock (3.
|
|
158
|
+
webmock (3.12.0)
|
|
159
159
|
addressable (>= 2.3.6)
|
|
160
160
|
crack (>= 0.3.2)
|
|
161
161
|
hashdiff (>= 0.4.0, < 2.0.0)
|
|
@@ -162,6 +162,12 @@ body #book {
|
|
|
162
162
|
margin-top: -0.4em;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
+
#book .code .highlight .linenos {
|
|
166
|
+
color: #666;
|
|
167
|
+
font-weight: normal;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* Include `.lineno` for backward-compatibility with Pygments 1. */
|
|
165
171
|
#book .code .highlight .lineno {
|
|
166
172
|
color: #666;
|
|
167
173
|
font-weight: normal;
|
|
@@ -162,6 +162,12 @@ body #book {
|
|
|
162
162
|
margin-top: -0.4em;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
+
#book .code .highlight .linenos {
|
|
166
|
+
color: #666;
|
|
167
|
+
font-weight: normal;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* Include `.lineno` for backward-compatibility with Pygments 1. */
|
|
165
171
|
#book .code .highlight .lineno {
|
|
166
172
|
color: #666;
|
|
167
173
|
font-weight: normal;
|
data/lib/softcover/cli.rb
CHANGED
|
@@ -267,7 +267,7 @@ module Softcover
|
|
|
267
267
|
# ===============================================
|
|
268
268
|
# Utilities
|
|
269
269
|
# ===============================================
|
|
270
|
-
desc "exercises", "Add exercise id elements as spans
|
|
270
|
+
desc "exercises", "Add exercise id elements as spans"
|
|
271
271
|
define_method "exercises" do
|
|
272
272
|
Softcover::Commands::Exercises.add_to_chapters!
|
|
273
273
|
end
|
|
@@ -43,7 +43,7 @@ module Softcover
|
|
|
43
43
|
[:java, 'Java'],
|
|
44
44
|
[:zip, 'zip'],
|
|
45
45
|
[:epubcheck, 'EpubCheck'],
|
|
46
|
-
[:
|
|
46
|
+
[:python3, 'Python 3']
|
|
47
47
|
]
|
|
48
48
|
end
|
|
49
49
|
|
|
@@ -86,8 +86,8 @@ module Softcover
|
|
|
86
86
|
message += " ∟ Unzip and place epubcheck-4.2.2/ in a directory on your path"
|
|
87
87
|
when :inkscape
|
|
88
88
|
message = "Inkscape (https://inkscape.org/)"
|
|
89
|
-
when :
|
|
90
|
-
message = "Configure your shell so that `
|
|
89
|
+
when :python3
|
|
90
|
+
message = "Configure your shell so that `python3` runs Python 3"
|
|
91
91
|
else
|
|
92
92
|
raise "Unknown label #{label}"
|
|
93
93
|
end
|
data/lib/softcover/utils.rb
CHANGED
|
@@ -274,12 +274,9 @@ module Softcover::Utils
|
|
|
274
274
|
else
|
|
275
275
|
""
|
|
276
276
|
end
|
|
277
|
-
when :
|
|
278
|
-
python = get_filename(:
|
|
279
|
-
|
|
280
|
-
require 'open3'
|
|
281
|
-
stdout, stderr, status = Open3.capture3("#{python} --version")
|
|
282
|
-
stderr.match(/Python 2/) ? python : ""
|
|
277
|
+
when :python3
|
|
278
|
+
python = get_filename(:python3)
|
|
279
|
+
`#{python} --version`.match(/Python 3\.*/) ? python : ""
|
|
283
280
|
else
|
|
284
281
|
get_filename(label)
|
|
285
282
|
end
|
data/lib/softcover/version.rb
CHANGED
data/softcover.gemspec
CHANGED
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |gem|
|
|
|
10
10
|
gem.email = ["michael@softcover.io"]
|
|
11
11
|
gem.description = %q{Command-line interface for softcover.io}
|
|
12
12
|
gem.summary = %q{An ebook production system & sales and marketing platform for technical authors}
|
|
13
|
-
gem.homepage = "
|
|
13
|
+
gem.homepage = "https://github.com/softcover/softcover"
|
|
14
14
|
gem.license = "MIT"
|
|
15
15
|
|
|
16
16
|
gem.files = `git ls-files`.split($/)
|
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
|
|
|
18
18
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
|
19
19
|
gem.require_paths = ["lib"]
|
|
20
20
|
|
|
21
|
-
gem.add_dependency 'polytexnic', '~> 1.6
|
|
21
|
+
gem.add_dependency 'polytexnic', '~> 1.6'
|
|
22
22
|
gem.add_dependency 'msgpack', '~> 1.2.0'
|
|
23
23
|
gem.add_dependency 'nokogiri', '>= 1.6.0', '< 2.0'
|
|
24
24
|
gem.add_dependency 'thor', '>= 0.18.1', '< 2.0'
|
|
@@ -28,7 +28,7 @@ Gem::Specification.new do |gem|
|
|
|
28
28
|
gem.add_dependency 'curb', '>= 0.9.7'
|
|
29
29
|
gem.add_dependency 'ruby-progressbar', '~> 1.10'
|
|
30
30
|
gem.add_dependency 'maruku', '~> 0.7.1'
|
|
31
|
-
gem.add_dependency 'pygments.rb', '~>
|
|
31
|
+
gem.add_dependency 'pygments.rb', '~> 2.1'
|
|
32
32
|
gem.add_dependency 'kramdown', '>= 1.6.0'
|
|
33
33
|
|
|
34
34
|
gem.add_dependency 'sinatra', '~> 1.4.4'
|
data/spec/builders/pdf_spec.rb
CHANGED
|
@@ -73,7 +73,7 @@ describe Softcover::Builders::Pdf do
|
|
|
73
73
|
|
|
74
74
|
context "after removing Book.txt" do
|
|
75
75
|
before { FileUtils.rm Softcover::BookManifest::TXT_PATH }
|
|
76
|
-
it "should still build the book" do
|
|
76
|
+
it "should still build the book (run ulimit -n 1024 if this fails)" do
|
|
77
77
|
expect(Softcover::BookManifest::TXT_PATH).not_to exist
|
|
78
78
|
expect { @builder.build! }.not_to raise_error
|
|
79
79
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: softcover
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.7.
|
|
4
|
+
version: 1.7.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Hartl
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2021-03-06 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: polytexnic
|
|
@@ -17,14 +17,14 @@ dependencies:
|
|
|
17
17
|
requirements:
|
|
18
18
|
- - "~>"
|
|
19
19
|
- !ruby/object:Gem::Version
|
|
20
|
-
version: 1.6
|
|
20
|
+
version: '1.6'
|
|
21
21
|
type: :runtime
|
|
22
22
|
prerelease: false
|
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
|
24
24
|
requirements:
|
|
25
25
|
- - "~>"
|
|
26
26
|
- !ruby/object:Gem::Version
|
|
27
|
-
version: 1.6
|
|
27
|
+
version: '1.6'
|
|
28
28
|
- !ruby/object:Gem::Dependency
|
|
29
29
|
name: msgpack
|
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -169,14 +169,14 @@ dependencies:
|
|
|
169
169
|
requirements:
|
|
170
170
|
- - "~>"
|
|
171
171
|
- !ruby/object:Gem::Version
|
|
172
|
-
version:
|
|
172
|
+
version: '2.1'
|
|
173
173
|
type: :runtime
|
|
174
174
|
prerelease: false
|
|
175
175
|
version_requirements: !ruby/object:Gem::Requirement
|
|
176
176
|
requirements:
|
|
177
177
|
- - "~>"
|
|
178
178
|
- !ruby/object:Gem::Version
|
|
179
|
-
version:
|
|
179
|
+
version: '2.1'
|
|
180
180
|
- !ruby/object:Gem::Dependency
|
|
181
181
|
name: kramdown
|
|
182
182
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -600,7 +600,7 @@ files:
|
|
|
600
600
|
- spec/utils_spec.rb
|
|
601
601
|
- spec/webmock_helpers.rb
|
|
602
602
|
- tasks/run_specs.rake
|
|
603
|
-
homepage:
|
|
603
|
+
homepage: https://github.com/softcover/softcover
|
|
604
604
|
licenses:
|
|
605
605
|
- MIT
|
|
606
606
|
metadata: {}
|