asciidoctor-epub3 1.5.0.alpha.12 → 1.5.0.alpha.17

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,378 +1,29 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'yaml'
4
+
3
5
  module Asciidoctor
4
6
  module Epub3
5
7
  # Map of Font Awesome icon names to unicode characters
6
- FontIconMap = {
7
- glass: '\f000',
8
- music: '\f001',
9
- search: '\f002',
10
- envelope_o: '\f003',
11
- heart: '\f004',
12
- star: '\f005',
13
- star_o: '\f006',
14
- user: '\f007',
15
- film: '\f008',
16
- th_large: '\f009',
17
- th: '\f00a',
18
- th_list: '\f00b',
19
- check: '\f00c',
20
- times: '\f00d',
21
- search_plus: '\f00e',
22
- search_minus: '\f010',
23
- power_off: '\f011',
24
- signal: '\f012',
25
- cog: '\f013',
26
- trash_o: '\f014',
27
- home: '\f015',
28
- file_o: '\f016',
29
- clock_o: '\f017',
30
- road: '\f018',
31
- download: '\f019',
32
- arrow_circle_o_down: '\f01a',
33
- arrow_circle_o_up: '\f01b',
34
- inbox: '\f01c',
35
- play_circle_o: '\f01d',
36
- repeat: '\f01e',
37
- refresh: '\f021',
38
- list_alt: '\f022',
39
- lock: '\f023',
40
- flag: '\f024',
41
- headphones: '\f025',
42
- volume_off: '\f026',
43
- volume_down: '\f027',
44
- volume_up: '\f028',
45
- qrcode: '\f029',
46
- barcode: '\f02a',
47
- tag: '\f02b',
48
- tags: '\f02c',
49
- book: '\f02d',
50
- bookmark: '\f02e',
51
- print: '\f02f',
52
- camera: '\f030',
53
- font: '\f031',
54
- bold: '\f032',
55
- italic: '\f033',
56
- text_height: '\f034',
57
- text_width: '\f035',
58
- align_left: '\f036',
59
- align_center: '\f037',
60
- align_right: '\f038',
61
- align_justify: '\f039',
62
- list: '\f03a',
63
- outdent: '\f03b',
64
- indent: '\f03c',
65
- video_camera: '\f03d',
66
- picture_o: '\f03e',
67
- pencil: '\f040',
68
- map_marker: '\f041',
69
- adjust: '\f042',
70
- tint: '\f043',
71
- pencil_square_o: '\f044',
72
- share_square_o: '\f045',
73
- check_square_o: '\f046',
74
- arrows: '\f047',
75
- step_backward: '\f048',
76
- fast_backward: '\f049',
77
- backward: '\f04a',
78
- play: '\f04b',
79
- pause: '\f04c',
80
- stop: '\f04d',
81
- forward: '\f04e',
82
- fast_forward: '\f050',
83
- step_forward: '\f051',
84
- eject: '\f052',
85
- chevron_left: '\f053',
86
- chevron_right: '\f054',
87
- plus_circle: '\f055',
88
- minus_circle: '\f056',
89
- times_circle: '\f057',
90
- check_circle: '\f058',
91
- question_circle: '\f059',
92
- info_circle: '\f05a',
93
- crosshairs: '\f05b',
94
- times_circle_o: '\f05c',
95
- check_circle_o: '\f05d',
96
- ban: '\f05e',
97
- arrow_left: '\f060',
98
- arrow_right: '\f061',
99
- arrow_up: '\f062',
100
- arrow_down: '\f063',
101
- share: '\f064',
102
- expand: '\f065',
103
- compress: '\f066',
104
- plus: '\f067',
105
- minus: '\f068',
106
- asterisk: '\f069',
107
- exclamation_circle: '\f06a',
108
- gift: '\f06b',
109
- leaf: '\f06c',
110
- fire: '\f06d',
111
- eye: '\f06e',
112
- eye_slash: '\f070',
113
- exclamation_triangle: '\f071',
114
- plane: '\f072',
115
- calendar: '\f073',
116
- random: '\f074',
117
- comment: '\f075',
118
- magnet: '\f076',
119
- chevron_up: '\f077',
120
- chevron_down: '\f078',
121
- retweet: '\f079',
122
- shopping_cart: '\f07a',
123
- folder: '\f07b',
124
- folder_open: '\f07c',
125
- arrows_v: '\f07d',
126
- arrows_h: '\f07e',
127
- bar_chart_o: '\f080',
128
- twitter_square: '\f081',
129
- facebook_square: '\f082',
130
- camera_retro: '\f083',
131
- key: '\f084',
132
- cogs: '\f085',
133
- comments: '\f086',
134
- thumbs_o_up: '\f087',
135
- thumbs_o_down: '\f088',
136
- star_half: '\f089',
137
- heart_o: '\f08a',
138
- sign_out: '\f08b',
139
- linkedin_square: '\f08c',
140
- thumb_tack: '\f08d',
141
- external_link: '\f08e',
142
- sign_in: '\f090',
143
- trophy: '\f091',
144
- github_square: '\f092',
145
- upload: '\f093',
146
- lemon_o: '\f094',
147
- phone: '\f095',
148
- square_o: '\f096',
149
- bookmark_o: '\f097',
150
- phone_square: '\f098',
151
- twitter: '\f099',
152
- facebook: '\f09a',
153
- github: '\f09b',
154
- unlock: '\f09c',
155
- credit_card: '\f09d',
156
- rss: '\f09e',
157
- hdd_o: '\f0a0',
158
- bullhorn: '\f0a1',
159
- bell: '\f0f3',
160
- certificate: '\f0a3',
161
- hand_o_right: '\f0a4',
162
- hand_o_left: '\f0a5',
163
- hand_o_up: '\f0a6',
164
- hand_o_down: '\f0a7',
165
- arrow_circle_left: '\f0a8',
166
- arrow_circle_right: '\f0a9',
167
- arrow_circle_up: '\f0aa',
168
- arrow_circle_down: '\f0ab',
169
- globe: '\f0ac',
170
- wrench: '\f0ad',
171
- tasks: '\f0ae',
172
- filter: '\f0b0',
173
- briefcase: '\f0b1',
174
- arrows_alt: '\f0b2',
175
- users: '\f0c0',
176
- link: '\f0c1',
177
- cloud: '\f0c2',
178
- flask: '\f0c3',
179
- scissors: '\f0c4',
180
- files_o: '\f0c5',
181
- paperclip: '\f0c6',
182
- floppy_o: '\f0c7',
183
- square: '\f0c8',
184
- bars: '\f0c9',
185
- list_ul: '\f0ca',
186
- list_ol: '\f0cb',
187
- strikethrough: '\f0cc',
188
- underline: '\f0cd',
189
- table: '\f0ce',
190
- magic: '\f0d0',
191
- truck: '\f0d1',
192
- pinterest: '\f0d2',
193
- pinterest_square: '\f0d3',
194
- google_plus_square: '\f0d4',
195
- google_plus: '\f0d5',
196
- money: '\f0d6',
197
- caret_down: '\f0d7',
198
- caret_up: '\f0d8',
199
- caret_left: '\f0d9',
200
- caret_right: '\f0da',
201
- columns: '\f0db',
202
- sort: '\f0dc',
203
- sort_asc: '\f0dd',
204
- sort_desc: '\f0de',
205
- envelope: '\f0e0',
206
- linkedin: '\f0e1',
207
- undo: '\f0e2',
208
- gavel: '\f0e3',
209
- tachometer: '\f0e4',
210
- comment_o: '\f0e5',
211
- comments_o: '\f0e6',
212
- bolt: '\f0e7',
213
- sitemap: '\f0e8',
214
- umbrella: '\f0e9',
215
- clipboard: '\f0ea',
216
- lightbulb_o: '\f0eb',
217
- exchange: '\f0ec',
218
- cloud_download: '\f0ed',
219
- cloud_upload: '\f0ee',
220
- user_md: '\f0f0',
221
- stethoscope: '\f0f1',
222
- suitcase: '\f0f2',
223
- bell_o: '\f0a2',
224
- coffee: '\f0f4',
225
- cutlery: '\f0f5',
226
- file_text_o: '\f0f6',
227
- building_o: '\f0f7',
228
- hospital_o: '\f0f8',
229
- ambulance: '\f0f9',
230
- medkit: '\f0fa',
231
- fighter_jet: '\f0fb',
232
- beer: '\f0fc',
233
- h_square: '\f0fd',
234
- plus_square: '\f0fe',
235
- angle_double_left: '\f100',
236
- angle_double_right: '\f101',
237
- angle_double_up: '\f102',
238
- angle_double_down: '\f103',
239
- angle_left: '\f104',
240
- angle_right: '\f105',
241
- angle_up: '\f106',
242
- angle_down: '\f107',
243
- desktop: '\f108',
244
- laptop: '\f109',
245
- tablet: '\f10a',
246
- mobile: '\f10b',
247
- circle_o: '\f10c',
248
- quote_left: '\f10d',
249
- quote_right: '\f10e',
250
- spinner: '\f110',
251
- circle: '\f111',
252
- reply: '\f112',
253
- github_alt: '\f113',
254
- folder_o: '\f114',
255
- folder_open_o: '\f115',
256
- smile_o: '\f118',
257
- frown_o: '\f119',
258
- meh_o: '\f11a',
259
- gamepad: '\f11b',
260
- keyboard_o: '\f11c',
261
- flag_o: '\f11d',
262
- flag_checkered: '\f11e',
263
- terminal: '\f120',
264
- code: '\f121',
265
- reply_all: '\f122',
266
- mail_reply_all: '\f122',
267
- star_half_o: '\f123',
268
- location_arrow: '\f124',
269
- crop: '\f125',
270
- code_fork: '\f126',
271
- chain_broken: '\f127',
272
- question: '\f128',
273
- info: '\f129',
274
- exclamation: '\f12a',
275
- superscript: '\f12b',
276
- subscript: '\f12c',
277
- eraser: '\f12d',
278
- puzzle_piece: '\f12e',
279
- microphone: '\f130',
280
- microphone_slash: '\f131',
281
- shield: '\f132',
282
- calendar_o: '\f133',
283
- fire_extinguisher: '\f134',
284
- rocket: '\f135',
285
- maxcdn: '\f136',
286
- chevron_circle_left: '\f137',
287
- chevron_circle_right: '\f138',
288
- chevron_circle_up: '\f139',
289
- chevron_circle_down: '\f13a',
290
- html5: '\f13b',
291
- css3: '\f13c',
292
- anchor: '\f13d',
293
- unlock_alt: '\f13e',
294
- bullseye: '\f140',
295
- ellipsis_h: '\f141',
296
- ellipsis_v: '\f142',
297
- rss_square: '\f143',
298
- play_circle: '\f144',
299
- ticket: '\f145',
300
- minus_square: '\f146',
301
- minus_square_o: '\f147',
302
- level_up: '\f148',
303
- level_down: '\f149',
304
- check_square: '\f14a',
305
- pencil_square: '\f14b',
306
- external_link_square: '\f14c',
307
- share_square: '\f14d',
308
- compass: '\f14e',
309
- caret_square_o_down: '\f150',
310
- caret_square_o_up: '\f151',
311
- caret_square_o_right: '\f152',
312
- eur: '\f153',
313
- gbp: '\f154',
314
- usd: '\f155',
315
- inr: '\f156',
316
- jpy: '\f157',
317
- rub: '\f158',
318
- krw: '\f159',
319
- btc: '\f15a',
320
- file: '\f15b',
321
- file_text: '\f15c',
322
- sort_alpha_asc: '\f15d',
323
- sort_alpha_desc: '\f15e',
324
- sort_amount_asc: '\f160',
325
- sort_amount_desc: '\f161',
326
- sort_numeric_asc: '\f162',
327
- sort_numeric_desc: '\f163',
328
- thumbs_up: '\f164',
329
- thumbs_down: '\f165',
330
- youtube_square: '\f166',
331
- youtube: '\f167',
332
- xing: '\f168',
333
- xing_square: '\f169',
334
- youtube_play: '\f16a',
335
- dropbox: '\f16b',
336
- stack_overflow: '\f16c',
337
- instagram: '\f16d',
338
- flickr: '\f16e',
339
- adn: '\f170',
340
- bitbucket: '\f171',
341
- bitbucket_square: '\f172',
342
- tumblr: '\f173',
343
- tumblr_square: '\f174',
344
- long_arrow_down: '\f175',
345
- long_arrow_up: '\f176',
346
- long_arrow_left: '\f177',
347
- long_arrow_right: '\f178',
348
- apple: '\f179',
349
- windows: '\f17a',
350
- android: '\f17b',
351
- linux: '\f17c',
352
- dribbble: '\f17d',
353
- skype: '\f17e',
354
- foursquare: '\f180',
355
- trello: '\f181',
356
- female: '\f182',
357
- male: '\f183',
358
- gittip: '\f184',
359
- sun_o: '\f185',
360
- moon_o: '\f186',
361
- archive: '\f187',
362
- bug: '\f188',
363
- vk: '\f189',
364
- weibo: '\f18a',
365
- renren: '\f18b',
366
- pagelines: '\f18c',
367
- stack_exchange: '\f18d',
368
- arrow_circle_o_right: '\f18e',
369
- arrow_circle_o_left: '\f190',
370
- caret_square_o_left: '\f191',
371
- dot_circle_o: '\f192',
372
- wheelchair: '\f193',
373
- vimeo_square: '\f194',
374
- try: '\f195',
375
- plus_square_o: '\f196',
376
- }
8
+ class FontIconMap
9
+ class << self
10
+ FONT_AWESOME_DIR = File.join __dir__, '..', '..', 'data', 'fonts', 'awesome'
11
+
12
+ def icons
13
+ @icons ||= YAML.load_file File.join(FONT_AWESOME_DIR, 'icons.yml')
14
+ end
15
+
16
+ def shims
17
+ @shims ||= YAML.load_file File.join(FONT_AWESOME_DIR, 'shims.yml')
18
+ end
19
+
20
+ def unicode icon_name
21
+ shim = shims[icon_name]
22
+ icon_name = shim['name'] unless shim.nil?
23
+ icon_data = icons[icon_name]
24
+ icon_data.nil? ? '' : %(\\#{icon_data['unicode']})
25
+ end
26
+ end
27
+ end
377
28
  end
378
29
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Asciidoctor
4
4
  module Epub3
5
- VERSION = '1.5.0.alpha.12'
5
+ VERSION = '1.5.0.alpha.17'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-epub3
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0.alpha.12
4
+ version: 1.5.0.alpha.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Allen
@@ -9,8 +9,56 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-02-02 00:00:00.000000000 Z
12
+ date: 2020-05-25 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: asciidoctor-diagram
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: 1.5.0
21
+ - - "<"
22
+ - !ruby/object:Gem::Version
23
+ version: 3.0.0
24
+ type: :development
25
+ prerelease: false
26
+ version_requirements: !ruby/object:Gem::Requirement
27
+ requirements:
28
+ - - ">="
29
+ - !ruby/object:Gem::Version
30
+ version: 1.5.0
31
+ - - "<"
32
+ - !ruby/object:Gem::Version
33
+ version: 3.0.0
34
+ - !ruby/object:Gem::Dependency
35
+ name: coderay
36
+ requirement: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 1.1.0
41
+ type: :development
42
+ prerelease: false
43
+ version_requirements: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 1.1.0
48
+ - !ruby/object:Gem::Dependency
49
+ name: pygments.rb
50
+ requirement: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 1.2.0
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 1.2.0
14
62
  - !ruby/object:Gem::Dependency
15
63
  name: rake
16
64
  requirement: !ruby/object:Gem::Requirement
@@ -25,6 +73,20 @@ dependencies:
25
73
  - - "~>"
26
74
  - !ruby/object:Gem::Version
27
75
  version: 13.0.0
76
+ - !ruby/object:Gem::Dependency
77
+ name: rouge
78
+ requirement: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.0'
83
+ type: :development
84
+ prerelease: false
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '3.0'
28
90
  - !ruby/object:Gem::Dependency
29
91
  name: rspec
30
92
  requirement: !ruby/object:Gem::Requirement
@@ -45,35 +107,35 @@ dependencies:
45
107
  requirements:
46
108
  - - "~>"
47
109
  - !ruby/object:Gem::Version
48
- version: 0.79.0
110
+ version: 0.81.0
49
111
  type: :development
50
112
  prerelease: false
51
113
  version_requirements: !ruby/object:Gem::Requirement
52
114
  requirements:
53
115
  - - "~>"
54
116
  - !ruby/object:Gem::Version
55
- version: 0.79.0
117
+ version: 0.81.0
56
118
  - !ruby/object:Gem::Dependency
57
119
  name: rubocop-rspec
58
120
  requirement: !ruby/object:Gem::Requirement
59
121
  requirements:
60
122
  - - "~>"
61
123
  - !ruby/object:Gem::Version
62
- version: 1.37.0
124
+ version: 1.38.0
63
125
  type: :development
64
126
  prerelease: false
65
127
  version_requirements: !ruby/object:Gem::Requirement
66
128
  requirements:
67
129
  - - "~>"
68
130
  - !ruby/object:Gem::Version
69
- version: 1.37.0
131
+ version: 1.38.0
70
132
  - !ruby/object:Gem::Dependency
71
133
  name: asciidoctor
72
134
  requirement: !ruby/object:Gem::Requirement
73
135
  requirements:
74
136
  - - ">="
75
137
  - !ruby/object:Gem::Version
76
- version: 1.5.3
138
+ version: 1.5.6
77
139
  - - "<"
78
140
  - !ruby/object:Gem::Version
79
141
  version: 3.0.0
@@ -83,24 +145,10 @@ dependencies:
83
145
  requirements:
84
146
  - - ">="
85
147
  - !ruby/object:Gem::Version
86
- version: 1.5.3
148
+ version: 1.5.6
87
149
  - - "<"
88
150
  - !ruby/object:Gem::Version
89
151
  version: 3.0.0
90
- - !ruby/object:Gem::Dependency
91
- name: epubcheck-ruby
92
- requirement: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: 4.2.2.0
97
- type: :runtime
98
- prerelease: false
99
- version_requirements: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: 4.2.2.0
104
152
  - !ruby/object:Gem::Dependency
105
153
  name: gepub
106
154
  requirement: !ruby/object:Gem::Requirement
@@ -116,25 +164,19 @@ dependencies:
116
164
  - !ruby/object:Gem::Version
117
165
  version: 1.0.0
118
166
  - !ruby/object:Gem::Dependency
119
- name: kindlegen
167
+ name: mime-types
120
168
  requirement: !ruby/object:Gem::Requirement
121
169
  requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: 3.0.3
125
- - - "<="
170
+ - - "~>"
126
171
  - !ruby/object:Gem::Version
127
- version: 3.0.5
172
+ version: '3.0'
128
173
  type: :runtime
129
174
  prerelease: false
130
175
  version_requirements: !ruby/object:Gem::Requirement
131
176
  requirements:
132
- - - ">="
133
- - !ruby/object:Gem::Version
134
- version: 3.0.3
135
- - - "<="
177
+ - - "~>"
136
178
  - !ruby/object:Gem::Version
137
- version: 3.0.5
179
+ version: '3.0'
138
180
  description: 'An extension for Asciidoctor that converts AsciiDoc documents to EPUB3
139
181
  and KF8/MOBI (Kindle) e-book archives.
140
182
 
@@ -146,10 +188,9 @@ executables:
146
188
  extensions: []
147
189
  extra_rdoc_files: []
148
190
  files:
149
- - ".yardopts"
150
191
  - CHANGELOG.adoc
151
192
  - Gemfile
152
- - LICENSE.adoc
193
+ - LICENSE
153
194
  - NOTICE.adoc
154
195
  - README.adoc
155
196
  - Rakefile
@@ -157,7 +198,10 @@ files:
157
198
  - bin/adb-push-ebook
158
199
  - bin/asciidoctor-epub3
159
200
  - data/fonts/assorted-icons.ttf
160
- - data/fonts/fontawesome-icons.ttf
201
+ - data/fonts/awesome/LICENSE.txt
202
+ - data/fonts/awesome/fa-solid-900.ttf
203
+ - data/fonts/awesome/icons.yml
204
+ - data/fonts/awesome/shims.yml
161
205
  - data/fonts/mplus1mn-bold-ascii.ttf
162
206
  - data/fonts/mplus1mn-bolditalic-ascii.ttf
163
207
  - data/fonts/mplus1mn-italic-ascii.ttf
@@ -208,8 +252,6 @@ files:
208
252
  - lib/asciidoctor-epub3/ext/core.rb
209
253
  - lib/asciidoctor-epub3/ext/core/string.rb
210
254
  - lib/asciidoctor-epub3/font_icon_map.rb
211
- - lib/asciidoctor-epub3/packager.rb
212
- - lib/asciidoctor-epub3/spine_item_processor.rb
213
255
  - lib/asciidoctor-epub3/version.rb
214
256
  homepage: https://github.com/asciidoctor/asciidoctor-epub3
215
257
  licenses: