fontawesome_subsetter 0.1.6 → 0.1.8

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: c3395a57402faa7fb58158786c202eb9a2f000086d2d245bce27987c94fbbbbe
4
- data.tar.gz: 9f012d76d36a0715d4b586819dad35c52864ad2c81594bdaa4cffd64e58b2809
3
+ metadata.gz: ee1a96f695d2d8ba25bf3ef9cbc67a1904b7e1b2dc8253725e3a2a908e488fc4
4
+ data.tar.gz: 3077455250275b5fffefa855d18339689f6858a1ace1f862cd60b490cda58c2b
5
5
  SHA512:
6
- metadata.gz: 28e09214a8a1908393e13d9748b0fd494addcffa6cfeb8838e531adfd1cfa6c8fd8903381c46f1e4fe317c8cba9e70725e2592078f7d899b13e676dc0a4c6ca5
7
- data.tar.gz: e0587974d644d2c006928c8dfa493fea56e1291b095f664825b561dce5cde1243806804e2b4f978916155db9379b3268530b044c97c67c3a96ebbf216e6ef9eb
6
+ metadata.gz: c4f0c881d6cc89e17990f9e02c367e1028f4abdc7196bba424dfa2e417556744769d4fdb1000b4de9db05555352c2967d715db0fe555761df054bec6477de511
7
+ data.tar.gz: 61bd9c7daad6fd89ce9d7e5dfec870868e6228e4153a47011e1d80bbac7558f4d1aeb3ab0173b8f98cec02455440b7cc79142ae4c229f1382f25ec76671fe689
data/README.md CHANGED
@@ -106,6 +106,25 @@ FontawesomeSubsetter.configure do | config |
106
106
  end
107
107
  ```
108
108
 
109
+ ## Deploying with Kamal (Docker)
110
+
111
+ `pyftsubset` must be available during `assets:precompile` in your Docker build stage. Add the following to the **build** stage of your Dockerfile:
112
+
113
+ ```dockerfile
114
+ # In the build stage, install pyftsubset for font subsetting
115
+ RUN apt-get update -qq && \
116
+ apt-get install --no-install-recommends -y python3 python3-pip python3-venv pipx && \
117
+ pipx ensurepath && \
118
+ pipx install fonttools && \
119
+ pipx inject fonttools brotli && \
120
+ ln -s /root/.local/bin/pyftsubset /usr/local/bin/pyftsubset && \
121
+ rm -rf /var/lib/apt/lists /var/cache/apt/archives
122
+ ```
123
+
124
+ Font subsetting runs automatically during `assets:precompile`, so no additional Dockerfile steps are needed — just make sure the line above appears before your `RUN ... assets:precompile` step.
125
+
126
+ The final (runtime) stage does **not** need `pyftsubset`; subsetted fonts are already baked into the image.
127
+
109
128
  ## License
110
129
 
111
130
  [MIT](LICENSE.txt) — Copyright (c) 2026
@@ -1,5 +1,5 @@
1
1
  module FontawesomeSubsetter
2
2
 
3
- VERSION = "0.1.6"
3
+ VERSION = "0.1.8"
4
4
 
5
5
  end
@@ -8,7 +8,7 @@ Puma::Plugin.create do
8
8
  @log_writer = launcher.log_writer
9
9
  @puma_pid = $PROCESS_ID
10
10
 
11
- launcher.events.on_booted do
11
+ launcher.events.after_booted do
12
12
 
13
13
  @fontawesome_pid = fork do
14
14
 
@@ -38,7 +38,7 @@ Puma::Plugin.create do
38
38
 
39
39
  end
40
40
 
41
- launcher.events.on_stopped { stop_fontawesome }
41
+ launcher.events.after_stopped { stop_fontawesome }
42
42
  end
43
43
 
44
44
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fontawesome_subsetter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - 16554289+optimuspwnius@users.noreply.github.com