svg2img 0.2.0-x86_64-darwin → 0.2.2-x86_64-darwin

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb17acb2c8d8d9199cfa84c90725af829842a88a97b530049f7d814bdd95866b
4
- data.tar.gz: 9592573c376a2900b4329058595daa720ee016ba589e2d1bcba39cdb8860b0dd
3
+ metadata.gz: 5cf8c50b8c23a42947d405388520f82b4eb666a723001db511077db2830965d3
4
+ data.tar.gz: af4e194936de0debeb19c981bf4c87ea250f3feaceb0e19dae745c97ccc0d1c2
5
5
  SHA512:
6
- metadata.gz: 90120abefa442b26d8a35437970f7facafa081d850651547835908a0844a2a720d4cf10b9da22033d014f28090c8413bbb3007a8568a13012e130f4ec28bb15c
7
- data.tar.gz: 2028b75669fc28455eec7f2a3ab71dc5d60f60bd0c607dbe1d1fa150a7782e93e83fb125df04e819c59c3c832991eaeb60c2219bb9b0db73e385bf8cfe0cc521
6
+ metadata.gz: c2b5321690174519c8d9f55e718d67ee1467fb82431025de4ac4dcedd016c29768fce473d526926e4a5861f6e20cc1cf7a1556f0712f90d1e331113cfbaa77ff
7
+ data.tar.gz: 3d27f99d7a929a41979b896ac425b1960c6e2974a0df0d9bdc5d70f2218990ca6cbae6eb6c682944e5c9d5f2f7af93f68ab50b243b9b796081d76888507c836f
data/README.md CHANGED
@@ -40,6 +40,11 @@ bundle lock --add-platform arm64-darwin # Apple Silicon MacOS (i.e. M1)
40
40
 
41
41
  ## Usage
42
42
 
43
+ ```ruby
44
+ require "svg2img"
45
+ Svg2Img.process_svg(svg_string, options)
46
+ ```
47
+
43
48
  Example usage:
44
49
 
45
50
  ```ruby
@@ -66,6 +71,7 @@ send_data(png_data, type: 'image/png', disposition: 'inline')
66
71
  ### Options
67
72
 
68
73
  - `format` - output format, one of `:png`, `:jpg`, `:webp`, `:gif`
74
+ - `output_path` - path to the output image. If not provided, a temporary file will be created and the path to it will be returned.
69
75
  - `size` - size of the output image as a proc that receives the width and height of the SVG and returns an array with the width and height of the output image. If the provides size has a different aspect ratio than the SVG, the image will be resized to fit in the center of the provided size. If not provided, the output image will have the same size as the SVG.
70
76
 
71
77
  ## Development
Binary file
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Svg2Img
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svg2img
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: x86_64-darwin
6
6
  authors:
7
7
  - Orvar Segerström
@@ -20,6 +20,7 @@ files:
20
20
  - LICENSE.txt
21
21
  - README.md
22
22
  - lib/svg2img.rb
23
+ - lib/svg2img/3.1/svg2img.bundle
23
24
  - lib/svg2img/3.2/svg2img.bundle
24
25
  - lib/svg2img/3.3/svg2img.bundle
25
26
  - lib/svg2img/version.rb
@@ -38,7 +39,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
38
39
  requirements:
39
40
  - - ">="
40
41
  - !ruby/object:Gem::Version
41
- version: '3.2'
42
+ version: '3.1'
42
43
  - - "<"
43
44
  - !ruby/object:Gem::Version
44
45
  version: 3.4.dev