softcover 1.6.4 → 1.7.3

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
  SHA256:
3
- metadata.gz: 29616f4e2783a39aec430923eb597ccfa391e88ec2c82711310c609464faa0b9
4
- data.tar.gz: 88e41af733eef6aaa01bbca7d7227fb30d7cd6431fe1c95578e2fa8a9771b7ea
3
+ metadata.gz: 33aac3de7c01d8599e9d1a4ae8354ca4378cbd969e141488a85e017a31fb0c81
4
+ data.tar.gz: e8f1c4cc9fad2e6a8f04a5e0ad334bf26092e7d1ae50b166bbee07feaabf266b
5
5
  SHA512:
6
- metadata.gz: d620f7ab02d8d781d49d92ab6005d2f33207259a32bc00e76ddcac8e976c1fd3fdb6ecce40cf9582ba3917ec2ebdedcc86bc0f95b9bc600b2f56f1fed26e4d72
7
- data.tar.gz: c9b8868c8a4fe698a1798dfd9620b2659da245aab02e0443d4bda94a3f7776bd38ecccc3a7deba45d1fc6b105b975442b8b9244eac483e3f1541f6afc1de0971
6
+ metadata.gz: 8815715e04270ed59569f149a57a0866fa4fab538cdda4f21634b4bfd2956d481b771012d128445a5f4b32809ba515a6350cb25aa0d2b5b6606543ea543cfbff
7
+ data.tar.gz: 7e298e6aad78fb455a2fa655069d94c0f223cda6b22c264cce6ae555b73d9def6cff63e2adb0d79586a9b5e6563e1e0df87071e554debe9ff29009c9c32fdce3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- softcover (1.6.4)
4
+ softcover (1.7.3)
5
5
  activesupport (~> 4.2.3)
6
6
  async_sinatra (~> 1.1.0)
7
7
  coffee-script (>= 2.2.0)
@@ -12,11 +12,11 @@ PATH
12
12
  maruku (~> 0.7.1)
13
13
  msgpack (~> 1.2.0)
14
14
  nokogiri (>= 1.6.0, < 2.0)
15
- polytexnic (~> 1.5.16)
16
- pygments.rb (~> 1.2.1)
15
+ polytexnic (~> 1.6)
16
+ pygments.rb (~> 2.1)
17
17
  rest-client (>= 1.8.0)
18
18
  ruby-progressbar (~> 1.10)
19
- sanitize (~> 4.6.3)
19
+ sanitize (>= 4.6.3, < 5.3.0)
20
20
  sinatra (~> 1.4.4)
21
21
  sinatra-respond_to (~> 0.9.0)
22
22
  thin (~> 1.6.1)
@@ -35,38 +35,39 @@ GEM
35
35
  async_sinatra (1.1.0)
36
36
  rack (>= 1.4.1)
37
37
  sinatra (>= 1.3.2)
38
- coderay (1.1.2)
38
+ coderay (1.1.3)
39
39
  coffee-script (2.4.1)
40
40
  coffee-script-source
41
41
  execjs
42
42
  coffee-script-source (1.12.2)
43
- concurrent-ruby (1.1.6)
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.3)
51
- safe_yaml (~> 1.0.0)
50
+ crack (0.4.5)
51
+ rexml
52
52
  crass (1.0.6)
53
- curb (0.9.10)
54
- daemons (1.3.1)
55
- diff-lcs (1.3)
56
- docile (1.3.2)
53
+ curb (0.9.11)
54
+ daemons (1.4.0)
55
+ diff-lcs (1.4.4)
56
+ docile (1.4.0)
57
57
  domain_name (0.5.20190701)
58
58
  unf (>= 0.0.5, < 1.0.0)
59
59
  eventmachine (1.2.7)
60
- execjs (2.7.0)
61
- ffi (1.12.2)
60
+ execjs (2.8.1)
61
+ ffi (1.15.0)
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.0)
69
- kramdown (1.17.0)
68
+ json (2.3.1)
69
+ kramdown (2.3.1)
70
+ rexml
70
71
  listen (3.2.1)
71
72
  rb-fsevent (~> 0.10, >= 0.10.3)
72
73
  rb-inotify (~> 0.9, >= 0.9.10)
@@ -74,35 +75,35 @@ GEM
74
75
  method_source (1.0.0)
75
76
  mime-types (3.3.1)
76
77
  mime-types-data (~> 3.2015)
77
- mime-types-data (3.2020.0512)
78
- mini_portile2 (2.4.0)
79
- minitest (5.14.1)
78
+ mime-types-data (3.2021.0225)
79
+ mini_portile2 (2.5.1)
80
+ minitest (5.14.4)
80
81
  msgpack (1.2.10)
81
- multi_json (1.14.1)
82
82
  netrc (0.11.0)
