softcover 1.6.3 → 1.6.4
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 +12 -16
- data/lib/softcover/builder.rb +1 -16
- data/lib/softcover/commands/server.rb +14 -4
- data/lib/softcover/version.rb +1 -1
- data/softcover.gemspec +1 -2
- metadata +5 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29616f4e2783a39aec430923eb597ccfa391e88ec2c82711310c609464faa0b9
|
4
|
+
data.tar.gz: 88e41af733eef6aaa01bbca7d7227fb30d7cd6431fe1c95578e2fa8a9771b7ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d620f7ab02d8d781d49d92ab6005d2f33207259a32bc00e76ddcac8e976c1fd3fdb6ecce40cf9582ba3917ec2ebdedcc86bc0f95b9bc600b2f56f1fed26e4d72
|
7
|
+
data.tar.gz: c9b8868c8a4fe698a1798dfd9620b2659da245aab02e0443d4bda94a3f7776bd38ecccc3a7deba45d1fc6b105b975442b8b9244eac483e3f1541f6afc1de0971
|
data/Gemfile.lock
CHANGED
@@ -1,20 +1,19 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
softcover (1.6.
|
4
|
+
softcover (1.6.4)
|
5
5
|
activesupport (~> 4.2.3)
|
6
6
|
async_sinatra (~> 1.1.0)
|
7
7
|
coffee-script (>= 2.2.0)
|
8
8
|
curb (>= 0.9.7)
|
9
9
|
i18n (>= 0.7.0)
|
10
10
|
kramdown (>= 1.6.0)
|
11
|
-
listen (~>
|
11
|
+
listen (~> 3.2.1)
|
12
12
|
maruku (~> 0.7.1)
|
13
13
|
msgpack (~> 1.2.0)
|
14
14
|
nokogiri (>= 1.6.0, < 2.0)
|
15
15
|
polytexnic (~> 1.5.16)
|
16
16
|
pygments.rb (~> 1.2.1)
|
17
|
-
rb-fsevent (~> 0.9.3)
|
18
17
|
rest-client (>= 1.8.0)
|
19
18
|
ruby-progressbar (~> 1.10)
|
20
19
|
sanitize (~> 4.6.3)
|
@@ -26,7 +25,7 @@ PATH
|
|
26
25
|
GEM
|
27
26
|
remote: https://rubygems.org/
|
28
27
|
specs:
|
29
|
-
activesupport (4.2.11.
|
28
|
+
activesupport (4.2.11.3)
|
30
29
|
i18n (~> 0.7)
|
31
30
|
minitest (~> 5.1)
|
32
31
|
thread_safe (~> 0.3, >= 0.3.4)
|
@@ -68,17 +67,16 @@ GEM
|
|
68
67
|
concurrent-ruby (~> 1.0)
|
69
68
|
json (2.3.0)
|
70
69
|
kramdown (1.17.0)
|
71
|
-
listen (
|
72
|
-
rb-fsevent (>= 0.
|
73
|
-
rb-inotify (>= 0.9)
|
74
|
-
rb-kqueue (>= 0.2)
|
70
|
+
listen (3.2.1)
|
71
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
72
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
75
73
|
maruku (0.7.3)
|
76
74
|
method_source (1.0.0)
|
77
75
|
mime-types (3.3.1)
|
78
76
|
mime-types-data (~> 3.2015)
|
79
|
-
mime-types-data (3.
|
77
|
+
mime-types-data (3.2020.0512)
|
80
78
|
mini_portile2 (2.4.0)
|
81
|
-
minitest (5.14.
|
79
|
+
minitest (5.14.1)
|
82
80
|
msgpack (1.2.10)
|
83
81
|
multi_json (1.14.1)
|
84
82
|
netrc (0.11.0)
|
@@ -95,7 +93,7 @@ GEM
|
|
95
93
|
pry (0.13.1)
|
96
94
|
coderay (~> 1.1)
|
97
95
|
method_source (~> 1.0)
|
98
|
-
public_suffix (4.0.
|
96
|
+
public_suffix (4.0.5)
|
99
97
|
pygments.rb (1.2.1)
|
100
98
|
multi_json (>= 1.0.0)
|
101
99
|
rack (1.6.13)
|
@@ -104,11 +102,9 @@ GEM
|
|
104
102
|
rack-test (1.1.0)
|
105
103
|
rack (>= 1.0, < 3)
|
106
104
|
rake (13.0.1)
|
107
|
-
rb-fsevent (0.
|
105
|
+
rb-fsevent (0.10.4)
|
108
106
|
rb-inotify (0.10.1)
|
109
107
|
ffi (~> 1.0)
|
110
|
-
rb-kqueue (0.2.5)
|
111
|
-
ffi (>= 0.5.0)
|
112
108
|
rest-client (2.1.0)
|
113
109
|
http-accept (>= 1.7.0, < 2.0)
|
114
110
|
http-cookie (>= 1.0.2, < 2.0)
|
@@ -122,7 +118,7 @@ GEM
|
|
122
118
|
rspec-expectations (2.14.5)
|
123
119
|
diff-lcs (>= 1.1.3, < 2.0)
|
124
120
|
rspec-mocks (2.14.6)
|
125
|
-
ruby-prof (1.
|
121
|
+
ruby-prof (1.4.1)
|
126
122
|
ruby-progressbar (1.10.1)
|
127
123
|
safe_yaml (1.0.4)
|
128
124
|
sanitize (4.6.6)
|
@@ -150,7 +146,7 @@ GEM
|
|
150
146
|
thor (1.0.1)
|
151
147
|
thread_safe (0.3.6)
|
152
148
|
tilt (2.0.10)
|
153
|
-
tins (1.
|
149
|
+
tins (1.25.0)
|
154
150
|
sync
|
155
151
|
tzinfo (1.2.7)
|
156
152
|
thread_safe (~> 0.1)
|
data/lib/softcover/builder.rb
CHANGED
@@ -31,25 +31,10 @@ module Softcover
|
|
31
31
|
def ensure_style_file_locations
|
32
32
|
styles_dir = Softcover::Directories::STYLES
|
33
33
|
mkdir styles_dir
|
34
|
-
fix_custom_include
|
35
34
|
files = Dir.glob('*.sty')
|
36
35
|
FileUtils.mv(files, styles_dir)
|
37
36
|
end
|
38
37
|
|
39
|
-
# Fixes the custom include.
|
40
|
-
# The template includes the custom style file as an example
|
41
|
-
# of file inclusion. Unfortunately, the location of 'custom.sty', has
|
42
|
-
# changed, which will result in older templates spontaneously breaking.
|
43
|
-
def fix_custom_include
|
44
|
-
first_chapter = File.join('chapters', 'a_chapter.tex')
|
45
|
-
if File.exist?(first_chapter)
|
46
|
-
text = File.read(first_chapter)
|
47
|
-
text.gsub!('<<(custom.sty',
|
48
|
-
"<<(#{Softcover::Directories::STYLES}/custom.sty" )
|
49
|
-
File.write(first_chapter, text)
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
38
|
# Writes out the PolyTeXnic commands from polytexnic.
|
54
39
|
def write_polytexnic_commands_file
|
55
40
|
Polytexnic.write_polytexnic_style_file(styles_dir)
|
@@ -83,4 +68,4 @@ module Softcover
|
|
83
68
|
end
|
84
69
|
|
85
70
|
end
|
86
|
-
end
|
71
|
+
end
|
@@ -11,16 +11,14 @@ module Softcover::Commands::Server
|
|
11
11
|
return if defined?(@no_listener) && @no_listener
|
12
12
|
server_pid = Process.pid
|
13
13
|
filter_regex = /(\.md|\.tex|custom\.sty|custom\.css|Book\.txt|book\.yml)$/
|
14
|
-
@listener = Listen.to('.')
|
15
|
-
@listener.filter(filter_regex)
|
16
|
-
|
17
|
-
@listener.change do |modified|
|
14
|
+
@listener = Listen.to('.', only: filter_regex, ignore: /html\//) do |modified|
|
18
15
|
first_modified = modified.try(:first)
|
19
16
|
unless first_modified =~ ignore_regex
|
20
17
|
rebuild first_modified
|
21
18
|
Process.kill("HUP", server_pid)
|
22
19
|
end
|
23
20
|
end
|
21
|
+
|
24
22
|
@listener.start
|
25
23
|
end
|
26
24
|
|
@@ -65,3 +63,15 @@ module Softcover::Commands::Server
|
|
65
63
|
start_server port, bind
|
66
64
|
end
|
67
65
|
end
|
66
|
+
|
67
|
+
# Listen >=2.8 patch to silence duplicate directory errors. USE AT YOUR OWN RISK
|
68
|
+
require 'listen/record/symlink_detector'
|
69
|
+
module Listen
|
70
|
+
class Record
|
71
|
+
class SymlinkDetector
|
72
|
+
def _fail(_, _)
|
73
|
+
fail Error, "Don't watch locally-symlinked directory twice"
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
data/lib/softcover/version.rb
CHANGED
data/softcover.gemspec
CHANGED
@@ -36,7 +36,6 @@ Gem::Specification.new do |gem|
|
|
36
36
|
gem.add_dependency 'async_sinatra', '~> 1.1.0'
|
37
37
|
gem.add_dependency 'sinatra-respond_to', '~> 0.9.0'
|
38
38
|
gem.add_dependency 'coffee-script', '>= 2.2.0'
|
39
|
-
gem.add_dependency 'listen', '~>
|
40
|
-
gem.add_dependency 'rb-fsevent', '~> 0.9.3'
|
39
|
+
gem.add_dependency 'listen', '~> 3.2.1'
|
41
40
|
gem.add_dependency 'sanitize', '~> 4.6.3'
|
42
41
|
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.6.
|
4
|
+
version: 1.6.4
|
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-
|
12
|
+
date: 2020-05-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: polytexnic
|
@@ -267,28 +267,14 @@ dependencies:
|
|
267
267
|
requirements:
|
268
268
|
- - "~>"
|
269
269
|
- !ruby/object:Gem::Version
|
270
|
-
version:
|
270
|
+
version: 3.2.1
|
271
271
|
type: :runtime
|
272
272
|
prerelease: false
|
273
273
|
version_requirements: !ruby/object:Gem::Requirement
|
274
274
|
requirements:
|
275
275
|
- - "~>"
|
276
276
|
- !ruby/object:Gem::Version
|
277
|
-
version:
|
278
|
-
- !ruby/object:Gem::Dependency
|
279
|
-
name: rb-fsevent
|
280
|
-
requirement: !ruby/object:Gem::Requirement
|
281
|
-
requirements:
|
282
|
-
- - "~>"
|
283
|
-
- !ruby/object:Gem::Version
|
284
|
-
version: 0.9.3
|
285
|
-
type: :runtime
|
286
|
-
prerelease: false
|
287
|
-
version_requirements: !ruby/object:Gem::Requirement
|
288
|
-
requirements:
|
289
|
-
- - "~>"
|
290
|
-
- !ruby/object:Gem::Version
|
291
|
-
version: 0.9.3
|
277
|
+
version: 3.2.1
|
292
278
|
- !ruby/object:Gem::Dependency
|
293
279
|
name: sanitize
|
294
280
|
requirement: !ruby/object:Gem::Requirement
|
@@ -627,7 +613,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
627
613
|
- !ruby/object:Gem::Version
|
628
614
|
version: '0'
|
629
615
|
requirements: []
|
630
|
-
rubygems_version: 3.
|
616
|
+
rubygems_version: 3.1.2
|
631
617
|
signing_key:
|
632
618
|
specification_version: 4
|
633
619
|
summary: An ebook production system & sales and marketing platform for technical authors
|