favicon_factory 0.1.0 → 0.3.0
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/lib/favicon_factory/base_adapter.rb +102 -0
- data/lib/favicon_factory/cli.rb +65 -0
- data/lib/favicon_factory/command.rb +48 -0
- data/lib/favicon_factory/image_magick_adapter.rb +52 -0
- data/lib/favicon_factory/version.rb +1 -1
- data/lib/favicon_factory/vips_adapter.rb +45 -0
- data/lib/favicon_factory.rb +5 -184
- metadata +24 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc00963b3c1d159bb936b8a4f0e146c32d68b1a0bcdc4fb40f5d700cbf38cf3d
|
4
|
+
data.tar.gz: 616e4bb03f11554299f8a0dc4f400988d701172f8701f45762cf0511913fe73c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 777f954b9cd891583b89ff389bde2aa942a1315c79ac0162634460f77266ec06a97ce47d7551409e5dcc3dead2d1e75ed264468414e4e22ee9f8895ba6b147cb
|
7
|
+
data.tar.gz: a15c26c10a9076d7b5010de545c0f813da1c5dc0cb0e933f7c3e03843a0e47c0c542de064b2689df3e447327ee4147f6ef4d375a6b785572d03ffc4c65ac4210
|
@@ -0,0 +1,102 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "tty/which"
|
4
|
+
|
5
|
+
module FaviconFactory
|
6
|
+
class BaseAdapter
|
7
|
+
class << self
|
8
|
+
def find
|
9
|
+
if TTY::Which.which("vips") || TTY::Which.which("libvips")
|
10
|
+
VipsAdapter
|
11
|
+
elsif TTY::Which.which("magick") || TTY::Which.which("convert")
|
12
|
+
ImageMagickAdapter
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def initialize(file:, params:, stderr:)
|
18
|
+
@file = file
|
19
|
+
@params = params
|
20
|
+
@stderr = stderr
|
21
|
+
end
|
22
|
+
|
23
|
+
def create_icons
|
24
|
+
create_by_name
|
25
|
+
.keys
|
26
|
+
.map { |name| Thread.new { create(name, params) } }
|
27
|
+
.each(&:join)
|
28
|
+
|
29
|
+
stderr.puts <<~TEXT
|
30
|
+
Info: Add the following to the `<head>`
|
31
|
+
<!-- favicons generated with the favicon_factory gem -->
|
32
|
+
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
|
33
|
+
<link rel="icon" href="/favicon.ico" sizes="32x32">
|
34
|
+
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
35
|
+
<link rel="manifest" href="/manifest.webmanifest">
|
36
|
+
TEXT
|
37
|
+
end
|
38
|
+
|
39
|
+
private
|
40
|
+
|
41
|
+
attr_reader :params, :stderr, :file
|
42
|
+
|
43
|
+
def create(name, params)
|
44
|
+
path = file.join(params.dir, name)
|
45
|
+
if file.exist?(path)
|
46
|
+
stderr.puts "Info: Skipping #{path} because it already exists"
|
47
|
+
return
|
48
|
+
end
|
49
|
+
|
50
|
+
stderr.puts "Info: Generating #{path}"
|
51
|
+
create_by_name.fetch(name).call(path, params)
|
52
|
+
end
|
53
|
+
|
54
|
+
def create_by_name
|
55
|
+
{
|
56
|
+
"favicon.ico" => method(:ico!),
|
57
|
+
"icon-192.png" => method(:png_192!),
|
58
|
+
"icon-512.png" => method(:png_512!),
|
59
|
+
"icon-mask.png" => method(:png_mask!),
|
60
|
+
"apple-touch-icon.png" => method(:touch!),
|
61
|
+
"manifest.webmanifest" => method(:manifest!)
|
62
|
+
}
|
63
|
+
end
|
64
|
+
|
65
|
+
def png_192!(path, params)
|
66
|
+
png!(path, params, 192)
|
67
|
+
end
|
68
|
+
|
69
|
+
def png_512!(path, params)
|
70
|
+
png!(path, params, 512)
|
71
|
+
end
|
72
|
+
|
73
|
+
def png_mask!(path, params)
|
74
|
+
mask!(path, params)
|
75
|
+
end
|
76
|
+
|
77
|
+
def manifest!(path, _params)
|
78
|
+
file.write(path, <<~MANIFEST.chomp)
|
79
|
+
{
|
80
|
+
"icons": [
|
81
|
+
{
|
82
|
+
"src": "/icon-192.png",
|
83
|
+
"type": "image/png",
|
84
|
+
"sizes": "192x192"
|
85
|
+
},
|
86
|
+
{
|
87
|
+
"src": "/icon-512.png",
|
88
|
+
"type": "image/png",
|
89
|
+
"sizes": "512x512"
|
90
|
+
},
|
91
|
+
{
|
92
|
+
"src": "/icon-mask.png",
|
93
|
+
"type": "image/png",
|
94
|
+
"sizes": "512x512",
|
95
|
+
"purpose": "maskable"
|
96
|
+
}
|
97
|
+
]
|
98
|
+
}
|
99
|
+
MANIFEST
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module FaviconFactory
|
4
|
+
Params = Data.define(:favicon_svg, :background) do
|
5
|
+
def dir
|
6
|
+
File.dirname(favicon_svg)
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
class Cli
|
11
|
+
def self.call
|
12
|
+
exit new(argv: ARGV, file: File, stderr: $stderr).call
|
13
|
+
end
|
14
|
+
|
15
|
+
def initialize(argv:, file:, stderr:, find_adapter: -> { BaseAdapter.find })
|
16
|
+
@argv = argv
|
17
|
+
@file = file
|
18
|
+
@stderr = stderr
|
19
|
+
@find_adapter = find_adapter
|
20
|
+
end
|
21
|
+
|
22
|
+
def call
|
23
|
+
code, message = catch(:exit) do
|
24
|
+
adapter = try_find_adapter
|
25
|
+
params = try_parse(argv)
|
26
|
+
adapter.new(file: file, params: params, stderr: stderr).create_icons
|
27
|
+
[0, nil]
|
28
|
+
end
|
29
|
+
|
30
|
+
stderr.puts message unless message.nil?
|
31
|
+
code
|
32
|
+
end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
attr_reader :stderr, :file, :find_adapter, :argv
|
37
|
+
|
38
|
+
def try_find_adapter
|
39
|
+
adapter = find_adapter.call
|
40
|
+
throw(:exit, [1, "Error: Neither vips or imagemagick found, install one"]) if adapter.nil?
|
41
|
+
adapter
|
42
|
+
end
|
43
|
+
|
44
|
+
def try_parse(argv)
|
45
|
+
command = Command.new.parse(argv)
|
46
|
+
params = command.params
|
47
|
+
throw(:exit, [0, command.help]) if params.fetch(:help) == true
|
48
|
+
throw(:exit, [1, params.errors.summary]) if params.errors.any?
|
49
|
+
|
50
|
+
favicon_svg = params.fetch(:favicon_svg)
|
51
|
+
throw(:exit, [1, "Error: #{favicon_svg} does not end with .svg"]) unless favicon_svg.end_with?(".svg")
|
52
|
+
throw(:exit, [1, "Error: #{favicon_svg} does not exist"]) unless file.exist?(favicon_svg)
|
53
|
+
|
54
|
+
background = params.fetch(:background)
|
55
|
+
throw(:exit, [1, "Error: #{background} is not a valid color, use a hex value like #0099ff"]) unless hex?(background)
|
56
|
+
|
57
|
+
Params.new(favicon_svg: favicon_svg, background: background)
|
58
|
+
end
|
59
|
+
|
60
|
+
def hex?(string)
|
61
|
+
string = string.delete_prefix("#")
|
62
|
+
string.chars.all? { |char| char.match?(/^[0-9a-fA-F]$/) }
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "tty/option"
|
4
|
+
|
5
|
+
module FaviconFactory
|
6
|
+
class Command
|
7
|
+
include TTY::Option
|
8
|
+
|
9
|
+
usage do
|
10
|
+
program "favicon_factory"
|
11
|
+
no_command
|
12
|
+
|
13
|
+
desc <<~DESC
|
14
|
+
`favicon_factory` generates from an SVG the minimal set of icons needed by modern browsers.
|
15
|
+
|
16
|
+
The source SVG is ideal for [modern browsers](https://caniuse.com/link-icon-svg). And it may contain a `<style>` tag with `@media (prefers-color-scheme: dark)` to support light/dark themes, which is ignored when generating favicons.
|
17
|
+
|
18
|
+
Icons will be generated in the same folder as the source SVG unless already existing:
|
19
|
+
|
20
|
+
- `favicon.ico` (32x32) for legacy browsers; serve it from `/favicon.ico` because tools, like RSS readers, just look there.
|
21
|
+
- `apple-touch-icon.png` (180x180) for Apple devices when adding a webpage to the home screen; a background and a padding around the icon is applied to make it look pretty.
|
22
|
+
- `manifest.webmanifest` that includes `icon-192.png`, `icon-512.png`, and `icon-mask.png` for Android devices; the first for display on the home screen, the second for different Android launchers, and the last for the splash screen while the PWA is loading.
|
23
|
+
DESC
|
24
|
+
|
25
|
+
example "favicon_factory path/to/favicon.svg"
|
26
|
+
example "favicon_factory --background red path/to/favicon.svg"
|
27
|
+
example "favicon_factory --background #000000 path/to/favicon.svg"
|
28
|
+
end
|
29
|
+
|
30
|
+
argument :favicon_svg do
|
31
|
+
name "favicon_svg"
|
32
|
+
desc "Path to the favicon.svg"
|
33
|
+
end
|
34
|
+
|
35
|
+
option :background do
|
36
|
+
short "-b"
|
37
|
+
long "--background string"
|
38
|
+
default "#ffffff"
|
39
|
+
desc "Background hex color for apple-touch-icon.png"
|
40
|
+
end
|
41
|
+
|
42
|
+
flag :help do
|
43
|
+
short "-h"
|
44
|
+
long "--help"
|
45
|
+
desc "Print usage"
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "mini_magick"
|
4
|
+
|
5
|
+
module FaviconFactory
|
6
|
+
class ImageMagickAdapter < BaseAdapter
|
7
|
+
SVG_DENSITY = 1_000
|
8
|
+
|
9
|
+
def initialize(**)
|
10
|
+
super
|
11
|
+
stderr.puts "Warn: Install imagemagick v7 for best results, using v6" unless MiniMagick.imagemagick7?
|
12
|
+
end
|
13
|
+
|
14
|
+
def ico!(path, params)
|
15
|
+
MiniMagick.convert do |convert|
|
16
|
+
convert.density(SVG_DENSITY).background("none")
|
17
|
+
convert << params.favicon_svg
|
18
|
+
convert.resize("32x32")
|
19
|
+
convert << path
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def png!(path, params, size)
|
24
|
+
MiniMagick.convert do |convert|
|
25
|
+
convert.density(SVG_DENSITY).background("none")
|
26
|
+
convert << params.favicon_svg
|
27
|
+
convert.resize("#{size}x#{size}")
|
28
|
+
convert << path
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def touch!(path, params)
|
33
|
+
MiniMagick.convert do |convert|
|
34
|
+
convert.density(SVG_DENSITY).background(params.background)
|
35
|
+
convert << params.favicon_svg
|
36
|
+
convert.resize("160x160")
|
37
|
+
convert.gravity("center").extent("180x180")
|
38
|
+
convert << path
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def mask!(path, params)
|
43
|
+
MiniMagick.convert do |convert|
|
44
|
+
convert.density(SVG_DENSITY).background(params.background)
|
45
|
+
convert << params.favicon_svg
|
46
|
+
convert.resize("409x409")
|
47
|
+
convert.gravity("center").extent("512x512")
|
48
|
+
convert << path
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "vips"
|
4
|
+
|
5
|
+
module FaviconFactory
|
6
|
+
class VipsAdapter < BaseAdapter
|
7
|
+
def ico!(path, params)
|
8
|
+
png = Vips::Image.thumbnail(params.favicon_svg, 32).write_to_buffer(".png")
|
9
|
+
# https://www.meziantou.net/creating-ico-files-from-multiple-images-in-dotnet.htm
|
10
|
+
ico = [0, 1, 1].pack("S<*") + [32, 32, 0, 0].pack("C*") + [1, 32].pack("S<*") + [png.size, 22].pack("L<*") + png
|
11
|
+
file.write(path, ico)
|
12
|
+
end
|
13
|
+
|
14
|
+
def png!(path, params, size)
|
15
|
+
Vips::Image.thumbnail(params.favicon_svg, size).write_to_file(path)
|
16
|
+
end
|
17
|
+
|
18
|
+
def touch!(path, params)
|
19
|
+
svg = Vips::Image.thumbnail(params.favicon_svg, 160).gravity("centre", 180, 180)
|
20
|
+
image = square(180, params.background).composite(svg, :over)
|
21
|
+
image.write_to_file(path)
|
22
|
+
end
|
23
|
+
|
24
|
+
def mask!(path, params)
|
25
|
+
svg = Vips::Image.thumbnail(params.favicon_svg, 409).gravity("centre", 512, 512)
|
26
|
+
image = square(512, params.background).composite(svg, :over)
|
27
|
+
image.write_to_file(path)
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def square(size, hex)
|
33
|
+
pixel = (Vips::Image.black(1, 1) + hex2rgb(hex)).cast(:uchar)
|
34
|
+
pixel.embed(0, 0, size, size, extend: :copy)
|
35
|
+
end
|
36
|
+
|
37
|
+
def hex2rgb(hex)
|
38
|
+
hex = hex.delete_prefix("#")
|
39
|
+
r = hex[0..1].to_i(16)
|
40
|
+
g = hex[2..3].to_i(16)
|
41
|
+
b = hex[4..5].to_i(16)
|
42
|
+
[r, g, b]
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
data/lib/favicon_factory.rb
CHANGED
@@ -1,190 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "favicon_factory/version"
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
require_relative "favicon_factory/command"
|
5
|
+
require_relative "favicon_factory/cli"
|
6
|
+
require_relative "favicon_factory/base_adapter"
|
7
7
|
|
8
8
|
module FaviconFactory
|
9
|
-
|
10
|
-
|
11
|
-
Params = Data.define(:favicon_svg, :background) do
|
12
|
-
def dir
|
13
|
-
File.dirname(favicon_svg)
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
PngParams = Data.define(:favicon_svg, :background, :size) do
|
18
|
-
def self.from_params(size, params)
|
19
|
-
new(**params.to_h, size: size)
|
20
|
-
end
|
21
|
-
|
22
|
-
def dir
|
23
|
-
File.dirname(favicon_svg)
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
class Command
|
28
|
-
include TTY::Option
|
29
|
-
|
30
|
-
usage do
|
31
|
-
program "favicon_factory"
|
32
|
-
no_command
|
33
|
-
|
34
|
-
desc <<~DESC
|
35
|
-
`favicon_factory` generates from an SVG the minimal set of icons needed by modern browsers.
|
36
|
-
|
37
|
-
The source SVG is ideal for [modern browsers](https://caniuse.com/link-icon-svg). And it may contain a `<style>` tag with `@media (prefers-color-scheme: dark)` to support light/dark themes, which is ignored when generating favicons.
|
38
|
-
|
39
|
-
Icons will be generated in the same folder as the source SVG unless already existing:
|
40
|
-
|
41
|
-
- `favicon.ico` (32x32) for legacy browsers; serve it from `/favicon.ico` because tools, like RSS readers, just look there.
|
42
|
-
- `apple-touch-icon.png` (180x180) for Apple devices when adding a webpage to the home screen; a background and a padding around the icon is applied to make it look pretty.
|
43
|
-
- `manifest.webmanifest` that includes `icon-192.png` and `icon-512.png` for Android devices; the former for display on the home screen, and the latter for the splash screen while the PWA is loading.
|
44
|
-
DESC
|
45
|
-
|
46
|
-
example "favicon_factory path/to/favicon.svg"
|
47
|
-
example "favicon_factory --background red path/to/favicon.svg"
|
48
|
-
example "favicon_factory --background #000000 path/to/favicon.svg"
|
49
|
-
end
|
50
|
-
|
51
|
-
argument :favicon_svg do
|
52
|
-
name "favicon_svg"
|
53
|
-
desc "Path to the favicon.svg"
|
54
|
-
end
|
55
|
-
|
56
|
-
option :background do
|
57
|
-
short "-b"
|
58
|
-
long "--background string"
|
59
|
-
default "white"
|
60
|
-
desc "Background color for apple-touch-icon.png"
|
61
|
-
end
|
62
|
-
|
63
|
-
flag :help do
|
64
|
-
short "-h"
|
65
|
-
long "--help"
|
66
|
-
desc "Print usage"
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
class Cli
|
71
|
-
def self.call
|
72
|
-
exit new(ARGV, $stderr).call
|
73
|
-
end
|
74
|
-
|
75
|
-
attr_reader :stderr
|
76
|
-
|
77
|
-
def initialize(argv, stderr)
|
78
|
-
@argv = argv
|
79
|
-
@stderr = stderr
|
80
|
-
end
|
81
|
-
|
82
|
-
def call
|
83
|
-
stderr.puts "imagemagick v7 not found, please install for best results" unless MiniMagick.imagemagick7?
|
84
|
-
stderr.puts "inkscape not found, install inkscape for best results" unless TTY::Which.which("inkscape")
|
85
|
-
|
86
|
-
params, status = parse(@argv)
|
87
|
-
return status if status >= 0
|
88
|
-
|
89
|
-
[
|
90
|
-
Thread.new { create("favicon.ico", params) },
|
91
|
-
Thread.new { create("icon-192.png", PngParams.from_params(192, params)) },
|
92
|
-
Thread.new { create("icon-512.png", PngParams.from_params(512, params)) },
|
93
|
-
Thread.new { create("apple-touch-icon.png", params) },
|
94
|
-
Thread.new { create("manifest.webmanifest", params) }
|
95
|
-
]
|
96
|
-
.each(&:join)
|
97
|
-
|
98
|
-
stderr.puts <<~TEXT
|
99
|
-
Info: Add the following to the `<head>`
|
100
|
-
<!-- favicons generated with the favicon_factory gem -->
|
101
|
-
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
|
102
|
-
<link rel="icon" href="/favicon.ico" sizes="32x32">
|
103
|
-
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
104
|
-
<link rel="manifest" href="/manifest.webmanifest">
|
105
|
-
TEXT
|
106
|
-
|
107
|
-
0
|
108
|
-
end
|
109
|
-
|
110
|
-
private
|
111
|
-
|
112
|
-
def parse(argv)
|
113
|
-
command = Command.new.parse(argv)
|
114
|
-
params = command.params
|
115
|
-
return exit_message(0, command.help) if params.fetch(:help) == true
|
116
|
-
return exit_message(1, params.errors.summary) if params.errors.any?
|
117
|
-
|
118
|
-
params = params.to_h
|
119
|
-
favicon_svg = params.fetch(:favicon_svg)
|
120
|
-
return exit_message(1, "Error: #{favicon_svg} does not end with .svg") unless favicon_svg.end_with?(".svg")
|
121
|
-
return exit_message(1, "Error: #{favicon_svg} does not exist") unless File.exist?(favicon_svg)
|
122
|
-
|
123
|
-
[Params.new(favicon_svg: favicon_svg, background: params.fetch(:background)), -1]
|
124
|
-
end
|
125
|
-
|
126
|
-
def exit_message(status, message)
|
127
|
-
stderr.puts message
|
128
|
-
[nil, status]
|
129
|
-
end
|
130
|
-
|
131
|
-
def create(name, params)
|
132
|
-
path = File.join(params.dir, name)
|
133
|
-
if File.exist?(path)
|
134
|
-
stderr.puts "Info: Skipping #{path} because it already exists"
|
135
|
-
return
|
136
|
-
end
|
137
|
-
|
138
|
-
stderr.puts "Info: Generating #{path}"
|
139
|
-
create_by_name.fetch(name).call(path, params)
|
140
|
-
end
|
141
|
-
|
142
|
-
def create_by_name
|
143
|
-
{
|
144
|
-
"favicon.ico" => method(:ico!),
|
145
|
-
"icon-192.png" => method(:png!),
|
146
|
-
"icon-512.png" => method(:png!),
|
147
|
-
"apple-touch-icon.png" => method(:touch!),
|
148
|
-
"manifest.webmanifest" => method(:manifest!)
|
149
|
-
}
|
150
|
-
end
|
151
|
-
|
152
|
-
def ico!(path, params)
|
153
|
-
MiniMagick::Tool::Convert.new do |convert|
|
154
|
-
convert.density(SVG_DENSITY).background("none")
|
155
|
-
convert << params.favicon_svg
|
156
|
-
convert.resize("32x32")
|
157
|
-
convert << path
|
158
|
-
end
|
159
|
-
end
|
160
|
-
|
161
|
-
def png!(path, params)
|
162
|
-
MiniMagick::Tool::Convert.new do |convert|
|
163
|
-
convert.density(SVG_DENSITY).background("none")
|
164
|
-
convert << params.favicon_svg
|
165
|
-
convert.resize("#{params.size}x#{params.size}")
|
166
|
-
convert << path
|
167
|
-
end
|
168
|
-
end
|
169
|
-
|
170
|
-
def touch!(path, params)
|
171
|
-
MiniMagick::Tool::Convert.new do |convert|
|
172
|
-
convert.density(SVG_DENSITY).background(params.background)
|
173
|
-
convert << params.favicon_svg
|
174
|
-
convert.resize("160x160").gravity("center").extent("180x180")
|
175
|
-
convert << path
|
176
|
-
end
|
177
|
-
end
|
178
|
-
|
179
|
-
def manifest!(path, _params)
|
180
|
-
File.write(path, <<~MANIFEST)
|
181
|
-
{
|
182
|
-
"icons": [
|
183
|
-
{ "src": "/icon-192.png", "type": "image/png", "sizes": "192x192" },
|
184
|
-
{ "src": "/icon-512.png", "type": "image/png", "sizes": "512x512" }
|
185
|
-
]
|
186
|
-
}
|
187
|
-
MANIFEST
|
188
|
-
end
|
189
|
-
end
|
9
|
+
autoload(:ImageMagickAdapter, "favicon_factory/image_magick_adapter")
|
10
|
+
autoload(:VipsAdapter, "favicon_factory/vips_adapter")
|
190
11
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: favicon_factory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 3v0k4
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: mini_magick
|
@@ -16,14 +15,28 @@ dependencies:
|
|
16
15
|
requirements:
|
17
16
|
- - "~>"
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
18
|
+
version: '5.2'
|
20
19
|
type: :runtime
|
21
20
|
prerelease: false
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
23
22
|
requirements:
|
24
23
|
- - "~>"
|
25
24
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
25
|
+
version: '5.2'
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: ruby-vips
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - "~>"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2.2'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '2.2'
|
27
40
|
- !ruby/object:Gem::Dependency
|
28
41
|
name: tty-option
|
29
42
|
requirement: !ruby/object:Gem::Requirement
|
@@ -63,7 +76,12 @@ extra_rdoc_files: []
|
|
63
76
|
files:
|
64
77
|
- exe/favicon_factory
|
65
78
|
- lib/favicon_factory.rb
|
79
|
+
- lib/favicon_factory/base_adapter.rb
|
80
|
+
- lib/favicon_factory/cli.rb
|
81
|
+
- lib/favicon_factory/command.rb
|
82
|
+
- lib/favicon_factory/image_magick_adapter.rb
|
66
83
|
- lib/favicon_factory/version.rb
|
84
|
+
- lib/favicon_factory/vips_adapter.rb
|
67
85
|
homepage: https://github.com/3v0k4/favicon_factory
|
68
86
|
licenses:
|
69
87
|
- MIT
|
@@ -72,7 +90,6 @@ metadata:
|
|
72
90
|
source_code_uri: https://github.com/3v0k4/favicon_factory
|
73
91
|
changelog_uri: https://github.com/3v0k4/favicon_factory/blob/main/CHANGELOG.md
|
74
92
|
rubygems_mfa_required: 'true'
|
75
|
-
post_install_message:
|
76
93
|
rdoc_options: []
|
77
94
|
require_paths:
|
78
95
|
- lib
|
@@ -87,8 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
87
104
|
- !ruby/object:Gem::Version
|
88
105
|
version: '0'
|
89
106
|
requirements: []
|
90
|
-
rubygems_version: 3.
|
91
|
-
signing_key:
|
107
|
+
rubygems_version: 3.6.7
|
92
108
|
specification_version: 4
|
93
109
|
summary: Generate favicons from an SVG
|
94
110
|
test_files: []
|