83
- nokogiri (1.10.9)
84
- mini_portile2 (~> 2.4.0)
85
- nokogumbo (1.5.0)
86
- nokogiri
87
- polytexnic (1.5.16)
83
+ nokogiri (1.11.4)
84
+ mini_portile2 (~> 2.5.0)
85
+ racc (~> 1.4)
86
+ nokogumbo (2.0.5)
87
+ nokogiri (~> 1.8, >= 1.8.4)
88
+ polytexnic (1.6.4)
88
89
  json (~> 2.3.0)
89
- kramdown (~> 1.17)
90
+ kramdown (>= 2.0, < 3.0)
90
91
  msgpack (~> 1.2.0)
91
- nokogiri (~> 1.10.8)
92
- pygments.rb (~> 1.2.1)
93
- pry (0.13.1)
92
+ nokogiri (>= 1.6.0, < 2.0)
93
+ pygments.rb (~> 2.1)
94
+ pry (0.14.1)
94
95
  coderay (~> 1.1)
95
96
  method_source (~> 1.0)
96
- public_suffix (4.0.5)
97
- pygments.rb (1.2.1)
98
- multi_json (>= 1.0.0)
97
+ public_suffix (4.0.6)
98
+ pygments.rb (2.2.0)
99
+ racc (1.5.2)
99
100
  rack (1.6.13)
100
101
  rack-protection (1.5.5)
101
102
  rack
102
103
  rack-test (1.1.0)
103
104
  rack (>= 1.0, < 3)
104
- rake (13.0.1)
105
- rb-fsevent (0.10.4)
105
+ rake (13.0.3)
106
+ rb-fsevent (0.11.0)
106
107
  rb-inotify (0.10.1)
107
108
  ffi (~> 1.0)
108
109
  rest-client (2.1.0)
@@ -110,6 +111,7 @@ GEM
110
111
  http-cookie (>= 1.0.2, < 2.0)
111
112
  mime-types (>= 1.16, < 4.0)
112
113
  netrc (~> 0.8)
114
+ rexml (3.2.5)
113
115
  rspec (2.14.1)
114
116
  rspec-core (~> 2.14.0)
115
117
  rspec-expectations (~> 2.14.0)
@@ -118,13 +120,13 @@ GEM
118
120
  rspec-expectations (2.14.5)
119
121
  diff-lcs (>= 1.1.3, < 2.0)
120
122
  rspec-mocks (2.14.6)
121
- ruby-prof (1.4.1)
122
- ruby-progressbar (1.10.1)
123
+ ruby-prof (1.4.3)
124
+ ruby-progressbar (1.11.0)
123
125
  safe_yaml (1.0.4)
124
- sanitize (4.6.6)
126
+ sanitize (5.2.3)
125
127
  crass (~> 1.0.2)
126
- nokogiri (>= 1.4.4)
127
- nokogumbo (~> 1.4)
128
+ nokogiri (>= 1.8.0)
129
+ nokogumbo (~> 2.0)
128
130
  simplecov (0.16.1)
129
131
  docile (~> 1.1)
130
132
  json (>= 1.8, < 3)
@@ -143,17 +145,17 @@ GEM
143
145
  daemons (~> 1.0, >= 1.0.9)
144
146
  eventmachine (~> 1.0, >= 1.0.4)
145
147
  rack (~> 1.0)
146
- thor (1.0.1)
148
+ thor (1.1.0)
147
149
  thread_safe (0.3.6)
148
150
  tilt (2.0.10)
149
- tins (1.25.0)
151
+ tins (1.29.0)
150
152
  sync
151
- tzinfo (1.2.7)
153
+ tzinfo (1.2.9)
152
154
  thread_safe (~> 0.1)
153
155
  unf (0.1.4)
154
156
  unf_ext
155
157
  unf_ext (0.0.7.7)
156
- webmock (3.8.3)
158
+ webmock (3.13.0)
157
159
  addressable (>= 2.3.6)
158
160
  crack (>= 0.3.2)
159
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;
@@ -434,7 +440,7 @@ body #book {
434
440
  color: red;
435
441
  }
436
442
 
437
- #book .sc {
443
+ #book .smallcaps {
438
444
  font-variant: small-caps;
439
445
  }
440
446
 
@@ -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;
@@ -434,7 +440,7 @@ body #book {
434
440
  color: red;
435
441
  }
436
442
 
437
- #book .sc {
443
+ #book .smallcaps {
438
444
  font-variant: small-caps;
439
445
  }
440
446
 
