prawn-svg 0.34.2 → 0.35.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/lint.yml +19 -0
- data/.github/workflows/test.yml +14 -27
- data/.gitignore +0 -1
- data/.rubocop.yml +86 -0
- data/.rubocop_todo.yml +51 -0
- data/Gemfile +4 -3
- data/Gemfile.lock +81 -0
- data/README.md +1 -1
- data/Rakefile +1 -1
- data/lib/prawn/svg/attributes/clip_path.rb +3 -3
- data/lib/prawn/svg/attributes/opacity.rb +3 -3
- data/lib/prawn/svg/attributes/stroke.rb +9 -9
- data/lib/prawn/svg/attributes/transform.rb +2 -2
- data/lib/prawn/svg/attributes.rb +1 -1
- data/lib/prawn/svg/calculators/arc_to_bezier_curve.rb +17 -15
- data/lib/prawn/svg/calculators/aspect_ratio.rb +16 -14
- data/lib/prawn/svg/calculators/document_sizing.rb +9 -10
- data/lib/prawn/svg/calculators/pixels.rb +8 -5
- data/lib/prawn/svg/color.rb +209 -212
- data/lib/prawn/svg/css/font_family_parser.rb +2 -2
- data/lib/prawn/svg/css/selector_parser.rb +39 -35
- data/lib/prawn/svg/css/stylesheets.rb +24 -24
- data/lib/prawn/svg/css/values_parser.rb +68 -0
- data/lib/prawn/svg/document.rb +6 -5
- data/lib/prawn/svg/elements/base.rb +29 -34
- data/lib/prawn/svg/elements/circle.rb +4 -4
- data/lib/prawn/svg/elements/clip_path.rb +0 -1
- data/lib/prawn/svg/elements/depth_first_base.rb +6 -6
- data/lib/prawn/svg/elements/ellipse.rb +3 -4
- data/lib/prawn/svg/elements/gradient.rb +49 -51
- data/lib/prawn/svg/elements/image.rb +5 -5
- data/lib/prawn/svg/elements/marker.rb +5 -5
- data/lib/prawn/svg/elements/path.rb +46 -47
- data/lib/prawn/svg/elements/polygon.rb +1 -1
- data/lib/prawn/svg/elements/polyline.rb +2 -2
- data/lib/prawn/svg/elements/rect.rb +3 -3
- data/lib/prawn/svg/elements/text.rb +1 -1
- data/lib/prawn/svg/elements/text_component.rb +22 -22
- data/lib/prawn/svg/elements/use.rb +3 -7
- data/lib/prawn/svg/elements/viewport.rb +1 -3
- data/lib/prawn/svg/elements.rb +30 -29
- data/lib/prawn/svg/extension.rb +2 -1
- data/lib/prawn/svg/font.rb +7 -7
- data/lib/prawn/svg/font_registry.rb +13 -13
- data/lib/prawn/svg/gradients.rb +3 -2
- data/lib/prawn/svg/interface.rb +4 -3
- data/lib/prawn/svg/loaders/data.rb +2 -2
- data/lib/prawn/svg/loaders/file.rb +12 -14
- data/lib/prawn/svg/loaders/web.rb +4 -8
- data/lib/prawn/svg/pathable.rb +41 -37
- data/lib/prawn/svg/properties.rb +34 -33
- data/lib/prawn/svg/renderer.rb +7 -7
- data/lib/prawn/svg/state.rb +1 -1
- data/lib/prawn/svg/transform_parser.rb +5 -5
- data/lib/prawn/svg/ttf.rb +21 -17
- data/lib/prawn/svg/url_loader.rb +1 -1
- data/lib/prawn/svg/version.rb +1 -1
- data/lib/prawn-svg.rb +1 -0
- data/prawn-svg.gemspec +5 -7
- data/spec/integration_spec.rb +77 -70
- data/spec/prawn/svg/attributes/opacity_spec.rb +11 -15
- data/spec/prawn/svg/attributes/transform_spec.rb +6 -6
- data/spec/prawn/svg/calculators/aspect_ratio_spec.rb +50 -50
- data/spec/prawn/svg/calculators/document_sizing_spec.rb +35 -35
- data/spec/prawn/svg/calculators/pixels_spec.rb +31 -30
- data/spec/prawn/svg/color_spec.rb +31 -31
- data/spec/prawn/svg/css/font_family_parser_spec.rb +12 -12
- data/spec/prawn/svg/css/selector_parser_spec.rb +21 -21
- data/spec/prawn/svg/css/stylesheets_spec.rb +51 -45
- data/spec/prawn/svg/css/values_parser_spec.rb +16 -0
- data/spec/prawn/svg/document_spec.rb +15 -14
- data/spec/prawn/svg/elements/base_spec.rb +39 -34
- data/spec/prawn/svg/elements/gradient_spec.rb +39 -39
- data/spec/prawn/svg/elements/line_spec.rb +22 -22
- data/spec/prawn/svg/elements/marker_spec.rb +36 -40
- data/spec/prawn/svg/elements/path_spec.rb +134 -110
- data/spec/prawn/svg/elements/polygon_spec.rb +18 -18
- data/spec/prawn/svg/elements/polyline_spec.rb +16 -16
- data/spec/prawn/svg/elements/text_spec.rb +149 -127
- data/spec/prawn/svg/font_registry_spec.rb +34 -34
- data/spec/prawn/svg/font_spec.rb +4 -4
- data/spec/prawn/svg/interface_spec.rb +47 -39
- data/spec/prawn/svg/loaders/data_spec.rb +21 -21
- data/spec/prawn/svg/loaders/file_spec.rb +43 -40
- data/spec/prawn/svg/loaders/web_spec.rb +15 -15
- data/spec/prawn/svg/pathable_spec.rb +21 -21
- data/spec/prawn/svg/properties_spec.rb +51 -51
- data/spec/prawn/svg/transform_parser_spec.rb +12 -12
- data/spec/prawn/svg/ttf_spec.rb +5 -5
- data/spec/prawn/svg/url_loader_spec.rb +25 -23
- data/spec/spec_helper.rb +4 -4
- metadata +21 -146
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prawn-svg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.35.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mog Nesbitt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: css_parser
|
@@ -62,44 +62,22 @@ dependencies:
|
|
62
62
|
name: rexml
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
|
-
- - "
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '3.2'
|
68
|
-
type: :runtime
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: !ruby/object:Gem::Requirement
|
71
|
-
requirements:
|
72
|
-
- - "~>"
|
65
|
+
- - ">="
|
73
66
|
- !ruby/object:Gem::Version
|
74
|
-
version:
|
75
|
-
-
|
76
|
-
name: rake
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
79
|
-
- - "~>"
|
67
|
+
version: 3.2.0
|
68
|
+
- - "<"
|
80
69
|
- !ruby/object:Gem::Version
|
81
|
-
version: '
|
82
|
-
type: :
|
70
|
+
version: '4'
|
71
|
+
type: :runtime
|
83
72
|
prerelease: false
|
84
73
|
version_requirements: !ruby/object:Gem::Requirement
|
85
74
|
requirements:
|
86
|
-
- - "
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: '13.0'
|
89
|
-
- !ruby/object:Gem::Dependency
|
90
|
-
name: rspec
|
91
|
-
requirement: !ruby/object:Gem::Requirement
|
92
|
-
requirements:
|
93
|
-
- - "~>"
|
75
|
+
- - ">="
|
94
76
|
- !ruby/object:Gem::Version
|
95
|
-
version:
|
96
|
-
|
97
|
-
prerelease: false
|
98
|
-
version_requirements: !ruby/object:Gem::Requirement
|
99
|
-
requirements:
|
100
|
-
- - "~>"
|
77
|
+
version: 3.2.0
|
78
|
+
- - "<"
|
101
79
|
- !ruby/object:Gem::Version
|
102
|
-
version: '
|
80
|
+
version: '4'
|
103
81
|
description: This gem allows you to render SVG directly into a PDF using the 'prawn'
|
104
82
|
gem. Since PDF is vector-based, you'll get nice scaled graphics if you use SVG
|
105
83
|
instead of an image.
|
@@ -108,10 +86,14 @@ executables: []
|
|
108
86
|
extensions: []
|
109
87
|
extra_rdoc_files: []
|
110
88
|
files:
|
89
|
+
- ".github/workflows/lint.yml"
|
111
90
|
- ".github/workflows/test.yml"
|
112
91
|
- ".gitignore"
|
113
92
|
- ".rspec"
|
93
|
+
- ".rubocop.yml"
|
94
|
+
- ".rubocop_todo.yml"
|
114
95
|
- Gemfile
|
96
|
+
- Gemfile.lock
|
115
97
|
- LICENSE
|
116
98
|
- README.md
|
117
99
|
- Rakefile
|
@@ -130,6 +112,7 @@ files:
|
|
130
112
|
- lib/prawn/svg/css/font_family_parser.rb
|
131
113
|
- lib/prawn/svg/css/selector_parser.rb
|
132
114
|
- lib/prawn/svg/css/stylesheets.rb
|
115
|
+
- lib/prawn/svg/css/values_parser.rb
|
133
116
|
- lib/prawn/svg/document.rb
|
134
117
|
- lib/prawn/svg/elements.rb
|
135
118
|
- lib/prawn/svg/elements/base.rb
|
@@ -181,6 +164,7 @@ files:
|
|
181
164
|
- spec/prawn/svg/css/font_family_parser_spec.rb
|
182
165
|
- spec/prawn/svg/css/selector_parser_spec.rb
|
183
166
|
- spec/prawn/svg/css/stylesheets_spec.rb
|
167
|
+
- spec/prawn/svg/css/values_parser_spec.rb
|
184
168
|
- spec/prawn/svg/document_spec.rb
|
185
169
|
- spec/prawn/svg/elements/base_spec.rb
|
186
170
|
- spec/prawn/svg/elements/gradient_spec.rb
|
@@ -284,7 +268,8 @@ files:
|
|
284
268
|
homepage: http://github.com/mogest/prawn-svg
|
285
269
|
licenses:
|
286
270
|
- MIT
|
287
|
-
metadata:
|
271
|
+
metadata:
|
272
|
+
rubygems_mfa_required: 'true'
|
288
273
|
post_install_message:
|
289
274
|
rdoc_options: []
|
290
275
|
require_paths:
|
@@ -293,7 +278,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
293
278
|
requirements:
|
294
279
|
- - ">="
|
295
280
|
- !ruby/object:Gem::Version
|
296
|
-
version: 2.
|
281
|
+
version: 2.7.0
|
297
282
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
298
283
|
requirements:
|
299
284
|
- - ">="
|
@@ -304,114 +289,4 @@ rubygems_version: 3.5.3
|
|
304
289
|
signing_key:
|
305
290
|
specification_version: 4
|
306
291
|
summary: SVG renderer for Prawn PDF library
|
307
|
-
test_files:
|
308
|
-
- spec/integration_spec.rb
|
309
|
-
- spec/prawn/svg/attributes/opacity_spec.rb
|
310
|
-
- spec/prawn/svg/attributes/transform_spec.rb
|
311
|
-
- spec/prawn/svg/calculators/aspect_ratio_spec.rb
|
312
|
-
- spec/prawn/svg/calculators/document_sizing_spec.rb
|
313
|
-
- spec/prawn/svg/calculators/pixels_spec.rb
|
314
|
-
- spec/prawn/svg/color_spec.rb
|
315
|
-
- spec/prawn/svg/css/font_family_parser_spec.rb
|
316
|
-
- spec/prawn/svg/css/selector_parser_spec.rb
|
317
|
-
- spec/prawn/svg/css/stylesheets_spec.rb
|
318
|
-
- spec/prawn/svg/document_spec.rb
|
319
|
-
- spec/prawn/svg/elements/base_spec.rb
|
320
|
-
- spec/prawn/svg/elements/gradient_spec.rb
|
321
|
-
- spec/prawn/svg/elements/line_spec.rb
|
322
|
-
- spec/prawn/svg/elements/marker_spec.rb
|
323
|
-
- spec/prawn/svg/elements/path_spec.rb
|
324
|
-
- spec/prawn/svg/elements/polygon_spec.rb
|
325
|
-
- spec/prawn/svg/elements/polyline_spec.rb
|
326
|
-
- spec/prawn/svg/elements/root_spec.rb
|
327
|
-
- spec/prawn/svg/elements/text_spec.rb
|
328
|
-
- spec/prawn/svg/font_registry_spec.rb
|
329
|
-
- spec/prawn/svg/font_spec.rb
|
330
|
-
- spec/prawn/svg/interface_spec.rb
|
331
|
-
- spec/prawn/svg/loaders/data_spec.rb
|
332
|
-
- spec/prawn/svg/loaders/file_spec.rb
|
333
|
-
- spec/prawn/svg/loaders/web_spec.rb
|
334
|
-
- spec/prawn/svg/pathable_spec.rb
|
335
|
-
- spec/prawn/svg/properties_spec.rb
|
336
|
-
- spec/prawn/svg/transform_parser_spec.rb
|
337
|
-
- spec/prawn/svg/ttf_spec.rb
|
338
|
-
- spec/prawn/svg/url_loader_spec.rb
|
339
|
-
- spec/sample_images/image_svg_embed.svg
|
340
|
-
- spec/sample_images/mushroom-long.jpg
|
341
|
-
- spec/sample_images/mushroom-wide.jpg
|
342
|
-
- spec/sample_output/.keep
|
343
|
-
- spec/sample_svg/arcs01.svg
|
344
|
-
- spec/sample_svg/arrows.svg
|
345
|
-
- spec/sample_svg/cap_styles.svg
|
346
|
-
- spec/sample_svg/circle01.svg
|
347
|
-
- spec/sample_svg/clip_path.svg
|
348
|
-
- spec/sample_svg/close_path.svg
|
349
|
-
- spec/sample_svg/cmyk.svg
|
350
|
-
- spec/sample_svg/cubic01.svg
|
351
|
-
- spec/sample_svg/cubic01a.svg
|
352
|
-
- spec/sample_svg/cubic02.svg
|
353
|
-
- spec/sample_svg/display_none.svg
|
354
|
-
- spec/sample_svg/double_opacity.svg
|
355
|
-
- spec/sample_svg/ellipse01.svg
|
356
|
-
- spec/sample_svg/gistfile1.svg
|
357
|
-
- spec/sample_svg/google_charts.svg
|
358
|
-
- spec/sample_svg/gradient_transform.svg
|
359
|
-
- spec/sample_svg/gradients-cmyk.svg
|
360
|
-
- spec/sample_svg/gradients.svg
|
361
|
-
- spec/sample_svg/hidden_paths.svg
|
362
|
-
- spec/sample_svg/highcharts.svg
|
363
|
-
- spec/sample_svg/image01.svg
|
364
|
-
- spec/sample_svg/image02_base64.svg
|
365
|
-
- spec/sample_svg/image03.svg
|
366
|
-
- spec/sample_svg/image_svg.svg
|
367
|
-
- spec/sample_svg/line01.svg
|
368
|
-
- spec/sample_svg/links.svg
|
369
|
-
- spec/sample_svg/marker.svg
|
370
|
-
- spec/sample_svg/markers_degenerate_cp.svg
|
371
|
-
- spec/sample_svg/maths.svg
|
372
|
-
- spec/sample_svg/matrix_transform.svg
|
373
|
-
- spec/sample_svg/matrix_transform_3.svg
|
374
|
-
- spec/sample_svg/negminy.svg
|
375
|
-
- spec/sample_svg/no_width_or_height.svg
|
376
|
-
- spec/sample_svg/offset_viewport.svg
|
377
|
-
- spec/sample_svg/omnigraffle.svg
|
378
|
-
- spec/sample_svg/opacity01.svg
|
379
|
-
- spec/sample_svg/ordering.svg
|
380
|
-
- spec/sample_svg/path.svg
|
381
|
-
- spec/sample_svg/pie_piece.svg
|
382
|
-
- spec/sample_svg/polygon01.svg
|
383
|
-
- spec/sample_svg/polyline01.svg
|
384
|
-
- spec/sample_svg/preserve-space.svg
|
385
|
-
- spec/sample_svg/quad01.svg
|
386
|
-
- spec/sample_svg/radgrad01-bounding.svg
|
387
|
-
- spec/sample_svg/radgrad01.svg
|
388
|
-
- spec/sample_svg/rect01.svg
|
389
|
-
- spec/sample_svg/rect02.svg
|
390
|
-
- spec/sample_svg/rotate_scale.svg
|
391
|
-
- spec/sample_svg/scale.svg
|
392
|
-
- spec/sample_svg/scruffy_graph.svg
|
393
|
-
- spec/sample_svg/subfamilies.svg
|
394
|
-
- spec/sample_svg/subviewports.svg
|
395
|
-
- spec/sample_svg/subviewports2.svg
|
396
|
-
- spec/sample_svg/svg_fill.svg
|
397
|
-
- spec/sample_svg/symbol.svg
|
398
|
-
- spec/sample_svg/text-decoration.svg
|
399
|
-
- spec/sample_svg/text_entities.svg
|
400
|
-
- spec/sample_svg/text_stroke.svg
|
401
|
-
- spec/sample_svg/transform.svg
|
402
|
-
- spec/sample_svg/tref01.svg
|
403
|
-
- spec/sample_svg/triangle01.svg
|
404
|
-
- spec/sample_svg/tspan01.svg
|
405
|
-
- spec/sample_svg/tspan02.svg
|
406
|
-
- spec/sample_svg/tspan03-cc.svg
|
407
|
-
- spec/sample_svg/tspan03.svg
|
408
|
-
- spec/sample_svg/tspan04.svg
|
409
|
-
- spec/sample_svg/tspan05.svg
|
410
|
-
- spec/sample_svg/tspan91.svg
|
411
|
-
- spec/sample_svg/use.svg
|
412
|
-
- spec/sample_svg/use_disordered.svg
|
413
|
-
- spec/sample_svg/viewbox.svg
|
414
|
-
- spec/sample_svg/viewport.svg
|
415
|
-
- spec/sample_svg/warning-radioactive.svg
|
416
|
-
- spec/sample_ttf/OpenSans-SemiboldItalic.ttf
|
417
|
-
- spec/spec_helper.rb
|
292
|
+
test_files: []
|