@@ -17,6 +17,7 @@ html/*.xhtml
17
17
 
18
18
  # Generated EPUB files
19
19
  epub/OEBPS/*.html
20
+ epub/OEBPS/*.xhtml
20
21
  epub/OEBPS/*.opf
21
22
  epub/OEBPS/*.ncx
22
23
  epub/OEBPS/images
data/lib/softcover/cli.rb CHANGED
@@ -205,8 +205,8 @@ module Softcover
205
205
  method_option :polytex,
206
206
  :type => :boolean,
207
207
  :default => false,
208
- :aliases => "-p",
209
- :desc => "Generate a PolyTeX document."
208
+ :aliases => %w[-p --latex -l],
209
+ :desc => "Generate a LaTeX document."
210
210
  method_option :article,
211
211
  :type => :boolean,
212
212
  :default => false,
@@ -267,7 +267,7 @@ module Softcover
267
267
  # ===============================================
268
268
  # Utilities
269
269
  # ===============================================
270
- desc "exercises", "Add exercise id elements as spans (warning: files are overwritten)"
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
- [:python2, 'Python 2']
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 :python2
90
- message = "Configure your shell so that `python` runs Python 2"
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
@@ -274,12 +274,9 @@ module Softcover::Utils
274
274
  else
275
275
  ""
276
276
  end
277
- when :python2
278
- python = get_filename(:python2)
279
- # Python 2 stupidly outputs the version number to STDERR instead of STDOUT.
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
@@ -1,3 +1,3 @@
1
1
  module Softcover
2
- VERSION = "1.6.4"
2
+ VERSION = "1.7.3"
3
3
  end
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 = "http://manual.softcover.io/book"
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.5.16'
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', '~> 1.2.1'
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'
@@ -37,5 +37,5 @@ Gem::Specification.new do |gem|
37
37
  gem.add_dependency 'sinatra-respond_to', '~> 0.9.0'
38
38
  gem.add_dependency 'coffee-script', '>= 2.2.0'
39
39
  gem.add_dependency 'listen', '~> 3.2.1'
40
- gem.add_dependency 'sanitize', '~> 4.6.3'
40
+ gem.add_dependency 'sanitize', '>= 4.6.3', '< 5.3.0'
41
41
  end
@@ -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
data/spec/cli_spec.rb CHANGED
@@ -48,7 +48,7 @@ describe Softcover::CLI do
48
48
 
49
49
  context "softcover new options" do
50
50
  subject { `softcover help new` }
51
- it { should include '-p, [--polytex]' }
51
+ it { should include '-p, --latex, -l, [--polytex]' }
52
52
  it { should include '-a, [--article]' }
53
53
  end
54
54
 
@@ -155,6 +155,19 @@ describe Softcover::CLI do
155
155
  it_should_behave_like "book"
156
156
  end
157
157
 
158
+ describe "LaTeX books" do
159
+
160
+ before(:all) do
161
+ remove_book
162
+ chdir_to_fixtures
163
+ silence { `softcover new book --latex` }
164
+ chdir_to_book
165
+ end
166
+ after(:all) { remove_book }
167
+
168
+ it_should_behave_like "book"
169
+ end
170
+
158
171
  describe "Markdown books" do
159
172
 
160
173
  before(:all) do
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.6.4
4
+ version: 1.7.3
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: 2020-05-18 00:00:00.000000000 Z
12
+ date: 2021-05-17 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.5.16
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.5.16
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: 1.2.1
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: 1.2.1
179
+ version: '2.1'
180
180
  - !ruby/object:Gem::Dependency
181
181
  name: kramdown
182
182
  requirement: !ruby/object:Gem::Requirement
@@ -279,16 +279,22 @@ dependencies:
279
279
  name: sanitize
280
280
  requirement: !ruby/object:Gem::Requirement
281
281
  requirements:
282
- - - "~>"
282
+ - - ">="
283
283
  - !ruby/object:Gem::Version
284
284
  version: 4.6.3
285
+ - - "<"
286
+ - !ruby/object:Gem::Version
287
+ version: 5.3.0
285
288
  type: :runtime
286
289
  prerelease: false
287
290
  version_requirements: !ruby/object:Gem::Requirement
288
291
  requirements:
289
- - - "~>"
292
+ - - ">="
290
293
  - !ruby/object:Gem::Version
291
294
  version: 4.6.3
295
+ - - "<"
296
+ - !ruby/object:Gem::Version
297
+ version: 5.3.0
292
298
  description: Command-line interface for softcover.io
293
299
  email:
294
300
  - michael@softcover.io
@@ -594,7 +600,7 @@ files:
594
600
  - spec/utils_spec.rb
595
601
  - spec/webmock_helpers.rb
596
602
  - tasks/run_specs.rake
597
- homepage: http://manual.softcover.io/book
603
+ homepage: https://github.com/softcover/softcover
598
604
  licenses:
599
605
  - MIT
600
606
  metadata: {}
@@ -613,7 +619,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
613
619
  - !ruby/object:Gem::Version
614
620
  version: '0'
615
621
  requirements: []
616
- rubygems_version: 3.1.2
622
+ rubygems_version: 3.1.4
617
623
  signing_key:
618
624
  specification_version: 4
619
625
  summary: An ebook production system & sales and marketing platform for technical authors